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

Public Member Functions

 boss_lord_marrowgar (Creature *creature)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void SpellHitTarget (Unit *target, SpellInfo const *spell) override
 
ObjectGuid GetGUID (int32 id) const override
 
void UpdateAI (uint32 diff) override
 
void MovementInform (uint32 type, uint32 id) override
 
void JustDied (Unit *) override
 
void JustReachedHome () override
 
void KilledUnit (Unit *victim) override
 
void MoveInLineOfSight (Unit *who) override
 
bool CanAIAttack (Unit const *target) const override
 
- 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
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void SummonedCreatureDespawnAll () override
 
void UpdateAI (uint32 diff) override
 
void ScheduleHealthCheckEvent (uint32 healthPct, std::function< void()> exec)
 Executes a function once the creature reaches the defined health point percent.
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
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
 
void UpdateAI (uint32 diff) override
 
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 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 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)
 
void SetCombatMovement (bool allowMovement)
 
bool IsCombatMovementAllowed () const
 
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
 
- 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.
 
void Talk (uint8 id, Milliseconds delay)
 
 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 EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void JustEngagedWith (Unit *)
 Called for reaction when initially engaged.
 
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 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
 
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 ()
 
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 *)
 
- 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
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 
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)
 
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 (NOTE: Creature engage logic should NOT be here, but in JustEngagedWith, which happens once threat is established!)
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void HealDone (Unit *, uint32 &)
 
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)
 
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)
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the max threat target, which may not always 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)
 
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

bool _introDone
 
bool _boneSlice
 
ObjectGuid _lastBoneSliceTargets [3]
 
- Public Attributes inherited from BossAI
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
bool IsFleeing
 

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 BossAI
void _Reset ()
 
void _JustEngagedWith ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
bool _ProccessHealthCheckEvent (uint8 healthPct, uint32 damage, std::function< void()> exec) const
 
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
EventMap events
 
SummonList summons
 
TaskScheduler scheduler
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_lord_marrowgar()

boss_lord_marrowgar::boss_lord_marrowgar ( Creature creature)
inline
102 : BossAI(creature, DATA_LORD_MARROWGAR)
103 {
104 _introDone = false;
105 _boneSlice = false;
106 }
@ DATA_LORD_MARROWGAR
Definition: icecrown_citadel.h:93
Definition: ScriptedCreature.h:456
bool _boneSlice
Definition: boss_lord_marrowgar.cpp:109
bool _introDone
Definition: boss_lord_marrowgar.cpp:108

References _boneSlice, and _introDone.

Member Function Documentation

◆ CanAIAttack()

bool boss_lord_marrowgar::CanAIAttack ( Unit const *  target) const
inlineoverridevirtual

Reimplemented from UnitAI.

303 {
304 return target->GetPositionX() < -337.0f; // main gate
305 }

References Position::GetPositionX().

◆ GetGUID()

ObjectGuid boss_lord_marrowgar::GetGUID ( int32  id) const
inlineoverridevirtual

Reimplemented from UnitAI.

150 {
151 if (id >= 0 && id <= 2)
152 return _lastBoneSliceTargets[id];
153
154 return ObjectGuid::Empty;
155 }
static ObjectGuid const Empty
Definition: ObjectGuid.h:122
ObjectGuid _lastBoneSliceTargets[3]
Definition: boss_lord_marrowgar.cpp:110

References _lastBoneSliceTargets, and ObjectGuid::Empty.

◆ JustDied()

void boss_lord_marrowgar::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

274 {
276 _JustDied();
277 }
@ SAY_DEATH
Definition: boss_lord_marrowgar.cpp:36
Talk
Definition: boss_fathomlord_karathress.cpp:23
void _JustDied()
Definition: ScriptedCreature.cpp:585

References BossAI::_JustDied(), and SAY_DEATH.

◆ JustEngagedWith()

void boss_lord_marrowgar::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from BossAI.

131 {
133 me->setActive(true);
136 }
@ IN_PROGRESS
Definition: InstanceScript.h:57
@ SAY_AGGRO
Definition: boss_lord_marrowgar.cpp:32
void DoZoneInCombat(Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
Definition: CreatureAI.cpp:95
Creature * me
Definition: ScriptedCreature.h:282
InstanceScript *const instance
Definition: ScriptedCreature.h:461
void setActive(bool isActiveObject)
Definition: Object.cpp:1085
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:317

References DATA_LORD_MARROWGAR, CreatureAI::DoZoneInCombat(), IN_PROGRESS, BossAI::instance, ScriptedAI::me, SAY_AGGRO, WorldObject::setActive(), and InstanceScript::SetBossState().

◆ JustReachedHome()

void boss_lord_marrowgar::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from BossAI.

280 {
283 }
@ FAIL
Definition: InstanceScript.h:58
void _JustReachedHome()
Definition: ScriptedCreature.h:491

References BossAI::_JustReachedHome(), DATA_LORD_MARROWGAR, FAIL, BossAI::instance, and InstanceScript::SetBossState().

◆ KilledUnit()

void boss_lord_marrowgar::KilledUnit ( Unit victim)
inlineoverridevirtual

Reimplemented from ScriptedAI.

286 {
287 if (victim->GetTypeId() == TYPEID_PLAYER)
288 Talk(SAY_KILL);
289 }
@ TYPEID_PLAYER
Definition: ObjectGuid.h:38
@ SAY_KILL
Definition: boss_lord_marrowgar.cpp:35
TypeID GetTypeId() const
Definition: Object.h:121

References Object::GetTypeId(), SAY_KILL, and TYPEID_PLAYER.

◆ MoveInLineOfSight()

void boss_lord_marrowgar::MoveInLineOfSight ( Unit who)
inlineoverridevirtual

Reimplemented from CreatureAI.

292 {
293 if (!_introDone && me->IsAlive() && who->GetTypeId() == TYPEID_PLAYER && me->GetExactDist2dSq(who) <= 10000.0f) // 100*100, moveinlineofsight limited to 60yd anyway
294 {
296 _introDone = true;
297 }
298
300 }
@ SAY_ENTER_ZONE
Definition: boss_lord_marrowgar.cpp:31
virtual void MoveInLineOfSight(Unit *)
Definition: CreatureAI.cpp:158
float GetExactDist2dSq(const float x, const float y) const
Definition: Position.h:157
bool IsAlive() const
Definition: Unit.h:1808

References _introDone, Position::GetExactDist2dSq(), Object::GetTypeId(), Unit::IsAlive(), ScriptedAI::me, CreatureAI::MoveInLineOfSight(), SAY_ENTER_ZONE, and TYPEID_PLAYER.

◆ MovementInform()

void boss_lord_marrowgar::MovementInform ( uint32  type,
uint32  id 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

266 {
267 if (type != POINT_MOTION_TYPE || id != 1337)
268 return;
269
270 events.ScheduleEvent(EVENT_SPELL_COLDFLAME_BONE_STORM, 0ms);
271 }
@ POINT_MOTION_TYPE
Definition: MotionMaster.h:46
events
Definition: boss_sartura.cpp:43
@ EVENT_SPELL_COLDFLAME_BONE_STORM
Definition: boss_lord_marrowgar.cpp:64

References EVENT_SPELL_COLDFLAME_BONE_STORM, and POINT_MOTION_TYPE.

◆ Reset()

void boss_lord_marrowgar::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

113 {
115 _Reset();
116 events.ScheduleEvent(EVENT_ENABLE_BONE_SLICE, 10s);
117 events.ScheduleEvent(EVENT_SPELL_BONE_SPIKE_GRAVEYARD, 10s, 15s);
118 events.ScheduleEvent(EVENT_SPELL_COLDFLAME, 5s);
119 events.ScheduleEvent(EVENT_WARN_BONE_STORM, 45s, 50s);
120 events.ScheduleEvent(EVENT_ENRAGE, 10min);
121
122 _boneSlice = false;
123
124 for (uint8 i = 0; i < 3; ++i)
125 _lastBoneSliceTargets[i].Clear();
126
128 }
std::uint8_t uint8
Definition: Define.h:110
std::uint32_t uint32
Definition: Define.h:108
@ REACT_AGGRESSIVE
Definition: Unit.h:1025
@ EVENT_SPELL_BONE_SPIKE_GRAVEYARD
Definition: boss_lord_marrowgar.cpp:62
@ EVENT_SPELL_COLDFLAME
Definition: boss_lord_marrowgar.cpp:63
@ EVENT_WARN_BONE_STORM
Definition: boss_lord_marrowgar.cpp:65
@ EVENT_ENRAGE
Definition: boss_lord_marrowgar.cpp:69
@ EVENT_ENABLE_BONE_SLICE
Definition: boss_lord_marrowgar.cpp:61
@ DATA_BONED_ACHIEVEMENT
Definition: icecrown_citadel.h:112
void _Reset()
Definition: ScriptedCreature.cpp:570
void SetReactState(ReactStates st)
Definition: Creature.h:89
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:53

References _boneSlice, _lastBoneSliceTargets, BossAI::_Reset(), DATA_BONED_ACHIEVEMENT, EVENT_ENABLE_BONE_SLICE, EVENT_ENRAGE, EVENT_SPELL_BONE_SPIKE_GRAVEYARD, EVENT_SPELL_COLDFLAME, EVENT_WARN_BONE_STORM, BossAI::instance, ScriptedAI::me, REACT_AGGRESSIVE, ZoneScript::SetData(), and Creature::SetReactState().

◆ SpellHitTarget()

void boss_lord_marrowgar::SpellHitTarget ( Unit target,
SpellInfo const *  spell 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

139 {
140 if (target && (spell->Id == 69055 || spell->Id == 70814)) // Bone Slice (Saber Lash)
141 for (uint8 i = 0; i < 3; ++i)
142 if (!_lastBoneSliceTargets[i])
143 {
144 _lastBoneSliceTargets[i] = target->GetGUID();
145 break;
146 }
147 }
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106

References _lastBoneSliceTargets, Object::GetGUID(), and SpellInfo::Id.

◆ UpdateAI()

void boss_lord_marrowgar::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from BossAI.

158 {
159 if (!UpdateVictim())
160 return;
161
162 events.Update(diff);
163
165 return;
166
167 switch (events.ExecuteEvent())
168 {
169 case 0:
170 break;
172 _boneSlice = true;
173 break;
175 {
176 bool a = me->HasAura(SPELL_BONE_STORM);
177 if (IsHeroic() || !a)
179 events.Repeat(15s, 20s);
180 }
181 break;
184 me->CastSpell((Unit*)nullptr, SPELL_COLDFLAME_NORMAL, false);
185 events.Repeat(5s);
186 break;
189 break;
191 _boneSlice = false;
196 me->SetReactState(REACT_PASSIVE); // to prevent chasing another target on UpdateVictim()
199 events.Repeat(90s, 95s);
200 events.ScheduleEvent(EVENT_BEGIN_BONE_STORM, 3050ms);
201 break;
203 {
204 uint32 _boneStormDuration = RAID_MODE<uint32>(20000, 30000, 20000, 30000);
205 if (Aura* pStorm = me->GetAura(SPELL_BONE_STORM))
206 pStorm->SetDuration(int32(_boneStormDuration));
207 events.ScheduleEvent(EVENT_BONE_STORM_MOVE, 0ms);
208 events.ScheduleEvent(EVENT_END_BONE_STORM, _boneStormDuration + 1);
209 }
210 break;
212 {
214 {
215 events.Repeat(1ms);
216 break;
217 }
218 events.Repeat(5s);
219 Unit* unit = SelectTarget(SelectTargetMethod::Random, 0, BoneStormMoveTargetSelector(me));
220 if (!unit)
221 {
222 if ((unit = SelectTarget(SelectTargetMethod::MaxThreat, 0, 175.0f, true)))
223 if (unit->GetPositionX() > -337.0f)
224 {
226 return;
227 }
228 }
229 if (unit)
230 me->GetMotionMaster()->MoveCharge(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ(), 25.0f, 1337);
231 break;
232 }
233 break;
235 me->StopMoving();
239 events.CancelEvent(EVENT_BONE_STORM_MOVE);
240 events.ScheduleEvent(EVENT_ENABLE_BONE_SLICE, 10s);
241 if (!IsHeroic())
242 events.RescheduleEvent(EVENT_SPELL_BONE_SPIKE_GRAVEYARD, 15s, 20s);
243 break;
244 case EVENT_ENRAGE:
245 me->CastSpell(me, SPELL_BERSERK, true);
247 break;
248 }
249
251 return;
252
255
257 {
258 for (uint8 i = 0; i < 3; ++i)
259 _lastBoneSliceTargets[i].Clear();
260 }
261
263 }
std::int32_t int32
Definition: Define.h:104
@ REACT_PASSIVE
Definition: Unit.h:1023
@ CURRENT_MELEE_SPELL
Definition: Unit.h:978
@ UNIT_STATE_CASTING
Definition: Unit.h:340
@ SPELL_COLDFLAME_BONE_STORM
Definition: boss_lord_marrowgar.cpp:48
@ SPELL_COLDFLAME_NORMAL
Definition: boss_lord_marrowgar.cpp:47
@ SPELL_BONE_SPIKE_GRAVEYARD
Definition: boss_lord_marrowgar.cpp:46
@ SPELL_BONE_STORM
Definition: boss_lord_marrowgar.cpp:45
@ SPELL_BONE_SLICE
Definition: boss_lord_marrowgar.cpp:44
@ SAY_BONE_STORM
Definition: boss_lord_marrowgar.cpp:33
@ SAY_BERSERK
Definition: boss_lord_marrowgar.cpp:37
@ EMOTE_BONE_STORM
Definition: boss_lord_marrowgar.cpp:38
@ EVENT_BONE_STORM_MOVE
Definition: boss_lord_marrowgar.cpp:67
@ EVENT_BEGIN_BONE_STORM
Definition: boss_lord_marrowgar.cpp:66
@ EVENT_END_BONE_STORM
Definition: boss_lord_marrowgar.cpp:68
#define SPELL_BERSERK
Definition: boss_ignis.cpp:39
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:40
SpellCastResult DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:241
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:111
bool UpdateVictim()
Definition: CreatureAI.cpp:269
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:197
bool IsHeroic() const
Definition: ScriptedCreature.h:379
void DoStartMovement(Unit *target, float distance=0.0f, float angle=0.0f)
Definition: ScriptedCreature.cpp:223
float GetPositionZ() const
Definition: Position.h:119
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
Definition: Unit.h:1290
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5499
MotionMaster * GetMotionMaster()
Definition: Unit.h:2262
void StopMoving()
Definition: Unit.cpp:16824
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5610
bool IsWithinMeleeRange(Unit const *obj, float dist=0.f) const
Definition: Unit.cpp:683
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:1169
Unit * GetVictim() const
Definition: Unit.h:1386
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1398
void FinishSpell(CurrentSpellTypes spellType, bool ok=true)
Definition: Unit.cpp:4027
bool isAttackReady(WeaponAttackType type=BASE_ATTACK) const
Definition: Unit.h:1343
Spell * GetCurrentSpell(CurrentSpellTypes spellType) const
Definition: Unit.h:2061
void MoveCharge(float x, float y, float z, float speed=SPEED_CHARGE, uint32 id=EVENT_CHARGE, const Movement::PointsArray *path=nullptr, bool generatePath=false, float orientation=0.0f, ObjectGuid targetGUID=ObjectGuid::Empty)
Definition: MotionMaster.cpp:586
MovementGeneratorType GetCurrentMovementGeneratorType() const
Definition: MotionMaster.cpp:817
void MovementExpired(bool reset=true)
Definition: MotionMaster.h:178
void MoveIdle()
Definition: MotionMaster.cpp:231
Definition: SpellAuras.h:87
Definition: boss_lord_marrowgar.cpp:75

References _boneSlice, _lastBoneSliceTargets, Unit::CastSpell(), CURRENT_MELEE_SPELL, UnitAI::DoCastVictim(), UnitAI::DoMeleeAttackIfReady(), ScriptedAI::DoStartMovement(), EMOTE_BONE_STORM, CreatureAI::EnterEvadeMode(), EVENT_BEGIN_BONE_STORM, EVENT_BONE_STORM_MOVE, EVENT_ENABLE_BONE_SLICE, EVENT_END_BONE_STORM, EVENT_ENRAGE, EVENT_SPELL_BONE_SPIKE_GRAVEYARD, EVENT_SPELL_COLDFLAME, EVENT_SPELL_COLDFLAME_BONE_STORM, EVENT_WARN_BONE_STORM, Unit::FinishSpell(), Unit::GetAura(), MotionMaster::GetCurrentMovementGeneratorType(), Unit::GetCurrentSpell(), Unit::GetMotionMaster(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Unit::GetVictim(), Unit::HasAura(), Unit::HasUnitState(), Unit::isAttackReady(), ScriptedAI::IsHeroic(), Unit::IsWithinMeleeRange(), ScriptedAI::me, MotionMaster::MoveCharge(), MotionMaster::MoveIdle(), MotionMaster::MovementExpired(), POINT_MOTION_TYPE, REACT_AGGRESSIVE, REACT_PASSIVE, SAY_BERSERK, SAY_BONE_STORM, UnitAI::SelectTarget(), Creature::SetReactState(), SPELL_BERSERK, SPELL_BONE_SLICE, SPELL_BONE_SPIKE_GRAVEYARD, SPELL_BONE_STORM, SPELL_COLDFLAME_BONE_STORM, SPELL_COLDFLAME_NORMAL, Unit::StopMoving(), UNIT_STATE_CASTING, and CreatureAI::UpdateVictim().

Member Data Documentation

◆ _boneSlice

bool boss_lord_marrowgar::_boneSlice

◆ _introDone

bool boss_lord_marrowgar::_introDone

◆ _lastBoneSliceTargets

ObjectGuid boss_lord_marrowgar::_lastBoneSliceTargets[3]