mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 01:37:00 +00:00
[12717] Implemented ACTION_T_EMOTE_TARGET
This commit is contained in:
parent
2b0b9f12d2
commit
2914f3168b
4 changed files with 30 additions and 3 deletions
|
|
@ -136,7 +136,7 @@ For all ACTION_T_RANDOM Actions, When a Particular Param is selected for the Eve
|
|||
29 ACTION_T_RANGED_MOVEMENT Distance, Angle Changes the movement generator to a ranged type. (note: default melee type can still be set by using 0 as angle and 0 as distance).
|
||||
30 ACTION_T_RANDOM_PHASE PhaseId1, PhaseId2, PhaseId3 Sets a phase to a specified id(s)*
|
||||
31 ACTION_T_RANDOM_PHASE_RANGE PhaseMin, PhaseMax Sets a phase to a random id (Phase = PhaseMin + rnd % PhaseMin-PhaseMax). PhaseMax must be greater than PhaseMin.
|
||||
32 ACTION_T_SUMMON CreatureID, Target, SummonID Summons a creature (Param1) to attack target (Param2) at location specified by EventAI_Summons (Param3).
|
||||
32 ACTION_T_SUMMON_ID CreatureID, Target, SummonID Summons a creature (Param1) to attack target (Param2) at location specified by EventAI_Summons (Param3).
|
||||
33 ACTION_T_KILLED_MONSTER CreatureID, Target Calls KilledMonster (Param1) for a target (Param2).
|
||||
34 ACTION_T_SET_INST_DATA Field, Data Calls ScriptedInstance::SetData with field (Param1) and data (Param2).
|
||||
35 ACTION_T_SET_INST_DATA64 Field, Target Calls ScriptedInstance::SetData64 with field (Param1) and target's GUID (Param2).
|
||||
|
|
@ -151,6 +151,7 @@ For all ACTION_T_RANDOM Actions, When a Particular Param is selected for the Eve
|
|||
44 ACTION_T_CHANCED_TEXT Chance, -TextId1, -TextId2 Displays by Chance (1..100) the specified -TextId. When -TextId2 is specified, the selection will be randomized. Text types are defined, along with other options for the text, in a table below. Param2 and Param3 needs to be negative.
|
||||
45 ACTION_T_THROW_AI_EVENT EventType, Radius Throws an AIEvent of type (Param1) to nearby friendly Npcs in range of (Param2)
|
||||
46 ACTION_T_SET_THROW_MASK EventTypeMask Marks for which AIEvents the npc will throw AIEvents on its own.
|
||||
47 ACTION_T_EMOTE_TARGET EmoteId, TargetGuid NPC faces to creature (Param2) and does a specified emote id (Param2).
|
||||
|
||||
* = Use -1 where the param is expected to do nothing. Random constant is generated for each event, so if you have a random yell and a random sound, they will be linked up with each other (ie. param2 with param2).
|
||||
|
||||
|
|
@ -891,6 +892,11 @@ Currently supported are:
|
|||
|
||||
So if you want an npc to throw AIEvents automatically on death and on critical health, you would set its EventTypeMask to 0x03
|
||||
|
||||
-----------------------------
|
||||
47 = ACTION_T_EMOTE_TARGET
|
||||
-----------------------------
|
||||
|
||||
|
||||
=========================================
|
||||
Target Types
|
||||
=========================================
|
||||
|
|
|
|||
|
|
@ -960,6 +960,20 @@ 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12716"
|
||||
#define REVISION_NR "12717"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue