aboutsummaryrefslogtreecommitdiff
path: root/src/game/CreatureEventAI.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/CreatureEventAI.h')
-rw-r--r--src/game/CreatureEventAI.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/game/CreatureEventAI.h b/src/game/CreatureEventAI.h
index e8dcbaeca40..7b9fe84453e 100644
--- a/src/game/CreatureEventAI.h
+++ b/src/game/CreatureEventAI.h
@@ -44,7 +44,7 @@ enum EventAI_Type
EVENT_T_SPELLHIT = 8, // SpellID, School, RepeatMin, RepeatMax
EVENT_T_RANGE = 9, // MinDist, MaxDist, RepeatMin, RepeatMax
EVENT_T_OOC_LOS = 10, // NoHostile, MaxRnage, RepeatMin, RepeatMax
- EVENT_T_SPAWNED = 11, // NONE
+ EVENT_T_SPAWNED = 11, // Condition, CondValue1
EVENT_T_TARGET_HP = 12, // HPMax%, HPMin%, RepeatMin, RepeatMax
EVENT_T_TARGET_CASTING = 13, // RepeatMin, RepeatMax
EVENT_T_FRIENDLY_HP = 14, // HPDeficit, Radius, RepeatMin, RepeatMax
@@ -160,6 +160,13 @@ enum EventFlags
EFLAG_DEBUG_ONLY = 0x80, //Event only occurs in debug build
};
+enum SpawnedEventMode
+{
+ SPAWNED_EVENT_ALWAY = 0,
+ SPAWNED_EVENT_MAP = 1,
+ SPAWNED_EVENT_ZONE = 2
+};
+
// String text additional data, used in (CreatureEventAI)
struct StringTextData
{
@@ -436,6 +443,12 @@ struct CreatureEventAI_Event
uint32 repeatMin;
uint32 repeatMax;
} ooc_los;
+ // EVENT_T_SPAWNED = 11
+ struct
+ {
+ uint32 condition;
+ uint32 conditionValue1;
+ } spawned;
// EVENT_T_TARGET_CASTING = 13
struct
{
@@ -563,6 +576,8 @@ class TRINITY_DLL_SPEC CreatureEventAI : public CreatureAI
void DoScriptText(int32 textEntry, WorldObject* pSource, Unit* target);
bool CanCast(Unit* Target, SpellEntry const *Spell, bool Triggered);
+ bool SpawnedEventConditionsCheck(CreatureEventAI_Event const& event);
+
Unit* DoSelectLowestHpFriendly(float range, uint32 MinHPDiff);
void DoFindFriendlyMissingBuff(std::list<Creature*>& _list, float range, uint32 spellid);
void DoFindFriendlyCC(std::list<Creature*>& _list, float range);