mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[10748] Convert MonsterSay/Say and similar functions to ObjectGuid use.
This commit is contained in:
parent
12b80fec68
commit
f5cf98e9f4
11 changed files with 84 additions and 85 deletions
|
|
@ -1335,31 +1335,31 @@ void CreatureEventAI::DoScriptText(int32 textEntry, WorldObject* pSource, Unit*
|
|||
switch((*i).second.Type)
|
||||
{
|
||||
case CHAT_TYPE_SAY:
|
||||
pSource->MonsterSay(textEntry, (*i).second.Language, target ? target->GetGUID() : 0);
|
||||
pSource->MonsterSay(textEntry, (*i).second.Language, target ? target->GetObjectGuid() : ObjectGuid());
|
||||
break;
|
||||
case CHAT_TYPE_YELL:
|
||||
pSource->MonsterYell(textEntry, (*i).second.Language, target ? target->GetGUID() : 0);
|
||||
pSource->MonsterYell(textEntry, (*i).second.Language, target ? target->GetObjectGuid() : ObjectGuid());
|
||||
break;
|
||||
case CHAT_TYPE_TEXT_EMOTE:
|
||||
pSource->MonsterTextEmote(textEntry, target ? target->GetGUID() : 0);
|
||||
pSource->MonsterTextEmote(textEntry, target ? target->GetObjectGuid() : ObjectGuid());
|
||||
break;
|
||||
case CHAT_TYPE_BOSS_EMOTE:
|
||||
pSource->MonsterTextEmote(textEntry, target ? target->GetGUID() : 0, true);
|
||||
pSource->MonsterTextEmote(textEntry, target ? target->GetObjectGuid() : ObjectGuid(), true);
|
||||
break;
|
||||
case CHAT_TYPE_WHISPER:
|
||||
{
|
||||
if (target && target->GetTypeId() == TYPEID_PLAYER)
|
||||
pSource->MonsterWhisper(textEntry, target->GetGUID());
|
||||
pSource->MonsterWhisper(textEntry, target->GetObjectGuid());
|
||||
else sLog.outErrorDb("CreatureEventAI: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", textEntry);
|
||||
}break;
|
||||
case CHAT_TYPE_BOSS_WHISPER:
|
||||
{
|
||||
if (target && target->GetTypeId() == TYPEID_PLAYER)
|
||||
pSource->MonsterWhisper(textEntry, target->GetGUID(), true);
|
||||
pSource->MonsterWhisper(textEntry, target->GetObjectGuid(), true);
|
||||
else sLog.outErrorDb("CreatureEventAI: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", textEntry);
|
||||
}break;
|
||||
case CHAT_TYPE_ZONE_YELL:
|
||||
pSource->MonsterYellToZone(textEntry, (*i).second.Language, target ? target->GetGUID() : 0);
|
||||
pSource->MonsterYellToZone(textEntry, (*i).second.Language, target ? target->GetObjectGuid() : ObjectGuid());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue