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

Public Member Functions

 boss_ingvar_the_plunderer (Creature *c)
 
void Reset () override
 
void DamageTaken (Unit *, uint32 &damage, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void JustSummoned (Creature *s) override
 
void KilledUnit (Unit *) override
 
void FeignDeath (bool apply)
 
void JustDied (Unit *) override
 
void EnterEvadeMode (EvadeReason why) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
- 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)
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
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.
 
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=0ms, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0ms, 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=0ms)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
WorldObjectGetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon.
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void OnSpellCastFinished (SpellInfo const *, SpellFinishReason)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed.
 
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 ==================
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields =======================================
 
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 ()
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false, bool checkZ=false) const
 
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)
 
virtual void DistancingStarted ()
 
virtual void DistancingEnded ()
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void InitializeAI ()
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid const &, 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:
 
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.
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage to any victim (before damage apply)
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal.
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates.
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals.
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations.
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT)
 
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.
 
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.
 
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.
 
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.
 
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
 

Public Attributes

InstanceScriptpInstance
 
EventMap events
 
SummonList summons
 
ObjectGuid ValkyrGUID
 
ObjectGuid ThrowGUID
 
- Public Attributes inherited from ScriptedAI
Creatureme
 

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 ()
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- 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 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

◆ boss_ingvar_the_plunderer()

boss_ingvar_the_plunderer::boss_ingvar_the_plunderer ( Creature c)
inline
93 : ScriptedAI(c), summons(me)
94 {
96 }
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1221
Definition ScriptedCreature.h:190
Creature * me
Definition ScriptedCreature.h:280
SummonList summons
Definition boss_ingvar_the_plunderer.cpp:100
InstanceScript * pInstance
Definition boss_ingvar_the_plunderer.cpp:98

References WorldObject::GetInstanceScript(), and pInstance.

Member Function Documentation

◆ DamageTaken()

void boss_ingvar_the_plunderer::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 UnitAI.

122 {
123 if (me->GetDisplayId() == DISPLAYID_DEFAULT && damage >= me->GetHealth())
124 {
125 damage = 0;
130 me->DisableRotate(false);
133 me->StopMoving();
134 FeignDeath(true);
135 events.Reset();
136 events.RescheduleEvent(EVENT_START_RESURRECTION, 1s);
137 events.RescheduleEvent(EVENT_YELL_DEAD_1, 0ms);
138 }
139 }
@ UNIT_STATE_ROOT
Definition UnitDefines.h:180
@ UNIT_FLAG_NOT_SELECTABLE
Definition UnitDefines.h:279
@ EVENT_YELL_DEAD_1
Definition boss_ingvar_the_plunderer.cpp:73
@ EVENT_START_RESURRECTION
Definition boss_ingvar_the_plunderer.cpp:72
@ DISPLAYID_DEFAULT
Definition boss_ingvar_the_plunderer.cpp:24
events
Definition boss_sartura.cpp:43
void MovementExpired(bool reset=true)
Definition MotionMaster.h:195
void MoveIdle()
Definition MotionMaster.cpp:233
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition Unit.cpp:4188
MotionMaster * GetMotionMaster()
Definition Unit.h:1713
void StopMoving()
Definition Unit.cpp:16660
void DisableRotate(bool apply)
Definition Unit.cpp:18306
void SetControlled(bool apply, UnitState state, Unit *source=nullptr, bool isFear=false)
Definition Unit.cpp:18074
uint32 GetDisplayId() const
Definition Unit.h:1928
uint32 GetHealth() const
Definition Unit.h:1070
void RemoveAllAuras()
Definition Unit.cpp:5387
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:733
void FeignDeath(bool apply)
Definition boss_ingvar_the_plunderer.cpp:184

References Unit::DisableRotate(), DISPLAYID_DEFAULT, EVENT_START_RESURRECTION, EVENT_YELL_DEAD_1, FeignDeath(), Unit::GetDisplayId(), Unit::GetHealth(), Unit::GetMotionMaster(), Unit::InterruptNonMeleeSpells(), ScriptedAI::me, MotionMaster::MoveIdle(), MotionMaster::MovementExpired(), Unit::RemoveAllAuras(), Unit::SetControlled(), Unit::SetUnitFlag(), Unit::StopMoving(), UNIT_FLAG_NOT_SELECTABLE, and UNIT_STATE_ROOT.

◆ EnterEvadeMode()

void boss_ingvar_the_plunderer::EnterEvadeMode ( EvadeReason  why)
inlineoverridevirtual

Reimplemented from CreatureAI.

215 {
217 me->DisableRotate(false);
219 }
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition CreatureAI.cpp:215

References Unit::DisableRotate(), CreatureAI::EnterEvadeMode(), ScriptedAI::me, Unit::SetControlled(), and UNIT_STATE_ROOT.

◆ FeignDeath()

void boss_ingvar_the_plunderer::FeignDeath ( bool  apply)
inline
185 {
186 if (apply)
187 {
192 }
193 else
194 {
199 }
200 }
@ UNIT_DYNFLAG_DEAD
Definition SharedDefines.h:3376
@ UNIT_FLAG2_FEIGN_DEATH
Definition UnitDefines.h:293
@ UNIT_STAND_STATE_DEAD
Definition UnitDefines.h:39
@ UNIT_STAND_STATE_STAND
Definition UnitDefines.h:32
@ UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT
Definition UnitDefines.h:283
virtual void RemoveDynamicFlag(uint32 flag)
Definition Object.h:125
virtual void SetDynamicFlag(uint32 flag)
Definition Object.h:124
void SetUnitFlag2(UnitFlags2 flags)
Definition Unit.h:739
void RemoveUnitFlag2(UnitFlags2 flags)
Definition Unit.h:740
void SetStandState(uint8 state)
Definition Unit.cpp:16752
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:734

References ScriptedAI::me, Object::RemoveDynamicFlag(), Unit::RemoveUnitFlag(), Unit::RemoveUnitFlag2(), Object::SetDynamicFlag(), Unit::SetStandState(), Unit::SetUnitFlag(), Unit::SetUnitFlag2(), UNIT_DYNFLAG_DEAD, UNIT_FLAG2_FEIGN_DEATH, UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT, UNIT_STAND_STATE_DEAD, and UNIT_STAND_STATE_STAND.

Referenced by DamageTaken(), Reset(), and UpdateAI().

◆ JustDied()

void boss_ingvar_the_plunderer::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

203 {
204 events.Reset();
207 if (pInstance)
208 {
211 }
212 }
@ ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE
Definition DBCEnums.h:122
@ DONE
Definition InstanceScript.h:61
@ YELL_DEAD_2
Definition boss_ingvar_the_plunderer.cpp:44
@ NPC_INGVAR_UNDEAD
Definition boss_ingvar_the_plunderer.cpp:30
void DoUpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1=0, uint32 miscValue2=0, Unit *unit=nullptr)
Definition InstanceScript.cpp:656
void DespawnAll(Milliseconds delay=0ms)
Definition ScriptedCreature.cpp:71
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:52
Talk
Definition hyjal.cpp:82
@ DATA_INGVAR
Definition utgarde_keep.h:33

References ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, DATA_INGVAR, SummonList::DespawnAll(), DONE, InstanceScript::DoUpdateAchievementCriteria(), NPC_INGVAR_UNDEAD, pInstance, ZoneScript::SetData(), summons, and YELL_DEAD_2.

◆ JustEngagedWith()

void boss_ingvar_the_plunderer::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from CreatureAI.

142 {
143 events.Reset();
144 // schedule Phase 1 abilities
145 events.RescheduleEvent(EVENT_SPELL_ROAR, 15s);
146 events.RescheduleEvent(EVENT_SPELL_CLEAVE_OR_WOE_STRIKE, 2s);
147 events.RescheduleEvent(EVENT_SPELL_SMASH, 5s);
148 events.RescheduleEvent(EVENT_SPELL_ENRAGE_OR_SHADOW_AXE, 10s);
149
152
153 if (pInstance)
155 }
@ IN_PROGRESS
Definition InstanceScript.h:59
@ EVENT_SPELL_SMASH
Definition boss_ingvar_the_plunderer.cpp:85
@ EVENT_SPELL_ROAR
Definition boss_ingvar_the_plunderer.cpp:83
@ EVENT_SPELL_CLEAVE_OR_WOE_STRIKE
Definition boss_ingvar_the_plunderer.cpp:84
@ EVENT_SPELL_ENRAGE_OR_SHADOW_AXE
Definition boss_ingvar_the_plunderer.cpp:86
@ YELL_AGGRO_1
Definition boss_ingvar_the_plunderer.cpp:38
void LowerPlayerDamageReq(uint32 unDamage, bool damagedByPlayer=true)
Definition Creature.cpp:3737
uint32 GetMaxHealth() const
Definition Unit.h:1071

References DATA_INGVAR, EVENT_SPELL_CLEAVE_OR_WOE_STRIKE, EVENT_SPELL_ENRAGE_OR_SHADOW_AXE, EVENT_SPELL_ROAR, EVENT_SPELL_SMASH, Unit::GetMaxHealth(), IN_PROGRESS, Creature::LowerPlayerDamageReq(), ScriptedAI::me, pInstance, ZoneScript::SetData(), and YELL_AGGRO_1.

◆ JustSummoned()

void boss_ingvar_the_plunderer::JustSummoned ( Creature s)
inlineoverridevirtual

Reimplemented from CreatureAI.

158 {
159 summons.Summon(s);
160 if (s->GetEntry() == NPC_ANNHYLDE)
161 {
162 ValkyrGUID = s->GetGUID();
163 s->SetCanFly(true);
164 s->SetDisableGravity(true);
165 s->SetPosition(s->GetPositionX(), s->GetPositionY(), s->GetPositionZ() + 35.0f, s->GetOrientation());
167 }
168 else if (s->GetEntry() == NPC_THROW)
169 {
170 ThrowGUID = s->GetGUID();
171 if (Unit* t = SelectTarget(SelectTargetMethod::Random, 0, 70.0f, true))
172 s->GetMotionMaster()->MovePoint(0, t->GetPositionX(), t->GetPositionY(), t->GetPositionZ());
173 }
174 }
@ NPC_ANNHYLDE
Definition boss_ingvar_the_plunderer.cpp:31
@ NPC_THROW
Definition boss_ingvar_the_plunderer.cpp:32
void SetPosition(float x, float y, float z, float o)
Definition Creature.cpp:3172
void MovePoint(uint32 id, const Position &pos, ForcedMovement forcedMovement=FORCED_MOVEMENT_NONE, float speed=0.f, bool generatePath=true, bool forceDestination=true)
Definition MotionMaster.h:228
uint32 GetEntry() const
Definition Object.h:116
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:113
void Summon(Creature const *summon)
Definition ScriptedCreature.h:88
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:110
Definition Unit.h:650
void SetFacingTo(float ori)
Definition Unit.cpp:20280
void SetCanFly(bool enable)
Add the movement flag: MOVEMENTFLAGCAN_FLY. Generaly only use by players, allowing them to fly by pre...
Definition Unit.cpp:20391
void SetDisableGravity(bool disable)
Definition Unit.cpp:20331
float GetPositionZ() const
Definition Position.h:123
float GetOrientation() const
Definition Position.h:124
float GetPositionX() const
Definition Position.h:121
float GetPositionY() const
Definition Position.h:122
ObjectGuid ValkyrGUID
Definition boss_ingvar_the_plunderer.cpp:101
ObjectGuid ThrowGUID
Definition boss_ingvar_the_plunderer.cpp:102

References Object::GetEntry(), Object::GetGUID(), Unit::GetMotionMaster(), Position::GetOrientation(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), MotionMaster::MovePoint(), NPC_ANNHYLDE, NPC_THROW, Random, UnitAI::SelectTarget(), Unit::SetCanFly(), Unit::SetDisableGravity(), Unit::SetFacingTo(), Creature::SetPosition(), SummonList::Summon(), summons, ThrowGUID, and ValkyrGUID.

◆ KilledUnit()

void boss_ingvar_the_plunderer::KilledUnit ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

177 {
180 else
182 }
@ YELL_KILL_2
Definition boss_ingvar_the_plunderer.cpp:43
@ YELL_KILL_1
Definition boss_ingvar_the_plunderer.cpp:39

References DISPLAYID_DEFAULT, Unit::GetDisplayId(), ScriptedAI::me, YELL_KILL_1, and YELL_KILL_2.

◆ Reset()

void boss_ingvar_the_plunderer::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

105 {
108 events.Reset();
111 me->LoadEquipment(1);
112 FeignDeath(false);
115 me->DisableRotate(false);
116
117 if (pInstance)
119 }
@ NOT_STARTED
Definition InstanceScript.h:58
void LoadEquipment(int8 id=1, bool force=false)
Definition Creature.cpp:1811
void SetDisplayId(uint32 displayId, float displayScale=1.f) override
Definition Creature.cpp:3412
void Clear()
Definition ObjectGuid.h:138

References ObjectGuid::Clear(), DATA_INGVAR, SummonList::DespawnAll(), Unit::DisableRotate(), DISPLAYID_DEFAULT, FeignDeath(), Creature::LoadEquipment(), ScriptedAI::me, NOT_STARTED, pInstance, Unit::RemoveUnitFlag(), Unit::SetControlled(), ZoneScript::SetData(), Creature::SetDisplayId(), summons, ThrowGUID, UNIT_FLAG_NOT_SELECTABLE, UNIT_STATE_ROOT, and ValkyrGUID.

◆ UpdateAI()

void boss_ingvar_the_plunderer::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

222 {
223 if (!UpdateVictim())
224 return;
225
226 events.Update(diff);
227
229 return;
230
231 switch (events.ExecuteEvent())
232 {
233 case 0:
234 break;
237 break;
240 events.RescheduleEvent(EVENT_VALKYR_BEAM, 7s);
241 events.RescheduleEvent(EVENT_VALKYR_MOVE, 1ms);
242 events.RescheduleEvent(EVENT_ANNHYLDE_YELL, 3s);
243 break;
246 s->GetMotionMaster()->MovePoint(1, s->GetPositionX(), s->GetPositionY(), s->GetPositionZ() - 15.0f);
247 break;
250 s->AI()->Talk(YELL_ANHYLDE_2);
251 break;
255 c->CastSpell(me, SPELL_RESURRECTION_BEAM, false);
256 events.RescheduleEvent(EVENT_RESURRECTION_BALL, 4s);
257 break;
260 events.RescheduleEvent(EVENT_RESURRECTION_HEAL, 4s);
261 break;
265 FeignDeath(false);
266 events.RescheduleEvent(EVENT_MORPH_TO_UNDEAD, 3s);
267 break;
270 events.RescheduleEvent(EVENT_START_PHASE_2, 1s);
271 break;
274 {
275 c->DespawnOrUnsummon();
277 }
282
283 // schedule Phase 2 abilities
284 events.RescheduleEvent(EVENT_SPELL_ROAR, 15s);
285 events.RescheduleEvent(EVENT_SPELL_CLEAVE_OR_WOE_STRIKE, 2s);
286 events.RescheduleEvent(EVENT_SPELL_SMASH, 5s);
287 events.RescheduleEvent(EVENT_SPELL_ENRAGE_OR_SHADOW_AXE, 10s);
288
289 break;
290
291 // ABILITIES HERE:
292 case EVENT_UNROOT:
294 me->DisableRotate(false);
295 break;
296 case EVENT_SPELL_ROAR:
298
300 me->CastSpell((Unit*)nullptr, SPELL_STAGGERING_ROAR, false);
301 else
302 me->CastSpell((Unit*)nullptr, SPELL_DREADFUL_ROAR, false);
303 events.Repeat(15s, 20s);
304 break;
307 {
308 events.Repeat(3s);
309 break;
310 }
312 me->CastSpell(me->GetVictim(), SPELL_CLEAVE, false);
313 else
315 events.Repeat(3s, 7s);
316 break;
319 {
320 events.Repeat(3s);
321 break;
322 }
324 me->DisableRotate(true);
327 me->CastSpell((Unit*)nullptr, SPELL_SMASH, false);
328 else
329 me->CastSpell((Unit*)nullptr, SPELL_DARK_SMASH, false);
330 events.Repeat(9s, 11s);
331 events.RescheduleEvent(EVENT_UNROOT, 3750ms);
332 break;
335 {
336 me->CastSpell(me, SPELL_ENRAGE, false);
337 events.Repeat(10s);
338 }
339 else
340 {
341 me->CastSpell((Unit*)nullptr, SPELL_SHADOW_AXE, true);
343 events.Repeat(35s);
344 events.RescheduleEvent(EVENT_AXE_RETURN, 10s);
345 }
346 break;
347 case EVENT_AXE_RETURN:
349 c->GetMotionMaster()->MoveCharge(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
350 events.RescheduleEvent(EVENT_AXE_PICKUP, 1500ms);
351 break;
352 case EVENT_AXE_PICKUP:
354 {
355 c->DestroyForVisiblePlayers();
356 c->DespawnOrUnsummon();
358 }
360 SetEquipmentSlots(true);
361 break;
362 }
363
366 }
@ EQUIP_UNEQUIP
Definition CreatureAI.h:67
@ EQUIP_NO_CHANGE
Definition CreatureAI.h:66
@ UNIT_STATE_CASTING
Definition UnitDefines.h:185
@ UNIT_VIRTUAL_ITEM_SLOT_ID
Definition UpdateFields.h:116
@ EVENT_ANNHYLDE_YELL
Definition boss_ingvar_the_plunderer.cpp:75
@ EVENT_START_PHASE_2
Definition boss_ingvar_the_plunderer.cpp:80
@ EVENT_RESURRECTION_HEAL
Definition boss_ingvar_the_plunderer.cpp:78
@ EVENT_RESURRECTION_BALL
Definition boss_ingvar_the_plunderer.cpp:77
@ EVENT_MORPH_TO_UNDEAD
Definition boss_ingvar_the_plunderer.cpp:79
@ EVENT_AXE_RETURN
Definition boss_ingvar_the_plunderer.cpp:87
@ EVENT_VALKYR_MOVE
Definition boss_ingvar_the_plunderer.cpp:74
@ EVENT_VALKYR_BEAM
Definition boss_ingvar_the_plunderer.cpp:76
@ EVENT_AXE_PICKUP
Definition boss_ingvar_the_plunderer.cpp:88
@ EVENT_UNROOT
Definition boss_ingvar_the_plunderer.cpp:82
@ YELL_AGGRO_2
Definition boss_ingvar_the_plunderer.cpp:42
@ YELL_ANHYLDE_2
Definition boss_ingvar_the_plunderer.cpp:48
@ EMOTE_ROAR
Definition boss_ingvar_the_plunderer.cpp:46
@ YELL_DEAD_1
Definition boss_ingvar_the_plunderer.cpp:40
@ SPELL_CLEAVE
Definition boss_ingvar_the_plunderer.cpp:60
@ SPELL_ENRAGE
Definition boss_ingvar_the_plunderer.cpp:62
@ SPELL_SUMMON_VALKYR
Definition boss_ingvar_the_plunderer.cpp:53
@ SPELL_SHADOW_AXE
Definition boss_ingvar_the_plunderer.cpp:67
@ SPELL_DREADFUL_ROAR
Definition boss_ingvar_the_plunderer.cpp:64
@ SPELL_STAGGERING_ROAR
Definition boss_ingvar_the_plunderer.cpp:59
@ SPELL_RESURRECTION_BALL
Definition boss_ingvar_the_plunderer.cpp:55
@ SPELL_RESURRECTION_BEAM
Definition boss_ingvar_the_plunderer.cpp:54
@ SPELL_INGVAR_TRANSFORM
Definition boss_ingvar_the_plunderer.cpp:57
@ SPELL_DARK_SMASH
Definition boss_ingvar_the_plunderer.cpp:66
@ SPELL_SMASH
Definition boss_ingvar_the_plunderer.cpp:61
@ SPELL_RESURRECTION_HEAL
Definition boss_ingvar_the_plunderer.cpp:56
@ SPELL_WOE_STRIKE
Definition boss_ingvar_the_plunderer.cpp:65
bool UpdateVictim()
Definition CreatureAI.cpp:287
Definition Creature.h:47
void MoveChase(Unit *target, std::optional< ChaseRange > dist={}, std::optional< ChaseAngle > angle={})
Force the unit to chase this target. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition MotionMaster.cpp:314
uint32 GetUInt32Value(uint16 index) const
Definition Object.cpp:294
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:39
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:4844
bool HasUnitFlag(UnitFlags flags) const
Definition Unit.h:732
void SendMovementFlagUpdate(bool self=false)
Definition Unit.cpp:16714
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:1194
Unit * GetVictim() const
Definition Unit.h:886
bool HasUnitState(const uint32 f) const
Definition Unit.h:721
Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:210
void SetEquipmentSlots(bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
Definition ScriptedCreature.cpp:529
void AttackStart(Unit *) override
Definition ScriptedCreature.cpp:210

References ScriptedAI::AttackStart(), Unit::CastSpell(), ObjectGuid::Clear(), SummonList::DespawnAll(), Unit::DisableRotate(), DISPLAYID_DEFAULT, UnitAI::DoMeleeAttackIfReady(), EMOTE_ROAR, EQUIP_NO_CHANGE, EQUIP_UNEQUIP, EVENT_ANNHYLDE_YELL, EVENT_AXE_PICKUP, EVENT_AXE_RETURN, EVENT_MORPH_TO_UNDEAD, EVENT_RESURRECTION_BALL, EVENT_RESURRECTION_HEAL, EVENT_SPELL_CLEAVE_OR_WOE_STRIKE, EVENT_SPELL_ENRAGE_OR_SHADOW_AXE, EVENT_SPELL_ROAR, EVENT_SPELL_SMASH, EVENT_START_PHASE_2, EVENT_START_RESURRECTION, EVENT_UNROOT, EVENT_VALKYR_BEAM, EVENT_VALKYR_MOVE, EVENT_YELL_DEAD_1, FeignDeath(), ObjectAccessor::GetCreature(), Unit::GetDisplayId(), Unit::GetMotionMaster(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Object::GetUInt32Value(), Unit::GetVictim(), Unit::HasUnitFlag(), Unit::HasUnitState(), ScriptedAI::me, MotionMaster::MoveChase(), Unit::RemoveAura(), Unit::RemoveUnitFlag(), Unit::SendMovementFlagUpdate(), Unit::SetControlled(), ScriptedAI::SetEquipmentSlots(), SPELL_CLEAVE, SPELL_DARK_SMASH, SPELL_DREADFUL_ROAR, SPELL_ENRAGE, SPELL_INGVAR_TRANSFORM, SPELL_RESURRECTION_BALL, SPELL_RESURRECTION_BEAM, SPELL_RESURRECTION_HEAL, SPELL_SHADOW_AXE, SPELL_SMASH, SPELL_STAGGERING_ROAR, SPELL_SUMMON_VALKYR, SPELL_WOE_STRIKE, summons, ThrowGUID, UNIT_FLAG_NOT_SELECTABLE, UNIT_STATE_CASTING, UNIT_STATE_ROOT, UNIT_VIRTUAL_ITEM_SLOT_ID, CreatureAI::UpdateVictim(), ValkyrGUID, YELL_AGGRO_2, YELL_ANHYLDE_2, and YELL_DEAD_1.

Member Data Documentation

◆ events

EventMap boss_ingvar_the_plunderer::events

◆ pInstance

InstanceScript* boss_ingvar_the_plunderer::pInstance

◆ summons

SummonList boss_ingvar_the_plunderer::summons

◆ ThrowGUID

ObjectGuid boss_ingvar_the_plunderer::ThrowGUID

Referenced by JustSummoned(), Reset(), and UpdateAI().

◆ ValkyrGUID

ObjectGuid boss_ingvar_the_plunderer::ValkyrGUID

Referenced by JustSummoned(), Reset(), and UpdateAI().


The documentation for this struct was generated from the following file: