Core/CreatureAI: Implement CreatureAI::TalkToMap for all your map-wide talking needs. Could also replace Battleground::SendChatMessage
This commit is contained in:
1 parent
8769207854
commit
eb414532fe
4 files changed
+9
-4
No files matched your search
@@ -43,6 +43,11 @@ void CreatureAI::Talk(uint8 id, WorldObject const* whisperTarget /*= NULL*/)
|
||||
sCreatureTextMgr->SendChat(me, id, whisperTarget);
|
||||
}
|
||||
|
||||
void CreatureAI::TalkToMap(uint8 id, WorldObject const* whisperTarget /*= NULL*/)
|
||||
{
|
||||
sCreatureTextMgr->SendChat(me, id, whisperTarget, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_MAP);
|
||||
}
|
||||
|
||||
void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/, float maxRangeToNearestTarget /* = 50.0f*/)
|
||||
{
|
||||
if (!creature)
|
||||
|
||||
@@ -79,6 +79,7 @@ class CreatureAI : public UnitAI
|
||||
|
||||
public:
|
||||
void Talk(uint8 id, WorldObject const* whisperTarget = NULL);
|
||||
void TalkToMap(uint8 id, WorldObject const* whisperTarget = NULL);
|
||||
explicit CreatureAI(Creature* creature) : UnitAI(creature), me(creature), m_MoveInLineOfSight_locked(false) { }
|
||||
|
||||
virtual ~CreatureAI() { }
|
||||
|
||||
Reference in new issue
Block a user