*Allow gm command to set other types of state.

--HG--
branch : trunk
This commit is contained in:
megamage committed 2009-04-29 17:48:32 -05:00
1 parent ba7bcb02b5
commit 6fbe69c2db
2 files changed
+15 -5

No files matched your search

+14 -4
View File
@@ -3035,15 +3035,25 @@ bool ChatHandler::HandleGameObjectStateCommand(const char* args)
return false;
}
char* ctype = strtok(NULL, " ");
if(!ctype)
return false;
int32 type = atoi(ctype);
if(type < 0)
{
gobj->SendObjectDeSpawnAnim(gobj->GetGUID());
return true;
}
char* cstate = strtok(NULL, " ");
if(!cstate)
return false;
int32 state = atoi(cstate);
if(state < 0)
gobj->SendObjectDeSpawnAnim(gobj->GetGUID());
else
gobj->SetGoState((GOState)state);
gobj->SetByteValue(GAMEOBJECT_BYTES_1, type, state);
PSendSysMessage("Set gobject type %d state %d", type, state);
return true;
}