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.
 
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.
 
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 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)
 
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 OnPowerUpdate (Powers, int32, int32, uint32)
 
virtual void HealDone (Unit *, uint32 &)
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 
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
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

◆ boss_lord_marrowgar()

boss_lord_marrowgar::boss_lord_marrowgar ( Creature creature)
inline
103 : BossAI(creature, DATA_LORD_MARROWGAR)
104 {
105 _introDone = false;
106 _boneSlice = false;
107 }
@ DATA_LORD_MARROWGAR
Definition: icecrown_citadel.h:94
Definition: ScriptedCreature.h:469
bool _boneSlice
Definition: boss_lord_marrowgar.cpp:110
bool _introDone
Definition: boss_lord_marrowgar.cpp:109

References _boneSlice, and _introDone.

Member Function Documentation

◆ CanAIAttack()

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

Reimplemented from UnitAI.

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

References Position::GetPositionX().

◆ GetGUID()

ObjectGuid boss_lord_marrowgar::GetGUID ( int32  id) const
inlineoverridevirtual

Reimplemented from UnitAI.

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

References _lastBoneSliceTargets, and ObjectGuid::Empty.

◆ JustDied()

void boss_lord_marrowgar::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

275 {
277 _JustDied();
278 }
@ SAY_DEATH
Definition: boss_lord_marrowgar.cpp:37
Talk
Definition: boss_fathomlord_karathress.cpp:25
void _JustDied()
Definition: ScriptedCreature.cpp:620

References BossAI::_JustDied(), and SAY_DEATH.

◆ JustEngagedWith()

void boss_lord_marrowgar::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from BossAI.

132 {
134 me->setActive(true);
137 }
@ IN_PROGRESS
Definition: InstanceScript.h:58
@ SAY_AGGRO
Definition: boss_lord_marrowgar.cpp:33
void DoZoneInCombat(Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
Definition: CreatureAI.cpp:94
Creature * me
Definition: ScriptedCreature.h:282
InstanceScript *const instance
Definition: ScriptedCreature.h:474
void setActive(bool isActiveObject)
Definition: Object.cpp:1085
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:350

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.

281 {
284 }
@ FAIL
Definition: InstanceScript.h:59
void _JustReachedHome()
Definition: ScriptedCreature.h:505

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

◆ KilledUnit()

void boss_lord_marrowgar::KilledUnit ( Unit victim)
inlineoverridevirtual

Reimplemented from ScriptedAI.

287 {
288 if (victim->GetTypeId() == TYPEID_PLAYER)
289 Talk(SAY_KILL);
290 }
@ TYPEID_PLAYER
Definition: ObjectGuid.h:38
@ SAY_KILL
Definition: boss_lord_marrowgar.cpp:36
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.

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

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.

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

References EVENT_SPELL_COLDFLAME_BONE_STORM, and POINT_MOTION_TYPE.

◆ Reset()

void boss_lord_marrowgar::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

114 {
116 _Reset();
117 events.ScheduleEvent(EVENT_ENABLE_BONE_SLICE, 10s);
118 events.ScheduleEvent(EVENT_SPELL_BONE_SPIKE_GRAVEYARD, 10s, 15s);
119 events.ScheduleEvent(EVENT_SPELL_COLDFLAME, 5s);
120 events.ScheduleEvent(EVENT_WARN_BONE_STORM, 45s, 50s);
121 events.ScheduleEvent(EVENT_ENRAGE, 10min);
122
123 _boneSlice = false;
124
125 for (uint8 i = 0; i < 3; ++i)
126 _lastBoneSliceTargets[i].Clear();
127
129 }
std::uint8_t uint8
Definition: Define.h:110
std::uint32_t uint32
Definition: Define.h:108
@ REACT_AGGRESSIVE
Definition: Unit.h:1037
@ EVENT_SPELL_BONE_SPIKE_GRAVEYARD
Definition: boss_lord_marrowgar.cpp:63
@ EVENT_SPELL_COLDFLAME
Definition: boss_lord_marrowgar.cpp:64
@ EVENT_WARN_BONE_STORM
Definition: boss_lord_marrowgar.cpp:66
@ EVENT_ENRAGE
Definition: boss_lord_marrowgar.cpp:70
@ EVENT_ENABLE_BONE_SLICE
Definition: boss_lord_marrowgar.cpp:62
@ DATA_BONED_ACHIEVEMENT
Definition: icecrown_citadel.h:113
void _Reset()
Definition: ScriptedCreature.cpp:604
void SetReactState(ReactStates st)
Definition: Creature.h:90
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.

140 {
141 if (target && (spell->Id == 69055 || spell->Id == 70814)) // Bone Slice (Saber Lash)
142 for (uint8 i = 0; i < 3; ++i)
143 if (!_lastBoneSliceTargets[i])
144 {
145 _lastBoneSliceTargets[i] = target->GetGUID();
146 break;
147 }
148 }
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.

159 {
160 if (!UpdateVictim())
161 return;
162
163 events.Update(diff);
164
166 return;
167
168 switch (events.ExecuteEvent())
169 {
170 case 0:
171 break;
173 _boneSlice = true;
174 break;
176 {
177 bool a = me->HasAura(SPELL_BONE_STORM);
178 if (IsHeroic() || !a)
180 events.Repeat(15s, 20s);
181 }
182 break;
185 me->CastSpell((Unit*)nullptr, SPELL_COLDFLAME_NORMAL, false);
186 events.Repeat(5s);
187 break;
190 break;
192 _boneSlice = false;
197 me->SetReactState(REACT_PASSIVE); // to prevent chasing another target on UpdateVictim()
200 events.Repeat(90s, 95s);
201 events.ScheduleEvent(EVENT_BEGIN_BONE_STORM, 3050ms);
202 break;
204 {
205 uint32 _boneStormDuration = RAID_MODE<uint32>(20000, 30000, 20000, 30000);
206 if (Aura* pStorm = me->GetAura(SPELL_BONE_STORM))
207 pStorm->SetDuration(int32(_boneStormDuration));
208 events.ScheduleEvent(EVENT_BONE_STORM_MOVE, 0ms);
209 events.ScheduleEvent(EVENT_END_BONE_STORM, _boneStormDuration + 1);
210 }
211 break;
213 {
215 {
216 events.Repeat(1ms);
217 break;
218 }
219 events.Repeat(5s);
220 Unit* unit = SelectTarget(SelectTargetMethod::Random, 0, BoneStormMoveTargetSelector(me));
221 if (!unit)
222 {
223 if ((unit = SelectTarget(SelectTargetMethod::MaxThreat, 0, 175.0f, true)))
224 if (unit->GetPositionX() > -337.0f)
225 {
227 return;
228 }
229 }
230 if (unit)
231 me->GetMotionMaster()->MoveCharge(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ(), 25.0f, 1337);
232 break;
233 }
234 break;
236 me->StopMoving();
240 events.CancelEvent(EVENT_BONE_STORM_MOVE);
241 events.ScheduleEvent(EVENT_ENABLE_BONE_SLICE, 10s);
242 if (!IsHeroic())
243 events.RescheduleEvent(EVENT_SPELL_BONE_SPIKE_GRAVEYARD, 15s, 20s);
244 break;
245 case EVENT_ENRAGE:
246 me->CastSpell(me, SPELL_BERSERK, true);
248 break;
249 }
250
252 return;
253
256
258 {
259 for (uint8 i = 0; i < 3; ++i)
260 _lastBoneSliceTargets[i].Clear();
261 }
262
264 }
std::int32_t int32
Definition: Define.h:104
@ REACT_PASSIVE
Definition: Unit.h:1035
@ CURRENT_MELEE_SPELL
Definition: Unit.h:990
@ UNIT_STATE_CASTING
Definition: Unit.h:340
@ SPELL_COLDFLAME_BONE_STORM
Definition: boss_lord_marrowgar.cpp:49
@ SPELL_COLDFLAME_NORMAL
Definition: boss_lord_marrowgar.cpp:48
@ SPELL_BONE_SPIKE_GRAVEYARD
Definition: boss_lord_marrowgar.cpp:47
@ SPELL_BONE_STORM
Definition: boss_lord_marrowgar.cpp:46
@ SPELL_BONE_SLICE
Definition: boss_lord_marrowgar.cpp:45
@ SAY_BONE_STORM
Definition: boss_lord_marrowgar.cpp:34
@ SAY_BERSERK
Definition: boss_lord_marrowgar.cpp:38
@ EMOTE_BONE_STORM
Definition: boss_lord_marrowgar.cpp:39
@ EVENT_BONE_STORM_MOVE
Definition: boss_lord_marrowgar.cpp:68
@ EVENT_BEGIN_BONE_STORM
Definition: boss_lord_marrowgar.cpp:67
@ EVENT_END_BONE_STORM
Definition: boss_lord_marrowgar.cpp:69
#define SPELL_BERSERK
Definition: boss_ignis.cpp:41
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:39
SpellCastResult DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:240
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:110
bool UpdateVictim()
Definition: CreatureAI.cpp:268
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:196
bool IsHeroic() const
Definition: ScriptedCreature.h:391
void DoStartMovement(Unit *target, float distance=0.0f, float angle=0.0f)
Definition: ScriptedCreature.cpp:227
float GetPositionZ() const
Definition: Position.h:119
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
Definition: Unit.h:1302
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5519
MotionMaster * GetMotionMaster()
Definition: Unit.h:2276
void StopMoving()
Definition: Unit.cpp:16918
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5636
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:1398
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1410
void FinishSpell(CurrentSpellTypes spellType, bool ok=true)
Definition: Unit.cpp:4039
bool isAttackReady(WeaponAttackType type=BASE_ATTACK) const
Definition: Unit.h:1355
Spell * GetCurrentSpell(CurrentSpellTypes spellType) const
Definition: Unit.h:2075
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:628
MovementGeneratorType GetCurrentMovementGeneratorType() const
Definition: MotionMaster.cpp:859
void MovementExpired(bool reset=true)
Definition: MotionMaster.h:178
void MoveIdle()
Definition: MotionMaster.cpp:232
Definition: SpellAuras.h:87
Definition: boss_lord_marrowgar.cpp:76

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]