fix: improve skill management in InventoryComponent to ensure correct client updates

This commit is contained in:
Aaron Kimbrell
2026-06-09 16:03:15 -05:00
parent 54dc3a0b80
commit dd24e20165
3 changed files with 45 additions and 9 deletions

View File

@@ -159,6 +159,10 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream& inStream, const System
InventoryComponent* inv = entity->GetComponent<InventoryComponent>();
if (inv) {
// Clear server-side skill state so AddItemSkills sends fresh AddSkill
// packets to the now-ready client. Skills sent during entity construction
// (Serialize) arrive before LWOSkillComponent is initialized and are dropped.
inv->ClearSkills();
auto items = inv->GetEquippedItems();
for (auto pair : items) {
const auto item = pair.second;