* Modify .respawn command handler so that it does not work on pets, fixes crash in underlying object functions.

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2009-10-09 23:00:02 +02:00
parent a4adccef0f
commit 5654721269
+1 -1
View File
@@ -6188,7 +6188,7 @@ bool ChatHandler::HandleRespawnCommand(const char* /*args*/)
Unit* target = getSelectedUnit(); Unit* target = getSelectedUnit();
if(pl->GetSelection() && target) if(pl->GetSelection() && target)
{ {
if(target->GetTypeId()!=TYPEID_UNIT) if(target->GetTypeId()!=TYPEID_UNIT || target->isPet())
{ {
SendSysMessage(LANG_SELECT_CREATURE); SendSysMessage(LANG_SELECT_CREATURE);
SetSentErrorMessage(true); SetSentErrorMessage(true);