aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Level3.cpp18
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;
}