[12717] Implemented ACTION_T_EMOTE_TARGET

This commit is contained in:
sanctum32 2013-11-16 21:52:12 +02:00 committed by Antz
parent 2b0b9f12d2
commit 2914f3168b
4 changed files with 30 additions and 3 deletions

View file

@ -959,7 +959,21 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
{
m_throwAIEventMask = action.setThrowMask.eventTypeMask;
break;
}
}
case ACTION_T_EMOTE_TARGET:
{
Unit* pCreature = m_creature->GetMap()->GetCreature(ObjectGuid(HIGHGUID_UNIT, action.emoteTarget.targetGuid));
if (!pCreature)
{
sLog.outErrorEventAI("Event %d. Cannot find creature by guid %d", EventId, action.emoteTarget.targetGuid);
return;
}
m_creature->SetFacingToObject(pCreature);
m_creature->HandleEmote(action.emoteTarget.emoteId);
break;
}
}
}