diff options
author | Shauren <shauren.trinity@gmail.com> | 2018-03-25 18:41:05 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2018-03-25 18:41:05 +0200 |
commit | 0be08dd79c166b3de8ce42eaf5bf9d68fd204b0b (patch) | |
tree | 413b994e470e60b9cd52e4e10a96f9094d9864e2 /src/server/scripts | |
parent | 82bf263f924144c7fb011acc8dcab3fe4d8c631b (diff) |
Core/Commands: Allow modifying gameobject destructible state with .gobject set state command
Diffstat (limited to 'src/server/scripts')
-rw-r--r-- | src/server/scripts/Commands/cs_gobject.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp index e2a1f8172a4..8f1f2b98120 100644 --- a/src/server/scripts/Commands/cs_gobject.cpp +++ b/src/server/scripts/Commands/cs_gobject.cpp @@ -663,6 +663,13 @@ public: object->SetByteValue(GAMEOBJECT_BYTES_1, uint8(objectType), uint8(objectState)); else if (objectType == 4) object->SendCustomAnim(objectState); + else if (objectType == 5) + { + if (objectState < 0 || objectState > GO_DESTRUCTIBLE_REBUILDING) + return false; + + object->SetDestructibleState(GameObjectDestructibleState(objectState)); + } handler->PSendSysMessage("Set gobject type %d state %d", objectType, objectState); return true; |