Core/Player: Fix equipment sets not saving correctly
New sets were always saved to _equipmentSets[0], overwriting eachother
This commit is contained in:
1 parent
eec9ef54b6
commit
c8d6fc99c0
1 file changed
+4
-4
@@ -26520,14 +26520,14 @@ void Player::SetEquipmentSet(EquipmentSetInfo::EquipmentSetData const& eqSet)
|
||||
}
|
||||
}
|
||||
|
||||
EquipmentSetInfo& eqSlot = _equipmentSets[eqSet.Guid];
|
||||
uint64 setGuid = (eqSet.Guid != 0) ? eqSet.Guid : sObjectMgr->GenerateEquipmentSetGuid();
|
||||
|
||||
EquipmentSetUpdateState oldState = eqSlot.State;
|
||||
EquipmentSetInfo& eqSlot = _equipmentSets[setGuid];
|
||||
eqSlot.Data = eqSet;
|
||||
|
||||
if (eqSet.Guid == 0)
|
||||
{
|
||||
eqSlot.Data.Guid = sObjectMgr->GenerateEquipmentSetGuid();
|
||||
eqSlot.Data.Guid = setGuid;
|
||||
|
||||
WorldPacket data(SMSG_EQUIPMENT_SET_SAVED, 4 + 1);
|
||||
data << uint32(eqSlot.Data.SetID);
|
||||
@@ -26535,7 +26535,7 @@ void Player::SetEquipmentSet(EquipmentSetInfo::EquipmentSetData const& eqSet)
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
eqSlot.State = (oldState == EQUIPMENT_SET_NEW ? EQUIPMENT_SET_NEW : EQUIPMENT_SET_CHANGED);
|
||||
eqSlot.State = (eqSlot.State == EQUIPMENT_SET_NEW ? EQUIPMENT_SET_NEW : EQUIPMENT_SET_CHANGED);
|
||||
}
|
||||
|
||||
void Player::_SaveEquipmentSets(CharacterDatabaseTransaction& trans)
|
||||
|
||||
Reference in new issue
Block a user