Scripts/Commands: .npc info now includes react state info

Port From (https://github.com/TrinityCore/TrinityCore/commit/dd239e8b0f945a70c9d738024bdc2d75d54575f4)
This commit is contained in:
hondacrx
2021-11-02 14:03:25 -04:00
parent 6f27d79873
commit aebbc968eb
3 changed files with 7 additions and 2 deletions
+3 -2
View File
@@ -1023,7 +1023,7 @@ namespace Framework.Constants
Battleground = 5015, Battleground = 5015,
Arena = 5016, Arena = 5016,
Raid = 5017, Raid = 5017,
NpcinfoPhaseIds = 5018, NpcinfoReactState = 5018,
CommandTempFrozenPlayer = 5019, CommandTempFrozenPlayer = 5019,
NpcinfoPhases = 5020, NpcinfoPhases = 5020,
NpcinfoArmor = 5021, NpcinfoArmor = 5021,
@@ -1101,8 +1101,9 @@ namespace Framework.Constants
NpcinfoUnitFieldFlags2 = 5084, NpcinfoUnitFieldFlags2 = 5084,
NpcinfoUnitFieldFlags3 = 5085, NpcinfoUnitFieldFlags3 = 5085,
NpcinfoNpcFlags = 5086, NpcinfoNpcFlags = 5086,
NpcinfoPhaseIds = 5087,
// Room For More Trinity Strings 5087-6603 // Room For More Trinity Strings 5088-6603
// Level Requirement Notifications // Level Requirement Notifications
SayReq = 6604, SayReq = 6604,
+1
View File
@@ -179,6 +179,7 @@ namespace Game.Chat
handler.SendSysMessage(CypherStrings.NpcinfoArmor, target.GetArmor()); handler.SendSysMessage(CypherStrings.NpcinfoArmor, target.GetArmor());
handler.SendSysMessage(CypherStrings.NpcinfoPosition, target.GetPositionX(), target.GetPositionY(), target.GetPositionZ()); handler.SendSysMessage(CypherStrings.NpcinfoPosition, target.GetPositionX(), target.GetPositionY(), target.GetPositionZ());
handler.SendSysMessage(CypherStrings.ObjectInfoAIInfo, target.GetAIName(), target.GetScriptName()); handler.SendSysMessage(CypherStrings.ObjectInfoAIInfo, target.GetAIName(), target.GetScriptName());
handler.SendSysMessage(CypherStrings.NpcinfoReactState, target.GetReactState());
var ai = target.GetAI(); var ai = target.GetAI();
if (ai != null) if (ai != null)
handler.SendSysMessage(CypherStrings.ObjectInfoAIType, nameof(ai)); handler.SendSysMessage(CypherStrings.ObjectInfoAIType, nameof(ai));
@@ -0,0 +1,3 @@
UPDATE `trinity_string` SET `entry`=5087 WHERE `entry`=5018;
DELETE FROM `trinity_string` WHERE `entry`=5018;
INSERT INTO `trinity_string` (`entry`,`content_default`) VALUES (5018,"React state: %s");