@@ -5985,7 +5985,7 @@ void Player::SendActionButtons(uint32 state) const
59855985
59865986 packet.Reason = state;
59875987
5988- GetSession()->SendPacket (packet.Write());
5988+ SendDirectMessage (packet.Write());
59895989}
59905990
59915991bool Player::IsActionButtonDataValid(uint8 button, uint32 action, uint8 type) const
@@ -25373,33 +25373,33 @@ void Player::SendEquipmentSetList()
2537325373 SendDirectMessage(data.Write());
2537425374}
2537525375
25376- void Player::SetEquipmentSet(EquipmentSetInfo::EquipmentSetData const& eqSet )
25376+ void Player::SetEquipmentSet(EquipmentSetInfo::EquipmentSetData const& newEqSet )
2537725377{
25378- if (eqSet .Guid != 0)
25378+ if (newEqSet .Guid != 0)
2537925379 {
2538025380 // something wrong...
25381- auto itr = _equipmentSets.find(eqSet .Guid);
25382- if (itr == _equipmentSets.end() || itr->second.Data.Guid != eqSet .Guid)
25381+ auto itr = _equipmentSets.find(newEqSet .Guid);
25382+ if (itr == _equipmentSets.end() || itr->second.Data.Guid != newEqSet .Guid)
2538325383 {
2538425384 TC_LOG_ERROR("entities.player", "Player::SetEquipmentSet: Player '{}' ({}) tried to save nonexistent equipment set {} (index: {})",
25385- GetName(), GetGUID().ToString(), eqSet .Guid, eqSet .SetID);
25385+ GetName(), GetGUID().ToString(), newEqSet .Guid, newEqSet .SetID);
2538625386 return;
2538725387 }
2538825388 }
2538925389
25390- uint64 setGuid = (eqSet .Guid != 0) ? eqSet .Guid : sObjectMgr->GenerateEquipmentSetGuid();
25390+ uint64 setGuid = (newEqSet .Guid != 0) ? newEqSet .Guid : sObjectMgr->GenerateEquipmentSetGuid();
2539125391
2539225392 EquipmentSetInfo& eqSlot = _equipmentSets[setGuid];
25393- eqSlot.Data = eqSet ;
25393+ eqSlot.Data = newEqSet ;
2539425394
25395- if (eqSet .Guid == 0)
25395+ if (eqSlot.Data .Guid == 0)
2539625396 {
2539725397 eqSlot.Data.Guid = setGuid;
2539825398
25399- WorldPacket data(SMSG_EQUIPMENT_SET_SAVED, 4 + 1) ;
25400- data << uint32( eqSlot.Data.SetID) ;
25401- data.appendPackGUID( eqSlot.Data.Guid) ;
25402- SendDirectMessage(& data);
25399+ WorldPackets::EquipmentSet::EquipmentSetID data;
25400+ data.GUID = eqSlot.Data.Guid ;
25401+ data.SetID = eqSlot.Data.SetID ;
25402+ SendDirectMessage(data.Write() );
2540325403 }
2540425404
2540525405 eqSlot.State = (eqSlot.State == EQUIPMENT_SET_NEW ? EQUIPMENT_SET_NEW : EQUIPMENT_SET_CHANGED);
@@ -25476,11 +25476,11 @@ void Player::_SaveBGData(CharacterDatabaseTransaction trans)
2547625476 trans->Append(stmt);
2547725477}
2547825478
25479- void Player::DeleteEquipmentSet(uint64 setGuid )
25479+ void Player::DeleteEquipmentSet(uint64 id )
2548025480{
2548125481 for (EquipmentSetContainer::iterator itr = _equipmentSets.begin(); itr != _equipmentSets.end();)
2548225482 {
25483- if (itr->second.Data.Guid == setGuid )
25483+ if (itr->second.Data.Guid == id )
2548425484 {
2548525485 if (itr->second.State == EQUIPMENT_SET_NEW)
2548625486 itr = _equipmentSets.erase(itr);
0 commit comments