mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
Core/Commands: Allow modifying gameobject destructible state with .gobject set state command
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user