mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Core/CreatureAI: Implement CreatureAI::TalkToMap for all your map-wide talking needs. Could also replace Battleground::SendChatMessage
This commit is contained in:
@@ -187,7 +187,7 @@ class instance_culling_of_stratholme : public InstanceMapScript
|
||||
// Summon Chromie and global whisper
|
||||
if (Creature* chromie = instance->SummonCreature(NPC_CHROMIE_2, ChromieSummonPos))
|
||||
if (!instance->GetPlayers().isEmpty())
|
||||
sCreatureTextMgr->SendChat(chromie, SAY_CRATES_COMPLETED, NULL, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_MAP);
|
||||
chromie->AI()->TalkToMap(SAY_CRATES_COMPLETED);
|
||||
}
|
||||
DoUpdateWorldState(WORLDSTATE_CRATES_REVEALED, _crateCount);
|
||||
break;
|
||||
|
||||
@@ -664,7 +664,7 @@ public:
|
||||
Talk(SAY_BUFF_SPARK);
|
||||
}
|
||||
else if (spell->Id == SPELL_MALYGOS_BERSERK)
|
||||
sCreatureTextMgr->SendChat(me, EMOTE_HIT_BERSERKER_TIMER, NULL, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_MAP);
|
||||
TalkToMap(EMOTE_HIT_BERSERKER_TIMER);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
@@ -1113,8 +1113,7 @@ public:
|
||||
npc_power_sparkAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_instance = creature->GetInstanceScript();
|
||||
// Talk range was not enough for this encounter
|
||||
sCreatureTextMgr->SendChat(me, EMOTE_POWER_SPARK_SUMMONED, NULL, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_MAP);
|
||||
TalkToMap(EMOTE_POWER_SPARK_SUMMONED);
|
||||
MoveToMalygos();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user