AzerothCore 3.3.5a
OpenSource WoW Emulator
No Matches
boss_prince_taldaram_icc::boss_prince_taldaramAI Struct Reference
Inheritance diagram for boss_prince_taldaram_icc::boss_prince_taldaramAI:
ScriptedAI CreatureAI UnitAI

Public Member Functions

 boss_prince_taldaramAI (Creature *creature)
void InitializeAI () override
void Reset () override
void JustEngagedWith (Unit *who) override
 Called for reaction when initially engaged.
void JustDied (Unit *) override
void JustRespawned () override
void JustReachedHome () override
void JustSummoned (Creature *summon) override
void SummonedCreatureDespawn (Creature *s) override
void DamageTaken (Unit *attacker, uint32 &damage, DamageEffectType, SpellSchoolMask) override
void DamageDealt (Unit *target, uint32 &damage, DamageEffectType) override
void KilledUnit (Unit *victim) override
void SpellHit (Unit *, SpellInfo const *spell) override
void DoAction (int32 action) override
void UpdateAI (uint32 diff) override
void EnterEvadeMode (EvadeReason why) 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

EventMap events
SummonList summons
bool _isEmpowered
bool _evading
bool _canDie
- Public Attributes inherited from ScriptedAI
bool IsFleeing

Additional Inherited Members

- Public Types inherited from ScriptedAI
enum class  Axis {
  AXIS_X ,
- Public Types inherited from CreatureAI
enum  EvadeReason {
- 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
CreatureBoundary const * _boundary
bool _negateBoundary
- Protected Attributes inherited from UnitAI
Unit *const me

Detailed Description

Constructor & Destructor Documentation

◆ boss_prince_taldaramAI()

boss_prince_taldaram_icc::boss_prince_taldaramAI::boss_prince_taldaramAI ( Creature creature)
452 : ScriptedAI(creature), summons(creature), instance(creature->GetInstanceScript())
453 {
454 if (!instance)
455 {
456 me->IsAIEnabled = false;
458 }
459 _canDie = true;
460 }
Definition: Unit.h:346
Definition: ScriptedCreature.h:192
Creature * me
Definition: ScriptedCreature.h:282
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
void AddUnitState(uint32 f)
Definition: Unit.h:1397
bool IsAIEnabled
Definition: Unit.h:2350
InstanceScript * instance
Definition: boss_blood_prince_council.cpp:482
SummonList summons
Definition: boss_blood_prince_council.cpp:481
bool _canDie
Definition: boss_blood_prince_council.cpp:485

References _canDie, Unit::AddUnitState(), instance, Unit::IsAIEnabled, ScriptedAI::me, and UNIT_STATE_EVADE.

Member Function Documentation

◆ DamageDealt()

void boss_prince_taldaram_icc::boss_prince_taldaramAI::DamageDealt ( Unit target,
uint32 damage,

Reimplemented from UnitAI.

614 {
615 if (target->GetTypeId() != TYPEID_PLAYER)
616 return;
618 if (damage > RAID_MODE<uint32>(23000, 25000, 23000, 25000))
620 }
Definition: ObjectGuid.h:38
Definition: icecrown_citadel.h:116
TypeID GetTypeId() const
Definition: Object.h:121
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:53

References DATA_ORB_WHISPERER_ACHIEVEMENT, Object::GetTypeId(), instance, ZoneScript::SetData(), and TYPEID_PLAYER.

◆ DamageTaken()

void boss_prince_taldaram_icc::boss_prince_taldaramAI::DamageTaken ( Unit attacker,
uint32 damage,
DamageEffectType  ,

Reimplemented from ScriptedAI.

604 {
605 if (!_isEmpowered)
606 {
607 if (attacker)
608 me->AddThreat(attacker, float(damage));
609 damage = 0;
610 }
611 }
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=nullptr)
Definition: Unit.cpp:14548
bool _isEmpowered
Definition: boss_blood_prince_council.cpp:483

References _isEmpowered, Unit::AddThreat(), and ScriptedAI::me.

◆ DoAction()

void boss_prince_taldaram_icc::boss_prince_taldaramAI::DoAction ( int32  action)

Reimplemented from UnitAI.

635 {
636 switch (action)
637 {
641 me->SetImmuneToAll(false);
645 me->ForceValuesUpdateAtIndex(UNIT_NPC_FLAGS); // was in sniff. don't ask why
648 me->SetHealth(1);
649 break;
654 _isEmpowered = true;
655 break;
657 _isEmpowered = false;
660 break;
663 break;
664 default:
665 break;
666 }
667 }
Definition: UpdateFields.h:139
Definition: Unit.h:36
Definition: Unit.h:488
Definition: Unit.h:1025
Definition: Unit.h:477
Definition: Unit.h:473
Definition: boss_blood_prince_council.cpp:140
Definition: boss_blood_prince_council.cpp:139
Definition: boss_blood_prince_council.cpp:142
Definition: boss_blood_prince_council.cpp:141
Definition: boss_blood_prince_council.cpp:64
Definition: boss_blood_prince_council.cpp:62
Definition: boss_blood_prince_council.cpp:40
Definition: boss_fathomlord_karathress.cpp:23
Definition: SharedDefines.h:3098
void AddEvent(BasicEvent *Event, uint64 e_time, bool set_addtime=true)
Definition: EventProcessor.h:105
uint64 CalculateTime(uint64 t_offset) const
Definition: EventProcessor.cpp:158
void DespawnEntry(uint32 entry)
Definition: ScriptedCreature.cpp:50
void DoAction(int32 info, uint16 max=0)
Definition: ScriptedCreature.h:104
void SetReactState(ReactStates st)
Definition: Creature.h:89
virtual void RemoveDynamicFlag(uint32 flag)
Definition: Object.h:118
void ForceValuesUpdateAtIndex(uint32)
Definition: Object.cpp:2042
void SetHealth(uint32 val)
Definition: Unit.cpp:15370
EventProcessor m_Events
Definition: Unit.h:2094
void RemoveUnitFlag2(UnitFlags2 flags)
Definition: Unit.h:1488
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
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4835
void SetImmuneToAll(bool apply, bool keepCombat=false)
Definition: Unit.h:1678
void RemoveUnitFlag(UnitFlags flags)
Definition: Unit.h:1482
Definition: boss_blood_prince_council.cpp:152
void DoAction(int32 action) override
Definition: boss_blood_prince_council.cpp:634

References _isEmpowered, ACTION_CAST_INVOCATION, ACTION_FLAME_BALL_CHASE, ACTION_REMOVE_INVOCATION, ACTION_STAND_UP, EventProcessor::AddEvent(), EventProcessor::CalculateTime(), Unit::CastSpell(), SummonList::DespawnEntry(), DoAction(), SummonList::DoAction(), Object::ForceValuesUpdateAtIndex(), Unit::m_Events, ScriptedAI::me, REACT_AGGRESSIVE, Unit::RemoveAurasDueToSpell(), Object::RemoveDynamicFlag(), Unit::RemoveUnitFlag(), Unit::RemoveUnitFlag2(), SAY_TALDARAM_INVOCATION, Unit::SetHealth(), Unit::SetImmuneToAll(), Creature::SetReactState(), SPELL_INVOCATION_OF_BLOOD_TALDARAM, SPELL_INVOCATION_VISUAL_ACTIVE, summons, UNIT_DYNFLAG_DEAD, UNIT_FLAG2_FEIGN_DEATH, UNIT_FLAG_NOT_SELECTABLE, UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT, UNIT_NPC_FLAGS, and WORLD_TRIGGER.

Referenced by DoAction(), EnterEvadeMode(), JustEngagedWith(), JustReachedHome(), and SpellHit().

◆ EnterEvadeMode()

void boss_prince_taldaram_icc::boss_prince_taldaramAI::EnterEvadeMode ( EvadeReason  why)

Reimplemented from CreatureAI.

708 {
709 if (_evading)
710 return;
711 _canDie = false;
714 _evading = true;
716 keleseth->AI()->EnterEvadeMode(why);
718 valanar->AI()->EnterEvadeMode(why);
720 _evading = false;
721 }
Definition: icecrown_citadel.h:119
Definition: icecrown_citadel.h:117
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:215
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:197
Definition: Creature.h:46
uint32 GetMaxHealth() const
Definition: Unit.h:1441
ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:94
bool _evading
Definition: boss_blood_prince_council.cpp:484

References _canDie, _evading, ACTION_REMOVE_INVOCATION, DATA_PRINCE_KELESETH_GUID, DATA_PRINCE_VALANAR_GUID, DoAction(), CreatureAI::EnterEvadeMode(), ObjectAccessor::GetCreature(), InstanceScript::GetGuidData(), Unit::GetMaxHealth(), instance, ScriptedAI::me, and Unit::SetHealth().

Referenced by JustEngagedWith().

◆ InitializeAI()

void boss_prince_taldaram_icc::boss_prince_taldaramAI::InitializeAI ( )

Reimplemented from UnitAI.

463 {
465 if (me->IsAlive())
466 {
468 {
469 c->SetObjectScale(1.75f);
470 c->CastSpell(c, SPELL_FEIGN_DEATH, true);
471 }
475 me->SetImmuneToAll(true);
477 }
478 }
Definition: Unit.h:1023
Definition: boss_blood_prince_council.cpp:60
virtual void InitializeAI()
Definition: UnitAI.h:193
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition: Creature.h:330
virtual void SetDynamicFlag(uint32 flag)
Definition: Object.h:117
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition: Object.cpp:2318
void SetUnitFlag2(UnitFlags2 flags)
Definition: Unit.h:1487
bool IsAlive() const
Definition: Unit.h:1808

References Creature::GetHomePosition(), UnitAI::InitializeAI(), Unit::IsAlive(), ScriptedAI::me, REACT_PASSIVE, Object::SetDynamicFlag(), Unit::SetImmuneToAll(), Creature::SetReactState(), Unit::SetUnitFlag2(), SPELL_FEIGN_DEATH, WorldObject::SummonCreature(), UNIT_DYNFLAG_DEAD, UNIT_FLAG2_FEIGN_DEATH, and WORLD_TRIGGER.

◆ JustDied()

void boss_prince_taldaram_icc::boss_prince_taldaramAI::JustDied ( Unit )

Reimplemented from ScriptedAI.

541 {
542 events.Reset();
546 if (!_canDie)
547 {
548 me->RemoveCorpse(false);
549 me->SetRespawnTime(10);
553 me->GetMotionMaster()->Clear(false);
556 return;
557 }
561 if (keleseth->IsAlive())
562 Unit::Kill(keleseth, keleseth);
564 if (valanar->IsAlive())
565 Unit::Kill(valanar, valanar);
566 }
Definition: InstanceScript.h:45
Position const homePos
Definition: boss_chromaggus.cpp:69
Definition: boss_sartura.cpp:43
Definition: boss_blood_prince_council.cpp:46
void DespawnAll(uint32 delay=0)
Definition: ScriptedCreature.cpp:67
void SaveRespawnTime() override
Definition: Creature.cpp:2541
void SetRespawnTime(uint32 respawn)
Definition: Creature.cpp:3658
void RemoveCorpse(bool setSpawnTime=true, bool skipVisibility=false)
Definition: Creature.cpp:347
Definition: Position.h:28
static void Kill(Unit *killer, Unit *victim, bool durabilityLoss=true, WeaponAttackType attackType=BASE_ATTACK, SpellInfo const *spellProto=nullptr, Spell const *spell=nullptr)
Definition: Unit.cpp:17862
MotionMaster * GetMotionMaster()
Definition: Unit.h:2262
virtual bool UpdatePosition(float x, float y, float z, float ang, bool teleport=false)
Definition: Unit.cpp:20194
void StopMovingOnCurrentPos()
Definition: Unit.cpp:16863
void SendEncounterUnit(uint32 type, Unit *unit=nullptr, uint8 param1=0, uint8 param2=0)
Definition: InstanceScript.cpp:670
void MoveIdle()
Definition: MotionMaster.cpp:231
void Clear(bool reset=true)
Definition: MotionMaster.h:165

References _canDie, MotionMaster::Clear(), DATA_PRINCE_KELESETH_GUID, DATA_PRINCE_VALANAR_GUID, SummonList::DespawnAll(), EMOTE_TALDARAM_DEATH, ENCOUNTER_FRAME_DISENGAGE, ObjectAccessor::GetCreature(), InstanceScript::GetGuidData(), Creature::GetHomePosition(), Unit::GetMotionMaster(), homePos, instance, Unit::Kill(), ScriptedAI::me, MotionMaster::MoveIdle(), Creature::RemoveCorpse(), Creature::SaveRespawnTime(), InstanceScript::SendEncounterUnit(), Creature::SetRespawnTime(), Unit::StopMovingOnCurrentPos(), summons, and Unit::UpdatePosition().

◆ JustEngagedWith()

void boss_prince_taldaram_icc::boss_prince_taldaramAI::JustEngagedWith ( Unit )

Called for reaction when initially engaged.

Reimplemented from ScriptedAI.

498 {
499 bool valid = true;
501 if (!keleseth->IsAlive() || keleseth->IsInEvadeMode())
502 valid = false;
504 if (!taldaram->IsAlive() || taldaram->IsInEvadeMode())
505 valid = false;
507 if (!valanar->IsAlive() || valanar->IsInEvadeMode())
508 valid = false;
509 if (!valid)
510 {
512 return;
513 }
516 me->setActive(true);
518 if (!me->hasLootRecipient())
519 me->SetLootRecipient(who);
525 if (!keleseth->IsInEvadeMode())
526 keleseth->SetInCombatWithZone();
528 if (!valanar->IsInEvadeMode())
529 valanar->SetInCombatWithZone();
532 events.Reset();
533 events.ScheduleEvent(EVENT_BERSERK, 10min);
534 events.ScheduleEvent(EVENT_GLITTERING_SPARKS, 12s, 15s);
535 events.ScheduleEvent(EVENT_CONJURE_FLAME, 20s);
536 if (IsHeroic())
538 }
Definition: InstanceScript.h:44
Definition: boss_blood_prince_council.cpp:68
Definition: boss_blood_prince_council.cpp:127
Definition: boss_blood_prince_council.cpp:128
Definition: boss_blood_prince_council.cpp:121
Definition: icecrown_citadel.h:118
Definition: CreatureAI.h:92
void DoZoneInCombat(Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
Definition: CreatureAI.cpp:95
bool IsHeroic() const
Definition: ScriptedCreature.h:379
void SetLootRecipient(Unit *unit, bool withGroup=true)
Definition: Creature.cpp:1292
bool hasLootRecipient() const
Definition: Creature.h:223
void LowerPlayerDamageReq(uint32 unDamage, bool damagedByPlayer=true)
Definition: Creature.cpp:3689
void setActive(bool isActiveObject)
Definition: Object.cpp:1085
Aura * AddAura(uint32 spellId, Unit *target)
Definition: Unit.cpp:19031
Map * instance
Definition: InstanceScript.h:146
Creature * GetCreature(ObjectGuid const guid)
Definition: Map.cpp:3293
void EnterEvadeMode(EvadeReason why) override
Definition: boss_blood_prince_council.cpp:707

References ACTION_REMOVE_INVOCATION, Unit::AddAura(), DATA_PRINCE_KELESETH_GUID, DATA_PRINCE_TALDARAM_GUID, DATA_PRINCE_VALANAR_GUID, DoAction(), CreatureAI::DoZoneInCombat(), ENCOUNTER_FRAME_ENGAGE, EnterEvadeMode(), CreatureAI::EVADE_REASON_OTHER, EVENT_BERSERK, EVENT_CONJURE_FLAME, EVENT_GLITTERING_SPARKS, Map::GetCreature(), ObjectAccessor::GetCreature(), InstanceScript::GetGuidData(), Unit::GetMaxHealth(), Creature::hasLootRecipient(), InstanceScript::instance, instance, ScriptedAI::IsHeroic(), Creature::LowerPlayerDamageReq(), ScriptedAI::me, REACT_AGGRESSIVE, Unit::RemoveAurasDueToSpell(), InstanceScript::SendEncounterUnit(), WorldObject::setActive(), Creature::SetLootRecipient(), Creature::SetReactState(), SPELL_FEIGN_DEATH, and SPELL_SHADOW_PRISON.

◆ JustReachedHome()

void boss_prince_taldaram_icc::boss_prince_taldaramAI::JustReachedHome ( )

◆ JustRespawned()

void boss_prince_taldaram_icc::boss_prince_taldaramAI::JustRespawned ( )

Reimplemented from CreatureAI.

569 {
572 }
virtual void JustRespawned()
Definition: CreatureAI.h:149
void JustReachedHome() override
Definition: boss_blood_prince_council.cpp:574

References JustReachedHome(), and CreatureAI::JustRespawned().

◆ JustSummoned()

void boss_prince_taldaram_icc::boss_prince_taldaramAI::JustSummoned ( Creature summon)

Reimplemented from ScriptedAI.

584 {
585 summons.Summon(summon);
587 Unit* target = SelectTarget(SelectTargetMethod::Random, 0, -10.0f, true);
588 if (!target)
589 target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true);
590 if (target)
591 {
592 if (summon->GetEntry() == NPC_BALL_OF_INFERNO_FLAME)
593 Talk(EMOTE_TALDARAM_FLAME, target);
594 summon->AI()->SetGUID(target->GetGUID());
595 }
596 }
Definition: boss_blood_prince_council.cpp:43
Definition: icecrown_citadel.h:279
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:111
virtual void SetGUID(ObjectGuid, int32=0)
Definition: UnitAI.h:204
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:90
CreatureAI * AI() const
Definition: Creature.h:135
uint32 GetEntry() const
Definition: Object.h:109
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
Definition: Unit.h:1290

References Creature::AI(), EMOTE_TALDARAM_FLAME, Object::GetEntry(), Object::GetGUID(), NPC_BALL_OF_INFERNO_FLAME, UnitAI::SelectTarget(), UnitAI::SetGUID(), SummonList::Summon(), and summons.

◆ KilledUnit()

void boss_prince_taldaram_icc::boss_prince_taldaramAI::KilledUnit ( Unit victim)

Reimplemented from ScriptedAI.

623 {
624 if (victim->GetTypeId() == TYPEID_PLAYER)
626 }
Definition: boss_blood_prince_council.cpp:44

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

◆ Reset()

void boss_prince_taldaram_icc::boss_prince_taldaramAI::Reset ( )

◆ SpellHit()

void boss_prince_taldaram_icc::boss_prince_taldaramAI::SpellHit ( Unit ,
SpellInfo const *  spell 

Reimplemented from ScriptedAI.

629 {
630 if (spell->Id == 71081 && me->IsInCombat() && !me->IsInEvadeMode())
632 }
bool IsInEvadeMode() const
Definition: Creature.h:129
bool IsInCombat() const
Definition: Unit.h:1688

References ACTION_CAST_INVOCATION, DoAction(), SpellInfo::Id, Unit::IsInCombat(), Creature::IsInEvadeMode(), and ScriptedAI::me.

◆ SummonedCreatureDespawn()

void boss_prince_taldaram_icc::boss_prince_taldaramAI::SummonedCreatureDespawn ( Creature s)

Reimplemented from ScriptedAI.

599 {
600 summons.Despawn(s);
601 }
void Despawn(Creature const *summon)
Definition: ScriptedCreature.h:91

References SummonList::Despawn(), and summons.

◆ UpdateAI()

void boss_prince_taldaram_icc::boss_prince_taldaramAI::UpdateAI ( uint32  diff)

Reimplemented from ScriptedAI.

670 {
671 if (!UpdateVictim())
672 return;
674 events.Update(diff);
677 return;
679 switch (events.ExecuteEvent())
680 {
682 me->CastSpell(me, SPELL_BERSERK, true);
684 break;
687 events.ScheduleEvent(EVENT_GLITTERING_SPARKS, 15s, 25s);
688 break;
690 if (_isEmpowered)
691 {
693 events.ScheduleEvent(EVENT_CONJURE_FLAME, 15s);
694 }
695 else
696 {
698 events.ScheduleEvent(EVENT_CONJURE_FLAME, 20s, 25s);
699 }
701 break;
702 }
705 }
Definition: Unit.h:340
Definition: boss_blood_prince_council.cpp:82
Definition: boss_blood_prince_council.cpp:84
Definition: boss_blood_prince_council.cpp:83
Definition: boss_blood_prince_council.cpp:42
Definition: boss_blood_prince_council.cpp:45
Definition: boss_ignis.cpp:39
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:40
bool UpdateVictim()
Definition: CreatureAI.cpp:269
Unit * GetVictim() const
Definition: Unit.h:1386
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1398


Member Data Documentation

◆ _canDie

bool boss_prince_taldaram_icc::boss_prince_taldaramAI::_canDie

◆ _evading

bool boss_prince_taldaram_icc::boss_prince_taldaramAI::_evading

Referenced by EnterEvadeMode(), and Reset().

◆ _isEmpowered

bool boss_prince_taldaram_icc::boss_prince_taldaramAI::_isEmpowered

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

◆ events

EventMap boss_prince_taldaram_icc::boss_prince_taldaramAI::events

◆ instance

InstanceScript* boss_prince_taldaram_icc::boss_prince_taldaramAI::instance

◆ summons

SummonList boss_prince_taldaram_icc::boss_prince_taldaramAI::summons