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

Public Member Functions

 npc_koltira_deathweaverAI (Creature *creature)
 
void Reset () override
 
void EnterEvadeMode (EvadeReason) override
 
void AttackStart (Unit *who) override
 
void WaypointReached (uint32 waypointId) override
 
void JustSummoned (Creature *summoned) override
 
void SummonAcolyte (uint32 uiAmount)
 
void UpdateAI (uint32 uiDiff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
- 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
 

Public Attributes

uint32 m_uiWave
 
uint32 m_uiWave_Timer
 
ObjectGuid m_uiValrothGUID
 
SummonList summons
 
- Public Attributes inherited from ScriptedAI
Creatureme
 

Additional Inherited Members

- Public Types inherited from ScriptedAI
enum class  Axis {
  AXIS_X ,
  AXIS_Y
}
 
- Public Types inherited from CreatureAI
enum  EvadeReason {
  EVADE_REASON_NO_HOSTILES ,
  EVADE_REASON_BOUNDARY ,
  EVADE_REASON_SEQUENCE_BREAK ,
  EVADE_REASON_NO_PATH ,
  EVADE_REASON_OTHER
}
 
- Static Public Member Functions inherited from CreatureAI
static bool IsInBounds (CreatureBoundary const &boundary, Position const *who)
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from 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_koltira_deathweaverAI()

npc_koltira_deathweaver::npc_koltira_deathweaverAI::npc_koltira_deathweaverAI ( Creature creature)
inline
219 : npc_escortAI(creature), summons(me)
220 {
222 }
@ REACT_DEFENSIVE
Definition: Unit.h:549
Creature * me
Definition: ScriptedCreature.h:280
Definition: ScriptedEscortAI.h:53
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition: Creature.h:97
SummonList summons
Definition: chapter2.cpp:227

References ScriptedAI::me, REACT_DEFENSIVE, and Creature::SetReactState().

Member Function Documentation

◆ AttackStart()

void npc_koltira_deathweaver::npc_koltira_deathweaverAI::AttackStart ( Unit who)
inlineoverridevirtual

Reimplemented from npc_escortAI.

264 {
266 return;
267
269 }
@ STATE_ESCORT_PAUSED
Definition: ScriptedEscortAI.h:49
bool HasEscortState(uint32 escortState)
Definition: ScriptedEscortAI.h:98
void AttackStart(Unit *who) override
Definition: ScriptedEscortAI.cpp:52

References npc_escortAI::AttackStart(), npc_escortAI::HasEscortState(), and STATE_ESCORT_PAUSED.

◆ EnterEvadeMode()

void npc_koltira_deathweaver::npc_koltira_deathweaverAI::EnterEvadeMode ( EvadeReason  )
inlineoverridevirtual

Reimplemented from npc_escortAI.

244 {
246 me->CombatStop(false);
247 me->SetLootRecipient(nullptr);
248
250 {
253 LOG_DEBUG("scripts.ai", "EscortAI has left combat and is now returning to last point");
254 }
255 else
256 {
258 me->SetImmuneToNPC(true);
259 Reset();
260 }
261 }
#define LOG_DEBUG(filterType__,...)
Definition: Log.h:168
@ STATE_ESCORT_ESCORTING
Definition: ScriptedEscortAI.h:47
@ STATE_ESCORT_RETURNING
Definition: ScriptedEscortAI.h:48
void AddEscortState(uint32 escortState)
Definition: ScriptedEscortAI.h:110
void ReturnToLastPoint()
Definition: ScriptedEscortAI.cpp:193
void ClearAllThreat()
Definition: ThreatMgr.cpp:417
void SetLootRecipient(Unit *unit, bool withGroup=true)
Definition: Creature.cpp:1315
void CombatStop(bool includingCast=false)
Definition: Unit.cpp:10398
void SetImmuneToNPC(bool apply, bool keepCombat=false)
Definition: Unit.cpp:13577
MotionMaster * GetMotionMaster()
Definition: Unit.h:1601
ThreatMgr & GetThreatMgr()
Definition: Unit.h:839
void MoveTargetedHome(bool walk=false)
The unit will return this initial position (owner for pets and summoned creatures)....
Definition: MotionMaster.cpp:259
void Reset() override
Definition: chapter2.cpp:229

References npc_escortAI::AddEscortState(), ThreatMgr::ClearAllThreat(), Unit::CombatStop(), Unit::GetMotionMaster(), Unit::GetThreatMgr(), npc_escortAI::HasEscortState(), LOG_DEBUG, ScriptedAI::me, MotionMaster::MoveTargetedHome(), Reset(), npc_escortAI::ReturnToLastPoint(), Unit::SetImmuneToNPC(), Creature::SetLootRecipient(), STATE_ESCORT_ESCORTING, and STATE_ESCORT_RETURNING.

◆ JustSummoned()

void npc_koltira_deathweaver::npc_koltira_deathweaverAI::JustSummoned ( Creature summoned)
inlineoverridevirtual

Reimplemented from ScriptedAI.

308 {
309 if (Player* player = GetPlayerForEscort())
310 summoned->AI()->AttackStart(player);
311
312 if (summoned->GetEntry() == NPC_HIGH_INQUISITOR_VALROTH)
313 m_uiValrothGUID = summoned->GetGUID();
314
315 summoned->AddThreat(me, 0.0f);
316 summoned->SetImmuneToPC(false);
317 summons.Summon(summoned);
318 }
@ NPC_HIGH_INQUISITOR_VALROTH
Definition: chapter2.cpp:187
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:27
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:88
Player * GetPlayerForEscort()
Definition: ScriptedEscortAI.h:114
CreatureAI * AI() const
Definition: Creature.h:143
uint32 GetEntry() const
Definition: Object.h:112
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
Definition: Player.h:1064
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=nullptr)
Definition: Unit.cpp:14608
void SetImmuneToPC(bool apply, bool keepCombat=false)
Definition: Unit.cpp:13568
ObjectGuid m_uiValrothGUID
Definition: chapter2.cpp:226

References Unit::AddThreat(), Creature::AI(), UnitAI::AttackStart(), Object::GetEntry(), Object::GetGUID(), npc_escortAI::GetPlayerForEscort(), m_uiValrothGUID, ScriptedAI::me, NPC_HIGH_INQUISITOR_VALROTH, Unit::SetImmuneToPC(), SummonList::Summon(), and summons.

◆ Reset()

void npc_koltira_deathweaver::npc_koltira_deathweaverAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

230 {
232 {
233 m_uiWave = 0;
234 m_uiWave_Timer = 3000;
237 me->LoadEquipment(0, true);
240 }
241 }
@ UNIT_FLAG_NON_ATTACKABLE
Definition: UnitDefines.h:230
void DespawnAll(uint32 delay=0)
Definition: ScriptedCreature.cpp:71
void LoadEquipment(int8 id=1, bool force=false)
Definition: Creature.cpp:1793
void Clear()
Definition: ObjectGuid.h:138
void RemoveAllAuras()
Definition: Unit.cpp:5290
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition: Unit.h:683
uint32 m_uiWave
Definition: chapter2.cpp:224
uint32 m_uiWave_Timer
Definition: chapter2.cpp:225

References ObjectGuid::Clear(), SummonList::DespawnAll(), npc_escortAI::HasEscortState(), Creature::LoadEquipment(), m_uiValrothGUID, m_uiWave, m_uiWave_Timer, ScriptedAI::me, Unit::RemoveAllAuras(), Unit::SetUnitFlag(), STATE_ESCORT_ESCORTING, summons, and UNIT_FLAG_NON_ATTACKABLE.

Referenced by EnterEvadeMode().

◆ SummonAcolyte()

void npc_koltira_deathweaver::npc_koltira_deathweaverAI::SummonAcolyte ( uint32  uiAmount)
inline
321 {
322 for (uint32 i = 0; i < uiAmount; ++i)
323 me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1642.329f, -6045.818f, 127.583f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
324 }
std::uint32_t uint32
Definition: Define.h:107
@ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT
Definition: Object.h:48
@ NPC_CRIMSON_ACOLYTE
Definition: chapter2.cpp:186
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

References ScriptedAI::me, NPC_CRIMSON_ACOLYTE, WorldObject::SummonCreature(), and TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT.

Referenced by UpdateAI().

◆ UpdateAI()

void npc_koltira_deathweaver::npc_koltira_deathweaverAI::UpdateAI ( uint32  )
inlineoverridevirtual

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

Reimplemented from npc_escortAI.

327 {
329
331 {
332 if (m_uiWave_Timer <= uiDiff)
333 {
334 switch (m_uiWave)
335 {
336 case 0:
338 SummonAcolyte(3);
339 m_uiWave_Timer = 20000;
340 break;
341 case 1:
343 SummonAcolyte(3);
344 m_uiWave_Timer = 20000;
345 break;
346 case 2:
348 SummonAcolyte(4);
349 m_uiWave_Timer = 20000;
350 break;
351 case 3:
353 me->SummonCreature(NPC_HIGH_INQUISITOR_VALROTH, 1642.329f, -6045.818f, 127.583f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
354 m_uiWave_Timer = 1000;
355 break;
356 case 4:
357 {
359
360 if (!temp || !temp->IsAlive())
361 {
363 m_uiWave_Timer = 5000;
364 }
365 else
366 {
367 // xinef: despawn check
368 Player* player = GetPlayerForEscort();
369 if (!player || me->GetDistance(player) > 60.0f)
370 {
372 return;
373 }
374
375 m_uiWave_Timer = 2500;
376 return; //return, we don't want m_uiWave to increment now
377 }
378 break;
379 }
380 case 5:
383 // i do not know why the armor will also be removed
384 m_uiWave_Timer = 2500;
385 break;
386 case 6:
388 SetEscortPaused(false);
389 break;
390 }
391
392 ++m_uiWave;
393 }
394 else
395 m_uiWave_Timer -= uiDiff;
396 }
397 }
@ SAY_BREAKOUT8
Definition: chapter2.cpp:177
@ SPELL_ANTI_MAGIC_ZONE
Definition: chapter2.cpp:182
@ SAY_BREAKOUT5
Definition: chapter2.cpp:174
@ SAY_BREAKOUT6
Definition: chapter2.cpp:175
@ SAY_BREAKOUT3
Definition: chapter2.cpp:172
@ SAY_BREAKOUT9
Definition: chapter2.cpp:178
@ SAY_BREAKOUT10
Definition: chapter2.cpp:179
@ SAY_BREAKOUT4
Definition: chapter2.cpp:173
Talk
Definition: hyjal.cpp:82
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:213
void UpdateAI(uint32 diff) override
Use to start attacking a target. Called just before JustEngagedWith()
Definition: ScriptedEscortAI.cpp:240
void SetEscortPaused(bool on)
Definition: ScriptedEscortAI.cpp:523
Definition: Creature.h:46
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition: Creature.cpp:2173
float GetDistance(WorldObject const *obj) const
Definition: Object.cpp:1245
bool IsAlive() const
Definition: Unit.h:1204
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4891
void SummonAcolyte(uint32 uiAmount)
Definition: chapter2.cpp:320

References Creature::DespawnOrUnsummon(), ObjectAccessor::GetCreature(), WorldObject::GetDistance(), npc_escortAI::GetPlayerForEscort(), npc_escortAI::HasEscortState(), Unit::IsAlive(), m_uiValrothGUID, m_uiWave, m_uiWave_Timer, ScriptedAI::me, NPC_HIGH_INQUISITOR_VALROTH, Unit::RemoveAurasDueToSpell(), SAY_BREAKOUT10, SAY_BREAKOUT3, SAY_BREAKOUT4, SAY_BREAKOUT5, SAY_BREAKOUT6, SAY_BREAKOUT8, SAY_BREAKOUT9, npc_escortAI::SetEscortPaused(), SPELL_ANTI_MAGIC_ZONE, STATE_ESCORT_PAUSED, SummonAcolyte(), WorldObject::SummonCreature(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, and npc_escortAI::UpdateAI().

◆ WaypointReached()

void npc_koltira_deathweaver::npc_koltira_deathweaverAI::WaypointReached ( uint32  waypointId)
inlineoverridevirtual

Implements npc_escortAI.

272 {
273 switch (waypointId)
274 {
275 case 0:
278 break;
279 case 1:
281 break;
282 case 2:
284 //me->UpdateEntry(NPC_KOLTIRA_ALT); //unclear if we must update or not
286 me->LoadEquipment();
287 break;
288 case 3:
289 SetEscortPaused(true);
292 DoCast(me, SPELL_ANTI_MAGIC_ZONE); // cast again that makes bubble up
293 break;
294 case 4:
296 SetRun(true);
297 break;
298 case 9:
300 break;
301 case 10:
302 me->Dismount();
303 break;
304 }
305 }
@ UNIT_STAND_STATE_KNEEL
Definition: UnitDefines.h:40
@ UNIT_STAND_STATE_STAND
Definition: UnitDefines.h:32
@ SAY_BREAKOUT1
Definition: chapter2.cpp:170
@ SAY_BREAKOUT2
Definition: chapter2.cpp:171
@ SPELL_KOLTIRA_TRANSFORM
Definition: chapter2.cpp:181
@ MODEL_DEATH_KNIGHT_MOUNT
Definition: chapter2.cpp:191
@ IMMUNITY_DAMAGE
Definition: SharedDefines.h:1397
@ SPELL_SCHOOL_MASK_ALL
Definition: SharedDefines.h:315
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:177
void SetRun(bool on=true)
Definition: ScriptedEscortAI.cpp:428
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply, SpellImmuneBlockType blockType=SPELL_BLOCK_TYPE_ALL)
Definition: Unit.cpp:13346
void Dismount()
Definition: Unit.cpp:13481
void Mount(uint32 mount, uint32 vehicleId=0, uint32 creatureEntry=0)
Definition: Unit.cpp:13422
void SetStandState(uint8 state)
Definition: Unit.cpp:16682
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition: Unit.h:684

References Unit::ApplySpellImmune(), Unit::Dismount(), UnitAI::DoCast(), IMMUNITY_DAMAGE, Creature::LoadEquipment(), ScriptedAI::me, MODEL_DEATH_KNIGHT_MOUNT, Unit::Mount(), Unit::RemoveUnitFlag(), SAY_BREAKOUT1, SAY_BREAKOUT2, npc_escortAI::SetEscortPaused(), npc_escortAI::SetRun(), Unit::SetStandState(), SPELL_ANTI_MAGIC_ZONE, SPELL_KOLTIRA_TRANSFORM, SPELL_SCHOOL_MASK_ALL, UNIT_FLAG_NON_ATTACKABLE, UNIT_STAND_STATE_KNEEL, and UNIT_STAND_STATE_STAND.

Member Data Documentation

◆ m_uiValrothGUID

ObjectGuid npc_koltira_deathweaver::npc_koltira_deathweaverAI::m_uiValrothGUID

Referenced by JustSummoned(), Reset(), and UpdateAI().

◆ m_uiWave

uint32 npc_koltira_deathweaver::npc_koltira_deathweaverAI::m_uiWave

Referenced by Reset(), and UpdateAI().

◆ m_uiWave_Timer

uint32 npc_koltira_deathweaver::npc_koltira_deathweaverAI::m_uiWave_Timer

Referenced by Reset(), and UpdateAI().

◆ summons

SummonList npc_koltira_deathweaver::npc_koltira_deathweaverAI::summons

Referenced by JustSummoned(), and Reset().