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

Public Member Functions

 npc_thrall_old_hillsbradAI (Creature *creature)
 
void DoAction (int32 param) override
 
void WaypointStart (uint32 waypointId) override
 
void WaypointReached (uint32 waypointId) override
 
void MountSelf ()
 
void UnMountSelf ()
 
void MovementInform (uint32 type, uint32 point) override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged. More...
 
void Reset () override
 
void JustReachedHome () override
 
void KilledUnit (Unit *) override
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void SummonedCreatureDies (Creature *summon, Unit *) override
 
void JustDied (Unit *killer) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
void UpdateEscortAI (uint32 diff) override
 
void ReorderInstance (uint32 data)
 
- Public Member Functions inherited from npc_escortAI
 npc_escortAI (Creature *creature)
 
 ~npc_escortAI () override
 
void AttackStart (Unit *who) override
 
void MoveInLineOfSight (Unit *who) override
 
void JustDied (Unit *) override
 
void JustRespawned () override
 
void ReturnToLastPoint ()
 
void EnterEvadeMode (EvadeReason=EVADE_REASON_OTHER) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
virtual void UpdateEscortAI (uint32 diff)
 
void MovementInform (uint32, uint32) override
 
void AddWaypoint (uint32 id, float x, float y, float z, uint32 waitTime=0)
 
bool SetNextWaypoint (uint32 pointId, float x, float y, float z, float orientation)
 
bool SetNextWaypoint (uint32 pointId, bool setPosition=true)
 
bool GetWaypointPosition (uint32 pointId, float &x, float &y, float &z)
 
void GenerateWaypointArray (Movement::PointsArray *points)
 
virtual void WaypointReached (uint32 pointId)=0
 
virtual void WaypointStart (uint32)
 
void Start (bool isActiveAttacker=true, bool run=false, ObjectGuid playerGUID=ObjectGuid::Empty, Quest const *quest=nullptr, bool instantRespawn=false, bool canLoopPath=false, bool resetWaypoints=true)
 
void SetRun (bool on=true)
 
void SetEscortPaused (bool on)
 
bool HasEscortState (uint32 escortState)
 
bool IsEscorted () override
 
void SetMaxPlayerDistance (float newMax)
 
float GetMaxPlayerDistance ()
 
void SetDespawnAtEnd (bool despawn)
 
void SetDespawnAtFar (bool despawn)
 
bool GetAttack ()
 
void SetCanAttack (bool attack)
 
ObjectGuid GetEventStarterGUID ()
 
void AddEscortState (uint32 escortState)
 
void RemoveEscortState (uint32 escortState)
 
- 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

InstanceScriptinstance
 
EventMap events
 
EventMap combatEvents
 
SummonList summons
 
bool _mounted
 
bool _barnWave
 
bool _churchWave
 

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 npc_escortAI
PlayerGetPlayerForEscort ()
 
- 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_thrall_old_hillsbradAI()

npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::npc_thrall_old_hillsbradAI ( Creature creature)
inline
249 : npc_escortAI(creature), summons(me)
250 {
251 instance = creature->GetInstanceScript();
252 _barnWave = false;
253 _churchWave = false;
254 }
Creature * me
Definition: ScriptedCreature.h:280
Definition: ScriptedEscortAI.h:53
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
bool _barnWave
Definition: old_hillsbrad.cpp:978
bool _churchWave
Definition: old_hillsbrad.cpp:979
SummonList summons
Definition: old_hillsbrad.cpp:975
InstanceScript * instance
Definition: old_hillsbrad.cpp:972

References _barnWave, _churchWave, WorldObject::GetInstanceScript(), and instance.

Member Function Documentation

◆ DoAction()

void npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::DoAction ( int32  param)
inlineoverridevirtual

Reimplemented from UnitAI.

257 {
258 switch (param)
259 {
261 events.ScheduleEvent(EVENT_OPEN_DOORS, 0);
262 events.ScheduleEvent(EVENT_START_WP, 3000);
263 break;
268 SetEscortPaused(false);
269 break;
271 events.ScheduleEvent(EVENT_SUMMON_CHRONO, 0);
272 events.ScheduleEvent(EVENT_THRALL_TALK_2, 6000);
273 events.ScheduleEvent(EVENT_TARETHA_FALL, 11000);
274 events.ScheduleEvent(EVENT_THRALL_TALK_3, 15000);
275 events.ScheduleEvent(EVENT_THRALL_MOVE_DOWN, 17000);
276 break;
277 case NPC_TARETHA:
278 events.ScheduleEvent(EVENT_THRALL_FACE_TARETHA, 0);
279 events.ScheduleEvent(EVENT_THRALL_TALK_4, 4000);
280 events.ScheduleEvent(EVENT_TARETHA_TALK_1, 13000);
281 events.ScheduleEvent(EVENT_THRALL_TALK_5, 17000);
282 events.ScheduleEvent(EVENT_SUMMON_EROZION, 17500);
283 events.ScheduleEvent(EVENT_EROZION_TALK_1, 18000);
284 events.ScheduleEvent(EVENT_EROZION_ACTION_1, 24000);
285 events.ScheduleEvent(EVENT_EROZION_TALK_2, 29000);
286 events.ScheduleEvent(EVENT_EROZION_TALK_3, 40000);
287 events.ScheduleEvent(EVENT_EROZION_ACTION_2, 46000);
288 events.ScheduleEvent(EVENT_THRALL_TALK_6, 48000);
289 events.ScheduleEvent(EVENT_THRALL_RUN_AWAY, 51000);
290 events.ScheduleEvent(EVENT_TARETHA_TALK_2, 53000);
291 events.ScheduleEvent(EVENT_EROZION_FLAGS, 56000);
292 break;
293 }
294 }
@ EVENT_THRALL_FACE_TARETHA
Definition: old_hillsbrad.cpp:187
@ EVENT_EROZION_ACTION_2
Definition: old_hillsbrad.cpp:195
@ EVENT_TARETHA_TALK_1
Definition: old_hillsbrad.cpp:189
@ EVENT_THRALL_TALK_3
Definition: old_hillsbrad.cpp:175
@ EVENT_THRALL_TALK_6
Definition: old_hillsbrad.cpp:197
@ EVENT_START_WP
Definition: old_hillsbrad.cpp:139
@ EVENT_THRALL_TALK_2
Definition: old_hillsbrad.cpp:173
@ EVENT_TARETHA_FALL
Definition: old_hillsbrad.cpp:174
@ EVENT_THRALL_TALK_5
Definition: old_hillsbrad.cpp:190
@ EVENT_EROZION_TALK_1
Definition: old_hillsbrad.cpp:192
@ EVENT_EROZION_TALK_2
Definition: old_hillsbrad.cpp:194
@ EVENT_EROZION_TALK_3
Definition: old_hillsbrad.cpp:196
@ EVENT_EROZION_FLAGS
Definition: old_hillsbrad.cpp:200
@ EVENT_THRALL_MOVE_DOWN
Definition: old_hillsbrad.cpp:176
@ EVENT_SUMMON_CHRONO
Definition: old_hillsbrad.cpp:172
@ EVENT_TARETHA_TALK_2
Definition: old_hillsbrad.cpp:199
@ EVENT_SUMMON_EROZION
Definition: old_hillsbrad.cpp:191
@ EVENT_THRALL_RUN_AWAY
Definition: old_hillsbrad.cpp:198
@ EVENT_OPEN_DOORS
Definition: old_hillsbrad.cpp:138
@ EVENT_EROZION_ACTION_1
Definition: old_hillsbrad.cpp:193
@ EVENT_THRALL_TALK_4
Definition: old_hillsbrad.cpp:188
@ ENCOUNTER_PROGRESS_AMBUSHES_1
Definition: old_hillsbrad.h:79
@ ENCOUNTER_PROGRESS_THRALL_ARMORED
Definition: old_hillsbrad.h:78
@ ENCOUNTER_PROGRESS_BARRELS
Definition: old_hillsbrad.h:76
@ ENCOUNTER_PROGRESS_TARETHA_MEET
Definition: old_hillsbrad.h:82
@ ENCOUNTER_PROGRESS_SKARLOC_KILLED
Definition: old_hillsbrad.h:80
@ ENCOUNTER_PROGRESS_TARREN_MILL
Definition: old_hillsbrad.h:81
@ NPC_TARETHA
Definition: old_hillsbrad.h:46
events
Definition: boss_sartura.cpp:43
void SetEscortPaused(bool on)
Definition: ScriptedEscortAI.cpp:523

References ENCOUNTER_PROGRESS_AMBUSHES_1, ENCOUNTER_PROGRESS_BARRELS, ENCOUNTER_PROGRESS_SKARLOC_KILLED, ENCOUNTER_PROGRESS_TARETHA_MEET, ENCOUNTER_PROGRESS_TARREN_MILL, ENCOUNTER_PROGRESS_THRALL_ARMORED, EVENT_EROZION_ACTION_1, EVENT_EROZION_ACTION_2, EVENT_EROZION_FLAGS, EVENT_EROZION_TALK_1, EVENT_EROZION_TALK_2, EVENT_EROZION_TALK_3, EVENT_OPEN_DOORS, EVENT_START_WP, EVENT_SUMMON_CHRONO, EVENT_SUMMON_EROZION, EVENT_TARETHA_FALL, EVENT_TARETHA_TALK_1, EVENT_TARETHA_TALK_2, EVENT_THRALL_FACE_TARETHA, EVENT_THRALL_MOVE_DOWN, EVENT_THRALL_RUN_AWAY, EVENT_THRALL_TALK_2, EVENT_THRALL_TALK_3, EVENT_THRALL_TALK_4, EVENT_THRALL_TALK_5, EVENT_THRALL_TALK_6, NPC_TARETHA, and npc_escortAI::SetEscortPaused().

◆ JustDied()

void npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::JustDied ( Unit killer)
inlineoverridevirtual

Reimplemented from npc_escortAI.

536 {
537 if (killer && killer == me)
538 return;
539
546 else
548 }
constexpr auto DAY
Definition: Common.h:49
@ STATE_ESCORT_ESCORTING
Definition: ScriptedEscortAI.h:47
@ SAY_RANDOM_DIE
Definition: old_hillsbrad.cpp:48
@ SPELL_SUMMON_EROZION_IMAGE
Definition: old_hillsbrad.cpp:86
@ DATA_THRALL_REPOSITION
Definition: old_hillsbrad.h:35
@ DATA_ATTEMPTS_COUNT
Definition: old_hillsbrad.h:39
Talk
Definition: hyjal.cpp:82
void DespawnAll(uint32 delay=0)
Definition: ScriptedCreature.cpp:71
void RemoveEscortState(uint32 escortState)
Definition: ScriptedEscortAI.h:111
void SetRespawnTime(uint32 respawn)
Definition: Creature.cpp:3762
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:1168
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:52
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:53

References Unit::CastSpell(), DATA_ATTEMPTS_COUNT, DATA_THRALL_REPOSITION, DAY, SummonList::DespawnAll(), ZoneScript::GetData(), instance, ScriptedAI::me, npc_escortAI::RemoveEscortState(), SAY_RANDOM_DIE, ZoneScript::SetData(), Creature::SetRespawnTime(), SPELL_SUMMON_EROZION_IMAGE, STATE_ESCORT_ESCORTING, and summons.

◆ JustEngagedWith()

void npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from ScriptedAI.

474 {
479
480 if (roll_chance_i(50))
482
483 if (me->IsMounted())
484 {
485 _mounted = true;
486 UnMountSelf();
487 }
488 }
bool roll_chance_i(int chance)
Definition: Random.h:59
@ SAY_RANDOM_AGGRO
Definition: old_hillsbrad.cpp:49
@ EVENT_CHECK_HEALTH
Definition: old_hillsbrad.cpp:134
@ EVENT_SPELL_SHIELD_BLOCK
Definition: old_hillsbrad.cpp:136
@ EVENT_SPELL_STRIKE
Definition: old_hillsbrad.cpp:135
void ScheduleEvent(uint32 eventId, uint32 time, uint32 group=0, uint32 phase=0)
Definition: EventMap.cpp:56
void Reset()
Definition: EventMap.cpp:21
bool IsMounted() const
Definition: Unit.h:990
bool _mounted
Definition: old_hillsbrad.cpp:977
void UnMountSelf()
Definition: old_hillsbrad.cpp:455
EventMap combatEvents
Definition: old_hillsbrad.cpp:974

References _mounted, combatEvents, EVENT_CHECK_HEALTH, EVENT_SPELL_SHIELD_BLOCK, EVENT_SPELL_STRIKE, Unit::IsMounted(), ScriptedAI::me, EventMap::Reset(), roll_chance_i(), SAY_RANDOM_AGGRO, EventMap::ScheduleEvent(), and UnMountSelf().

◆ JustReachedHome()

void npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from CreatureAI.

506 {
507 if (_barnWave)
508 {
509 _barnWave = false;
510 Talk(SAY_LEAD);
511 }
512 else if (_churchWave)
513 {
514 _churchWave = false;
516 }
517 }
@ SAY_LEAD
Definition: old_hillsbrad.cpp:59
@ SAY_CHURCH_END
Definition: old_hillsbrad.cpp:42

References _barnWave, _churchWave, SAY_CHURCH_END, and SAY_LEAD.

◆ JustSummoned()

void npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from ScriptedAI.

525 {
526 if (summon->GetEntry() == NPC_INFINITE_SLAYER || summon->GetEntry() == NPC_INFINITE_SABOTEUR || summon->GetEntry() == NPC_INFINITE_DEFILER)
527 summon->GetMotionMaster()->MovePoint(10, 2634.25f, 672.01f, 54.445f);
528
529 summons.Summon(summon);
530 }
@ NPC_INFINITE_DEFILER
Definition: old_hillsbrad.cpp:109
@ NPC_INFINITE_SABOTEUR
Definition: old_hillsbrad.cpp:110
@ NPC_INFINITE_SLAYER
Definition: old_hillsbrad.cpp:111
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:88
uint32 GetEntry() const
Definition: Object.h:112
MotionMaster * GetMotionMaster()
Definition: Unit.h:1601
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition: MotionMaster.h:211

References Object::GetEntry(), Unit::GetMotionMaster(), MotionMaster::MovePoint(), NPC_INFINITE_DEFILER, NPC_INFINITE_SABOTEUR, NPC_INFINITE_SLAYER, SummonList::Summon(), and summons.

◆ KilledUnit()

void npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::KilledUnit ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

520 {
522 }
@ SAY_RANDOM_KILL
Definition: old_hillsbrad.cpp:50

References SAY_RANDOM_KILL.

◆ MountSelf()

void npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::MountSelf ( )
inline
450 {
453 }
@ MOVE_RUN
Definition: UnitDefines.h:329
#define SPEED_MOUNTED
Definition: old_hillsbrad.cpp:129
@ SKARLOC_MOUNT_MODEL
Definition: old_hillsbrad.h:73
void Mount(uint32 mount, uint32 vehicleId=0, uint32 creatureEntry=0)
Definition: Unit.cpp:13422
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
Definition: Unit.cpp:14383

References ScriptedAI::me, Unit::Mount(), MOVE_RUN, Unit::SetSpeed(), SKARLOC_MOUNT_MODEL, and SPEED_MOUNTED.

Referenced by MovementInform(), and UpdateAI().

◆ MovementInform()

void npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::MovementInform ( uint32  type,
uint32  point 
)
inlineoverridevirtual

Reimplemented from npc_escortAI.

462 {
463 npc_escortAI::MovementInform(type, point);
464 if (type == POINT_MOTION_TYPE && point == 0xFFFFFF /*POINT_LAST_POINT*/)
465 {
466 if (roll_chance_i(30))
468 if (_mounted)
469 MountSelf();
470 }
471 }
@ POINT_MOTION_TYPE
Definition: MotionMaster.h:46
@ SAY_LEAVE_COMBAT
Definition: old_hillsbrad.cpp:51
void MovementInform(uint32, uint32) override
Definition: ScriptedEscortAI.cpp:326
void MountSelf()
Definition: old_hillsbrad.cpp:449

References _mounted, MountSelf(), npc_escortAI::MovementInform(), POINT_MOTION_TYPE, roll_chance_i(), and SAY_LEAVE_COMBAT.

◆ ReorderInstance()

void npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::ReorderInstance ( uint32  data)
inline
924 {
925 Start(true, true);
926 SetEscortPaused(true);
927 SetDespawnAtEnd(false);
928
930
932 {
936 }
937 else
938 {
942 }
943
944 switch (data)
945 {
947 SetNextWaypoint(11, false);
948 break;
950 SetNextWaypoint(27, false);
951 break;
953 if (Creature* mount = me->SummonCreature(NPC_SKARLOC_MOUNT, 2049.12f, 252.31f, 62.855f, me->GetOrientation(), TEMPSUMMON_MANUAL_DESPAWN))
954 {
955 mount->SetImmuneToNPC(true);
956 mount->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
957 }
958 SetNextWaypoint(30, false);
959 break;
961 SetNextWaypoint(61, false);
962 break;
964 SetNextWaypoint(95, false);
966 Taretha->SetStandState(UNIT_STAND_STATE_STAND);
967 break;
968 }
969 }
@ UNIT_STAND_STATE_STAND
Definition: UnitDefines.h:32
@ UNIT_NPC_FLAG_GOSSIP
Definition: UnitDefines.h:294
@ UNIT_NPC_FLAG_QUESTGIVER
Definition: UnitDefines.h:295
@ UNIT_FLAG_NOT_SELECTABLE
Definition: UnitDefines.h:254
@ UNIT_VIRTUAL_ITEM_SLOT_ID
Definition: UpdateFields.h:116
@ TEMPSUMMON_MANUAL_DESPAWN
Definition: Object.h:52
@ THRALL_MODEL_UNEQUIPPED
Definition: old_hillsbrad.cpp:118
@ THRALL_MODEL_EQUIPPED
Definition: old_hillsbrad.cpp:119
@ THRALL_WEAPON_ITEM
Definition: old_hillsbrad.cpp:116
@ THRALL_SHIELD_ITEM
Definition: old_hillsbrad.cpp:117
@ DATA_TARETHA_GUID
Definition: old_hillsbrad.h:38
@ NPC_SKARLOC_MOUNT
Definition: old_hillsbrad.h:60
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:213
void Start(bool isActiveAttacker=true, bool run=false, ObjectGuid playerGUID=ObjectGuid::Empty, Quest const *quest=nullptr, bool instantRespawn=false, bool canLoopPath=false, bool resetWaypoints=true)
Definition: ScriptedEscortAI.cpp:449
void SetDespawnAtEnd(bool despawn)
Definition: ScriptedEscortAI.h:104
bool SetNextWaypoint(uint32 pointId, float x, float y, float z, float orientation)
Definition: ScriptedEscortAI.cpp:534
Definition: Creature.h:46
void SetDisplayId(uint32 displayId, float displayScale=1.f) override
Definition: Creature.cpp:3505
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
float GetOrientation() const
Definition: Position.h:120
void SetNpcFlag(NPCFlags flags)
Definition: Unit.h:695
void SetUInt32Value(uint16 index, uint32 value)
Definition: Unit.cpp:21256
ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:95

References DATA_TARETHA_GUID, ENCOUNTER_PROGRESS_AMBUSHES_1, ENCOUNTER_PROGRESS_SKARLOC_KILLED, ENCOUNTER_PROGRESS_TARETHA_MEET, ENCOUNTER_PROGRESS_TARREN_MILL, ENCOUNTER_PROGRESS_THRALL_ARMORED, ObjectAccessor::GetCreature(), InstanceScript::GetGuidData(), Position::GetOrientation(), instance, ScriptedAI::me, NPC_SKARLOC_MOUNT, npc_escortAI::SetDespawnAtEnd(), Creature::SetDisplayId(), npc_escortAI::SetEscortPaused(), npc_escortAI::SetNextWaypoint(), Unit::SetNpcFlag(), Unit::SetUInt32Value(), npc_escortAI::Start(), WorldObject::SummonCreature(), TEMPSUMMON_MANUAL_DESPAWN, THRALL_MODEL_EQUIPPED, THRALL_MODEL_UNEQUIPPED, THRALL_SHIELD_ITEM, THRALL_WEAPON_ITEM, UNIT_FLAG_NOT_SELECTABLE, UNIT_NPC_FLAG_GOSSIP, UNIT_NPC_FLAG_QUESTGIVER, UNIT_STAND_STATE_STAND, and UNIT_VIRTUAL_ITEM_SLOT_ID.

Referenced by Reset().

◆ Reset()

void npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::Reset ( )
inlineoverridevirtual

◆ SummonedCreatureDespawn()

void npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::SummonedCreatureDespawn ( Creature summon)
inlineoverridevirtual

Reimplemented from ScriptedAI.

532{ summons.Despawn(summon); }
void Despawn(Creature const *summon)
Definition: ScriptedCreature.h:89

References SummonList::Despawn(), and summons.

◆ SummonedCreatureDies()

void npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::SummonedCreatureDies ( Creature summon,
Unit  
)
inlineoverridevirtual

Reimplemented from CreatureAI.

533{ summons.Despawn(summon); }

References SummonList::Despawn(), and summons.

◆ UnMountSelf()

void npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::UnMountSelf ( )
inline
456 {
457 me->Dismount();
459 }
#define SPEED_RUNNING
Definition: old_hillsbrad.cpp:128
void Dismount()
Definition: Unit.cpp:13481

References Unit::Dismount(), ScriptedAI::me, MOVE_RUN, Unit::SetSpeed(), and SPEED_RUNNING.

Referenced by JustEngagedWith(), and WaypointReached().

◆ UpdateAI()

void npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::UpdateAI ( uint32  )
inlineoverridevirtual

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

Reimplemented from npc_escortAI.

551 {
553
554 events.Update(diff);
555 switch (events.ExecuteEvent())
556 {
557 case EVENT_OPEN_DOORS:
559 doors->SetGoState(GO_STATE_ACTIVE);
560 me->SummonCreature(NPC_DURNHOLDE_SENTRY, 2142.372f, 174.2907f, 66.30494f, 2.5656f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS);
561 me->SummonCreature(NPC_DURNHOLDE_SENTRY, 2138.178f, 168.6046f, 66.30494f, 2.4783f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS);
562 me->SummonCreature(NPC_DURNHOLDE_VETERAN, 2140.1458f, 169.23643f, 66.30494f, 2.4958f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS);
563 me->SummonCreature(NPC_DURNHOLDE_VETERAN, 2107.9377f, 192.07530f, 66.30494f, 2.5481f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS);
564 me->SummonCreature(NPC_DURNHOLDE_MAGE, 2142.3633f, 172.42600f, 66.30494f, 2.5481f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS);
565 me->SummonCreature(NPC_DURNHOLDE_MAGE, 2109.8518f, 195.14030f, 66.30493f, 2.4260f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS);
566 me->SummonCreature(NPC_DURNHOLDE_MAGE, 2108.4856f, 189.93457f, 66.30494f, 2.6878f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS);
567 break;
568 case EVENT_START_WP:
569 Start(true, true);
570 SetDespawnAtEnd(false);
571 break;
572 case EVENT_SET_FACING:
574 {
575 armorer->GetMotionMaster()->Clear();
576 armorer->GetMotionMaster()->MoveIdle();
577 armorer->SetFacingToObject(me);
578 me->SetFacingToObject(armorer);
579 }
580 break;
583 {
584 armorer->AI()->Talk(SAY_ARMORER_THRALL);
585 }
586 break;
589 break;
593 {
594 DoCast(armorer, SPELL_KNOCKOUT_ARMORER, true);
595 armorer->SetStandState(UNIT_STAND_STATE_DEAD);
596 }
597 break;
600 break;
602 me->SetFacingTo(2.61f);
605 break;
608 break;
611 break;
614 break;
617 break;
621 me->SetFacingTo(5.6897f);
623 if (Creature* sentry = me->SummonCreature(NPC_DURNHOLDE_SENTRY, 2185.916f, 140.38835f, 88.299866f, 5.9238f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS))
624 {
625 sentry->SetWalk(true);
626 sentry->GetMotionMaster()->MovePoint(0, 2191.9712f, 138.11394f, 88.2125f);
627 }
628 if (Creature* warden = me->SummonCreature(NPC_DURNHOLDE_WARDEN, 2188.5586f, 138.88553f, 88.299866f, 1.6031f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS))
629 {
630 warden->SetWalk(true);
631 warden->GetMotionMaster()->MovePoint(0, 2188.5068f, 140.48346f, 88.21251f);
632 }
633 if (Creature* veteran = me->SummonCreature(NPC_DURNHOLDE_VETERAN, 2186.9856f, 142.199f, 88.299866f, 5.9049f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS))
634 {
635 veteran->SetWalk(true);
636 veteran->GetMotionMaster()->MovePoint(0, 2190.48f, 140.81056f, 88.21251f);
637 }
638 if (Creature* mage = me->SummonCreature(NPC_DURNHOLDE_MAGE, 2189.7336f, 140.64551f, 88.299866f, 3.9532f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS))
639 {
640 mage->SetWalk(true);
641 mage->GetMotionMaster()->MovePoint(0, 2187.8035f, 138.61118f, 88.21251f);
642 }
643 break;
645 MountSelf();
646 if (Creature* mount = me->FindNearestCreature(NPC_SKARLOC_MOUNT, 10.0f))
647 {
648 me->SetFacingTo(mount->GetOrientation());
649 mount->DespawnOrUnsummon();
650 }
651 break;
654 break;
655 case EVENT_LOOK_1:
656 me->SetFacingTo(5.0090f);
657 me->SetImmuneToNPC(true);
658 break;
660 me->GetMotionMaster()->MovePoint(0, 2477.146f, 695.041f, 55.801f);
661 break;
662 case EVENT_LOOK_2:
663 me->SetFacingTo(2.0071f);
664 break;
666 SetRun(true);
667 me->SummonCreature(NPC_TM_PROTECTOR, 2501.5708f, 699.38086f, 55.64138f, 3.8571f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS);
668 me->SummonCreature(NPC_TM_LOOKOUT, 2500.7002f, 698.26746f, 55.618248f, 3.7350f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS);
669 if (Creature* guardsman = me->SummonCreature(NPC_TM_GUARDSMAN, 2500.0908f, 699.9389f, 55.629555f, 4.2935f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS))
670 {
671 guardsman->CastSpell(guardsman, SPELL_DUMMY_AURA, true);
672 }
673 me->SummonCreature(NPC_TM_GUARDSMAN, 2499.0579f, 698.99725f, 55.611156f, 4.5727f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS);
675 break;
676 case EVENT_LOOK_3:
677 me->SetFacingTo(0.3490f);
678 break;
681 summon->AI()->Talk(SAY_LOOKOUT_SAW);
682 me->SetFacingTo(0.4363f);
683 break;
684 case EVENT_LOOK_4:
685 me->SetFacingTo(4.7510f);
688 break;
690 me->SetFacingTo(0.4363f);
692 summon->AI()->Talk(SAY_LOOKOUT_GO);
693 me->SetImmuneToNPC(true);
694 break;
696 me->SetImmuneToNPC(false);
698 _barnWave = true;
699 break;
700 case EVENT_LOOK_5:
701 me->SetFacingTo(0.4886f);
703 break;
705 me->SummonCreature(NPC_TM_PROTECTOR, 2630.75f, 664.80f, 54.28f, 4.37f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS);
706 me->SummonCreature(NPC_TM_LOOKOUT, 2632.20f, 661.98f, 54.30f, 4.37f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS);
707 me->SummonCreature(NPC_TM_GUARDSMAN, 2630.02f, 662.75f, 54.28f, 4.37f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS);
708 me->SummonCreature(NPC_TM_GUARDSMAN, 2632.86f, 664.05f, 54.31f, 4.37f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS);
709 _churchWave = true;
710 break;
713 summon->AI()->Talk(SAY_LOOKOUT_CHURCH);
714 break;
718 break;
720 if (Creature* epoch = me->SummonCreature(NPC_EPOCH_HUNTER, 2640.49f, 696.15f, 64.31f, 4.51f, TEMPSUMMON_MANUAL_DESPAWN))
721 {
722 epoch->SetImmuneToAll(true);
723 epoch->AI()->Talk(SAY_EPOCH_ENTER1);
724 }
725 break;
727 me->SetFacingTo(2.60f);
729 break;
732 epoch->AI()->Talk(SAY_EPOCH_ENTER2);
734 {
735 Taretha->CastSpell(Taretha, SPELL_SHADOW_SPIKE);
736 Taretha->SetStandState(UNIT_STAND_STATE_DEAD);
737 }
738 break;
741 {
742 me->SetFacingToObject(Taretha);
743 }
745 break;
747 SetEscortPaused(false);
748 break;
751 {
752 me->SetFacingToObject(epoch);
753 epoch->SetFacingToObject(me);
754 epoch->AI()->Talk(SAY_EPOCH_ENTER3);
755 }
756 break;
758 me->SummonCreature(NPC_EPOCH_LOOKOUT, 2647.57f, 701.17f, 56.215f, 4.3f, TEMPSUMMON_MANUAL_DESPAWN);
759 me->SummonCreature(NPC_EPOCH_GUARDSMAN, 2629.46f, 704.76f, 56.286f, 4.98f, TEMPSUMMON_MANUAL_DESPAWN);
760 me->SummonCreature(NPC_EPOCH_PROTECTOR, 2640.14f, 709.44f, 56.135f, 4.70f, TEMPSUMMON_MANUAL_DESPAWN);
763 break;
764 case EVENT_TRANSFORM:
767 break;
769 events.ScheduleEvent(EVENT_CHECK_WAVE_1, 500);
772 break;
774 if (summons.size() == 1)
775 {
776 me->SummonCreature(NPC_INFINITE_SABOTEUR, 2599.57f, 683.72f, 55.975f, 0.05f, TEMPSUMMON_MANUAL_DESPAWN);
777 me->SummonCreature(NPC_INFINITE_SLAYER, 2599.57f, 677.0f, 55.975f, 0.05f, TEMPSUMMON_MANUAL_DESPAWN);
778 me->SummonCreature(NPC_INFINITE_DEFILER, 2592.57f, 680.0f, 55.975f, 0.05f, TEMPSUMMON_MANUAL_DESPAWN);
780 events.ScheduleEvent(EVENT_CHECK_WAVE_2, 500);
781 break;
782 }
783 events.ScheduleEvent(EVENT_CHECK_WAVE_1, 500);
784 break;
786 if (summons.size() == 1)
787 {
788 me->SummonCreature(NPC_INFINITE_SLAYER, 2642.62f, 701.43f, 55.965f, 4.46f, TEMPSUMMON_MANUAL_DESPAWN);
789 me->SummonCreature(NPC_INFINITE_SLAYER, 2638.62f, 701.43f, 55.965f, 4.46f, TEMPSUMMON_MANUAL_DESPAWN);
790 me->SummonCreature(NPC_INFINITE_SABOTEUR, 2638.62f, 705.43f, 55.965f, 4.46f, TEMPSUMMON_MANUAL_DESPAWN);
791 me->SummonCreature(NPC_INFINITE_DEFILER, 2642.62f, 705.43f, 55.965f, 4.46f, TEMPSUMMON_MANUAL_DESPAWN);
793 events.ScheduleEvent(EVENT_CHECK_WAVE_3, 500);
794 break;
795 }
796 events.ScheduleEvent(EVENT_CHECK_WAVE_2, 500);
797 break;
799 if (summons.size() == 1)
800 {
801 me->SetHomePosition(2634.79f, 672.964f, 54.8577f, 1.33f);
803 events.ScheduleEvent(EVENT_CALL_EPOCH, 8000);
804 break;
805 }
806 events.ScheduleEvent(EVENT_CHECK_WAVE_3, 500);
807 break;
808 case EVENT_CALL_EPOCH:
810 {
811 epoch->SetImmuneToAll(false);
812 epoch->GetMotionMaster()->MovePoint(0, *me, false, true);
813 }
814 break;
816 {
817 Map::PlayerList const& players = me->GetMap()->GetPlayers();
818 if (!players.IsEmpty())
819 for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
820 if (Player* player = itr->GetSource())
821 player->KilledMonsterCredit(20156);
822
824 {
825 me->SetFacingToObject(Taretha);
826 }
827 me->SetImmuneToNPC(true);
828 break;
829 }
833 break;
837 {
838 Taretha->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
839 Taretha->AI()->Talk(SAY_TARETHA_TALK1);
840 }
841 break;
844 break;
846 if (Creature* erozion = me->SummonCreature(NPC_EROZION, 2646.31f, 680.01f, 55.36f, 3.76f, TEMPSUMMON_MANUAL_DESPAWN))
847 erozion->ReplaceAllNpcFlags(UNIT_NPC_FLAG_NONE);
848 break;
851 {
852 erozion->CastSpell(erozion, SPELL_TELEPORT, true);
853 erozion->AI()->Talk(SAY_EROZION_1);
854 }
855 break;
858 erozion->CastSpell(erozion, SPELL_MEMORY_WIPE, false);
859 break;
862 erozion->AI()->Talk(SAY_EROZION_2);
863 break;
866 erozion->AI()->Talk(SAY_EROZION_3);
867 break;
870 erozion->CastSpell(erozion, SPELL_MEMORY_WIPE_RESUME, false);
871 break;
874 break;
876 me->SetImmuneToAll(true);
878 SetEscortPaused(false);
879 break;
882 {
883 Taretha->SetFacingToObject(me);
884 Taretha->AI()->Talk(SAY_TARETHA_TALK2);
885 }
886 break;
889 erozion->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
890 break;
891 }
892 }
constexpr auto IN_MILLISECONDS
Definition: Common.h:53
@ REACT_PASSIVE
Definition: Unit.h:548
@ UNIT_STAND_STATE_DEAD
Definition: UnitDefines.h:39
@ UNIT_STAND_STATE_KNEEL
Definition: UnitDefines.h:40
@ UNIT_NPC_FLAG_NONE
Definition: UnitDefines.h:293
@ UNIT_NPC_EMOTESTATE
Definition: UpdateFields.h:140
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
Definition: Object.h:50
@ GO_STATE_ACTIVE
Definition: GameObjectData.h:690
@ SAY_EROZION_3
Definition: old_hillsbrad.cpp:79
@ SAY_KILL_ARMORER
Definition: old_hillsbrad.cpp:52
@ SAY_GREET_TARETHA
Definition: old_hillsbrad.cpp:55
@ SAY_ENTER_CHURCH
Definition: old_hillsbrad.cpp:54
@ SAY_TARETHA_TALK1
Definition: old_hillsbrad.cpp:63
@ SAY_GO_ARMORED
Definition: old_hillsbrad.cpp:53
@ SAY_LOOKOUT_CHURCH
Definition: old_hillsbrad.cpp:70
@ SAY_EPOCH_ENTER2
Definition: old_hillsbrad.cpp:74
@ SAY_MOUNTS_UP
Definition: old_hillsbrad.cpp:41
@ SAY_EPOCH_ENTER3
Definition: old_hillsbrad.cpp:75
@ SAY_EPOCH_KILL_TARETHA
Definition: old_hillsbrad.cpp:45
@ SAY_MEET_TARETHA
Definition: old_hillsbrad.cpp:43
@ SAY_EPOCH_ENTER1
Definition: old_hillsbrad.cpp:73
@ SAY_CHAT_TARETHA1
Definition: old_hillsbrad.cpp:56
@ SAY_EROZION_2
Definition: old_hillsbrad.cpp:78
@ SAY_TARETHA_TALK2
Definition: old_hillsbrad.cpp:64
@ SAY_EROZION_1
Definition: old_hillsbrad.cpp:77
@ SAY_EMOTE_HORSE_2
Definition: old_hillsbrad.cpp:58
@ SAY_ARMORY
Definition: old_hillsbrad.cpp:37
@ SAY_EVENT_COMPLETE
Definition: old_hillsbrad.cpp:46
@ SAY_LOOKOUT_SAW
Definition: old_hillsbrad.cpp:68
@ SAY_EPOCH_WONDER
Definition: old_hillsbrad.cpp:44
@ SAY_LOOKOUT_GO
Definition: old_hillsbrad.cpp:69
@ SAY_ARMORER_THRALL
Definition: old_hillsbrad.cpp:66
@ NPC_EPOCH_GUARDSMAN
Definition: old_hillsbrad.cpp:105
@ NPC_TM_GUARDSMAN
Definition: old_hillsbrad.cpp:101
@ NPC_EPOCH_LOOKOUT
Definition: old_hillsbrad.cpp:107
@ NPC_TM_PROTECTOR
Definition: old_hillsbrad.cpp:102
@ NPC_EPOCH_PROTECTOR
Definition: old_hillsbrad.cpp:106
@ NPC_TM_LOOKOUT
Definition: old_hillsbrad.cpp:103
@ ACTION_MOVE
Definition: old_hillsbrad.cpp:124
@ ACTION_TRANSFORM
Definition: old_hillsbrad.cpp:123
@ ACTION_REMOVE_IMMUNE_FLAG
Definition: old_hillsbrad.cpp:122
@ ACTION_SET_IMMUNE_FLAG
Definition: old_hillsbrad.cpp:121
@ ACTION_START_COMBAT
Definition: old_hillsbrad.cpp:125
@ SPELL_SHADOW_SPIKE
Definition: old_hillsbrad.cpp:89
@ SPELL_SALVATION
Definition: old_hillsbrad.cpp:95
@ SPELL_MEMORY_WIPE
Definition: old_hillsbrad.cpp:92
@ SPELL_MEMORY_WIPE_RESUME
Definition: old_hillsbrad.cpp:93
@ SPELL_TELEPORT
Definition: old_hillsbrad.cpp:91
@ SPELL_DUMMY_AURA
Definition: old_hillsbrad.cpp:96
@ SPELL_KNOCKOUT_ARMORER
Definition: old_hillsbrad.cpp:94
@ EVENT_LOOK_3
Definition: old_hillsbrad.cpp:161
@ EVENT_CHECK_WAVE_2
Definition: old_hillsbrad.cpp:183
@ EVENT_SUMMON_TALK1
Definition: old_hillsbrad.cpp:162
@ EVENT_CALL_EPOCH
Definition: old_hillsbrad.cpp:185
@ EVENT_DRESSING_STAND
Definition: old_hillsbrad.cpp:149
@ EVENT_SUMMON_INFINITES
Definition: old_hillsbrad.cpp:179
@ EVENT_TALK_START_RIDE
Definition: old_hillsbrad.cpp:155
@ EVENT_DRESSING_ARMOR
Definition: old_hillsbrad.cpp:148
@ EVENT_THRALL_TALK
Definition: old_hillsbrad.cpp:171
@ EVENT_SUMMON_GUARDS_2
Definition: old_hillsbrad.cpp:168
@ EVENT_GUARDS_MOVING
Definition: old_hillsbrad.cpp:165
@ EVENT_DRESSING_TALK
Definition: old_hillsbrad.cpp:152
@ EVENT_SET_FACING
Definition: old_hillsbrad.cpp:141
@ EVENT_MOVE_AROUND
Definition: old_hillsbrad.cpp:158
@ EVENT_START_WAVE_1
Definition: old_hillsbrad.cpp:181
@ EVENT_SUMMON_TALK2
Definition: old_hillsbrad.cpp:164
@ EVENT_LOOK_5
Definition: old_hillsbrad.cpp:167
@ EVENT_ENTER_MOUNT
Definition: old_hillsbrad.cpp:154
@ EVENT_LOOK_2
Definition: old_hillsbrad.cpp:159
@ EVENT_EPOCH_INTRO
Definition: old_hillsbrad.cpp:178
@ EVENT_TALK_KILL_ARMORER
Definition: old_hillsbrad.cpp:145
@ EVENT_DRESSING_AXE
Definition: old_hillsbrad.cpp:150
@ EVENT_DRESSING_SHIELD
Definition: old_hillsbrad.cpp:151
@ EVENT_CHECK_WAVE_3
Definition: old_hillsbrad.cpp:184
@ EVENT_TRANSFORM
Definition: old_hillsbrad.cpp:180
@ EVENT_LOOK_1
Definition: old_hillsbrad.cpp:157
@ EVENT_LOOK_4
Definition: old_hillsbrad.cpp:163
@ EVENT_THRALL_EMOTE
Definition: old_hillsbrad.cpp:143
@ EVENT_DRESSING_KNEEL
Definition: old_hillsbrad.cpp:147
@ EVENT_KILL_ARMORER
Definition: old_hillsbrad.cpp:144
@ EVENT_ARMORER_SAY
Definition: old_hillsbrad.cpp:142
@ EVENT_CHECK_WAVE_1
Definition: old_hillsbrad.cpp:182
@ EVENT_SUMMON_GUARDS
Definition: old_hillsbrad.cpp:160
@ EVENT_SUMMON_TALK3
Definition: old_hillsbrad.cpp:169
@ NPC_DURNHOLDE_MAGE
Definition: old_hillsbrad.h:56
@ NPC_EPOCH_HUNTER
Definition: old_hillsbrad.h:47
@ NPC_EROZION
Definition: old_hillsbrad.h:44
@ NPC_DURNHOLDE_ARMORER
Definition: old_hillsbrad.h:53
@ NPC_DURNHOLDE_VETERAN
Definition: old_hillsbrad.h:55
@ NPC_DURNHOLDE_WARDEN
Definition: old_hillsbrad.h:54
@ NPC_DURNHOLDE_SENTRY
Definition: old_hillsbrad.h:57
@ GO_PRISON_DOOR
Definition: old_hillsbrad.h:67
@ EMOTE_ONESHOT_NO
Definition: SharedDefines.h:1962
@ EMOTE_ONESHOT_EXCLAMATION
Definition: SharedDefines.h:1899
@ EMOTE_STATE_TALK
Definition: SharedDefines.h:1973
@ EMOTE_ONESHOT_ATTACK_UNARMED
Definition: SharedDefines.h:1925
@ EMOTE_STATE_NONE
Definition: SharedDefines.h:1922
@ EMOTE_ONESHOT_TALK
Definition: SharedDefines.h:1895
bool IsEmpty() const
Definition: LinkedList.h:97
Definition: LinkedList.h:139
SpellCastResult DoCastSelf(uint32 spellId, bool triggered=false)
Definition: UnitAI.h:392
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:177
Creature * GetCreatureWithEntry(uint32 entry) const
Definition: ScriptedCreature.cpp:132
size_type size() const
Definition: ScriptedCreature.h:78
void DoAction(int32 info, uint16 max=0)
Definition: ScriptedCreature.h:102
void UpdateAI(uint32 diff) override
Use to start attacking a target. Called just before JustEngagedWith()
Definition: ScriptedEscortAI.cpp:240
void SetRun(bool on=true)
Definition: ScriptedEscortAI.cpp:428
void SetHomePosition(float x, float y, float z, float o)
Definition: Creature.h:337
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition: Creature.h:97
Definition: GameObject.h:121
Map * GetMap() const
Definition: Object.h:531
GameObject * FindNearestGameObject(uint32 entry, float range, bool onlySpawned=false) const
Definition: Object.cpp:2455
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2446
Definition: Player.h:1064
void SetFacingTo(float ori)
Definition: Unit.cpp:20483
void SetImmuneToNPC(bool apply, bool keepCombat=false)
Definition: Unit.cpp:13577
void SetFacingToObject(WorldObject *object)
Definition: Unit.cpp:20493
void HandleEmoteCommand(uint32 emoteId)
Definition: Unit.cpp:1984
void SetStandState(uint8 state)
Definition: Unit.cpp:16682
void SetImmuneToAll(bool apply, bool keepCombat=false)
Definition: Unit.h:810
PlayerList const & GetPlayers() const
Definition: Map.h:486
Definition: MapRefMgr.h:26
iterator begin()
Definition: MapRefMgr.h:36
iterator end()
Definition: MapRefMgr.h:37
void MoveTargetedHome(bool walk=false)
The unit will return this initial position (owner for pets and summoned creatures)....
Definition: MotionMaster.cpp:259

References _barnWave, _churchWave, ACTION_MOVE, ACTION_REMOVE_IMMUNE_FLAG, ACTION_SET_IMMUNE_FLAG, ACTION_START_COMBAT, ACTION_TRANSFORM, MapRefMgr::begin(), Unit::CastSpell(), DATA_ESCORT_PROGRESS, DATA_TARETHA_GUID, SummonList::DoAction(), UnitAI::DoCast(), UnitAI::DoCastSelf(), EMOTE_ONESHOT_ATTACK_UNARMED, EMOTE_ONESHOT_EXCLAMATION, EMOTE_ONESHOT_NO, EMOTE_ONESHOT_TALK, EMOTE_STATE_NONE, EMOTE_STATE_TALK, ENCOUNTER_PROGRESS_THRALL_ARMORED, MapRefMgr::end(), EVENT_ARMORER_SAY, EVENT_CALL_EPOCH, EVENT_CHECK_WAVE_1, EVENT_CHECK_WAVE_2, EVENT_CHECK_WAVE_3, EVENT_DRESSING_ARMOR, EVENT_DRESSING_AXE, EVENT_DRESSING_KNEEL, EVENT_DRESSING_SHIELD, EVENT_DRESSING_STAND, EVENT_DRESSING_TALK, EVENT_ENTER_MOUNT, EVENT_EPOCH_INTRO, EVENT_EROZION_ACTION_1, EVENT_EROZION_ACTION_2, EVENT_EROZION_FLAGS, EVENT_EROZION_TALK_1, EVENT_EROZION_TALK_2, EVENT_EROZION_TALK_3, EVENT_GUARDS_MOVING, EVENT_KILL_ARMORER, EVENT_LOOK_1, EVENT_LOOK_2, EVENT_LOOK_3, EVENT_LOOK_4, EVENT_LOOK_5, EVENT_MOVE_AROUND, EVENT_OPEN_DOORS, EVENT_SET_FACING, EVENT_START_WAVE_1, EVENT_START_WP, EVENT_SUMMON_CHRONO, EVENT_SUMMON_EROZION, EVENT_SUMMON_GUARDS, EVENT_SUMMON_GUARDS_2, EVENT_SUMMON_INFINITES, EVENT_SUMMON_TALK1, EVENT_SUMMON_TALK2, EVENT_SUMMON_TALK3, EVENT_TALK_KILL_ARMORER, EVENT_TALK_START_RIDE, EVENT_TARETHA_FALL, EVENT_TARETHA_TALK_1, EVENT_TARETHA_TALK_2, EVENT_THRALL_EMOTE, EVENT_THRALL_FACE_TARETHA, EVENT_THRALL_MOVE_DOWN, EVENT_THRALL_RUN_AWAY, EVENT_THRALL_TALK, EVENT_THRALL_TALK_2, EVENT_THRALL_TALK_3, EVENT_THRALL_TALK_4, EVENT_THRALL_TALK_5, EVENT_THRALL_TALK_6, EVENT_TRANSFORM, WorldObject::FindNearestCreature(), WorldObject::FindNearestGameObject(), ObjectAccessor::GetCreature(), SummonList::GetCreatureWithEntry(), InstanceScript::GetGuidData(), WorldObject::GetMap(), Unit::GetMotionMaster(), Map::GetPlayers(), GO_PRISON_DOOR, GO_STATE_ACTIVE, Unit::HandleEmoteCommand(), IN_MILLISECONDS, instance, LinkedListHead::IsEmpty(), ScriptedAI::me, MountSelf(), MotionMaster::MovePoint(), MotionMaster::MoveTargetedHome(), NPC_DURNHOLDE_ARMORER, NPC_DURNHOLDE_MAGE, NPC_DURNHOLDE_SENTRY, NPC_DURNHOLDE_VETERAN, NPC_DURNHOLDE_WARDEN, NPC_EPOCH_GUARDSMAN, NPC_EPOCH_HUNTER, NPC_EPOCH_LOOKOUT, NPC_EPOCH_PROTECTOR, NPC_EROZION, NPC_INFINITE_DEFILER, NPC_INFINITE_SABOTEUR, NPC_INFINITE_SLAYER, NPC_SKARLOC_MOUNT, NPC_TM_GUARDSMAN, NPC_TM_LOOKOUT, NPC_TM_PROTECTOR, REACT_PASSIVE, SAY_ARMORER_THRALL, SAY_ARMORY, SAY_CHAT_TARETHA1, SAY_EMOTE_HORSE_2, SAY_ENTER_CHURCH, SAY_EPOCH_ENTER1, SAY_EPOCH_ENTER2, SAY_EPOCH_ENTER3, SAY_EPOCH_KILL_TARETHA, SAY_EPOCH_WONDER, SAY_EROZION_1, SAY_EROZION_2, SAY_EROZION_3, SAY_EVENT_COMPLETE, SAY_GO_ARMORED, SAY_GREET_TARETHA, SAY_KILL_ARMORER, SAY_LOOKOUT_CHURCH, SAY_LOOKOUT_GO, SAY_LOOKOUT_SAW, SAY_MEET_TARETHA, SAY_MOUNTS_UP, SAY_TARETHA_TALK1, SAY_TARETHA_TALK2, ZoneScript::SetData(), npc_escortAI::SetDespawnAtEnd(), Creature::SetDisplayId(), npc_escortAI::SetEscortPaused(), Unit::SetFacingTo(), Unit::SetFacingToObject(), Creature::SetHomePosition(), Unit::SetImmuneToAll(), Unit::SetImmuneToNPC(), Unit::SetNpcFlag(), Creature::SetReactState(), npc_escortAI::SetRun(), Unit::SetStandState(), Unit::SetUInt32Value(), SummonList::size(), SPELL_DUMMY_AURA, SPELL_KNOCKOUT_ARMORER, SPELL_MEMORY_WIPE, SPELL_MEMORY_WIPE_RESUME, SPELL_SALVATION, SPELL_SHADOW_SPIKE, SPELL_TELEPORT, npc_escortAI::Start(), WorldObject::SummonCreature(), summons, TEMPSUMMON_CORPSE_TIMED_DESPAWN, TEMPSUMMON_MANUAL_DESPAWN, THRALL_MODEL_EQUIPPED, THRALL_SHIELD_ITEM, THRALL_WEAPON_ITEM, UNIT_NPC_EMOTESTATE, UNIT_NPC_FLAG_GOSSIP, UNIT_NPC_FLAG_NONE, UNIT_NPC_FLAG_QUESTGIVER, UNIT_STAND_STATE_DEAD, UNIT_STAND_STATE_KNEEL, UNIT_STAND_STATE_STAND, UNIT_VIRTUAL_ITEM_SLOT_ID, and npc_escortAI::UpdateAI().

◆ UpdateEscortAI()

void npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::UpdateEscortAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from npc_escortAI.

895 {
896 if (!UpdateVictim())
897 return;
898
899 combatEvents.Update(diff);
900 switch (combatEvents.ExecuteEvent())
901 {
903 if (me->HealthBelowPct(20))
904 {
906 break;
907 }
908 events.ScheduleEvent(EVENT_CHECK_HEALTH, 500);
909 break;
911 me->CastSpell(me->GetVictim(), SPELL_STRIKE, false);
912 events.ScheduleEvent(EVENT_SPELL_STRIKE, 6000);
913 break;
916 events.ScheduleEvent(EVENT_SPELL_SHIELD_BLOCK, 6000);
917 break;
918 }
919
921 }
@ SAY_RANDOM_LOW_HP
Definition: old_hillsbrad.cpp:47
@ SPELL_STRIKE
Definition: old_hillsbrad.cpp:84
@ SPELL_SHIELD_BLOCK
Definition: old_hillsbrad.cpp:85
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
bool HealthBelowPct(int32 pct) const
Definition: Unit.h:873
Unit * GetVictim() const
Definition: Unit.h:789

References Unit::CastSpell(), combatEvents, UnitAI::DoMeleeAttackIfReady(), EVENT_CHECK_HEALTH, EVENT_SPELL_SHIELD_BLOCK, EVENT_SPELL_STRIKE, EventMap::ExecuteEvent(), Unit::GetVictim(), Unit::HealthBelowPct(), ScriptedAI::me, SAY_RANDOM_LOW_HP, SPELL_SHIELD_BLOCK, SPELL_STRIKE, EventMap::Update(), and CreatureAI::UpdateVictim().

◆ WaypointReached()

void npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::WaypointReached ( uint32  waypointId)
inlineoverridevirtual

Implements npc_escortAI.

307 {
308 switch (waypointId)
309 {
310 case 0:
312 break;
313 case 8:
314 events.ScheduleEvent(EVENT_SET_FACING, 500);
315 events.ScheduleEvent(EVENT_ARMORER_SAY, 700);
316 events.ScheduleEvent(EVENT_THRALL_EMOTE, 1300);
317 break;
318 case 9:
319 SetRun(false);
320 events.ScheduleEvent(EVENT_KILL_ARMORER, 500);
321 events.ScheduleEvent(EVENT_TALK_KILL_ARMORER, 3000);
322 break;
323 case 10:
324 SetRun(true);
325 events.ScheduleEvent(EVENT_DRESSING_KNEEL, 500);
326 events.ScheduleEvent(EVENT_DRESSING_ARMOR, 3000);
327 events.ScheduleEvent(EVENT_DRESSING_STAND, 4000);
328 events.ScheduleEvent(EVENT_DRESSING_AXE, 7000);
329 events.ScheduleEvent(EVENT_DRESSING_SHIELD, 9000);
330 events.ScheduleEvent(EVENT_DRESSING_TALK, 12000);
331 break;
332 case 18:
333 if (Creature* warden = me->SummonCreature(NPC_DURNHOLDE_WARDEN, 2149.4634f, 104.97559f, 73.632385f, 1.9065f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS))
334 {
335 warden->SetWalk(true);
336 warden->GetMotionMaster()->MovePoint(0, 2144.9893f, 117.81233f, 75.98518f);
337 }
338 if (Creature* veteran = me->SummonCreature(NPC_DURNHOLDE_VETERAN, 2147.3281f, 106.72353f, 74.34447f, 1.6904f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS))
339 {
340 veteran->SetWalk(true);
341 veteran->GetMotionMaster()->MovePoint(0, 2145.2092f, 124.361f, 76.13655f);
342 }
343 if (Creature* veteran = me->SummonCreature(NPC_DURNHOLDE_VETERAN, 2149.212f, 107.20052f, 74.15676f, 1.9887f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS))
344 {
345 veteran->SetWalk(true);
346 veteran->GetMotionMaster()->MovePoint(0, 2143.7898f, 119.41281f, 75.96626f);
347 }
348 if (Creature* mage = me->SummonCreature(NPC_DURNHOLDE_MAGE, 2147.624f, 104.61046f, 73.909294f, 1.6186f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS))
349 {
350 mage->SetWalk(true);
351 mage->GetMotionMaster()->MovePoint(0, 2146.975f, 118.05078f, 76.098465f);
352 }
353 break;
354 case 27:
356 break;
357 case 28:
359 break;
360 case 29:
361 SetEscortPaused(true);
363 break;
364 case 30:
365 events.ScheduleEvent(EVENT_ENTER_MOUNT, 3000);
366 events.ScheduleEvent(EVENT_TALK_START_RIDE, 7000);
367 break;
368 case 59:
370 if (Creature* mount = me->SummonCreature(NPC_SKARLOC_MOUNT, 2488.64f, 625.77f, 58.26f, 4.71f, TEMPSUMMON_TIMED_DESPAWN, 7000))
371 {
372 mount->SetImmuneToNPC(true);
373 mount->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
374 }
375 UnMountSelf();
376 _mounted = false;
377 SetRun(false);
378 me->SetFacingTo(6.0388f);
379 break;
380 case 60:
382 if (Creature* horse = me->FindNearestCreature(NPC_SKARLOC_MOUNT, 10.0f))
383 {
384 horse->GetMotionMaster()->MovePoint(0, 2501.15f, 572.14f, 54.13f);
385 horse->DespawnOrUnsummon(30 * IN_MILLISECONDS);
386 }
388 SetEscortPaused(true);
389 SetRun(true);
391 me->SetFacingTo(4.1364f);
392 break;
393 case 64:
394 SetRun(false);
395 break;
396 case 67:
397 events.ScheduleEvent(EVENT_LOOK_1, 1200);
398 events.ScheduleEvent(EVENT_MOVE_AROUND, 3500);
399 events.ScheduleEvent(EVENT_LOOK_2, 5000);
400 events.ScheduleEvent(EVENT_SUMMON_GUARDS, 5100);
401 events.ScheduleEvent(EVENT_LOOK_3, 7000);
402 events.ScheduleEvent(EVENT_SUMMON_TALK1, 12000);
403 events.ScheduleEvent(EVENT_LOOK_4, 17000);
404 events.ScheduleEvent(EVENT_SUMMON_TALK2, 19000);
405 events.ScheduleEvent(EVENT_GUARDS_MOVING, 21000);
406 break;
407 case 82:
408 events.ScheduleEvent(EVENT_LOOK_5, 500);
409 events.ScheduleEvent(EVENT_SUMMON_GUARDS_2, 1000);
410 events.ScheduleEvent(EVENT_SUMMON_TALK3, 1500);
411 break;
412 case 91:
413 me->SummonCreature(NPC_TM_PROTECTOR, 2652.71f, 660.31f, 61.93f, 1.67f, TEMPSUMMON_MANUAL_DESPAWN);
414 me->SummonCreature(NPC_TM_LOOKOUT, 2648.96f, 662.59f, 61.93f, 0.79f, TEMPSUMMON_MANUAL_DESPAWN);
415 me->SummonCreature(NPC_TM_GUARDSMAN, 2657.36f, 662.34f, 61.93f, 2.68f, TEMPSUMMON_MANUAL_DESPAWN);
416 me->SummonCreature(NPC_TM_GUARDSMAN, 2656.39f, 659.77f, 61.93f, 2.61f, TEMPSUMMON_MANUAL_DESPAWN);
418 summon->AI()->Talk(SAY_LOOKOUT_INN);
419 break;
420 case 92:
421 SetRun(false);
422 break;
423 case 94:
425 SetEscortPaused(true);
426 SetRun(true);
429 {
430 Taretha->HandleEmoteCommand(EMOTE_ONESHOT_CHEER);
431 Taretha->AI()->Talk(SAY_TARETHA_ESCAPED);
432 }
433 events.ScheduleEvent(EVENT_THRALL_TALK, 4000);
434 break;
435 case 101:
436 SetEscortPaused(true);
437 events.ScheduleEvent(EVENT_EPOCH_INTRO, 500);
438 events.ScheduleEvent(EVENT_SUMMON_INFINITES, 1500);
439 events.ScheduleEvent(EVENT_TRANSFORM, 8000);
440 events.ScheduleEvent(EVENT_START_WAVE_1, 25000);
441 break;
442 case 103:
444 me->SetVisible(false);
445 break;
446 }
447 }
constexpr auto MINUTE
Definition: Common.h:47
@ TEMPSUMMON_TIMED_DESPAWN
Definition: Object.h:47
@ SAY_START_EVENT_PART1
Definition: old_hillsbrad.cpp:36
@ SAY_EMOTE_HORSE
Definition: old_hillsbrad.cpp:57
@ SAY_LOOKOUT_INN
Definition: old_hillsbrad.cpp:71
@ SAY_TARETHA_ESCAPED
Definition: old_hillsbrad.cpp:62
@ SAY_SKARLOC_MEET
Definition: old_hillsbrad.cpp:38
@ ENCOUNTER_PROGRESS_FINISHED
Definition: old_hillsbrad.h:84
@ NPC_CAPTAIN_SKARLOC
Definition: old_hillsbrad.h:59
@ EMOTE_ONESHOT_CHEER
Definition: SharedDefines.h:1898
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.
Definition: CreatureAI.cpp:50
CreatureAI * AI() const
Definition: Creature.h:143
void SetVisible(bool x)
Definition: Unit.cpp:14189

References _mounted, Creature::AI(), DATA_ESCORT_PROGRESS, DATA_TARETHA_GUID, SummonList::DespawnAll(), EMOTE_ONESHOT_CHEER, ENCOUNTER_PROGRESS_AMBUSHES_1, ENCOUNTER_PROGRESS_FINISHED, ENCOUNTER_PROGRESS_TARETHA_MEET, ENCOUNTER_PROGRESS_TARREN_MILL, EVENT_ARMORER_SAY, EVENT_DRESSING_ARMOR, EVENT_DRESSING_AXE, EVENT_DRESSING_KNEEL, EVENT_DRESSING_SHIELD, EVENT_DRESSING_STAND, EVENT_DRESSING_TALK, EVENT_ENTER_MOUNT, EVENT_EPOCH_INTRO, EVENT_GUARDS_MOVING, EVENT_KILL_ARMORER, EVENT_LOOK_1, EVENT_LOOK_2, EVENT_LOOK_3, EVENT_LOOK_4, EVENT_LOOK_5, EVENT_MOVE_AROUND, EVENT_SET_FACING, EVENT_START_WAVE_1, EVENT_SUMMON_GUARDS, EVENT_SUMMON_GUARDS_2, EVENT_SUMMON_INFINITES, EVENT_SUMMON_TALK1, EVENT_SUMMON_TALK2, EVENT_SUMMON_TALK3, EVENT_TALK_KILL_ARMORER, EVENT_TALK_START_RIDE, EVENT_THRALL_EMOTE, EVENT_THRALL_TALK, EVENT_TRANSFORM, WorldObject::FindNearestCreature(), ObjectAccessor::GetCreature(), SummonList::GetCreatureWithEntry(), InstanceScript::GetGuidData(), Unit::HandleEmoteCommand(), IN_MILLISECONDS, instance, ScriptedAI::me, MINUTE, NPC_CAPTAIN_SKARLOC, NPC_DURNHOLDE_MAGE, NPC_DURNHOLDE_VETERAN, NPC_DURNHOLDE_WARDEN, NPC_SKARLOC_MOUNT, NPC_TM_GUARDSMAN, NPC_TM_LOOKOUT, NPC_TM_PROTECTOR, SAY_EMOTE_HORSE, SAY_LOOKOUT_INN, SAY_SKARLOC_MEET, SAY_START_EVENT_PART1, SAY_TARETHA_ESCAPED, ZoneScript::SetData(), npc_escortAI::SetEscortPaused(), Unit::SetFacingTo(), Unit::SetNpcFlag(), npc_escortAI::SetRun(), Unit::SetVisible(), WorldObject::SummonCreature(), summons, CreatureAI::Talk(), TEMPSUMMON_CORPSE_TIMED_DESPAWN, TEMPSUMMON_MANUAL_DESPAWN, TEMPSUMMON_TIMED_DESPAWN, UNIT_FLAG_NOT_SELECTABLE, UNIT_NPC_FLAG_GOSSIP, and UnMountSelf().

◆ WaypointStart()

void npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::WaypointStart ( uint32  waypointId)
inlineoverridevirtual

Reimplemented from npc_escortAI.

297 {
298 switch (waypointId)
299 {
300 case 30:
302 break;
303 }
304 }
@ SAY_START_EVENT_PART2
Definition: old_hillsbrad.cpp:40

References SAY_START_EVENT_PART2.

Member Data Documentation

◆ _barnWave

bool npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::_barnWave
private

◆ _churchWave

bool npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::_churchWave
private

◆ _mounted

bool npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::_mounted
private

◆ combatEvents

EventMap npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::combatEvents
private

◆ events

EventMap npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::events
private

◆ instance

InstanceScript* npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::instance
private

◆ summons

SummonList npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::summons
private