Core/Commands: Allow modifying gameobject destructible state with .gobject set state command

This commit is contained in:
Shauren
2018-03-25 18:41:05 +02:00
parent 82bf263f92
commit 0be08dd79c

View File

@@ -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;