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

Public Member Functions

 npc_blessed_bannerAI (Creature *creature)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void MoveInLineOfSight (Unit *) override
 
void JustSummoned (Creature *Summoned) override
 
void JustDied (Unit *) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
 ~ScriptedAI () override
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *) override
 
void JustSummoned (Creature *) override
 
void SummonedCreatureDespawn (Creature *) override
 
void SpellHit (Unit *, SpellInfo const *) override
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void MovementInform (uint32, uint32) override
 
void OnPossess (bool)
 
bool IsInRoom (const Position *pos, Axis axis, bool above)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
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=0ms, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0ms, uint32 uniqueId=0)
 
void ScheduleUniqueTimedEvent (Milliseconds timer, std::function< void()> exec, uint32 uniqueId)
 
bool HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo const * SelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, uint32 powerCostMin, uint32 powerCostMax, float rangeMin, float rangeMax, SelectEffect effect)
 
void SetEquipmentSlots (bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
 
virtual bool CheckEvadeIfOutOfCombatArea () const
 
bool IsHeroic () const
 
Difficulty GetDifficulty () const
 
bool Is25ManRaid () const
 
template<class T >
const T & DUNGEON_MODE (const T &normal5, const T &heroic10) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25, const T &heroic10, const T &heroic25) const
 
PlayerSelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
 
void SetInvincibility (bool apply)
 
bool IsInvincible () const
 
void SetAutoAttackAllowed (bool allow)
 
bool IsAutoAttackAllowed () const
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0ms)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
WorldObjectGetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon.
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void OnSpellCastFinished (SpellInfo const *, SpellFinishReason)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed.
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ==================
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields =======================================
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false, bool checkZ=false) const
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
virtual void DistancingStarted ()
 
virtual void DistancingEnded ()
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void InitializeAI ()
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid const &, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the following:
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 Called when the unit enters combat.
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage to any victim (before damage apply)
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal.
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates.
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals.
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations.
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT)
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoAddAuraToAllHostilePlayers (uint32 spellid)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastSelf (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastToAllHostilePlayers (uint32 spellid, bool triggered=false)
 To specify the caster as target if the spell is self-cast.
 
SpellCastResult DoCastVictim (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastAOE (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastRandomTarget (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false, bool withTank=true)
 Cast the spell on a random unit from the threat list.
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the top threat target, which may not be the current victim.
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
void DoSpellAttackToRandomTargetIfReady (uint32 spell, uint32 threatTablePosition=0, float dist=0.f, bool playerOnly=true)
 
virtual void SummonMovementInform (Creature *, uint32, uint32)
 Called when a summon reaches a waypoint or point movement finished.
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelect (Player *, uint32, uint32)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestAccept (Player *, Quest const *)
 
virtual void sQuestSelect (Player *, Quest const *)
 
virtual void sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Public Attributes

EventMap events
 
bool HalofSpawned
 
uint32 PhaseCount
 
SummonList Summons
 
ObjectGuid guidDalfors
 
ObjectGuid guidPriest [3]
 
ObjectGuid guidMason [3]
 
ObjectGuid guidHalof
 
- 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 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)
 
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_blessed_bannerAI()

npc_blessed_banner::npc_blessed_bannerAI::npc_blessed_bannerAI ( Creature creature)
inline
1741 : ScriptedAI(creature), Summons(me)
1742 {
1743 HalofSpawned = false;
1744 PhaseCount = 0;
1746
1747 me->SetCombatMovement(false);
1748 }
Summons
Definition boss_razorgore.cpp:55
void SetCombatMovement(bool allowMovement)
Definition Creature.cpp:3777
void DespawnAll(Milliseconds delay=0ms)
Definition ScriptedCreature.cpp:71
Definition ScriptedCreature.h:190
Creature * me
Definition ScriptedCreature.h:280
bool HalofSpawned
Definition zone_icecrown.cpp:1752
SummonList Summons
Definition zone_icecrown.cpp:1756
uint32 PhaseCount
Definition zone_icecrown.cpp:1754

References HalofSpawned, ScriptedAI::me, PhaseCount, and Creature::SetCombatMovement().

Member Function Documentation

◆ JustDied()

void npc_blessed_banner::npc_blessed_bannerAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

1781 {
1782 Summons.DespawnAll();
1784 }
void DespawnOrUnsummon(Milliseconds msTimeToDespawn=0ms, Seconds forcedRespawnTimer=0s)
Definition Creature.cpp:2182

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

◆ JustEngagedWith()

void npc_blessed_banner::npc_blessed_bannerAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from CreatureAI.

1771{ }

◆ JustSummoned()

void npc_blessed_banner::npc_blessed_bannerAI::JustSummoned ( Creature Summoned)
inlineoverridevirtual

Reimplemented from CreatureAI.

1776 {
1777 Summons.Summon(Summoned);
1778 }

◆ MoveInLineOfSight()

void npc_blessed_banner::npc_blessed_bannerAI::MoveInLineOfSight ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

1773{ }

◆ Reset()

void npc_blessed_banner::npc_blessed_bannerAI::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

1764 {
1765 me->SetRegeneratingHealth(false);
1768 events.ScheduleEvent(EVENT_SPAWN, 3s);
1769 }
events
Definition boss_sartura.cpp:43
void SetRegeneratingHealth(bool enable)
Definition Creature.h:321
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:177
Talk
Definition hyjal.cpp:82
@ BANNER_SAY
Definition zone_icecrown.cpp:1667
@ EVENT_SPAWN
Definition zone_icecrown.cpp:1677
@ SPELL_THREAT_PULSE
Definition zone_icecrown.cpp:1653

References BANNER_SAY, UnitAI::DoCast(), EVENT_SPAWN, ScriptedAI::me, Creature::SetRegeneratingHealth(), and SPELL_THREAT_PULSE.

◆ UpdateAI()

void npc_blessed_banner::npc_blessed_bannerAI::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

1787 {
1788 events.Update(diff);
1789
1790 switch (events.ExecuteEvent())
1791 {
1792 case EVENT_SPAWN:
1793 {
1795 {
1796 guidDalfors = Dalfors->GetGUID();
1797 Dalfors->GetMotionMaster()->MovePoint(0, DalforsPos[1]);
1798 }
1800 {
1801 guidPriest[0] = Priest1->GetGUID();
1802 Priest1->GetMotionMaster()->MovePoint(0, Priest1Pos[1]);
1803 }
1805 {
1806 guidPriest[1] = Priest2->GetGUID();
1807 Priest2->GetMotionMaster()->MovePoint(0, Priest2Pos[1]);
1808 }
1810 {
1811 guidPriest[2] = Priest3->GetGUID();
1812 Priest3->GetMotionMaster()->MovePoint(0, Priest3Pos[1]);
1813 }
1814 if (Creature* Mason1 = DoSummon(NPC_ARGENT_MASON, Mason1Pos[0]))
1815 {
1816 guidMason[0] = Mason1->GetGUID();
1817 Mason1->GetMotionMaster()->MovePoint(0, Mason1Pos[1]);
1818 }
1819 if (Creature* Mason2 = DoSummon(NPC_ARGENT_MASON, Mason2Pos[0]))
1820 {
1821 guidMason[1] = Mason2->GetGUID();
1822 Mason2->GetMotionMaster()->MovePoint(0, Mason2Pos[1]);
1823 }
1824 if (Creature* Mason3 = DoSummon(NPC_ARGENT_MASON, Mason3Pos[0]))
1825 {
1826 guidMason[2] = Mason3->GetGUID();
1827 Mason3->GetMotionMaster()->MovePoint(0, Mason3Pos[1]);
1828 }
1829 events.ScheduleEvent(EVENT_INTRO_1, 15s);
1830 }
1831 break;
1832 case EVENT_INTRO_1:
1833 {
1835 Dalfors->AI()->Talk(DALFORS_SAY_PRE_1);
1836 events.ScheduleEvent(EVENT_INTRO_2, 5s);
1837 }
1838 break;
1839 case EVENT_INTRO_2:
1840 {
1842 {
1843 Dalfors->SetFacingTo(6.215f);
1844 Dalfors->AI()->Talk(DALFORS_SAY_PRE_2);
1845 }
1846 events.ScheduleEvent(EVENT_INTRO_3, 5s);
1847 }
1848 break;
1849 case EVENT_INTRO_3:
1850 {
1852 {
1853 Dalfors->GetMotionMaster()->MovePoint(0, DalforsPos[2]);
1854 Dalfors->SetHomePosition(DalforsPos[2]);
1855 }
1857 {
1858 Priest1->SetFacingTo(5.7421f);
1859 Priest1->SetHomePosition(Priest1Pos[1]);
1860 }
1862 {
1863 Priest2->SetFacingTo(5.7421f);
1864 Priest2->SetHomePosition(Priest2Pos[1]);
1865 }
1867 {
1868 Priest3->SetFacingTo(5.7421f);
1869 Priest3->SetHomePosition(Priest3Pos[1]);
1870 }
1872 {
1873 Mason1->GetMotionMaster()->MovePoint(0, Mason1Pos[2]);
1874 Mason1->SetHomePosition(Mason1Pos[2]);
1875 }
1877 {
1878 Mason2->GetMotionMaster()->MovePoint(0, Mason2Pos[2]);
1879 Mason2->SetHomePosition(Mason2Pos[2]);
1880 }
1882 {
1883 Mason3->GetMotionMaster()->MovePoint(0, Mason3Pos[2]);
1884 Mason3->SetHomePosition(Mason3Pos[2]);
1885 }
1886 events.ScheduleEvent(EVENT_START_FIGHT, 5s);
1887 events.ScheduleEvent(EVENT_MASON_ACTION, 15s);
1888 }
1889 break;
1890 case EVENT_MASON_ACTION:
1891 {
1893 {
1894 Mason1->SetFacingTo(2.8972f);
1895 Mason1->AI()->SetData(1, 1); // triggers SAI actions on npc
1896 }
1898 {
1899 Mason2->SetFacingTo(3.1241f);
1900 Mason2->AI()->SetData(1, 1); // triggers SAI actions on npc
1901 }
1903 {
1904 Mason3->SetFacingTo(3.6651f);
1905 Mason3->AI()->SetData(1, 1); // triggers SAI actions on npc
1906 }
1907 }
1908 break;
1909 case EVENT_START_FIGHT:
1910 {
1912 LK->AI()->Talk(LK_TALK_1);
1914 Dalfors->AI()->Talk(DALFORS_SAY_START);
1915 events.ScheduleEvent(EVENT_WAVE_SPAWN, 1s);
1916 }
1917 break;
1918 case EVENT_WAVE_SPAWN:
1919 {
1920 if (PhaseCount == 3)
1921 {
1923 LK->AI()->Talk(LK_TALK_2);
1924 }
1925 else if (PhaseCount == 6)
1926 {
1928 LK->AI()->Talk(LK_TALK_3);
1929 }
1930 if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE, Mason3Pos[0]))
1931 {
1932 tempsum->SetHomePosition(DalforsPos[2]);
1933 tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
1934 }
1935 if (urand(0, 1) == 0)
1936 {
1938 {
1939 tempsum->SetHomePosition(DalforsPos[2]);
1940 tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
1941 }
1943 {
1944 tempsum->SetHomePosition(DalforsPos[2]);
1945 tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
1946 }
1947 }
1948 else
1949 {
1951 {
1952 tempsum->SetHomePosition(DalforsPos[2]);
1953 tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
1954 }
1956 {
1957 tempsum->SetHomePosition(DalforsPos[2]);
1958 tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
1959 }
1960 }
1961
1962 PhaseCount++;
1963
1964 if (PhaseCount < 8)
1965 events.ScheduleEvent(EVENT_WAVE_SPAWN, 10s, 20s);
1966 else
1967 events.ScheduleEvent(EVENT_HALOF, 10s, 20s);
1968 }
1969 break;
1970 case EVENT_HALOF:
1971 {
1973 LK->AI()->Talk(LK_TALK_4);
1974 if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE, Mason1Pos[0]))
1975 {
1976 tempsum->SetHomePosition(DalforsPos[2]);
1977 tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
1978 }
1979 if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE, Mason2Pos[0]))
1980 {
1981 tempsum->SetHomePosition(DalforsPos[2]);
1982 tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
1983 }
1985 {
1986 HalofSpawned = true;
1987 guidHalof = tempsum->GetGUID();
1988 tempsum->SetHomePosition(DalforsPos[2]);
1989 tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
1990 }
1991 }
1992 break;
1993 case EVENT_ENDED:
1994 {
1995 Summons.DespawnAll();
1997 }
1998 break;
1999 }
2000
2001 if (PhaseCount == 8)
2003 if (Halof->isDead())
2004 {
2006 Summons.DespawnEntry(NPC_HIDEOUS_PLAGEBRINGER);
2007 Summons.DespawnEntry(NPC_REANIMATED_CAPTAIN);
2008 Summons.DespawnEntry(NPC_SCOURGE_DRUDGE);
2009 Summons.DespawnEntry(NPC_HALOF_THE_DEATHBRINGER);
2011 Dalfors->AI()->Talk(DALFORS_YELL_FINISHED);
2012 events.ScheduleEvent(EVENT_ENDED, 10s);
2013 }
2014 }
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:44
Creature * GetClosestCreatureWithEntry(WorldObject *source, uint32 entry, float maxSearchRange, bool alive)
Definition ScriptedCreature.cpp:887
Creature * DoSummon(uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
Definition CreatureAI.cpp:550
Definition Creature.h:47
Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:210
ObjectGuid guidMason[3]
Definition zone_icecrown.cpp:1760
ObjectGuid guidPriest[3]
Definition zone_icecrown.cpp:1759
ObjectGuid guidDalfors
Definition zone_icecrown.cpp:1758
ObjectGuid guidHalof
Definition zone_icecrown.cpp:1761
Position const Priest1Pos[2]
Definition zone_icecrown.cpp:1695
Position const Mason1Pos[3]
Definition zone_icecrown.cpp:1713
Position const Mason3Pos[3]
Definition zone_icecrown.cpp:1727
Position const Priest3Pos[2]
Definition zone_icecrown.cpp:1707
Position const Priest2Pos[2]
Definition zone_icecrown.cpp:1701
@ DALFORS_SAY_PRE_1
Definition zone_icecrown.cpp:1668
@ EVENT_START_FIGHT
Definition zone_icecrown.cpp:1682
@ EVENT_INTRO_1
Definition zone_icecrown.cpp:1678
@ NPC_HIDEOUS_PLAGEBRINGER
Definition zone_icecrown.cpp:1663
@ SPELL_CRUSADERS_SPIRE_VICTORY
Definition zone_icecrown.cpp:1654
@ EVENT_INTRO_2
Definition zone_icecrown.cpp:1679
@ NPC_HALOF_THE_DEATHBRINGER
Definition zone_icecrown.cpp:1664
@ NPC_BLESSED_BANNER
Definition zone_icecrown.cpp:1657
@ NPC_ARGENT_BATTLE_PRIEST
Definition zone_icecrown.cpp:1659
@ LK_TALK_2
Definition zone_icecrown.cpp:1673
@ NPC_REANIMATED_CAPTAIN
Definition zone_icecrown.cpp:1661
@ EVENT_HALOF
Definition zone_icecrown.cpp:1684
@ DALFORS_YELL_FINISHED
Definition zone_icecrown.cpp:1671
@ NPC_ARGENT_MASON
Definition zone_icecrown.cpp:1660
@ EVENT_WAVE_SPAWN
Definition zone_icecrown.cpp:1683
@ LK_TALK_1
Definition zone_icecrown.cpp:1672
@ EVENT_MASON_ACTION
Definition zone_icecrown.cpp:1681
@ NPC_CRUSADER_LORD_DALFORS
Definition zone_icecrown.cpp:1658
@ DALFORS_SAY_PRE_2
Definition zone_icecrown.cpp:1669
@ EVENT_INTRO_3
Definition zone_icecrown.cpp:1680
@ EVENT_ENDED
Definition zone_icecrown.cpp:1685
@ NPC_SCOURGE_DRUDGE
Definition zone_icecrown.cpp:1662
@ LK_TALK_4
Definition zone_icecrown.cpp:1675
@ DALFORS_SAY_START
Definition zone_icecrown.cpp:1670
@ LK_TALK_3
Definition zone_icecrown.cpp:1674
@ NPC_LK
Definition zone_icecrown.cpp:1665
Position const Mason2Pos[3]
Definition zone_icecrown.cpp:1720
Position const DalforsPos[3]
Definition zone_icecrown.cpp:1688

References DALFORS_SAY_PRE_1, DALFORS_SAY_PRE_2, DALFORS_SAY_START, DALFORS_YELL_FINISHED, DalforsPos, Creature::DespawnOrUnsummon(), UnitAI::DoCast(), CreatureAI::DoSummon(), EVENT_ENDED, EVENT_HALOF, EVENT_INTRO_1, EVENT_INTRO_2, EVENT_INTRO_3, EVENT_MASON_ACTION, EVENT_SPAWN, EVENT_START_FIGHT, EVENT_WAVE_SPAWN, GetClosestCreatureWithEntry(), ObjectAccessor::GetCreature(), guidDalfors, guidHalof, guidMason, guidPriest, HalofSpawned, LK_TALK_1, LK_TALK_2, LK_TALK_3, LK_TALK_4, Mason1Pos, Mason2Pos, Mason3Pos, ScriptedAI::me, NPC_ARGENT_BATTLE_PRIEST, NPC_ARGENT_MASON, NPC_BLESSED_BANNER, NPC_CRUSADER_LORD_DALFORS, NPC_HALOF_THE_DEATHBRINGER, NPC_HIDEOUS_PLAGEBRINGER, NPC_LK, NPC_REANIMATED_CAPTAIN, NPC_SCOURGE_DRUDGE, PhaseCount, Priest1Pos, Priest2Pos, Priest3Pos, SPELL_CRUSADERS_SPIRE_VICTORY, and urand().

Member Data Documentation

◆ events

EventMap npc_blessed_banner::npc_blessed_bannerAI::events

◆ guidDalfors

ObjectGuid npc_blessed_banner::npc_blessed_bannerAI::guidDalfors

Referenced by UpdateAI().

◆ guidHalof

ObjectGuid npc_blessed_banner::npc_blessed_bannerAI::guidHalof

Referenced by UpdateAI().

◆ guidMason

ObjectGuid npc_blessed_banner::npc_blessed_bannerAI::guidMason[3]

Referenced by UpdateAI().

◆ guidPriest

ObjectGuid npc_blessed_banner::npc_blessed_bannerAI::guidPriest[3]

Referenced by UpdateAI().

◆ HalofSpawned

bool npc_blessed_banner::npc_blessed_bannerAI::HalofSpawned

Referenced by npc_blessed_bannerAI(), and UpdateAI().

◆ PhaseCount

uint32 npc_blessed_banner::npc_blessed_bannerAI::PhaseCount

Referenced by npc_blessed_bannerAI(), and UpdateAI().

◆ Summons

SummonList npc_blessed_banner::npc_blessed_bannerAI::Summons

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