diff options
-rw-r--r-- | sql/updates/world/master/2021_10_14_06_world_2018_07_18_00_world.sql | 3 | ||||
-rw-r--r-- | src/server/game/Miscellaneous/Language.h | 1 | ||||
-rw-r--r-- | src/server/scripts/Commands/cs_gobject.cpp | 14 | ||||
-rw-r--r-- | src/server/scripts/Commands/cs_npc.cpp | 2 |
4 files changed, 14 insertions, 6 deletions
diff --git a/sql/updates/world/master/2021_10_14_06_world_2018_07_18_00_world.sql b/sql/updates/world/master/2021_10_14_06_world_2018_07_18_00_world.sql new file mode 100644 index 00000000000..0bd363d816a --- /dev/null +++ b/sql/updates/world/master/2021_10_14_06_world_2018_07_18_00_world.sql @@ -0,0 +1,3 @@ +-- +DELETE FROM `trinity_string` WHERE `entry`=5083; +INSERT INTO `trinity_string` (`entry`,`content_default`) VALUES (5083,"Active AI: %s"); diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index bc672dda42f..88dab80ad4c 100644 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -1067,6 +1067,7 @@ enum TrinityStrings LANG_LIST_RESPAWNS_OVERDUE = 5080, LANG_LIST_RESPAWNS_CREATURES = 5081, LANG_LIST_RESPAWNS_GAMEOBJECTS = 5082, + LANG_OBJECTINFO_AITYPE = 5083, LANG_NPCINFO_UNIT_FIELD_FLAGS_2 = 5084, LANG_NPCINFO_UNIT_FIELD_FLAGS_3 = 5085, diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp index 0b0d7792874..52dc4f52588 100644 --- a/src/server/scripts/Commands/cs_gobject.cpp +++ b/src/server/scripts/Commands/cs_gobject.cpp @@ -28,6 +28,7 @@ EndScriptData */ #include "DB2Stores.h" #include "GameEventMgr.h" #include "GameObject.h" +#include "GameObjectAI.h" #include "GameTime.h" #include "Language.h" #include "Log.h" @@ -658,16 +659,15 @@ public: handler->PSendSysMessage(LANG_GOINFO_LOOTID, lootId); handler->PSendSysMessage(LANG_GOINFO_DISPLAYID, displayId); - if (WorldObject* object = handler->getSelectedObject()) + if (thisGO) { - if (object->ToGameObject() && object->ToGameObject()->GetGameObjectData() && object->ToGameObject()->GetGameObjectData()->spawnGroupData->groupId) + if (thisGO->GetGameObjectData() && thisGO->GetGameObjectData()->spawnGroupData->groupId) { - SpawnGroupTemplateData const* groupData = object->ToGameObject()->GetGameObjectData()->spawnGroupData; - handler->PSendSysMessage(LANG_SPAWNINFO_GROUP_ID, groupData->name.c_str(), groupData->groupId, groupData->flags, object->GetMap()->IsSpawnGroupActive(groupData->groupId)); + SpawnGroupTemplateData const* groupData = thisGO->GetGameObjectData()->spawnGroupData; + handler->PSendSysMessage(LANG_SPAWNINFO_GROUP_ID, groupData->name.c_str(), groupData->groupId, groupData->flags, thisGO->GetMap()->IsSpawnGroupActive(groupData->groupId)); } - if (object->ToGameObject()) - handler->PSendSysMessage(LANG_SPAWNINFO_COMPATIBILITY_MODE, object->ToGameObject()->GetRespawnCompatibilityMode()); + handler->PSendSysMessage(LANG_SPAWNINFO_COMPATIBILITY_MODE, thisGO->GetRespawnCompatibilityMode()); } handler->PSendSysMessage(LANG_GOINFO_NAME, name.c_str()); @@ -685,6 +685,8 @@ public: handler->PSendSysMessage(LANG_GOINFO_ADDON, goOverride->Faction, goOverride->Flags); handler->PSendSysMessage(LANG_OBJECTINFO_AIINFO, gameObjectInfo->AIName.c_str(), sObjectMgr->GetScriptName(gameObjectInfo->ScriptId).c_str()); + if (GameObjectAI const* ai = thisGO ? thisGO->AI() : nullptr) + handler->PSendSysMessage(LANG_OBJECTINFO_AITYPE, typeid(*ai).name()); if (GameObjectDisplayInfoEntry const* modelInfo = sGameObjectDisplayInfoStore.LookupEntry(displayId)) handler->PSendSysMessage(LANG_GOINFO_MODEL, modelInfo->GeoBoxMax.X, modelInfo->GeoBoxMax.Y, modelInfo->GeoBoxMax.Z, modelInfo->GeoBoxMin.X, modelInfo->GeoBoxMin.Y, modelInfo->GeoBoxMin.Z); diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 03dd4b9c1a9..102e0917862 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -875,6 +875,8 @@ public: handler->PSendSysMessage(LANG_NPCINFO_ARMOR, target->GetArmor()); handler->PSendSysMessage(LANG_NPCINFO_POSITION, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ()); handler->PSendSysMessage(LANG_OBJECTINFO_AIINFO, target->GetAIName().c_str(), target->GetScriptName().c_str()); + if (CreatureAI const* ai = target->AI()) + handler->PSendSysMessage(LANG_OBJECTINFO_AITYPE, typeid(*ai).name()); handler->PSendSysMessage(LANG_NPCINFO_FLAGS_EXTRA, cInfo->flags_extra); for (uint8 i = 0; i < FLAGS_EXTRA_COUNT; ++i) if (cInfo->flags_extra & flagsExtra[i].Value) |