Scripts/Commands: .npc info and .gobj info now show runtime AI typenames in addition to AIName/ScriptName.

Port From (https://github.com/TrinityCore/TrinityCore/commit/c4458dd08ebe442461c711d01b014c6ff268fde6)
This commit is contained in:
hondacrx
2021-10-14 19:44:58 -04:00
parent d6f5d10da5
commit be1afd7949
3 changed files with 14 additions and 7 deletions
+3
View File
@@ -179,6 +179,9 @@ namespace Game.Chat
handler.SendSysMessage(CypherStrings.NpcinfoArmor, target.GetArmor());
handler.SendSysMessage(CypherStrings.NpcinfoPosition, target.GetPositionX(), target.GetPositionY(), target.GetPositionZ());
handler.SendSysMessage(CypherStrings.ObjectInfoAIInfo, target.GetAIName(), target.GetScriptName());
var ai = target.GetAI();
if (ai != null)
handler.SendSysMessage(CypherStrings.ObjectInfoAIType, nameof(ai));
handler.SendSysMessage(CypherStrings.NpcinfoFlagsExtra, cInfo.FlagsExtra);
foreach (uint value in Enum.GetValues(typeof(CreatureFlagsExtra)))
if (cInfo.FlagsExtra.HasAnyFlag((CreatureFlagsExtra)value))