mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-18 01:35:27 +00:00
fix(inventory): adding an inventory group that exists does nothing, as the client
LWOInventoryComponent_Common::msgUpdateInventoryGroup (0x00c955b0) ignores an ADD whose group id is already in the inventory. The server added a second group with the same id, saved to the charxml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1998,6 +1998,9 @@ void InventoryComponent::UpdateGroup(const GroupUpdate& groupUpdate) {
|
||||
return group.groupId == groupUpdate.groupId;
|
||||
});
|
||||
|
||||
// As LWOInventoryComponent_Common::msgUpdateInventoryGroup (0x00c955b0): adding a group that exists does nothing
|
||||
if (groupUpdate.command == GroupUpdateCommand::ADD && groupItr != groups.end()) return;
|
||||
|
||||
if (groupUpdate.command != GroupUpdateCommand::ADD && groupItr == groups.end()) {
|
||||
LOG("Group %s not found in inventory %s. Cannot process command.", groupUpdate.groupId.c_str(), StringifiedEnum::ToString(groupUpdate.inventory).data());
|
||||
return;
|
||||
|
||||
@@ -453,6 +453,7 @@ public:
|
||||
bool SetSkill(BehaviorSlot slot, uint32_t skillId);
|
||||
|
||||
void UpdateGroup(const GroupUpdate& groupUpdate);
|
||||
const std::map<eInventoryType, std::vector<Group>>& GetGroups() const { return m_Groups; }
|
||||
|
||||
std::unordered_map<LWOOBJID, DatabasePet>& GetPetsMut() { return m_Pets; };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user