[9644] Changes in emotes work.

Waypoint/db script/event ai/'.npc playemote' emote data now auto select by emote id way to execute:
oneshot or persistent state

So if in referenced DB data wrongly used state emote as oneshot case this will work in different way now.
This commit is contained in:
VladimirMangos 2010-03-30 22:06:20 +04:00
parent bf1903345b
commit 5c7f6356d6
9 changed files with 35 additions and 8 deletions

View file

@ -424,7 +424,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
m_creature->PlayDirectSound(action.sound.soundId);
break;
case ACTION_T_EMOTE:
m_creature->HandleEmoteCommand(action.emote.emoteId);
m_creature->HandleEmote(action.emote.emoteId);
break;
case ACTION_T_RANDOM_SOUND:
{
@ -437,7 +437,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
{
int32 temp = GetRandActionParam(rnd, action.random_emote.emoteId1, action.random_emote.emoteId2, action.random_emote.emoteId3);
if (temp >= 0)
m_creature->HandleEmoteCommand(temp);
m_creature->HandleEmote(temp);
break;
}
case ACTION_T_CAST:
@ -1314,7 +1314,7 @@ void CreatureEventAI::DoScriptText(int32 textEntry, WorldObject* pSource, Unit*
{
if (pSource->GetTypeId() == TYPEID_UNIT || pSource->GetTypeId() == TYPEID_PLAYER)
{
((Unit*)pSource)->HandleEmoteCommand((*i).second.Emote);
((Unit*)pSource)->HandleEmote((*i).second.Emote);
}
else
sLog.outErrorDb("CreatureEventAI: DoScriptText entry %i tried to process emote for invalid TypeId (%u).",textEntry,pSource->GetTypeId());