diff options
author | megamage <none@none> | 2009-04-30 12:01:38 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-30 12:01:38 -0500 |
commit | 1d5700ac13bc9c8fcbed3fa0c7bd7c66cf221f53 (patch) | |
tree | 9b0f3b66036b350fb34af788ab0a5cb21698bb79 /src | |
parent | 0e3453e6d4340b39a4972045891d843936958b30 (diff) |
*Update gobject state command.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Level3.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index c008a868994..259bba869e2 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -3042,7 +3042,14 @@ bool ChatHandler::HandleGameObjectStateCommand(const char* args) int32 type = atoi(ctype); if(type < 0) { - gobj->SendObjectDeSpawnAnim(gobj->GetGUID()); + if(type == -1) + gobj->SendObjectDeSpawnAnim(gobj->GetGUID()); + else if(type == -2) + { + WorldPacket data(SMSG_GAMEOBJECT_SPAWN_ANIM_OBSOLETE, 8); + data << gobj->GetGUID(); + gobj->SendMessageToSet(&data,true); + } return true; } @@ -3052,7 +3059,15 @@ bool ChatHandler::HandleGameObjectStateCommand(const char* args) int32 state = atoi(cstate); - gobj->SetByteValue(GAMEOBJECT_BYTES_1, type, state); + if(type < 4) + gobj->SetByteValue(GAMEOBJECT_BYTES_1, type, state); + else if(type == 4) + { + WorldPacket data(SMSG_GAMEOBJECT_CUSTOM_ANIM,8+4); + data << gobj->GetGUID(); + data << (uint32)(state); + gobj->SendMessageToSet(&data, true); + } PSendSysMessage("Set gobject type %d state %d", type, state); return true; |