mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
Scripts/Commands: .npc info now includes react state info
(cherry picked from commit 2c030ed5e7)
This commit is contained in:
@@ -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");
|
||||
@@ -373,6 +373,18 @@ enum ReactStates
|
||||
REACT_ASSIST = 3
|
||||
};
|
||||
|
||||
static char const* DescribeReactState(ReactStates state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case REACT_PASSIVE: return "PASSIVE";
|
||||
case REACT_DEFENSIVE: return "DEFENSIVE";
|
||||
case REACT_AGGRESSIVE: return "AGGRESSIVE";
|
||||
case REACT_ASSIST: return "ASSIST";
|
||||
default: return "<Invalid react state>";
|
||||
}
|
||||
}
|
||||
|
||||
enum CommandStates : uint8
|
||||
{
|
||||
COMMAND_STAY = 0,
|
||||
|
||||
@@ -996,7 +996,7 @@ enum TrinityStrings
|
||||
LANG_BATTLEGROUND = 5015,
|
||||
LANG_ARENA = 5016,
|
||||
LANG_RAID = 5017,
|
||||
LANG_NPCINFO_PHASE_IDS = 5018,
|
||||
LANG_NPCINFO_REACTSTATE = 5018,
|
||||
LANG_COMMAND_TEMP_FROZEN_PLAYER = 5019,
|
||||
LANG_NPCINFO_PHASES = 5020,
|
||||
LANG_NPCINFO_ARMOR = 5021,
|
||||
@@ -1074,8 +1074,9 @@ enum TrinityStrings
|
||||
LANG_NPCINFO_UNIT_FIELD_FLAGS_2 = 5084,
|
||||
LANG_NPCINFO_UNIT_FIELD_FLAGS_3 = 5085,
|
||||
LANG_NPCINFO_NPC_FLAGS = 5086,
|
||||
LANG_NPCINFO_PHASE_IDS = 5087,
|
||||
|
||||
// Room for more Trinity strings 5087-6603
|
||||
// Room for more Trinity strings 5088-6603
|
||||
// Level requirement notifications
|
||||
LANG_SAY_REQ = 6604,
|
||||
LANG_WHISPER_REQ = 6605,
|
||||
|
||||
@@ -877,6 +877,7 @@ 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());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_REACTSTATE, DescribeReactState(target->GetReactState()));
|
||||
if (CreatureAI const* ai = target->AI())
|
||||
handler->PSendSysMessage(LANG_OBJECTINFO_AITYPE, boost::core::demangle(typeid(*ai).name()).c_str());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_FLAGS_EXTRA, cInfo->flags_extra);
|
||||
|
||||
Reference in New Issue
Block a user