mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Commands/Npc: Add AIName/ScriptName to npc info
Thanks Aokromes for suggestion
This commit is contained in:
3
sql/updates/world/2011_12_18_03_world_trinity_string.sql
Normal file
3
sql/updates/world/2011_12_18_03_world_trinity_string.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `trinity_string` WHERE `entry`=5031;
|
||||
INSERT INTO `trinity_string` (`entry`,`content_default`) VALUES
|
||||
(5031, 'AIName: %s ScriptName: %s');
|
||||
@@ -946,8 +946,9 @@ enum TrinityStrings
|
||||
LANG_GOINFO_NAME = 5027,
|
||||
LANG_GOINFO_LOOTID = 5028,
|
||||
LANG_COMMAND_LOOKUP_MAX_RESULTS = 5029,
|
||||
// Room for more Trinity strings 5030-9999
|
||||
LANG_FLEE = 5030,
|
||||
LANG_NPCINFO_AIINFO = 5031,
|
||||
// Room for more Trinity strings 5032-9999
|
||||
|
||||
// Level requirement notifications
|
||||
LANG_SAY_REQ = 6604,
|
||||
|
||||
@@ -552,15 +552,13 @@ public:
|
||||
handler->PSendSysMessage(LANG_NPCINFO_PHASEMASK, target->GetPhaseMask());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_ARMOR, target->GetArmor());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_POSITION, float(target->GetPositionX()), float(target->GetPositionY()), float(target->GetPositionZ()));
|
||||
handler->PSendSysMessage(LANG_NPCINFO_AIINFO, target->GetAIName().c_str(), target->GetScriptName().c_str());
|
||||
|
||||
if ((npcflags & UNIT_NPC_FLAG_VENDOR))
|
||||
{
|
||||
if (npcflags & UNIT_NPC_FLAG_VENDOR)
|
||||
handler->SendSysMessage(LANG_NPCINFO_VENDOR);
|
||||
}
|
||||
if ((npcflags & UNIT_NPC_FLAG_TRAINER))
|
||||
{
|
||||
|
||||
if (npcflags & UNIT_NPC_FLAG_TRAINER)
|
||||
handler->SendSysMessage(LANG_NPCINFO_TRAINER);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user