fix: handling of the same skill on multiple items (#1990)

* refactor: update behavior slot determination to use equipLocation instead of itemType

* fix: improve skill management in InventoryComponent to ensure correct client updates
This commit is contained in:
Aaron Kimbrell
2026-06-22 19:16:57 -05:00
committed by GitHub
parent 5745742c91
commit 5d523a1e7b
3 changed files with 59 additions and 32 deletions

View File

@@ -367,11 +367,10 @@ public:
void RemoveDatabasePet(LWOOBJID id);
/**
* Returns the current behavior slot active for the passed item type
* @param type the item type to find the behavior slot for
* @return the current behavior slot active for the passed item type
* Returns the behavior slot for the given equipLocation string.
* This is the authoritative mapping used for skill slot assignment.
*/
static BehaviorSlot FindBehaviorSlot(eItemType type);
static BehaviorSlot FindBehaviorSlot(const std::string& equipLocation);
/**
* Checks if the inventory type is a temp inventory
@@ -403,6 +402,8 @@ public:
std::map<BehaviorSlot, uint32_t> GetSkills() { return m_Skills; };
void ClearSkills() { m_Skills.clear(); };
bool SetSkill(int slot, uint32_t skillId);
bool SetSkill(BehaviorSlot slot, uint32_t skillId);