Some Creature* casts moved to new ToCreature.

Added const Creature* ToCreature()

--HG--
branch : trunk
This commit is contained in:
raczman
2010-03-07 18:30:53 +01:00
parent 9a8f10fa30
commit 07f3b91426
29 changed files with 280 additions and 279 deletions

View File

@@ -324,7 +324,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
else
{
// not have spell in spellbook or spell passive and not casted by client
if ((mover->GetTypeId() == TYPEID_UNIT && !((Creature*)mover)->HasSpell(spellId)) || IsPassiveSpell(spellId))
if ((mover->GetTypeId() == TYPEID_UNIT && !mover->ToCreature()->HasSpell(spellId)) || IsPassiveSpell(spellId))
{
//cheater? kick? ban?
recvPacket.rpos(recvPacket.wpos()); // prevent spam at ignore packet