diff options
author | megamage <none@none> | 2009-05-21 10:52:05 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-21 10:52:05 -0500 |
commit | 5fe179019fded52718f6fce9a76c052785df48a5 (patch) | |
tree | ace3db0feaba56ff9f452849c54b2ef25d1d840e /src/game/CreatureEventAI.h | |
parent | 8d771cc9f7b8800ccf8a799740d0b95cc95b4cbe (diff) |
[7863] Implement for EVENT_T_SPAWNED map/zone/subzone only event conditions. Author: Alex
--HG--
branch : trunk
Diffstat (limited to 'src/game/CreatureEventAI.h')
-rw-r--r-- | src/game/CreatureEventAI.h | 17 |
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); |