AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
npc_warden_mellichar::npc_warden_mellicharAI Struct Reference
Inheritance diagram for npc_warden_mellichar::npc_warden_mellicharAI:
BossAI ScriptedAI CreatureAI UnitAI

Public Member Functions

 npc_warden_mellicharAI (Creature *creature)
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDies (Creature *summon, Unit *) override
 
void MoveInLineOfSight (Unit *) override
 
void AttackStart (Unit *) override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged. More...
 
void JustDied (Unit *) override
 
void Reset () override
 
void DamageTaken (Unit *attacker, uint32 &damage, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply) More...
 
void SetData (uint32 type, uint32 data) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
 ~BossAI () override
 
bool CanRespawn () override
 
void DamageTaken (Unit *attacker, uint32 &damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override
 Called at any Damage from any attacker (before damage apply) More...
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void SummonedCreatureDespawnAll () override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
void ScheduleHealthCheckEvent (uint32 healthPct, std::function< void()> exec)
 Executes a function once the creature reaches the defined health point percent. More...
 
void ScheduleHealthCheckEvent (std::initializer_list< uint8 > healthPct, std::function< void()> exec)
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged. More...
 
void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER) override
 
void JustDied (Unit *) override
 
void JustReachedHome () override
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
 ~ScriptedAI () override
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply) More...
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *) override
 
void JustSummoned (Creature *) override
 
void SummonedCreatureDespawn (Creature *) override
 
void SpellHit (Unit *, SpellInfo const *) override
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void MovementInform (uint32, uint32) override
 
void OnPossess (bool)
 
bool IsInRoom (const Position *pos, Axis axis, bool above)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged. More...
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoCastSpell (Unit *target, SpellInfo const *spellInfo, bool triggered=false)
 
void DoPlaySoundToSet (WorldObject *source, uint32 soundId)
 
void DoPlayMusic (uint32 soundId, bool zone)
 
void DoAddThreat (Unit *unit, float amount)
 
void DoModifyThreatByPercent (Unit *unit, int32 pct)
 
void DoResetThreat (Unit *unit)
 
void DoResetThreatList ()
 
float DoGetThreat (Unit *unit)
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 
void DoTeleportPlayer (Unit *unit, Position pos)
 
void DoTeleportAll (float x, float y, float z, float o)
 
UnitDoSelectLowestHpFriendly (float range, uint32 minHPDiff=1)
 
std::list< Creature * > DoFindFriendlyCC (float range)
 
std::list< Creature * > DoFindFriendlyMissingBuff (float range, uint32 spellId)
 
PlayerGetPlayerAtMinimumRange (float minRange)
 
CreatureDoSpawnCreature (uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime)
 
bool IsUniqueTimedEventDone (uint32 id) const
 
void SetUniqueTimedEventDone (uint32 id)
 
void ResetUniqueTimedEvent (uint32 id)
 
void ClearUniqueTimedEventsDone ()
 
void ScheduleTimedEvent (Milliseconds timerMin, Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, uint32 uniqueId=0)
 
void ScheduleUniqueTimedEvent (Milliseconds timer, std::function< void()> exec, uint32 uniqueId)
 
bool HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo const * SelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, uint32 powerCostMin, uint32 powerCostMax, float rangeMin, float rangeMax, SelectEffect effect)
 
void SetEquipmentSlots (bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
 
virtual bool CheckEvadeIfOutOfCombatArea () const
 
bool IsHeroic () const
 
Difficulty GetDifficulty () const
 
bool Is25ManRaid () const
 
template<class T >
const T & DUNGEON_MODE (const T &normal5, const T &heroic10) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25, const T &heroic10, const T &heroic25) const
 
PlayerSelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
 
void SetInvincibility (bool apply)
 
bool IsInvincible () const
 
void SetAutoAttackAllowed (bool allow)
 
bool IsAutoAttackAllowed () const
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0s)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table. More...
 
void Talk (uint8 id, Milliseconds delay)
 
WorldObjectGetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon. More...
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void JustEngagedWith (Unit *)
 Called for reaction when initially engaged. More...
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed. More...
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ================== More...
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields ======================================= More...
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void AttackStart (Unit *)
 
virtual void UpdateAI (uint32)=0
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 Called when unit is charmed. More...
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the following: More...
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 Called when the unit enters combat. More...
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat. More...
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 Called at any Damage to any victim (before damage apply) More...
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage from any attacker (before damage apply) More...
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal. More...
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates. More...
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals. More...
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations. More...
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT) More...
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoAddAuraToAllHostilePlayers (uint32 spellid)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastSelf (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastToAllHostilePlayers (uint32 spellid, bool triggered=false)
 To specify the caster as target if the spell is self-cast. More...
 
SpellCastResult DoCastVictim (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastAOE (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastRandomTarget (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false, bool withTank=true)
 Cast the spell on a random unit from the threat list. More...
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the top threat target, which may not be the current victim. More...
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
void DoSpellAttackToRandomTargetIfReady (uint32 spell, uint32 threatTablePosition=0, float dist=0.f, bool playerOnly=true)
 
virtual void SummonMovementInform (Creature *, uint32, uint32)
 Called when a summon reaches a waypoint or point movement finished. More...
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelect (Player *, uint32, uint32)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestAccept (Player *, Quest const *)
 
virtual void sQuestSelect (Player *, Quest const *)
 
virtual void sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Additional Inherited Members

- Public Types inherited from ScriptedAI
enum class  Axis {
  AXIS_X ,
  AXIS_Y
}
 
- Public Types inherited from CreatureAI
enum  EvadeReason {
  EVADE_REASON_NO_HOSTILES ,
  EVADE_REASON_BOUNDARY ,
  EVADE_REASON_SEQUENCE_BREAK ,
  EVADE_REASON_NO_PATH ,
  EVADE_REASON_OTHER
}
 
- Static Public Member Functions inherited from CreatureAI
static bool IsInBounds (CreatureBoundary const &boundary, Position const *who)
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- Public Attributes inherited from BossAI
float callForHelpRange
 
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from BossAI
void _Reset ()
 
void _JustEngagedWith ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
void _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
void TeleportCheaters ()
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
bool UpdateVictimWithGaze ()
 
void SetGazeOn (Unit *target)
 
CreatureDoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from BossAI
SummonList summons
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
TaskScheduler scheduler
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ npc_warden_mellicharAI()

npc_warden_mellichar::npc_warden_mellicharAI::npc_warden_mellicharAI ( Creature creature)
inline
337 : BossAI(creature, DATA_WARDEN_MELLICHAR)
338 {
339 }
@ DATA_WARDEN_MELLICHAR
Definition: arcatraz.h:33
Definition: ScriptedCreature.h:467

Member Function Documentation

◆ AttackStart()

void npc_warden_mellichar::npc_warden_mellicharAI::AttackStart ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

366{ }

Referenced by UpdateAI().

◆ DamageTaken()

void npc_warden_mellichar::npc_warden_mellicharAI::DamageTaken ( Unit ,
uint32 ,
DamageEffectType  ,
SpellSchoolMask   
)
inlineoverridevirtual

Called at any Damage from any attacker (before damage apply)

Note
It use for recalculation damage or special reaction at damage for attack reaction use AttackedBy called for non DOT damage in Unit::DealDamage also

Reimplemented from BossAI.

387 {
388 if (attacker && attacker->GetCharmerOrOwnerOrOwnGUID().IsPlayer() && damage > 0 && !me->isActiveObject())
389 {
390 me->setActive(true);
392 me->SetImmuneToAll(true);
393 events.ScheduleEvent(EVENT_WARDEN_INTRO1, 1500);
394 events.ScheduleEvent(EVENT_WARDEN_CHECK_PLAYERS, 1000);
396 }
397 damage = 0;
398 }
@ EVENT_WARDEN_INTRO1
Definition: arcatraz.cpp:299
@ EVENT_WARDEN_CHECK_PLAYERS
Definition: arcatraz.cpp:298
events
Definition: boss_sartura.cpp:43
@ IN_PROGRESS
Definition: InstanceScript.h:58
Creature * me
Definition: ScriptedCreature.h:280
InstanceScript *const instance
Definition: ScriptedCreature.h:474
bool isActiveObject() const
Definition: Object.h:579
void setActive(bool isActiveObject)
Definition: Object.cpp:1094
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition: Unit.cpp:4129
void SetImmuneToAll(bool apply, bool keepCombat=false)
Definition: Unit.h:874
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:373

References DATA_WARDEN_MELLICHAR, EVENT_WARDEN_CHECK_PLAYERS, EVENT_WARDEN_INTRO1, Unit::GetCharmerOrOwnerOrOwnGUID(), IN_PROGRESS, BossAI::instance, Unit::InterruptNonMeleeSpells(), WorldObject::isActiveObject(), ObjectGuid::IsPlayer(), ScriptedAI::me, WorldObject::setActive(), InstanceScript::SetBossState(), and Unit::SetImmuneToAll().

◆ JustDied()

void npc_warden_mellichar::npc_warden_mellicharAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

370 {
371 me->setActive(false);
372 }

References ScriptedAI::me, and WorldObject::setActive().

◆ JustEngagedWith()

void npc_warden_mellichar::npc_warden_mellicharAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from BossAI.

367{ }

◆ JustSummoned()

void npc_warden_mellichar::npc_warden_mellicharAI::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from BossAI.

342 {
343 summons.Summon(summon);
344 }
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:88
SummonList summons
Definition: ScriptedCreature.h:511

References SummonList::Summon(), and BossAI::summons.

◆ MoveInLineOfSight()

void npc_warden_mellichar::npc_warden_mellicharAI::MoveInLineOfSight ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

365{ }

◆ Reset()

void npc_warden_mellichar::npc_warden_mellicharAI::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

375 {
376 _Reset();
377 me->setActive(false);
378 me->SetImmuneToAll(false);
381 me->CastSpell((Unit*)nullptr, SPELL_TARGET_OMEGA, false);
384 }
@ DATA_WARDENS_SHIELD
Definition: arcatraz.h:42
@ SPELL_TARGET_OMEGA
Definition: arcatraz.cpp:289
@ UNIT_DYNFLAG_DEAD
Definition: SharedDefines.h:3126
@ NOT_STARTED
Definition: InstanceScript.h:57
@ UNIT_FLAG2_FEIGN_DEATH
Definition: UnitDefines.h:268
void _Reset()
Definition: ScriptedCreature.cpp:624
virtual void RemoveDynamicFlag(uint32 flag)
Definition: Object.h:124
Definition: Unit.h:630
void RemoveUnitFlag2(UnitFlags2 flags)
Definition: Unit.h:720
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1167
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:113
ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:98

References BossAI::_Reset(), Unit::CastSpell(), DATA_WARDEN_MELLICHAR, DATA_WARDENS_SHIELD, InstanceScript::GetGuidData(), InstanceScript::HandleGameObject(), BossAI::instance, ScriptedAI::me, NOT_STARTED, Object::RemoveDynamicFlag(), Unit::RemoveUnitFlag2(), WorldObject::setActive(), InstanceScript::SetBossState(), Unit::SetImmuneToAll(), SPELL_TARGET_OMEGA, UNIT_DYNFLAG_DEAD, and UNIT_FLAG2_FEIGN_DEATH.

◆ SetData()

void npc_warden_mellichar::npc_warden_mellicharAI::SetData ( uint32  type,
uint32  data 
)
inlineoverridevirtual

Reimplemented from UnitAI.

401 {
402 if (data == FAIL)
403 {
405 return;
406 }
407 if (data != DONE)
408 return;
409
410 switch (type)
411 {
412 case DATA_WARDEN_1:
413 events.ScheduleEvent(EVENT_WARDEN_INTRO8, 2000);
414 break;
415 case DATA_WARDEN_3:
416 events.ScheduleEvent(EVENT_WARDEN_INTRO19, 2000);
417 break;
418 case DATA_WARDEN_4:
419 events.ScheduleEvent(EVENT_WARDEN_INTRO24, 2000);
420 break;
421 }
422 }
@ DATA_WARDEN_4
Definition: arcatraz.h:40
@ DATA_WARDEN_3
Definition: arcatraz.h:39
@ DATA_WARDEN_1
Definition: arcatraz.h:37
@ EVENT_WARDEN_INTRO8
Definition: arcatraz.cpp:306
@ EVENT_WARDEN_INTRO19
Definition: arcatraz.cpp:317
@ EVENT_WARDEN_INTRO24
Definition: arcatraz.cpp:322
@ FAIL
Definition: InstanceScript.h:59
@ DONE
Definition: InstanceScript.h:60
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:208

References DATA_WARDEN_1, DATA_WARDEN_3, DATA_WARDEN_4, DONE, CreatureAI::EnterEvadeMode(), EVENT_WARDEN_INTRO19, EVENT_WARDEN_INTRO24, EVENT_WARDEN_INTRO8, and FAIL.

◆ SummonedCreatureDies()

void npc_warden_mellichar::npc_warden_mellicharAI::SummonedCreatureDies ( Creature summon,
Unit  
)
inlineoverridevirtual

Reimplemented from CreatureAI.

347 {
348 if (summon->GetEntry() == NPC_HARBINGER_SKYRISS)
349 {
350 me->KillSelf();
351 me->setActive(false);
354 {
355 if (IsHeroic())
356 {
358 }
359 creature->AI()->Talk(SAY_COMPLETE);
360 creature->ReplaceAllNpcFlags(UNIT_NPC_FLAG_GOSSIP);
361 }
362 }
363 }
@ NPC_HARBINGER_SKYRISS
Definition: arcatraz.h:50
@ SPELL_QID10886
Definition: arcatraz.cpp:293
@ NPC_MILLHOUSE
Definition: arcatraz.cpp:276
@ SAY_COMPLETE
Definition: arcatraz.cpp:38
@ UNIT_NPC_FLAG_GOSSIP
Definition: UnitDefines.h:294
Creature * GetCreatureWithEntry(uint32 entry) const
Definition: ScriptedCreature.cpp:132
bool IsHeroic() const
Definition: ScriptedCreature.h:379
Definition: Creature.h:43
uint32 GetEntry() const
Definition: Object.h:115
void KillSelf(bool durabilityLoss=true, WeaponAttackType attackType=BASE_ATTACK, SpellInfo const *spellProto=nullptr, Spell const *spell=nullptr)
Definition: Unit.h:1159
void DoCastSpellOnPlayers(uint32 spell)
Definition: InstanceScript.cpp:676

References DATA_WARDEN_MELLICHAR, InstanceScript::DoCastSpellOnPlayers(), DONE, SummonList::GetCreatureWithEntry(), Object::GetEntry(), BossAI::instance, ScriptedAI::IsHeroic(), Unit::KillSelf(), ScriptedAI::me, NPC_HARBINGER_SKYRISS, NPC_MILLHOUSE, SAY_COMPLETE, WorldObject::setActive(), InstanceScript::SetBossState(), SPELL_QID10886, BossAI::summons, and UNIT_NPC_FLAG_GOSSIP.

◆ UpdateAI()

void npc_warden_mellichar::npc_warden_mellicharAI::UpdateAI ( uint32  )
inlineoverridevirtual

Use to start attacking a target. Called just before JustEngagedWith()

Reimplemented from BossAI.

425 {
426 events.Update(diff);
427 switch (events.ExecuteEvent())
428 {
430 if (!SelectTargetFromPlayerList(100.0f))
431 {
433 return;
434 }
435 events.ScheduleEvent(EVENT_WARDEN_CHECK_PLAYERS, 1000);
436 break;
439 me->SetFacingTo(M_PI / 2.0f);
441 events.ScheduleEvent(EVENT_WARDEN_INTRO2, 1400);
442 break;
445 events.ScheduleEvent(EVENT_WARDEN_INTRO3, 20000);
446 break;
449 events.ScheduleEvent(EVENT_WARDEN_INTRO4, 5000);
450 break;
452 me->SetFacingTo(0.5f);
453 me->CastSpell((Unit*)nullptr, SPELL_TARGET_ALPHA, false);
454 events.ScheduleEvent(EVENT_WARDEN_INTRO5, 2000);
455 break;
458 events.ScheduleEvent(EVENT_WARDEN_INTRO6, 3000);
459 break;
461 me->SetFacingTo(M_PI * 1.5f);
462 me->CastSpell((Unit*)nullptr, SPELL_TARGET_OMEGA, false);
463 events.ScheduleEvent(EVENT_WARDEN_INTRO7, 5000);
464 break;
466 me->SummonCreature(RAND(NPC_TRICKSTER, NPC_PH_HUNTER), 478.326f, -148.505f, 42.56f, 3.19f, TEMPSUMMON_MANUAL_DESPAWN);
467 // Wait for kill
468 break;
472 me->SetFacingTo(2.6f);
473 events.ScheduleEvent(EVENT_WARDEN_INTRO10, 4000);
474 break;
476 me->CastSpell((Unit*)nullptr, SPELL_TARGET_BETA, false);
477 events.ScheduleEvent(EVENT_WARDEN_INTRO11, 2000);
478 break;
482 events.ScheduleEvent(EVENT_WARDEN_INTRO12, 2000);
483 break;
485 me->SetFacingTo(M_PI * 1.5f);
486 me->CastSpell((Unit*)nullptr, SPELL_TARGET_OMEGA, false);
487 events.ScheduleEvent(EVENT_WARDEN_INTRO13, 6000);
488 break;
490 me->SummonCreature(NPC_MILLHOUSE, 413.292f, -148.378f, 42.56f, 6.27f, TEMPSUMMON_MANUAL_DESPAWN);
491 events.ScheduleEvent(EVENT_WARDEN_INTRO14, 14000);
492 break;
496 me->SetFacingTo(3.3f);
497 events.ScheduleEvent(EVENT_WARDEN_INTRO15, 5000);
498 break;
500 me->CastSpell((Unit*)nullptr, SPELL_TARGET_DELTA, false);
501 events.ScheduleEvent(EVENT_WARDEN_INTRO16, 2000);
502 break;
505 events.ScheduleEvent(EVENT_WARDEN_INTRO17, 2000);
506 break;
508 me->SetFacingTo(M_PI * 1.5f);
509 me->CastSpell((Unit*)nullptr, SPELL_TARGET_OMEGA, false);
510 events.ScheduleEvent(EVENT_WARDEN_INTRO18, 6000);
511 break;
513 me->SummonCreature(RAND(NPC_AKKIRIS, NPC_SULFURON), 420.179f, -174.396f, 42.58f, 0.02f, TEMPSUMMON_MANUAL_DESPAWN);
514 // Wait for kill
515 break;
519 me->SetFacingTo(6.05f);
520 events.ScheduleEvent(EVENT_WARDEN_INTRO20, 4000);
521 break;
523 me->CastSpell((Unit*)nullptr, SPELL_TARGET_GAMMA, false);
524 events.ScheduleEvent(EVENT_WARDEN_INTRO21, 2000);
525 break;
528 events.ScheduleEvent(EVENT_WARDEN_INTRO22, 2000);
529 break;
531 me->SetFacingTo(M_PI * 1.5f);
532 me->CastSpell((Unit*)nullptr, SPELL_TARGET_OMEGA, false);
533 events.ScheduleEvent(EVENT_WARDEN_INTRO23, 6000);
534 break;
536 me->SummonCreature(RAND(NPC_TW_DRAK, NPC_BL_DRAK), 471.795f, -174.58f, 42.58f, 3.06f, TEMPSUMMON_MANUAL_DESPAWN);
537 // Wait for kill
538 break;
543 events.ScheduleEvent(EVENT_WARDEN_INTRO25, 8000);
544 break;
546 if (Creature* cr = me->SummonCreature(NPC_HARBINGER_SKYRISS, 445.763f, -191.639f, 44.64f, 1.60f, TEMPSUMMON_MANUAL_DESPAWN))
547 {
548 cr->SetImmuneToAll(true);
549 cr->CastSpell(cr, SPELL_TELEPORT_VISUAL, true);
550 }
551 events.ScheduleEvent(EVENT_WARDEN_INTRO26, 1000);
552 break;
555 creature->AI()->Talk(SAY_HARBINGER_INTRO);
556 events.ScheduleEvent(EVENT_WARDEN_INTRO27, 23000);
557 break;
560 events.ScheduleEvent(EVENT_WARDEN_INTRO28, 5000);
561 break;
565 creature->CastSpell((Unit*)nullptr, SPELL_MIND_REND, false);
566 events.ScheduleEvent(EVENT_WARDEN_INTRO29, 4000);
567 break;
568
570 events.Reset();
574 {
575 creature->SetImmuneToAll(false);
576 if (Player* player = SelectTargetFromPlayerList(50.0f))
577 AttackStart(player);
578 }
579 break;
580 }
581 }
@ DATA_WARDEN_2
Definition: arcatraz.h:38
@ DATA_WARDEN_5
Definition: arcatraz.h:41
@ SPELL_TARGET_GAMMA
Definition: arcatraz.cpp:288
@ SPELL_TARGET_BETA
Definition: arcatraz.cpp:286
@ SPELL_TARGET_DELTA
Definition: arcatraz.cpp:287
@ SPELL_BUBBLE_VISUAL
Definition: arcatraz.cpp:290
@ SPELL_TARGET_ALPHA
Definition: arcatraz.cpp:285
@ SPELL_MIND_REND
Definition: arcatraz.cpp:292
@ EVENT_WARDEN_INTRO29
Definition: arcatraz.cpp:327
@ EVENT_WARDEN_INTRO21
Definition: arcatraz.cpp:319
@ EVENT_WARDEN_INTRO10
Definition: arcatraz.cpp:308
@ EVENT_WARDEN_INTRO5
Definition: arcatraz.cpp:303
@ EVENT_WARDEN_INTRO18
Definition: arcatraz.cpp:316
@ EVENT_WARDEN_INTRO25
Definition: arcatraz.cpp:323
@ EVENT_WARDEN_INTRO6
Definition: arcatraz.cpp:304
@ EVENT_WARDEN_INTRO2
Definition: arcatraz.cpp:300
@ EVENT_WARDEN_INTRO13
Definition: arcatraz.cpp:311
@ EVENT_WARDEN_INTRO20
Definition: arcatraz.cpp:318
@ EVENT_WARDEN_INTRO27
Definition: arcatraz.cpp:325
@ EVENT_WARDEN_INTRO12
Definition: arcatraz.cpp:310
@ EVENT_WARDEN_INTRO4
Definition: arcatraz.cpp:302
@ EVENT_WARDEN_INTRO3
Definition: arcatraz.cpp:301
@ EVENT_WARDEN_INTRO15
Definition: arcatraz.cpp:313
@ EVENT_WARDEN_INTRO11
Definition: arcatraz.cpp:309
@ EVENT_WARDEN_INTRO22
Definition: arcatraz.cpp:320
@ EVENT_WARDEN_INTRO7
Definition: arcatraz.cpp:305
@ EVENT_WARDEN_INTRO26
Definition: arcatraz.cpp:324
@ EVENT_WARDEN_INTRO23
Definition: arcatraz.cpp:321
@ EVENT_WARDEN_INTRO28
Definition: arcatraz.cpp:326
@ EVENT_WARDEN_INTRO17
Definition: arcatraz.cpp:315
@ EVENT_WARDEN_INTRO16
Definition: arcatraz.cpp:314
@ EVENT_WARDEN_INTRO14
Definition: arcatraz.cpp:312
@ SAY_HARBINGER_INTRO
Definition: arcatraz.cpp:269
@ YELL_INTRO2
Definition: arcatraz.cpp:261
@ YELL_INTRO1
Definition: arcatraz.cpp:260
@ YELL_RELEASE2B
Definition: arcatraz.cpp:264
@ YELL_WELCOME
Definition: arcatraz.cpp:267
@ YELL_RELEASE4
Definition: arcatraz.cpp:266
@ YELL_RELEASE1
Definition: arcatraz.cpp:262
@ YELL_RELEASE2A
Definition: arcatraz.cpp:263
@ YELL_RELEASE3
Definition: arcatraz.cpp:265
@ NPC_PH_HUNTER
Definition: arcatraz.cpp:275
@ NPC_TRICKSTER
Definition: arcatraz.cpp:274
@ NPC_SULFURON
Definition: arcatraz.cpp:278
@ NPC_TW_DRAK
Definition: arcatraz.cpp:279
@ NPC_BL_DRAK
Definition: arcatraz.cpp:280
@ NPC_AKKIRIS
Definition: arcatraz.cpp:277
Talk
Definition: hyjal.cpp:82
@ SPELL_TELEPORT_VISUAL
Definition: boss_kiljaeden.cpp:590
static First const & RAND(First const &first, Second const &second, Rest const &... rest)
Definition: CreatureAIImpl.h:25
@ TEMPSUMMON_MANUAL_DESPAWN
Definition: Object.h:53
Player * SelectTargetFromPlayerList(float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
Definition: ScriptedCreature.cpp:571
virtual void SetDynamicFlag(uint32 flag)
Definition: Object.h:123
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition: Object.cpp:2366
Definition: Player.h:1081
void SetFacingTo(float ori)
Definition: Unit.cpp:20527
void SetUnitFlag2(UnitFlags2 flags)
Definition: Unit.h:719
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:52
void AttackStart(Unit *) override
Definition: arcatraz.cpp:366

References AttackStart(), Unit::CastSpell(), DATA_WARDEN_1, DATA_WARDEN_2, DATA_WARDEN_3, DATA_WARDEN_4, DATA_WARDEN_5, DATA_WARDENS_SHIELD, CreatureAI::EnterEvadeMode(), EVENT_WARDEN_CHECK_PLAYERS, EVENT_WARDEN_INTRO1, EVENT_WARDEN_INTRO10, EVENT_WARDEN_INTRO11, EVENT_WARDEN_INTRO12, EVENT_WARDEN_INTRO13, EVENT_WARDEN_INTRO14, EVENT_WARDEN_INTRO15, EVENT_WARDEN_INTRO16, EVENT_WARDEN_INTRO17, EVENT_WARDEN_INTRO18, EVENT_WARDEN_INTRO19, EVENT_WARDEN_INTRO2, EVENT_WARDEN_INTRO20, EVENT_WARDEN_INTRO21, EVENT_WARDEN_INTRO22, EVENT_WARDEN_INTRO23, EVENT_WARDEN_INTRO24, EVENT_WARDEN_INTRO25, EVENT_WARDEN_INTRO26, EVENT_WARDEN_INTRO27, EVENT_WARDEN_INTRO28, EVENT_WARDEN_INTRO29, EVENT_WARDEN_INTRO3, EVENT_WARDEN_INTRO4, EVENT_WARDEN_INTRO5, EVENT_WARDEN_INTRO6, EVENT_WARDEN_INTRO7, EVENT_WARDEN_INTRO8, SummonList::GetCreatureWithEntry(), InstanceScript::GetGuidData(), InstanceScript::HandleGameObject(), IN_PROGRESS, BossAI::instance, Unit::InterruptNonMeleeSpells(), ScriptedAI::me, NPC_AKKIRIS, NPC_BL_DRAK, NPC_HARBINGER_SKYRISS, NPC_MILLHOUSE, NPC_PH_HUNTER, NPC_SULFURON, NPC_TRICKSTER, NPC_TW_DRAK, RAND(), SAY_HARBINGER_INTRO, ScriptedAI::SelectTargetFromPlayerList(), ZoneScript::SetData(), Object::SetDynamicFlag(), Unit::SetFacingTo(), Unit::SetUnitFlag2(), SPELL_BUBBLE_VISUAL, SPELL_MIND_REND, SPELL_TARGET_ALPHA, SPELL_TARGET_BETA, SPELL_TARGET_DELTA, SPELL_TARGET_GAMMA, SPELL_TARGET_OMEGA, SPELL_TELEPORT_VISUAL, WorldObject::SummonCreature(), BossAI::summons, TEMPSUMMON_MANUAL_DESPAWN, UNIT_DYNFLAG_DEAD, UNIT_FLAG2_FEIGN_DEATH, YELL_INTRO1, YELL_INTRO2, YELL_RELEASE1, YELL_RELEASE2A, YELL_RELEASE2B, YELL_RELEASE3, YELL_RELEASE4, and YELL_WELCOME.