Fix skill slot assignment to use equipLocation instead of itemType

- Add FindBehaviorSlotByEquipLocation method to map equipLocation strings to BehaviorSlot enum
- Update AddItemSkills and RemoveItemSkills to use equipLocation instead of itemType
- This fixes issue where items with same skill but different equipLocations would conflict
- Add unit tests to verify the new behavior
- Based on issue #1339: Server doesn't allow same skill in multiple slots

Co-authored-by: aronwk-aaron <26027722+aronwk-aaron@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-09-02 21:10:50 +00:00
parent a66abfa1e9
commit 7be7b37b8d
4 changed files with 57 additions and 2 deletions

View File

@@ -368,6 +368,13 @@ public:
*/
static BehaviorSlot FindBehaviorSlot(eItemType type);
/**
* Returns the behavior slot for the given equipment location
* @param equipLocation the equipment location to find the behavior slot for
* @return the behavior slot for the given equipment location
*/
static BehaviorSlot FindBehaviorSlotByEquipLocation(const std::string& equipLocation);
/**
* Checks if the inventory type is a temp inventory
* @param type the inventory type to check