mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[9475] Add and use TotemSlot enum type
This commit is contained in:
parent
7e2d7d8324
commit
ded1e3c263
10 changed files with 85 additions and 82 deletions
|
|
@ -521,15 +521,11 @@ void WorldSession::HandleTotemDestroyed( WorldPacket& recvPacket)
|
|||
|
||||
recvPacket >> slotId;
|
||||
|
||||
if (slotId >= MAX_TOTEM)
|
||||
if (int(slotId) >= MAX_TOTEM_SLOT)
|
||||
return;
|
||||
|
||||
if(!_player->m_TotemSlot[slotId])
|
||||
return;
|
||||
|
||||
Creature* totem = GetPlayer()->GetMap()->GetCreature(_player->m_TotemSlot[slotId]);
|
||||
if(totem && totem->isTotem())
|
||||
((Totem*)totem)->UnSummon();
|
||||
if (Totem* totem = GetPlayer()->GetTotem(TotemSlot(slotId)))
|
||||
totem->UnSummon();
|
||||
}
|
||||
|
||||
void WorldSession::HandleSelfResOpcode( WorldPacket & /*recv_data*/ )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue