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

@@ -4544,7 +4544,7 @@ bool ChatHandler::HandleNpcChangeEntryCommand(const char *args)
SetSentErrorMessage(true);
return false;
}
Creature* creature = (Creature*)unit;
Creature* creature = unit->ToCreature();
if(creature->UpdateEntry(newEntryNum))
SendSysMessage(LANG_DONE);
else
@@ -6182,7 +6182,7 @@ bool ChatHandler::HandleRespawnCommand(const char* /*args*/)
}
if(target->isDead())
((Creature*)target)->Respawn();
target->ToCreature()->Respawn();
return true;
}