[9475] Add and use TotemSlot enum type

This commit is contained in:
VladimirMangos 2010-02-28 07:18:43 +03:00
parent 7e2d7d8324
commit ded1e3c263
10 changed files with 85 additions and 82 deletions

View file

@ -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*/ )