mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
Core/Player: Fix equipment sets not saving correctly
New sets were always saved to _equipmentSets[0], overwriting eachother
This commit is contained in:
@@ -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