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

Public Member Functions

 boss_taldaram (Creature *pCreature)
 
void InitializeAI () override
 
void Reset () override
 
void OnAuraRemove (AuraApplication *auraApp, AuraRemoveMode mode) override
 
void DoAction (int32 action) override
 
void MovementInform (uint32 type, uint32 id) override
 
void DamageTaken (Unit *attacker, uint32 &damage, DamageEffectType damageType, SpellSchoolMask school) override
 Called at any Damage from any attacker (before damage apply)
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *victim) override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void SpellHitTarget (Unit *, SpellInfo const *spellInfo) override
 
void JustSummoned (Creature *summon) override
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
 ~BossAI () override
 
bool CanRespawn () override
 
void OnSpellCast (SpellInfo const *spell) override
 
void OnChannelFinished (SpellInfo const *spell) override
 
void OnSpellFailed (SpellInfo const *spell) override
 
void DamageTaken (Unit *attacker, uint32 &damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
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()
 
void ScheduleHealthCheckEvent (uint32 healthPct, std::function< void()> exec, bool allowedWhileCasting=true)
 Executes a function once the creature reaches the defined health point percent.
 
void ScheduleHealthCheckEvent (std::initializer_list< uint8 > healthPct, std::function< void()> exec, bool allowedWhileCasting=true)
 
void ProcessHealthCheck ()
 
void ScheduleEnrageTimer (uint32 spellId, Milliseconds timer, uint8 textId=0)
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
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)
 
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 - this happens after JustEnteredCombat.
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoRewardPlayersInArea ()
 
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
 
bool IsEngaged () const
 Check if creature is currently engaged in combat.
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
void JustEnteredCombat (Unit *who) override
 Called when the unit enters combat.
 
virtual void JustStartedThreateningMe (Unit *who)
 
void EngagementStart (Unit *who)
 
void EngagementOver ()
 
void JustExitedCombat () override
 Called when the unit leaves combat.
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void OnSpellStart (SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void PathEndReached (uint32)
 
virtual void WaypointPathStarted (uint32)
 == Waypoints system =============================
 
virtual void WaypointStarted (uint32, uint32)
 
virtual void WaypointReached (uint32, uint32)
 
virtual void WaypointPathEnded (uint32, uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed.
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *attacker)
 
virtual void OwnerAttacked (Unit *target)
 
void OnOwnerCombatInteraction (Unit *target)
 
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 DistancingStarted ()
 
virtual void DistancingEnded ()
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
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 EvadeTimerExpired ()
 Called when evade timer expires (target unreachable for too long)
 
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
 

Private Member Functions

void ScheduleCombatEvents ()
 

Private Attributes

Position victimSperePos
 
uint32 vanishDamage
 

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
 
bool _isEngaged
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_taldaram()

boss_taldaram::boss_taldaram ( Creature pCreature)
inline
175 { }
@ DATA_PRINCE_TALDARAM
Definition ahnkahet.h:28
Definition ScriptedCreature.h:485
uint32 vanishDamage
Definition boss_prince_taldaram.cpp:357

Member Function Documentation

◆ DamageTaken()

void boss_taldaram::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.

286 {
287 BossAI::DamageTaken(attacker, damage, damageType, school);
288
290 {
291 vanishDamage += damage;
292 if (vanishDamage >= DUNGEON_MODE<uint32>(MAX_EMBRACE_DMG, MAX_EMBRACE_DMG_H))
293 {
295 me->CastStop();
298 vanishDamage = 0;
299 }
300 }
301 }
#define sSpellMgr
Definition SpellMgr.h:836
@ REACT_AGGRESSIVE
Definition Unit.h:568
@ MAX_EMBRACE_DMG
Definition boss_prince_taldaram.cpp:55
@ MAX_EMBRACE_DMG_H
Definition boss_prince_taldaram.cpp:56
@ SPELL_EMBRACE_OF_THE_VAMPYR
Definition boss_prince_taldaram.cpp:43
void DamageTaken(Unit *attacker, uint32 &damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override
Called at any Damage from any attacker (before damage apply)
Definition ScriptedCreature.cpp:805
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:99
void ResumeChasingVictim()
Helper to resume chasing current victim.
Definition Creature.h:432
Spell * FindCurrentSpellBySpellId(uint32 spell_id) const
Definition Unit.cpp:4326
void CastStop(uint32 except_spellid=0, bool withInstant=true)
Interrupt the unit cast for all the current spells.
Definition Unit.cpp:1343
Creature * me
Definition ScriptedCreature.h:281
void ScheduleCombatEvents()
Definition boss_prince_taldaram.cpp:359

References Unit::CastStop(), BossAI::DamageTaken(), Unit::FindCurrentSpellBySpellId(), MAX_EMBRACE_DMG, MAX_EMBRACE_DMG_H, ScriptedAI::me, REACT_AGGRESSIVE, Creature::ResumeChasingVictim(), ScheduleCombatEvents(), Creature::SetReactState(), SPELL_EMBRACE_OF_THE_VAMPYR, sSpellMgr, and vanishDamage.

◆ DoAction()

void boss_taldaram::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

246 {
247 if (action == ACTION_REMOVE_PRISON || action == ACTION_REMOVE_PRISON_AT_RESET)
248 {
251
252 if (action == ACTION_REMOVE_PRISON)
253 {
258 }
259 // Teleport instantly
260 else
261 {
262 me->SetDisableGravity(false);
263 me->SetHover(false);
266 me->SetImmuneToAll(false);
268 }
270 }
271 }
@ UNIT_FLAG_NON_ATTACKABLE
Definition UnitDefines.h:258
@ UNIT_FLAG_NOT_SELECTABLE
Definition UnitDefines.h:282
@ NPC_JEDOGA_CONTROLLER
Definition ahnkahet.h:46
@ ACTION_REMOVE_PRISON
Definition ahnkahet.h:65
@ DATA_PRINCE_TALDARAM_PLATFORM
Definition ahnkahet.h:35
@ ACTION_REMOVE_PRISON_AT_RESET
Definition boss_prince_taldaram.cpp:65
@ SAY_REMOVE_PRISON
Definition boss_prince_taldaram.cpp:72
@ POINT_LAND
Definition boss_prince_taldaram.cpp:82
@ SPELL_HOVER_FALL
Definition boss_prince_taldaram.cpp:42
InstanceScript *const instance
Definition ScriptedCreature.h:492
SummonList summons
Definition ScriptedCreature.h:539
void SetHomePosition(float x, float y, float z, float o)
Definition Creature.h:345
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition Creature.h:347
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Open or close a GameObject by GUID.
Definition InstanceScript.cpp:125
ObjectGuid GetGuidData(uint32 type) const override
Definition InstanceScript.cpp:110
void MoveLand(uint32 id, Position const &pos, float speed=0.0f)
Use to move the unit from the air to the ground. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition MotionMaster.cpp:553
void Clear(bool reset=true)
Definition MotionMaster.h:193
void DespawnEntry(uint32 entry)
Definition ScriptedCreature.cpp:55
SpellCastResult DoCastSelf(uint32 spellId, bool triggered=false)
Definition UnitAI.h:394
MotionMaster * GetMotionMaster()
Definition Unit.h:1758
void SetHover(bool enable)
Definition Unit.cpp:16599
virtual bool UpdatePosition(float x, float y, float z, float ang, bool teleport=false)
Definition Unit.cpp:15967
void SetDisableGravity(bool disable)
Definition Unit.cpp:16462
void RemoveAllAuras()
Definition Unit.cpp:5580
void SetImmuneToAll(bool apply, bool keepCombat=false)
Definition Unit.h:924
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:749
float GetMapWaterOrGroundLevel(Position pos, float *ground=nullptr) const
Definition Object.h:705
Talk
Definition hyjal.cpp:82
float GetOrientation() const
Definition Position.h:124
float GetPositionX() const
Definition Position.h:121
void GetPosition(float &x, float &y) const
Definition Position.h:126
float GetPositionY() const
Definition Position.h:122

References ACTION_REMOVE_PRISON, ACTION_REMOVE_PRISON_AT_RESET, MotionMaster::Clear(), DATA_PRINCE_TALDARAM_PLATFORM, SummonList::DespawnEntry(), UnitAI::DoCastSelf(), InstanceScript::GetGuidData(), Creature::GetHomePosition(), WorldObject::GetMapWaterOrGroundLevel(), Unit::GetMotionMaster(), Position::GetOrientation(), Position::GetPosition(), Position::GetPositionX(), Position::GetPositionY(), InstanceScript::HandleGameObject(), BossAI::instance, ScriptedAI::me, MotionMaster::MoveLand(), NPC_JEDOGA_CONTROLLER, POINT_LAND, Unit::RemoveAllAuras(), Unit::RemoveUnitFlag(), SAY_REMOVE_PRISON, Unit::SetDisableGravity(), Creature::SetHomePosition(), Unit::SetHover(), Unit::SetImmuneToAll(), SPELL_HOVER_FALL, BossAI::summons, UNIT_FLAG_NON_ATTACKABLE, UNIT_FLAG_NOT_SELECTABLE, and Unit::UpdatePosition().

Referenced by InitializeAI().

◆ InitializeAI()

void boss_taldaram::InitializeAI ( )
inlineoverridevirtual

Reimplemented from UnitAI.

178 {
180
181 // Event not started
183 {
184 me->SetImmuneToAll(true);
185 me->SetDisableGravity(true);
186 me->SetHover(true);
187
190
192 return;
193 }
194
197 }
@ DONE
Definition InstanceScript.h:61
@ DATA_TELDRAM_SPHERE1
Definition ahnkahet.h:75
@ DATA_TELDRAM_SPHERE2
Definition ahnkahet.h:76
@ SUMMON_GROUP_TRIGGERS
Definition boss_prince_taldaram.cpp:58
@ SPELL_BEAM_VISUAL
Definition boss_prince_taldaram.cpp:39
uint32 GetPersistentData(uint32 index) const
Definition InstanceScript.h:257
virtual void InitializeAI()
Definition UnitAI.h:209
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5982
void SummonCreatureGroup(uint8 group, std::list< TempSummon * > *list=nullptr)
Definition Object.cpp:2471
void DoAction(int32 action) override
Definition boss_prince_taldaram.cpp:245

References ACTION_REMOVE_PRISON_AT_RESET, DATA_TELDRAM_SPHERE1, DATA_TELDRAM_SPHERE2, DoAction(), UnitAI::DoCastSelf(), DONE, InstanceScript::GetPersistentData(), Unit::HasAura(), UnitAI::InitializeAI(), BossAI::instance, ScriptedAI::me, Unit::SetDisableGravity(), Unit::SetHover(), Unit::SetImmuneToAll(), SPELL_BEAM_VISUAL, SUMMON_GROUP_TRIGGERS, and WorldObject::SummonCreatureGroup().

◆ JustDied()

void boss_taldaram::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

304 {
305 _JustDied();
307 }
@ SAY_DEATH
Definition boss_prince_taldaram.cpp:75
void _JustDied()
Definition ScriptedCreature.cpp:664

References BossAI::_JustDied(), and SAY_DEATH.

◆ JustEngagedWith()

void boss_taldaram::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged - this happens after JustEnteredCombat.

Reimplemented from CreatureAI.

318 {
322
325 }
@ SAY_AGGRO
Definition boss_prince_taldaram.cpp:73
void _JustEngagedWith()
Definition ScriptedCreature.cpp:677
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition Unit.cpp:4302

References BossAI::_JustEngagedWith(), Unit::InterruptNonMeleeSpells(), ScriptedAI::me, Unit::RemoveAllAuras(), SAY_AGGRO, and ScheduleCombatEvents().

◆ JustSummoned()

void boss_taldaram::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from CreatureAI.

334 {
335 summons.Summon(summon);
336 switch (summon->GetEntry())
337 {
341 {
342 if (npc_taldaram_flamesphere* summonAI = dynamic_cast<npc_taldaram_flamesphere*>(summon->AI()))
343 summonAI->SetVictimPos(victimSperePos);
344
345 break;
346 }
348 {
349 summon->CastSpell(nullptr, SPELL_BEAM_VISUAL);
350 break;
351 }
352 }
353 }
@ NPC_FLAME_SPHERE_2
Definition boss_prince_taldaram.cpp:49
@ NPC_FLAME_SPHERE_3
Definition boss_prince_taldaram.cpp:50
@ NPC_FLAME_SPHERE_1
Definition boss_prince_taldaram.cpp:48
CreatureAI * AI() const
Definition Creature.h:143
uint32 GetEntry() const
Definition Object.h:117
void Summon(Creature const *summon)
Definition ScriptedCreature.h:88
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:1350
Position victimSperePos
Definition boss_prince_taldaram.cpp:356
Definition boss_prince_taldaram.cpp:90

References Creature::AI(), Unit::CastSpell(), Object::GetEntry(), NPC_FLAME_SPHERE_1, NPC_FLAME_SPHERE_2, NPC_FLAME_SPHERE_3, NPC_JEDOGA_CONTROLLER, SPELL_BEAM_VISUAL, SummonList::Summon(), BossAI::summons, and victimSperePos.

◆ KilledUnit()

void boss_taldaram::KilledUnit ( Unit victim)
inlineoverridevirtual

Reimplemented from CreatureAI.

310 {
311 if (!victim->IsPlayer())
312 return;
313
314 Talk(SAY_SLAY);
315 }
@ SAY_SLAY
Definition boss_prince_taldaram.cpp:74
bool IsPlayer() const
Definition Object.h:201

References Object::IsPlayer(), and SAY_SLAY.

◆ MovementInform()

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

◆ OnAuraRemove()

void boss_taldaram::OnAuraRemove ( AuraApplication auraApp,
AuraRemoveMode  mode 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

221 {
222 if (auraApp->GetBase()->GetId() == SPELL_VANISH && mode == AURA_REMOVE_BY_EXPIRE)
223 {
224 scheduler.Schedule(2500ms, [this](TaskContext)
225 {
226 if (Unit* vanishTarget = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
227 {
228 vanishDamage = 0;
229 DoCast(vanishTarget, SPELL_SHADOWSTEP);
230 DoCast(vanishTarget, SPELL_EMBRACE_OF_THE_VAMPYR);
231 }
232
235 {
236 ScheduleCombatEvents();
237 me->SetReactState(REACT_AGGRESSIVE);
238 me->ResumeChasingVictim();
239 }
240 }, 20s);
241 });
242 }
243 }
@ AURA_REMOVE_BY_EXPIRE
Definition SpellAuraDefines.h:395
@ GROUP_COMBAT_ABILITIES
Definition boss_prince_taldaram.cpp:60
@ SPELL_SHADOWSTEP
Definition boss_prince_taldaram.cpp:41
@ SPELL_VANISH
Definition boss_prince_taldaram.cpp:40
Aura * GetBase() const
Definition SpellAuras.h:62
uint32 GetId() const
Definition SpellAuras.cpp:405
TaskScheduler scheduler
Definition CreatureAI.h:74
void AddEventAtOffset(BasicEvent *event, Milliseconds offset, uint8 eventGroup=0)
Definition EventProcessor.h:108
Definition TaskScheduler.h:421
TaskScheduler & Schedule(std::chrono::duration< _Rep, _Period > const &time, task_handler_t const &task)
Definition TaskScheduler.h:232
bool IsGroupScheduled(group_t const group)
Check if the group exists and is currently scheduled.
Definition TaskScheduler.cpp:122
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:111
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:178
Definition Unit.h:664
EventProcessor m_Events
Definition Object.h:736

References EventProcessor::AddEventAtOffset(), AURA_REMOVE_BY_EXPIRE, UnitAI::DoCast(), AuraApplication::GetBase(), Aura::GetId(), GROUP_COMBAT_ABILITIES, TaskScheduler::IsGroupScheduled(), WorldObject::m_Events, ScriptedAI::me, Random, TaskScheduler::Schedule(), CreatureAI::scheduler, UnitAI::SelectTarget(), SPELL_EMBRACE_OF_THE_VAMPYR, SPELL_SHADOWSTEP, SPELL_VANISH, and vanishDamage.

◆ Reset()

void boss_taldaram::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

200 {
201 _Reset();
202
203 vanishDamage = 0;
204
206
207 ScheduleHealthCheckEvent({ 75, 50, 25 }, [&] {
208 scheduler.Schedule(1s, [this](TaskContext)
209 {
214 DoStopAttack();
216 });
217 });
218 }
@ REACT_PASSIVE
Definition Unit.h:566
@ SAY_VANISH
Definition boss_prince_taldaram.cpp:77
void ScheduleHealthCheckEvent(uint32 healthPct, std::function< void()> exec, bool allowedWhileCasting=true)
Executes a function once the creature reaches the defined health point percent.
Definition ScriptedCreature.cpp:831
void _Reset()
Definition ScriptedCreature.cpp:644
TaskScheduler & CancelGroup(group_t const group)
Definition TaskScheduler.cpp:53
void DoStopAttack()
Definition ScriptedCreature.cpp:266

References BossAI::_Reset(), TaskScheduler::CancelGroup(), MotionMaster::Clear(), UnitAI::DoCastSelf(), ScriptedAI::DoStopAttack(), Unit::GetMotionMaster(), GROUP_COMBAT_ABILITIES, ScriptedAI::me, REACT_AGGRESSIVE, REACT_PASSIVE, SAY_VANISH, TaskScheduler::Schedule(), BossAI::ScheduleHealthCheckEvent(), CreatureAI::scheduler, Creature::SetReactState(), SPELL_VANISH, and vanishDamage.

◆ ScheduleCombatEvents()

void boss_taldaram::ScheduleCombatEvents ( )
inlineprivate
360 {
362 {
364 context.Repeat(15s);
365 }).Schedule(10s, GROUP_COMBAT_ABILITIES, [this](TaskContext context)
366 {
367 if (Unit* victim = me->GetVictim())
368 {
370 victimSperePos = victim->GetPosition();
371 }
372
373 context.Repeat(15s);
374 });
375
376 vanishDamage = 0;
377 }
@ SPELL_CONJURE_FLAME_SPHERE
Definition boss_prince_taldaram.cpp:31
@ SPELL_BLOODTHIRST
Definition boss_prince_taldaram.cpp:30
TaskContext & Repeat(std::chrono::duration< _Rep, _Period > const &duration)
Definition TaskScheduler.h:493
SpellCastResult DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:277
Unit * GetVictim() const
Definition Unit.h:903

References UnitAI::DoCast(), UnitAI::DoCastVictim(), Position::GetPosition(), Unit::GetVictim(), GROUP_COMBAT_ABILITIES, ScriptedAI::me, TaskContext::Repeat(), TaskScheduler::Schedule(), CreatureAI::scheduler, SPELL_BLOODTHIRST, SPELL_CONJURE_FLAME_SPHERE, vanishDamage, and victimSperePos.

Referenced by DamageTaken(), and JustEngagedWith().

◆ SpellHitTarget()

void boss_taldaram::SpellHitTarget ( Unit ,
SpellInfo const *  spellInfo 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

328 {
329 if (spellInfo->Id == SPELL_CONJURE_FLAME_SPHERE)
331 }
@ ACTION_SPHERE
Definition boss_prince_taldaram.cpp:66
void DoAction(int32 info, uint16 max=0)
Definition ScriptedCreature.h:102

References ACTION_SPHERE, SummonList::DoAction(), SpellInfo::Id, SPELL_CONJURE_FLAME_SPHERE, and BossAI::summons.

Member Data Documentation

◆ vanishDamage

uint32 boss_taldaram::vanishDamage
private

◆ victimSperePos

Position boss_taldaram::victimSperePos
private

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