diff options
author | megamage <none@none> | 2009-04-29 17:48:32 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-29 17:48:32 -0500 |
commit | 6fbe69c2db396d8fc754401a1a730a798a8b8eb7 (patch) | |
tree | f9fd9bb27a17803d2d962e60b29ffcbe1e0ced8f /src | |
parent | ba7bcb02b56dde65d7642def7a6e818937a0b977 (diff) |
*Allow gm command to set other types of state.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Level3.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index 0b222bb9741..c008a868994 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -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; } |