aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2018-03-25 18:41:05 +0200
committerShauren <shauren.trinity@gmail.com>2018-03-25 18:41:05 +0200
commit0be08dd79c166b3de8ce42eaf5bf9d68fd204b0b (patch)
tree413b994e470e60b9cd52e4e10a96f9094d9864e2
parent82bf263f924144c7fb011acc8dcab3fe4d8c631b (diff)
Core/Commands: Allow modifying gameobject destructible state with .gobject set state command
-rw-r--r--src/server/scripts/Commands/cs_gobject.cpp7
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;