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

Public Member Functions

 npc_thassarian2AI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void SetData (uint32, uint32 data) override
 
void MovementInform (uint32 type, uint32 param) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
void JustDied (Unit *) override
 
void Cleanup ()
 
void sGossipHello (Player *) override
 
void sGossipSelect (Player *player, uint32, uint32 action) 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) More...
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
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. More...
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoCastSpell (Unit *target, SpellInfo const *spellInfo, bool triggered=false)
 
void DoPlaySoundToSet (WorldObject *source, uint32 soundId)
 
void DoPlayMusic (uint32 soundId, bool zone)
 
void DoAddThreat (Unit *unit, float amount)
 
void DoModifyThreatByPercent (Unit *unit, int32 pct)
 
void DoResetThreat (Unit *unit)
 
void DoResetThreatList ()
 
float DoGetThreat (Unit *unit)
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 
void DoTeleportPlayer (Unit *unit, Position pos)
 
void DoTeleportAll (float x, float y, float z, float o)
 
UnitDoSelectLowestHpFriendly (float range, uint32 minHPDiff=1)
 
std::list< Creature * > DoFindFriendlyCC (float range)
 
std::list< Creature * > DoFindFriendlyMissingBuff (float range, uint32 spellId)
 
PlayerGetPlayerAtMinimumRange (float minRange)
 
CreatureDoSpawnCreature (uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime)
 
bool IsUniqueTimedEventDone (uint32 id) const
 
void SetUniqueTimedEventDone (uint32 id)
 
void ResetUniqueTimedEvent (uint32 id)
 
void ClearUniqueTimedEventsDone ()
 
void ScheduleTimedEvent (Milliseconds timerMin, Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=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)
 
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. More...
 
void Talk (uint8 id, Milliseconds delay)
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
 
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. More...
 
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 SummonedCreatureEvade (Creature *)
 
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
 Called when unit is charmed. More...
 
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 ================== More...
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields ======================================= More...
 
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 *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
- 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
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 Called when unit is charmed. More...
 
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)
 Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the following: More...
 
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. More...
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat. More...
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 Called at any Damage to any victim (before damage apply) More...
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage from any attacker (before damage apply) More...
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal. More...
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates. More...
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals. More...
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations. More...
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT) More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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 Attributes

EventMap _events
 
ObjectGuid _playerGUID
 
ObjectGuid _arthasGUID
 
ObjectGuid _talbotGUID
 
ObjectGuid _leryssaGUID
 
ObjectGuid _arlosGUID
 

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 ScriptedAI
Creatureme
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
bool UpdateVictimWithGaze ()
 
void SetGazeOn (Unit *target)
 
CreatureDoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
TaskScheduler scheduler
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ npc_thassarian2AI()

npc_thassarian2::npc_thassarian2AI::npc_thassarian2AI ( Creature creature)
inline
1506 : ScriptedAI(creature)
1507 {
1508 Initialize();
1509 }
Definition: ScriptedCreature.h:190
void Initialize()
Definition: zone_borean_tundra.cpp:1511

References Initialize().

Member Function Documentation

◆ Cleanup()

void npc_thassarian2::npc_thassarian2AI::Cleanup ( )
inline
1863 {
1865 {
1866 talbot->RemoveFromWorld();
1867 }
1868
1870 {
1871 leryssa->RemoveFromWorld();
1872 }
1873
1875 {
1876 arlos->RemoveFromWorld();
1877 }
1878
1880 {
1881 arthas->RemoveFromWorld();
1882 }
1883 }
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:213
Creature * me
Definition: ScriptedCreature.h:280
Definition: Creature.h:46
ObjectGuid _arthasGUID
Definition: zone_borean_tundra.cpp:1907
ObjectGuid _leryssaGUID
Definition: zone_borean_tundra.cpp:1909
ObjectGuid _arlosGUID
Definition: zone_borean_tundra.cpp:1910
ObjectGuid _talbotGUID
Definition: zone_borean_tundra.cpp:1908

References _arlosGUID, _arthasGUID, _leryssaGUID, _talbotGUID, ObjectAccessor::GetCreature(), and ScriptedAI::me.

Referenced by JustDied(), and UpdateAI().

◆ Initialize()

void npc_thassarian2::npc_thassarian2AI::Initialize ( )
inline
1512 {
1516 _arlosGUID.Clear();
1517 }
void Clear()
Definition: ObjectGuid.h:138

References _arlosGUID, _arthasGUID, _leryssaGUID, _talbotGUID, and ObjectGuid::Clear().

Referenced by npc_thassarian2AI(), and Reset().

◆ JustDied()

void npc_thassarian2::npc_thassarian2AI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

1857 {
1858 Cleanup();
1859 me->DespawnOrUnsummon(1s, 120s);
1860 }
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition: Creature.cpp:2173
void Cleanup()
Definition: zone_borean_tundra.cpp:1862

References Cleanup(), Creature::DespawnOrUnsummon(), and ScriptedAI::me.

◆ MovementInform()

void npc_thassarian2::npc_thassarian2AI::MovementInform ( uint32  type,
uint32  param 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

1558 {
1559 if (type == WAYPOINT_MOTION_TYPE && param == 2)
1560 {
1561 me->SetWalk(false);
1564 }
1565 }
@ WAYPOINT_MOTION_TYPE
Definition: MotionMaster.h:39
@ UNIT_NPC_EMOTESTATE
Definition: UpdateFields.h:140
@ EVENT_THASSARIAN_SCRIPT_1
Definition: zone_borean_tundra.cpp:1390
@ EMOTE_STATE_READY1H
Definition: SharedDefines.h:1966
void ScheduleEvent(uint32 eventId, uint32 time, uint32 group=0, uint32 phase=0)
Definition: EventMap.cpp:56
bool SetWalk(bool enable) override
Enable or disable the creature's walk mode by removing: MOVEMENTFLAG_WALKING. Infom also the client.
Definition: Creature.cpp:3178
void SetUInt32Value(uint16 index, uint32 value)
Definition: Unit.cpp:21256
EventMap _events
Definition: zone_borean_tundra.cpp:1905

References _events, EMOTE_STATE_READY1H, EVENT_THASSARIAN_SCRIPT_1, ScriptedAI::me, EventMap::ScheduleEvent(), Unit::SetUInt32Value(), Creature::SetWalk(), UNIT_NPC_EMOTESTATE, and WAYPOINT_MOTION_TYPE.

◆ Reset()

void npc_thassarian2::npc_thassarian2AI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

1520 {
1526 Initialize();
1527 }
@ UNIT_STAND_STATE_STAND
Definition: UnitDefines.h:32
@ UNIT_NPC_FLAG_GOSSIP
Definition: UnitDefines.h:294
@ UNIT_NPC_FLAG_QUESTGIVER
Definition: UnitDefines.h:295
@ EMOTE_ONESHOT_NONE
Definition: SharedDefines.h:1894
@ FACTION_VALIANCE_EXPEDITION_7
Definition: SharedDefines.h:234
void SetFaction(uint32 faction)
Definition: Unit.cpp:10018
void RemoveNpcFlag(NPCFlags flags)
Definition: Unit.h:696
void SetNpcFlag(NPCFlags flags)
Definition: Unit.h:695
void SetStandState(uint8 state)
Definition: Unit.cpp:16682

References EMOTE_ONESHOT_NONE, FACTION_VALIANCE_EXPEDITION_7, Initialize(), ScriptedAI::me, Unit::RemoveNpcFlag(), Unit::SetFaction(), Unit::SetNpcFlag(), Unit::SetStandState(), Unit::SetUInt32Value(), UNIT_NPC_EMOTESTATE, UNIT_NPC_FLAG_GOSSIP, UNIT_NPC_FLAG_QUESTGIVER, and UNIT_STAND_STATE_STAND.

◆ SetData()

void npc_thassarian2::npc_thassarian2AI::SetData ( uint32  ,
uint32  data 
)
inlineoverridevirtual

Reimplemented from UnitAI.

1530 {
1531 switch (data)
1532 {
1533 case NPC_LERYSSA:
1534 {
1536 {
1537 arlos->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STUN);
1538 }
1540 {
1541 leryssa->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STUN);
1542 leryssa->SetOrientation(4.537856f);
1543 }
1545 break;
1546 }
1548 {
1550 }
1551 break;
1552 default:
1553 break;
1554 }
1555 }
@ EVENT_THASSARIAN_SCRIPT_18
Definition: zone_borean_tundra.cpp:1407
@ EVENT_THASSARIAN_SCRIPT_8
Definition: zone_borean_tundra.cpp:1397
@ NPC_COUNSELOR_TALBOT
Definition: zone_borean_tundra.cpp:1421
@ NPC_LERYSSA
Definition: zone_borean_tundra.cpp:1424
@ EMOTE_STATE_STUN
Definition: SharedDefines.h:1940

References _arlosGUID, _events, _leryssaGUID, EMOTE_STATE_STUN, EVENT_THASSARIAN_SCRIPT_18, EVENT_THASSARIAN_SCRIPT_8, ObjectAccessor::GetCreature(), ScriptedAI::me, NPC_COUNSELOR_TALBOT, NPC_LERYSSA, EventMap::ScheduleEvent(), and UNIT_NPC_EMOTESTATE.

◆ sGossipHello()

void npc_thassarian2::npc_thassarian2AI::sGossipHello ( Player )
inlineoverridevirtual

Reimplemented from UnitAI.

1886 {
1888 {
1890 }
1891 }
@ SPELL_BLOOD_PRESENCE
Definition: zone_borean_tundra.cpp:1428
SpellCastResult DoCastSelf(uint32 spellId, bool triggered=false)
Definition: UnitAI.h:392
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5669

References UnitAI::DoCastSelf(), Unit::HasAura(), ScriptedAI::me, and SPELL_BLOOD_PRESENCE.

◆ sGossipSelect()

void npc_thassarian2::npc_thassarian2AI::sGossipSelect ( Player player,
uint32  ,
uint32  action 
)
inlineoverridevirtual

Reimplemented from UnitAI.

1894 {
1895 if (action == 0)
1896 {
1897 _playerGUID = player->GetGUID();
1898 CloseGossipMenuFor(player);
1901 }
1902 }
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
@ PATH_THASSARIAN
Definition: zone_borean_tundra.cpp:1449
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
MotionMaster * GetMotionMaster()
Definition: Unit.h:1601
void MovePath(uint32 path_id, bool repeatable)
Move the unit following a specific path. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition: MotionMaster.cpp:849
ObjectGuid _playerGUID
Definition: zone_borean_tundra.cpp:1906

References _playerGUID, CloseGossipMenuFor(), Object::GetGUID(), Unit::GetMotionMaster(), ScriptedAI::me, MotionMaster::MovePath(), PATH_THASSARIAN, Unit::RemoveNpcFlag(), and UNIT_NPC_FLAG_GOSSIP.

◆ UpdateAI()

void npc_thassarian2::npc_thassarian2AI::UpdateAI ( uint32  )
inlineoverridevirtual

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

Reimplemented from ScriptedAI.

1568 {
1569 _events.Update(diff);
1570
1571 if (uint32 eventId = _events.ExecuteEvent())
1572 {
1573 switch (eventId)
1574 {
1576 // Summon Arthas and Talbot
1577 if (Creature* arthas = me->SummonCreature(NPC_IMAGE_LICH_KING, 3729.4614f, 3520.386f, 473.4048f, 1.361f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 120000))
1578 {
1579 _arthasGUID = arthas->GetGUID();
1580 arthas->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
1581 arthas->SetReactState(REACT_PASSIVE);
1582 arthas->SetWalk(true);
1583 }
1584 if (Creature* talbot = me->SummonCreature(NPC_COUNSELOR_TALBOT, 3748.7627f, 3614.0374f, 473.4048f, 4.5553f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 120000))
1585 {
1586 _talbotGUID = talbot->GetGUID();
1587 talbot->SetWalk(true);
1588 }
1590 break;
1592 // Arthas load path
1594 {
1595 arthas->GetMotionMaster()->MovePath(PATH_ARTHAS, false);
1596 }
1598 break;
1600 // Talbot load path
1602 {
1603 talbot->GetMotionMaster()->MovePath(PATH_TALBOT, false);
1604 }
1606 break;
1608 // Talbot transform and knell
1610 {
1611 talbot->CastSpell(talbot, SPELL_TRANSFORM_VALANAR);
1612 talbot->UpdateEntry(NPC_PRINCE_VALANAR);
1613 talbot->SetFullHealth();
1614 talbot->SetFaction(FACTION_UNDEAD_SCOURGE);
1615 talbot->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
1616 talbot->SetReactState(REACT_PASSIVE);
1617 talbot->SetStandState(UNIT_STAND_STATE_KNEEL);
1618 }
1620 break;
1622 // Talbot say text 1
1624 {
1625 talbot->AI()->Talk(SAY_TALBOT_1);
1626 }
1628 break;
1630 // Summon General Arlos and Leryssa
1631 if (Creature* arlos = me->SummonCreature(NPC_GENERAL_ARLOS, 3746.2825f, 3616.3699f, 473.4048f, 4.5029f, TEMPSUMMON_CORPSE_TIMED_DESPAWN))
1632 {
1633 _arlosGUID = arlos->GetGUID();
1634 arlos->SetWalk(true);
1635 arlos->SetImmuneToAll(true);
1636 arlos->RemoveNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
1637 arlos->GetMotionMaster()->MovePath(PATH_ARLOS, false);
1638 }
1639 if (Creature* leryssa = me->SummonCreature(NPC_LERYSSA, 3751.0986f, 3614.9219f, 473.4048f, 4.5029f, TEMPSUMMON_CORPSE_TIMED_DESPAWN))
1640 {
1641 _leryssaGUID = leryssa->GetGUID();
1642 leryssa->SetWalk(true);
1643 leryssa->SetImmuneToAll(true);
1644 leryssa->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
1645 leryssa->GetMotionMaster()->MovePath(PATH_LERYSSA, false);
1646 }
1648 break;
1650 // Talbot say text 2
1652 {
1653 talbot->AI()->Talk(SAY_TALBOT_2);
1654 }
1655 break;
1657 // Thassarian say text 1 and move to location
1659 me->SetWalk(false);
1660 me->GetMotionMaster()->MovePoint(0, 3722.527f, 3567.2583f, 477.44086f);
1662 break;
1664 // Thassarian say text 2
1668 break;
1670 // Arthas turn to Thassarian and Talbot stand
1672 {
1673 arthas->SetFacingToObject(me);
1674 }
1676 {
1677 talbot->SetStandState(UNIT_STAND_STATE_STAND);
1678 }
1680 break;
1682 // Arthas say text 2
1684 {
1685 arthas->AI()->Talk(SAY_LICH_2);
1686 }
1688 break;
1690 // Thassarian say text 3
1693 break;
1695 // Talbot say text 3
1697 {
1698 talbot->AI()->Talk(SAY_TALBOT_3);
1699 }
1701 break;
1703 // Arthas turn to Talbot say text 3
1705 {
1707 {
1708 arthas->SetFacingToObject(talbot);
1709 }
1710 arthas->AI()->Talk(SAY_LICH_3);
1711 }
1713 break;
1715 // Arthas turn to me and emote
1717 {
1718 arthas->SetFacingToObject(me);
1719 arthas->HandleEmoteCommand(EMOTE_ONESHOT_POINT);
1720 }
1722 break;
1724 // Arthas despawn
1726 {
1727 arthas->RemoveFromWorld();
1728 }
1730 break;
1732 // Talbot say text 4 and attack
1735 {
1736 talbot->AI()->Talk(SAY_TALBOT_4);
1737 talbot->SetFaction(FACTION_UNDEAD_SCOURGE_9);
1738 talbot->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
1739 talbot->SetReactState(REACT_AGGRESSIVE);
1740 talbot->Attack(me, false);
1741 }
1742 break;
1744 // Arlos say text 1
1747 {
1748 arlos->AI()->Talk(SAY_ARLOS_1);
1749 arlos->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
1750 arlos->SetStandState(UNIT_STAND_STATE_KNEEL);
1751 }
1753 {
1754 leryssa->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
1755 }
1757 break;
1759 // Leryssa set facing to me
1762 if (Creature* leryssa = me->FindNearestCreature(NPC_LERYSSA, 50.0f, true))
1763 {
1764 _leryssaGUID = leryssa->GetGUID();
1765 leryssa->SetFacingToObject(me);
1766 me->SetFacingToObject(leryssa);
1767 }
1769 break;
1771 // Arlos say text 2 and die. Leryssa say text 1
1772 if (Creature* arlos = me->FindNearestCreature(NPC_GENERAL_ARLOS, 50.0f, true))
1773 {
1774 _arlosGUID = arlos->GetGUID();
1775 arlos->AI()->Talk(SAY_ARLOS_2);
1776 arlos->SetStandState(UNIT_STAND_STATE_DEAD);
1777 }
1779 {
1780 leryssa->AI()->Talk(SAY_LERYSSA_1);
1781 }
1783 break;
1785 // Thassarian say text 4
1789 break;
1791 // Leryssa run to Thassarian
1793 {
1794 leryssa->SetWalk(false);
1795 leryssa->MonsterMoveWithSpeed(3726.751f, 3568.1633f, 477.44086f, leryssa->GetSpeed(MOVE_RUN));
1796 }
1798 break;
1800 // Leryssa say text 2
1802 {
1803 leryssa->AI()->Talk(SAY_LERYSSA_2);
1804 leryssa->SetStandState(UNIT_STAND_STATE_SIT);
1805 }
1807 break;
1809 // Thassarian say text 5
1812 break;
1814 // Leryssa say text 3
1816 {
1817 leryssa->AI()->Talk(SAY_LERYSSA_3);
1818 }
1820 break;
1822 // Thassarian say text 6
1825 break;
1827 // Leryssa say text 4
1829 {
1830 leryssa->AI()->Talk(SAY_LERYSSA_4);
1831 }
1833 break;
1835 // Thassarian say text 7
1838 break;
1840 Cleanup();
1841 me->DespawnOrUnsummon(30s, 120s);
1842 break;
1843 default:
1844 break;
1845 }
1846 }
1847
1848 if (!UpdateVictim())
1849 {
1850 return;
1851 }
1852
1854 }
std::uint32_t uint32
Definition: Define.h:107
@ REACT_PASSIVE
Definition: Unit.h:548
@ REACT_AGGRESSIVE
Definition: Unit.h:550
@ UNIT_STAND_STATE_DEAD
Definition: UnitDefines.h:39
@ UNIT_STAND_STATE_KNEEL
Definition: UnitDefines.h:40
@ UNIT_STAND_STATE_SIT
Definition: UnitDefines.h:33
@ MOVE_RUN
Definition: UnitDefines.h:329
@ UNIT_FLAG_NON_ATTACKABLE
Definition: UnitDefines.h:230
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
Definition: Object.h:50
@ EVENT_THASSARIAN_SCRIPT_29
Definition: zone_borean_tundra.cpp:1418
@ EVENT_THASSARIAN_SCRIPT_5
Definition: zone_borean_tundra.cpp:1394
@ SAY_THASSARIAN_3
Definition: zone_borean_tundra.cpp:1431
@ SAY_LERYSSA_4
Definition: zone_borean_tundra.cpp:1448
@ EVENT_THASSARIAN_SCRIPT_22
Definition: zone_borean_tundra.cpp:1411
@ PATH_TALBOT
Definition: zone_borean_tundra.cpp:1451
@ EVENT_THASSARIAN_SCRIPT_7
Definition: zone_borean_tundra.cpp:1396
@ SAY_THASSARIAN_4
Definition: zone_borean_tundra.cpp:1432
@ EVENT_THASSARIAN_SCRIPT_11
Definition: zone_borean_tundra.cpp:1400
@ EVENT_THASSARIAN_SCRIPT_2
Definition: zone_borean_tundra.cpp:1391
@ SAY_ARLOS_2
Definition: zone_borean_tundra.cpp:1444
@ NPC_PRINCE_VALANAR
Definition: zone_borean_tundra.cpp:1422
@ SAY_TALBOT_4
Definition: zone_borean_tundra.cpp:1439
@ EVENT_THASSARIAN_SCRIPT_16
Definition: zone_borean_tundra.cpp:1405
@ EVENT_THASSARIAN_SCRIPT_17
Definition: zone_borean_tundra.cpp:1406
@ PATH_LERYSSA
Definition: zone_borean_tundra.cpp:1453
@ EVENT_THASSARIAN_SCRIPT_20
Definition: zone_borean_tundra.cpp:1409
@ EVENT_THASSARIAN_SCRIPT_12
Definition: zone_borean_tundra.cpp:1401
@ NPC_IMAGE_LICH_KING
Definition: zone_borean_tundra.cpp:1420
@ SAY_LICH_3
Definition: zone_borean_tundra.cpp:1442
@ EVENT_THASSARIAN_SCRIPT_27
Definition: zone_borean_tundra.cpp:1416
@ SAY_ARLOS_1
Definition: zone_borean_tundra.cpp:1443
@ NPC_GENERAL_ARLOS
Definition: zone_borean_tundra.cpp:1423
@ EVENT_THASSARIAN_SCRIPT_26
Definition: zone_borean_tundra.cpp:1415
@ SAY_LERYSSA_2
Definition: zone_borean_tundra.cpp:1446
@ EVENT_THASSARIAN_SCRIPT_4
Definition: zone_borean_tundra.cpp:1393
@ SAY_TALBOT_3
Definition: zone_borean_tundra.cpp:1438
@ SPELL_TRANSFORM_VALANAR
Definition: zone_borean_tundra.cpp:1427
@ EVENT_THASSARIAN_SCRIPT_25
Definition: zone_borean_tundra.cpp:1414
@ SAY_LICH_2
Definition: zone_borean_tundra.cpp:1441
@ PATH_ARLOS
Definition: zone_borean_tundra.cpp:1452
@ EVENT_THASSARIAN_SCRIPT_21
Definition: zone_borean_tundra.cpp:1410
@ EVENT_THASSARIAN_SCRIPT_9
Definition: zone_borean_tundra.cpp:1398
@ EVENT_THASSARIAN_SCRIPT_6
Definition: zone_borean_tundra.cpp:1395
@ EVENT_THASSARIAN_SCRIPT_15
Definition: zone_borean_tundra.cpp:1404
@ EVENT_THASSARIAN_SCRIPT_14
Definition: zone_borean_tundra.cpp:1403
@ SAY_THASSARIAN_7
Definition: zone_borean_tundra.cpp:1435
@ SAY_THASSARIAN_1
Definition: zone_borean_tundra.cpp:1429
@ PATH_ARTHAS
Definition: zone_borean_tundra.cpp:1450
@ SAY_LERYSSA_1
Definition: zone_borean_tundra.cpp:1445
@ SAY_THASSARIAN_6
Definition: zone_borean_tundra.cpp:1434
@ SAY_LERYSSA_3
Definition: zone_borean_tundra.cpp:1447
@ EVENT_THASSARIAN_SCRIPT_19
Definition: zone_borean_tundra.cpp:1408
@ SAY_THASSARIAN_5
Definition: zone_borean_tundra.cpp:1433
@ SAY_TALBOT_2
Definition: zone_borean_tundra.cpp:1437
@ EVENT_THASSARIAN_SCRIPT_23
Definition: zone_borean_tundra.cpp:1412
@ EVENT_THASSARIAN_SCRIPT_13
Definition: zone_borean_tundra.cpp:1402
@ SAY_THASSARIAN_2
Definition: zone_borean_tundra.cpp:1430
@ EVENT_THASSARIAN_SCRIPT_24
Definition: zone_borean_tundra.cpp:1413
@ EVENT_THASSARIAN_SCRIPT_10
Definition: zone_borean_tundra.cpp:1399
@ EVENT_THASSARIAN_SCRIPT_3
Definition: zone_borean_tundra.cpp:1392
@ SAY_TALBOT_1
Definition: zone_borean_tundra.cpp:1436
@ EVENT_THASSARIAN_SCRIPT_28
Definition: zone_borean_tundra.cpp:1417
Talk
Definition: hyjal.cpp:82
@ EMOTE_ONESHOT_POINT
Definition: SharedDefines.h:1917
@ EMOTE_STATE_NONE
Definition: SharedDefines.h:1922
@ FACTION_UNDEAD_SCOURGE_9
Definition: SharedDefines.h:236
@ FACTION_UNDEAD_SCOURGE
Definition: SharedDefines.h:225
uint32 ExecuteEvent()
Definition: EventMap.cpp:114
void Update(uint32 time)
Definition: EventMap.h:54
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:39
bool UpdateVictim()
Definition: CreatureAI.cpp:269
void SetHomePosition(float x, float y, float z, float o)
Definition: Creature.h:337
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:2355
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2446
float GetPositionZ() const
Definition: Position.h:119
float GetOrientation() const
Definition: Position.h:120
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
void SetFacingToObject(WorldObject *object)
Definition: Unit.cpp:20493
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition: Unit.h:684
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition: MotionMaster.h:211

References _arlosGUID, _arthasGUID, _events, _leryssaGUID, _talbotGUID, Cleanup(), Creature::DespawnOrUnsummon(), UnitAI::DoMeleeAttackIfReady(), EMOTE_ONESHOT_POINT, EMOTE_STATE_NONE, EMOTE_STATE_READY1H, EVENT_THASSARIAN_SCRIPT_1, EVENT_THASSARIAN_SCRIPT_10, EVENT_THASSARIAN_SCRIPT_11, EVENT_THASSARIAN_SCRIPT_12, EVENT_THASSARIAN_SCRIPT_13, EVENT_THASSARIAN_SCRIPT_14, EVENT_THASSARIAN_SCRIPT_15, EVENT_THASSARIAN_SCRIPT_16, EVENT_THASSARIAN_SCRIPT_17, EVENT_THASSARIAN_SCRIPT_18, EVENT_THASSARIAN_SCRIPT_19, EVENT_THASSARIAN_SCRIPT_2, EVENT_THASSARIAN_SCRIPT_20, EVENT_THASSARIAN_SCRIPT_21, EVENT_THASSARIAN_SCRIPT_22, EVENT_THASSARIAN_SCRIPT_23, EVENT_THASSARIAN_SCRIPT_24, EVENT_THASSARIAN_SCRIPT_25, EVENT_THASSARIAN_SCRIPT_26, EVENT_THASSARIAN_SCRIPT_27, EVENT_THASSARIAN_SCRIPT_28, EVENT_THASSARIAN_SCRIPT_29, EVENT_THASSARIAN_SCRIPT_3, EVENT_THASSARIAN_SCRIPT_4, EVENT_THASSARIAN_SCRIPT_5, EVENT_THASSARIAN_SCRIPT_6, EVENT_THASSARIAN_SCRIPT_7, EVENT_THASSARIAN_SCRIPT_8, EVENT_THASSARIAN_SCRIPT_9, EventMap::ExecuteEvent(), FACTION_UNDEAD_SCOURGE, FACTION_UNDEAD_SCOURGE_9, WorldObject::FindNearestCreature(), ObjectAccessor::GetCreature(), Unit::GetMotionMaster(), Position::GetOrientation(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), ScriptedAI::me, MOVE_RUN, MotionMaster::MovePoint(), NPC_COUNSELOR_TALBOT, NPC_GENERAL_ARLOS, NPC_IMAGE_LICH_KING, NPC_LERYSSA, NPC_PRINCE_VALANAR, PATH_ARLOS, PATH_ARTHAS, PATH_LERYSSA, PATH_TALBOT, REACT_AGGRESSIVE, REACT_PASSIVE, Unit::RemoveNpcFlag(), Unit::RemoveUnitFlag(), SAY_ARLOS_1, SAY_ARLOS_2, SAY_LERYSSA_1, SAY_LERYSSA_2, SAY_LERYSSA_3, SAY_LERYSSA_4, SAY_LICH_2, SAY_LICH_3, SAY_TALBOT_1, SAY_TALBOT_2, SAY_TALBOT_3, SAY_TALBOT_4, SAY_THASSARIAN_1, SAY_THASSARIAN_2, SAY_THASSARIAN_3, SAY_THASSARIAN_4, SAY_THASSARIAN_5, SAY_THASSARIAN_6, SAY_THASSARIAN_7, EventMap::ScheduleEvent(), Unit::SetFacingToObject(), Creature::SetHomePosition(), Unit::SetNpcFlag(), Unit::SetStandState(), Unit::SetUInt32Value(), Creature::SetWalk(), SPELL_TRANSFORM_VALANAR, WorldObject::SummonCreature(), TEMPSUMMON_CORPSE_TIMED_DESPAWN, UNIT_FLAG_NON_ATTACKABLE, UNIT_NPC_EMOTESTATE, UNIT_NPC_FLAG_GOSSIP, UNIT_NPC_FLAG_QUESTGIVER, UNIT_STAND_STATE_DEAD, UNIT_STAND_STATE_KNEEL, UNIT_STAND_STATE_SIT, UNIT_STAND_STATE_STAND, EventMap::Update(), and CreatureAI::UpdateVictim().

Member Data Documentation

◆ _arlosGUID

ObjectGuid npc_thassarian2::npc_thassarian2AI::_arlosGUID
private

Referenced by Cleanup(), Initialize(), SetData(), and UpdateAI().

◆ _arthasGUID

ObjectGuid npc_thassarian2::npc_thassarian2AI::_arthasGUID
private

Referenced by Cleanup(), Initialize(), and UpdateAI().

◆ _events

EventMap npc_thassarian2::npc_thassarian2AI::_events
private

Referenced by MovementInform(), SetData(), and UpdateAI().

◆ _leryssaGUID

ObjectGuid npc_thassarian2::npc_thassarian2AI::_leryssaGUID
private

Referenced by Cleanup(), Initialize(), SetData(), and UpdateAI().

◆ _playerGUID

ObjectGuid npc_thassarian2::npc_thassarian2AI::_playerGUID
private

Referenced by sGossipSelect().

◆ _talbotGUID

ObjectGuid npc_thassarian2::npc_thassarian2AI::_talbotGUID
private

Referenced by Cleanup(), Initialize(), and UpdateAI().