[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;
}
}
}

View file

@ -117,6 +117,7 @@ enum EventAI_ActionType
ACTION_T_CHANCED_TEXT = 44, // Chance to display the text, TextId1, optionally TextId2. If more than just -TextId1 is defined, randomize. Negative values.
ACTION_T_THROW_AI_EVENT = 45, // EventType, Radius, unused
ACTION_T_SET_THROW_MASK = 46, // EventTypeMask, unused, unused
ACTION_T_EMOTE_TARGET = 47, // Emote, EmoteTarget, EntryOrGuid
ACTION_T_END,
};
@ -397,6 +398,12 @@ struct CreatureEventAI_Action
uint32 unused1;
uint32 unused2;
} setThrowMask;
// ACTION_T_EMOTE_TARGET = 47
struct
{
uint32 emoteId;
uint32 targetGuid;
} emoteTarget;
// RAW
struct
{

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "12716"
#define REVISION_NR "12717"
#endif // __REVISION_NR_H__