diff options
-rw-r--r-- | sql/updates/world/3.3.5/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/3.3.5/2018_07_18_00_world.sql b/sql/updates/world/3.3.5/2018_07_18_00_world.sql new file mode 100644 index 00000000000..0bd363d816a --- /dev/null +++ b/sql/updates/world/3.3.5/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 6c4afef784b..bf5f5c8ed4e 100644 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -1062,6 +1062,7 @@ enum TrinityStrings LANG_LIST_RESPAWNS_OVERDUE = 5080, LANG_LIST_RESPAWNS_CREATURES = 5081, LANG_LIST_RESPAWNS_GAMEOBJECTS = 5082, + LANG_OBJECTINFO_AITYPE = 5083, // Room for more Trinity strings 5084-6603 diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp index 45a816a6a77..5d5cec9fc3e 100644 --- a/src/server/scripts/Commands/cs_gobject.cpp +++ b/src/server/scripts/Commands/cs_gobject.cpp @@ -27,6 +27,7 @@ EndScriptData */ #include "DatabaseEnv.h" #include "DBCStores.h" #include "GameEventMgr.h" +#include "GameObjectAI.h" #include "GameTime.h" #include "Language.h" #include "Log.h" @@ -670,16 +671,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()); @@ -697,6 +697,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->maxX, modelInfo->maxY, modelInfo->maxZ, modelInfo->minX, modelInfo->minY, modelInfo->minZ); diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 02f6e4765d4..0bb08cb9c79 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -811,6 +811,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) |