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

Public Member Functions

 brann_bronzebeardAI (Creature *c)
 
void DespawnHeads ()
 
void SwitchHeadVisaul (uint8 headMask, bool activate)
 
void ResetEvent ()
 
void WaypointReached (uint32 id) override
 
void InitializeEvent ()
 
CreatureGetAbedneum ()
 
CreatureGetMarnak ()
 
CreatureGetKaddrak ()
 
void MoveInLineOfSight (Unit *) override
 
void DamageTaken (Unit *, uint32 &damage, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply) More...
 
void Reset () override
 
void DoAction (int32 action) override
 
void JustSummoned (Creature *cr) override
 
void UpdateEscortAI (uint32 diff) override
 
void SummonCreatures (uint32 entry, uint8 count)
 
void JustDied (Unit *) override
 
- 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

InstanceScriptpInstance
 
EventMap events
 
SummonList summons
 
ObjectGuid AbedneumGUID
 
ObjectGuid MarnakGUID
 
ObjectGuid KaddrakGUID
 
uint8 WaveNum
 
bool TalkEvent
 
uint32 SpeechCount
 
uint32 SpeechPause
 
- 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

◆ brann_bronzebeardAI()

brann_bronzebeard::brann_bronzebeardAI::brann_bronzebeardAI ( Creature c)
inline
238 : npc_escortAI(c), summons(me)
239 {
241 }
Creature * me
Definition: ScriptedCreature.h:280
Definition: ScriptedEscortAI.h:53
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
SummonList summons
Definition: brann_bronzebeard.cpp:245
InstanceScript * pInstance
Definition: brann_bronzebeard.cpp:243

References WorldObject::GetInstanceScript(), and pInstance.

Member Function Documentation

◆ DamageTaken()

void brann_bronzebeard::brann_bronzebeardAI::DamageTaken ( Unit ,
uint32 ,
DamageEffectType  ,
SpellSchoolMask   
)
inlineoverridevirtual

Called at any Damage from any attacker (before damage apply)

Note
It use for recalculation damage or special reaction at damage for attack reaction use AttackedBy called for non DOT damage in Unit::DealDamage also

Reimplemented from ScriptedAI.

306 {
307 if (damage && pInstance)
309 }
@ DATA_BRANN_ACHIEVEMENT
Definition: halls_of_stone.h:37
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:53

References DATA_BRANN_ACHIEVEMENT, pInstance, and ZoneScript::SetData().

◆ DespawnHeads()

void brann_bronzebeard::brann_bronzebeardAI::DespawnHeads ( )
inline
255 {
256 Creature* cr;
257 if ((cr = GetAbedneum())) cr->DespawnOrUnsummon();
258 if ((cr = GetMarnak())) cr->DespawnOrUnsummon();
259 if ((cr = GetKaddrak())) cr->DespawnOrUnsummon();
260 SwitchHeadVisaul(0x7, false);
261 }
Definition: Creature.h:46
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition: Creature.cpp:2177
Creature * GetKaddrak()
Definition: brann_bronzebeard.cpp:302
Creature * GetMarnak()
Definition: brann_bronzebeard.cpp:301
void SwitchHeadVisaul(uint8 headMask, bool activate)
Definition: brann_bronzebeard.cpp:263
Creature * GetAbedneum()
Definition: brann_bronzebeard.cpp:300

References Creature::DespawnOrUnsummon(), GetAbedneum(), GetKaddrak(), GetMarnak(), and SwitchHeadVisaul().

Referenced by ResetEvent().

◆ DoAction()

void brann_bronzebeard::brann_bronzebeardAI::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

333 {
334 switch (action)
335 {
337 Start(false, true, ObjectGuid::Empty, 0, true, false);
338 break;
340 {
341 Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
342 if (!PlayerList.IsEmpty())
343 for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
344 {
345 me->SetFaction(i->GetSource()->GetFaction());
346 break;
347 }
348
349 SetEscortPaused(false);
352 break;
353 }
355 SetEscortPaused(false);
356 ResetEvent();
358 break;
361 me->Yell("Don't worry! Ol' Brann's got yer back! Keep that metal monstrosity busy, and I'll see if I can't sweet talk this machine into helping ye!", LANG_UNIVERSAL);
362 me->PlayDirectSound(14274);
363 SetEscortPaused(false);
364 break;
366 me->Yell("Loken? That's downright bothersome... We might've neutralized the iron dwarves, but I'd lay odds there's another machine somewhere else churnin' out a whole mess o' these iron vrykul!", LANG_UNIVERSAL);
367 me->PlayDirectSound(14278);
368 events.ScheduleEvent(EVENT_END, 14000);
369 break;
371 RemoveEscortState(0x7); // all states
372 me->SetHomePosition(1077.41f, 474.16f, 207.8f, 2.70526f);
373 me->UpdatePosition(1077.41f, 474.16f, 207.9f, 2.70526f, true);
375 Reset();
376 break;
378 Start(false, true, ObjectGuid::Empty, 0, true, false);
379 SetNextWaypoint(20, false);
380 ResetEvent();
382 break;
383 case ACTION_OPEN_DOOR:
385 door->SetGoState(GO_STATE_ACTIVE);
386 SetEscortPaused(false);
387 me->RemoveAura(58506);
388 break;
389 }
390 }
@ UNIT_NPC_FLAG_NONE
Definition: UnitDefines.h:293
@ GO_STATE_ACTIVE
Definition: GameObjectData.h:689
@ GO_SJONNIR_DOOR
Definition: halls_of_stone.h:50
@ ACTION_WIPE_START
Definition: brann_bronzebeard.cpp:75
@ ACTION_START_EVENT
Definition: brann_bronzebeard.cpp:69
@ ACTION_OPEN_DOOR
Definition: brann_bronzebeard.cpp:76
@ ACTION_START_SJONNIR_FIGHT
Definition: brann_bronzebeard.cpp:72
@ ACTION_ENTEREVADEMODE
Definition: brann_bronzebeard.cpp:74
@ ACTION_START_TRIBUNAL
Definition: brann_bronzebeard.cpp:70
@ ACTION_GO_TO_SJONNIR
Definition: brann_bronzebeard.cpp:71
@ ACTION_SJONNIR_DEAD
Definition: brann_bronzebeard.cpp:73
@ EVENT_END
Definition: brann_bronzebeard.cpp:91
events
Definition: boss_sartura.cpp:43
@ LANG_UNIVERSAL
Definition: SharedDefines.h:735
@ FACTION_FRIENDLY
Definition: SharedDefines.h:201
GameObject * GetGameObject(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:187
bool IsEmpty() const
Definition: LinkedList.h:97
Definition: LinkedList.h:139
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 RemoveEscortState(uint32 escortState)
Definition: ScriptedEscortAI.h:111
void SetEscortPaused(bool on)
Definition: ScriptedEscortAI.cpp:523
bool SetNextWaypoint(uint32 pointId, float x, float y, float z, float orientation)
Definition: ScriptedEscortAI.cpp:534
void SetHomePosition(float x, float y, float z, float o)
Definition: Creature.h:339
Definition: GameObject.h:121
Map * GetMap() const
Definition: Object.h:531
void PlayDirectSound(uint32 sound_id, Player *target=nullptr)
Definition: Object.cpp:2892
static ObjectGuid const Empty
Definition: ObjectGuid.h:120
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4757
void SetFaction(uint32 faction)
Definition: Unit.cpp:10017
virtual void Yell(std::string_view text, Language language, WorldObject const *target=nullptr)
Definition: Unit.cpp:21109
virtual bool UpdatePosition(float x, float y, float z, float ang, bool teleport=false)
Definition: Unit.cpp:19992
void StopMovingOnCurrentPos()
Definition: Unit.cpp:16644
void ReplaceAllNpcFlags(NPCFlags flags)
Definition: Unit.h:697
ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:95
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 Reset() override
Definition: brann_bronzebeard.cpp:311
void ResetEvent()
Definition: brann_bronzebeard.cpp:282
void InitializeEvent()
Definition: brann_bronzebeard.cpp:616

References ACTION_ENTEREVADEMODE, ACTION_GO_TO_SJONNIR, ACTION_OPEN_DOOR, ACTION_SJONNIR_DEAD, ACTION_START_EVENT, ACTION_START_SJONNIR_FIGHT, ACTION_START_TRIBUNAL, ACTION_WIPE_START, MapRefMgr::begin(), ObjectGuid::Empty, MapRefMgr::end(), EVENT_END, FACTION_FRIENDLY, ObjectAccessor::GetGameObject(), InstanceScript::GetGuidData(), WorldObject::GetMap(), Map::GetPlayers(), GO_SJONNIR_DOOR, GO_STATE_ACTIVE, InitializeEvent(), LinkedListHead::IsEmpty(), LANG_UNIVERSAL, ScriptedAI::me, pInstance, WorldObject::PlayDirectSound(), Unit::RemoveAura(), npc_escortAI::RemoveEscortState(), Unit::ReplaceAllNpcFlags(), Reset(), ResetEvent(), npc_escortAI::SetEscortPaused(), Unit::SetFaction(), Creature::SetHomePosition(), npc_escortAI::SetNextWaypoint(), npc_escortAI::Start(), Unit::StopMovingOnCurrentPos(), UNIT_NPC_FLAG_NONE, Unit::UpdatePosition(), and Unit::Yell().

◆ GetAbedneum()

Creature * brann_bronzebeard::brann_bronzebeardAI::GetAbedneum ( )
inline
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:213
ObjectGuid AbedneumGUID
Definition: brann_bronzebeard.cpp:246

References AbedneumGUID, ObjectAccessor::GetCreature(), and ScriptedAI::me.

Referenced by DespawnHeads(), and UpdateEscortAI().

◆ GetKaddrak()

Creature * brann_bronzebeard::brann_bronzebeardAI::GetKaddrak ( )
inline
ObjectGuid KaddrakGUID
Definition: brann_bronzebeard.cpp:248

References ObjectAccessor::GetCreature(), KaddrakGUID, and ScriptedAI::me.

Referenced by DespawnHeads(), and UpdateEscortAI().

◆ GetMarnak()

Creature * brann_bronzebeard::brann_bronzebeardAI::GetMarnak ( )
inline
ObjectGuid MarnakGUID
Definition: brann_bronzebeard.cpp:247

References ObjectAccessor::GetCreature(), MarnakGUID, and ScriptedAI::me.

Referenced by DespawnHeads(), and UpdateEscortAI().

◆ InitializeEvent()

void brann_bronzebeard::brann_bronzebeardAI::InitializeEvent ( )
617{
618 Creature* cr = nullptr;
619 if ((cr = me->SummonCreature(NPC_KADDRAK, 923.7f, 326.9f, 219.5f, 2.1f, TEMPSUMMON_TIMED_DESPAWN, 580000)))
620 {
622 KaddrakGUID = cr->GetGUID();
623 }
624 if ((cr = me->SummonCreature(NPC_MARNAK, 895.974f, 363.571f, 219.337f, 5.5f, TEMPSUMMON_TIMED_DESPAWN, 580000)))
625 {
627 MarnakGUID = cr->GetGUID();
628 }
629 if ((cr = me->SummonCreature(NPC_ABEDNEUM, 892.25f, 331.25f, 223.86f, 0.6f, TEMPSUMMON_TIMED_DESPAWN, 580000)))
630 {
632 AbedneumGUID = cr->GetGUID();
633 }
634
635 TalkEvent = true;
636
637 events.Reset();
638 events.ScheduleEvent(EVENT_SUMMON_MONSTERS, 21s);
639 events.ScheduleEvent(EVENT_KADDRAK_HEAD, 20s);
640 events.ScheduleEvent(EVENT_MARNAK_HEAD, 105s);
641 events.ScheduleEvent(EVENT_ABEDNEUM_HEAD, 205s);
642 events.ScheduleEvent(EVENT_TRIBUNAL_END, 315s);
643
644 // Viusals
645 events.ScheduleEvent(EVENT_KADDRAK_VISUAL, 20s);
646 events.ScheduleEvent(EVENT_MARNAK_VISUAL, 105s);
647 events.ScheduleEvent(EVENT_ABEDNEUM_VISUAL, 205s);
648}
@ TEMPSUMMON_TIMED_DESPAWN
Definition: Object.h:47
@ NPC_KADDRAK
Definition: halls_of_stone.h:59
@ NPC_MARNAK
Definition: halls_of_stone.h:60
@ NPC_ABEDNEUM
Definition: halls_of_stone.h:61
@ EVENT_MARNAK_VISUAL
Definition: brann_bronzebeard.cpp:93
@ EVENT_ABEDNEUM_VISUAL
Definition: brann_bronzebeard.cpp:94
@ EVENT_ABEDNEUM_HEAD
Definition: brann_bronzebeard.cpp:87
@ EVENT_TRIBUNAL_END
Definition: brann_bronzebeard.cpp:89
@ EVENT_SUMMON_MONSTERS
Definition: brann_bronzebeard.cpp:88
@ EVENT_KADDRAK_VISUAL
Definition: brann_bronzebeard.cpp:92
@ EVENT_MARNAK_HEAD
Definition: brann_bronzebeard.cpp:86
@ EVENT_KADDRAK_HEAD
Definition: brann_bronzebeard.cpp:85
void SetInCombatWithZone()
Set in combat all units in the dungeon/raid. Affect only units with IsAIEnabled.
Definition: Creature.cpp:2810
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
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
bool TalkEvent
Definition: brann_bronzebeard.cpp:251

References AbedneumGUID, EVENT_ABEDNEUM_HEAD, EVENT_ABEDNEUM_VISUAL, EVENT_KADDRAK_HEAD, EVENT_KADDRAK_VISUAL, EVENT_MARNAK_HEAD, EVENT_MARNAK_VISUAL, EVENT_SUMMON_MONSTERS, EVENT_TRIBUNAL_END, Object::GetGUID(), KaddrakGUID, MarnakGUID, ScriptedAI::me, NPC_ABEDNEUM, NPC_KADDRAK, NPC_MARNAK, Creature::SetInCombatWithZone(), WorldObject::SummonCreature(), TalkEvent, and TEMPSUMMON_TIMED_DESPAWN.

Referenced by DoAction().

◆ JustDied()

void brann_bronzebeard::brann_bronzebeardAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from npc_escortAI.

599 {
600 ResetEvent();
601 if (pInstance)
602 {
604 {
605 brann->setDeathState(DeathState::JustDied);
606 brann->Respawn();
607 brann->AI()->DoAction(5);
608 }
611 }
612 }
@ DONE
Definition: InstanceScript.h:60
@ NOT_STARTED
Definition: InstanceScript.h:57
@ BOSS_TRIBUNAL_OF_AGES
Definition: halls_of_stone.h:31
@ NPC_BRANN
Definition: halls_of_stone.h:63
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:52

References BOSS_TRIBUNAL_OF_AGES, DONE, ObjectAccessor::GetCreature(), ZoneScript::GetData(), InstanceScript::GetGuidData(), ScriptedAI::me, NOT_STARTED, NPC_BRANN, pInstance, ResetEvent(), and ZoneScript::SetData().

◆ JustSummoned()

void brann_bronzebeard::brann_bronzebeardAI::JustSummoned ( Creature cr)
inlineoverridevirtual

Reimplemented from ScriptedAI.

393 {
394 if (cr->GetEntry() == NPC_ABEDNEUM || cr->GetEntry() == NPC_KADDRAK || cr->GetEntry() == NPC_MARNAK)
395 cr->SetCanFly(true);
396 else
397 summons.Summon(cr);
398 }
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:88
bool SetCanFly(bool enable, bool packetOnly=false) override
Add the movement flag: MOVEMENTFLAGCAN_FLY. Generaly only use by players, allowing them to fly by pre...
Definition: Creature.cpp:3289
uint32 GetEntry() const
Definition: Object.h:112

References Object::GetEntry(), NPC_ABEDNEUM, NPC_KADDRAK, NPC_MARNAK, Creature::SetCanFly(), SummonList::Summon(), and summons.

◆ MoveInLineOfSight()

void brann_bronzebeard::brann_bronzebeardAI::MoveInLineOfSight ( Unit )
inlineoverridevirtual

Reimplemented from npc_escortAI.

304{ }

◆ Reset()

void brann_bronzebeard::brann_bronzebeardAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

312 {
313 RemoveEscortState(0x7); // all states
314 SetDespawnAtFar(false);
315 SetDespawnAtEnd(false);
316 ResetEvent();
317
321
322 if (pInstance)
323 {
326
329 }
330 }
@ REACT_PASSIVE
Definition: Unit.h:548
@ UNIT_NPC_FLAG_GOSSIP
Definition: UnitDefines.h:294
@ UNIT_NPC_FLAG_QUESTGIVER
Definition: UnitDefines.h:295
@ BRANN_BRONZEBEARD
Definition: halls_of_stone.h:33
@ BOSS_SJONNIR
Definition: halls_of_stone.h:32
void SetDespawnAtFar(bool despawn)
Definition: ScriptedEscortAI.h:105
void SetDespawnAtEnd(bool despawn)
Definition: ScriptedEscortAI.h:104
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition: Creature.h:97

References BOSS_SJONNIR, BOSS_TRIBUNAL_OF_AGES, BRANN_BRONZEBEARD, DATA_BRANN_ACHIEVEMENT, DONE, FACTION_FRIENDLY, ZoneScript::GetData(), ScriptedAI::me, pInstance, REACT_PASSIVE, npc_escortAI::RemoveEscortState(), Unit::ReplaceAllNpcFlags(), ResetEvent(), ZoneScript::SetData(), npc_escortAI::SetDespawnAtEnd(), npc_escortAI::SetDespawnAtFar(), Unit::SetFaction(), Creature::SetReactState(), UNIT_NPC_FLAG_GOSSIP, and UNIT_NPC_FLAG_QUESTGIVER.

Referenced by DoAction().

◆ ResetEvent()

void brann_bronzebeard::brann_bronzebeardAI::ResetEvent ( )
inline
283 {
285 tribunal->SetGoState(GO_STATE_READY);
286
287 events.Reset();
289 DespawnHeads();
290
291 WaveNum = 0;
292 SpeechCount = 0;
293 SpeechPause = 0;
294 TalkEvent = false;
295 }
@ GO_STATE_READY
Definition: GameObjectData.h:690
@ GO_TRIBUNAL_CONSOLE
Definition: halls_of_stone.h:43
void DespawnAll(uint32 delay=0)
Definition: ScriptedCreature.cpp:71
void DespawnHeads()
Definition: brann_bronzebeard.cpp:254
uint32 SpeechPause
Definition: brann_bronzebeard.cpp:252
uint32 SpeechCount
Definition: brann_bronzebeard.cpp:252
uint8 WaveNum
Definition: brann_bronzebeard.cpp:249

References SummonList::DespawnAll(), DespawnHeads(), ObjectAccessor::GetGameObject(), InstanceScript::GetGuidData(), GO_STATE_READY, GO_TRIBUNAL_CONSOLE, ScriptedAI::me, pInstance, SpeechCount, SpeechPause, summons, TalkEvent, and WaveNum.

Referenced by DoAction(), JustDied(), Reset(), and UpdateEscortAI().

◆ SummonCreatures()

void brann_bronzebeard::brann_bronzebeardAI::SummonCreatures ( uint32  entry,
uint8  count 
)
inline
585 {
586 for (int i = 0; i < count; ++i)
587 {
588 Creature* cr = me->SummonCreature(entry, 946.5971f + urand(0, 6), 383.5330f + urand(0, 6), 205.9943f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000);
589 if (cr)
590 {
591 cr->AI()->AttackStart(me);
592 cr->AddThreat(me, 100.0f);
594 }
595 }
596 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
Definition: Object.h:50
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:27
CreatureAI * AI() const
Definition: Creature.h:143
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=nullptr)
Definition: Unit.cpp:14607

References Unit::AddThreat(), Creature::AI(), UnitAI::AttackStart(), ScriptedAI::me, Creature::SetInCombatWithZone(), WorldObject::SummonCreature(), TEMPSUMMON_CORPSE_TIMED_DESPAWN, and urand().

Referenced by UpdateEscortAI().

◆ SwitchHeadVisaul()

void brann_bronzebeard::brann_bronzebeardAI::SwitchHeadVisaul ( uint8  headMask,
bool  activate 
)
inline
264 {
265 if (!pInstance)
266 return;
267
268 GameObject* go = nullptr;
269 if (headMask & 0x1) // Kaddrak
271 activate ? go->SendCustomAnim(0) : go->SetGoState(GO_STATE_READY);
272
273 if (headMask & 0x2) // Marnak
275 activate ? go->SendCustomAnim(0) : go->SetGoState(GO_STATE_READY);
276
277 if (headMask & 0x4) // Abedneum
279 activate ? go->SendCustomAnim(0) : go->SetGoState(GO_STATE_READY);
280 }
@ GO_ABEDNEUM
Definition: halls_of_stone.h:47
@ GO_KADDRAK
Definition: halls_of_stone.h:45
@ GO_MARNAK
Definition: halls_of_stone.h:46
void SetGoState(GOState state)
Definition: GameObject.cpp:2477
void SendCustomAnim(uint32 anim)
Definition: GameObject.cpp:2150
GameObject * GetGameObject(ObjectGuid const guid)
Definition: Map.cpp:3319

References Map::GetGameObject(), InstanceScript::GetGuidData(), WorldObject::GetMap(), GO_ABEDNEUM, GO_KADDRAK, GO_MARNAK, GO_STATE_READY, ScriptedAI::me, pInstance, GameObject::SendCustomAnim(), and GameObject::SetGoState().

Referenced by DespawnHeads(), and UpdateEscortAI().

◆ UpdateEscortAI()

void brann_bronzebeard::brann_bronzebeardAI::UpdateEscortAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from npc_escortAI.

401 {
402 events.Update(diff);
403 switch (events.ExecuteEvent())
404 {
406 {
407 SwitchHeadVisaul(0x1, true);
408 break;
409 }
411 {
412 SwitchHeadVisaul(0x2, true);
413 break;
414 }
416 {
417 SwitchHeadVisaul(0x4, true);
418 break;
419 }
420 case EVENT_KADDRAK_HEAD: // First
421 {
422 if (Creature* kaddrak = GetKaddrak())
423 {
424 if (Player* plr = SelectTargetFromPlayerList(100.0f))
426 }
427
428 events.RescheduleEvent(EVENT_KADDRAK_SWITCH_EYE, 1500ms);
429 events.Repeat(2s, 4s);
430 break;
431 }
433 {
434 if (Creature* kaddrak = GetKaddrak())
435 {
436 if (urand(0, 1))
437 kaddrak->UpdatePosition(927.9f, 330.9f, 219.4f, 2.4f, true);
438 else
439 kaddrak->UpdatePosition(923.7f, 326.9f, 219.5f, 2.1f, true);
440
441 kaddrak->StopMovingOnCurrentPos();
442 }
443
444 break;
445 }
446 case EVENT_MARNAK_HEAD: // Second
447 {
448 if (Creature* marnak = GetMarnak())
449 {
450 if (Creature* cr = me->SummonCreature(NPC_DARK_MATTER_TRIGGER, marnak->GetPositionX(), marnak->GetPositionY(), marnak->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 7000))
451 {
452 cr->CastSpell(cr, SPELL_DARK_MATTER_VISUAL, true);
453 if (Player* plr = SelectTargetFromPlayerList(100.0f))
454 {
455 float speed = me->GetDistance(plr->GetPositionX(), plr->GetPositionY(), plr->GetPositionZ()) / (4000.0f * 0.001f);
456 cr->MonsterMoveWithSpeed(plr->GetPositionX(), plr->GetPositionY(), plr->GetPositionZ(), speed);
457 }
458 }
459 }
460 events.Repeat(20s);
461 break;
462 }
463 case EVENT_ABEDNEUM_HEAD: // Third
464 {
465 if (GetAbedneum())
466 {
467 Player* plr = SelectTargetFromPlayerList(100.0f);
468 if (!plr)
469 break;
470
472 {
473 // summon another abedneum to create double beam, despawn just after trigger despawn
474 me->SummonCreature(NPC_ABEDNEUM, 897.0f, 326.9f, 223.5f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 12000);
476 }
477 }
478 events.Repeat(30s);
479 break;
480 }
482 {
483 uint32 Time = 45000 - (2500 * WaveNum);
485 if (WaveNum > 2)
487 if (WaveNum > 5)
489
490 WaveNum++;
491 events.RepeatEvent(Time);
492 break;
493 }
495 {
496 // Has to be here!
497 events.Reset();
498 //DespawnHeads();
500
501 if (pInstance)
502 {
505 me->CastSpell(me, 59046, true); // credit
506 }
507
509
510 // Spawn Chest and quest credit
511 if (Player* plr = SelectTargetFromPlayerList(200.0f))
512 {
513 if (GameObject* go = plr->SummonGameObject((IsHeroic() ? GO_TRIBUNAL_CHEST_H : GO_TRIBUNAL_CHEST), 880.406f, 345.164f, 203.706f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0))
514 {
515 plr->RemoveGameObject(go, false);
516 go->SetLootMode(1);
517 go->ReplaceAllGameObjectFlags((GameObjectFlags)0);
518 }
519
521 }
522
523 events.ScheduleEvent(EVENT_GO_TO_SJONNIR, 279s);
524 break;
525 }
527 {
529 door->SetGoState(GO_STATE_ACTIVE);
530 SetEscortPaused(false);
531 ResetEvent();
533 break;
534 }
535 case EVENT_END:
536 {
537 events.Reset();
538 if (pInstance)
540
542 me->Yell("I'll use the forge to make batches o' earthen to stand guard... But our greatest challenge still remains: find and stop Loken!", LANG_UNIVERSAL);
543 me->PlayDirectSound(14279);
544 break;
545 }
546 }
547
548 if (TalkEvent)
549 {
550 SpeechPause += diff;
552 {
553 Creature* cs = nullptr;
554 switch (Conversation[SpeechCount].creature)
555 {
556 case NPC_BRANN:
557 cs = me;
558 break;
559 case NPC_ABEDNEUM:
560 cs = GetAbedneum();
561 break;
562 case NPC_KADDRAK:
563 cs = GetKaddrak();
564 break;
565 case NPC_MARNAK:
566 cs = GetMarnak();
567 break;
568 }
569
570 if (cs)
571 {
574 }
575
576 if (SpeechCount < 38)
578 else
579 TalkEvent = false;
580 }
581 }
582 }
std::uint32_t uint32
Definition: Define.h:107
@ GO_TRIBUNAL_CHEST
Definition: halls_of_stone.h:51
@ GO_TRIBUNAL_CHEST_H
Definition: halls_of_stone.h:52
@ SPELL_SEARING_GAZE
Definition: brann_bronzebeard.cpp:50
@ QUEST_HALLS_OF_STONE
Definition: brann_bronzebeard.cpp:79
@ SPELL_GLARE_OF_THE_TRIBUNAL
Definition: brann_bronzebeard.cpp:45
@ SPELL_SEARING_GAZE_H
Definition: brann_bronzebeard.cpp:51
@ SPELL_DARK_MATTER_VISUAL
Definition: brann_bronzebeard.cpp:47
@ SPELL_GLARE_OF_THE_TRIBUNAL_H
Definition: brann_bronzebeard.cpp:46
@ NPC_DARK_RUNE_STORMCALLER
Definition: brann_bronzebeard.cpp:36
@ NPC_SEARING_GAZE_TRIGGER
Definition: brann_bronzebeard.cpp:39
@ NPC_DARK_MATTER_TRIGGER
Definition: brann_bronzebeard.cpp:38
@ NPC_IRON_GOLEM_CUSTODIAN
Definition: brann_bronzebeard.cpp:37
@ NPC_DARK_RUNE_PROTECTOR
Definition: brann_bronzebeard.cpp:35
@ EVENT_KADDRAK_SWITCH_EYE
Definition: brann_bronzebeard.cpp:95
@ EVENT_GO_TO_SJONNIR
Definition: brann_bronzebeard.cpp:90
static Yells Conversation[]
Definition: brann_bronzebeard.cpp:117
GameObjectFlags
Definition: SharedDefines.h:1602
bool IsHeroic() const
Definition: ScriptedCreature.h:379
const T & DUNGEON_MODE(const T &normal5, const T &heroic10) const
Definition: ScriptedCreature.h:388
Player * SelectTargetFromPlayerList(float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
Definition: ScriptedCreature.cpp:562
float GetDistance(WorldObject const *obj) const
Definition: Object.cpp:1245
GameObject * SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime, bool checkTransport=true, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
Definition: Object.cpp:2369
float GetPositionZ() const
Definition: Position.h:119
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
Definition: Player.h:1064
void GroupEventHappens(uint32 questId, WorldObject const *pEventObject)
Definition: PlayerQuest.cpp:1812
void RemoveGameObject(GameObject *gameObj, bool del)
Definition: Unit.cpp:6167
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:1167
uint32 timer
Definition: brann_bronzebeard.cpp:114
void SummonCreatures(uint32 entry, uint8 count)
Definition: brann_bronzebeard.cpp:584

References BOSS_TRIBUNAL_OF_AGES, BRANN_BRONZEBEARD, Unit::CastSpell(), Conversation, SummonList::DespawnAll(), DONE, ScriptedAI::DUNGEON_MODE(), EVENT_ABEDNEUM_HEAD, EVENT_ABEDNEUM_VISUAL, EVENT_END, EVENT_GO_TO_SJONNIR, EVENT_KADDRAK_HEAD, EVENT_KADDRAK_SWITCH_EYE, EVENT_KADDRAK_VISUAL, EVENT_MARNAK_HEAD, EVENT_MARNAK_VISUAL, EVENT_SUMMON_MONSTERS, EVENT_TRIBUNAL_END, GetAbedneum(), WorldObject::GetDistance(), ObjectAccessor::GetGameObject(), InstanceScript::GetGuidData(), GetKaddrak(), GetMarnak(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), GO_SJONNIR_DOOR, GO_STATE_ACTIVE, GO_TRIBUNAL_CHEST, GO_TRIBUNAL_CHEST_H, ScriptedAI::IsHeroic(), LANG_UNIVERSAL, ScriptedAI::me, NPC_ABEDNEUM, NPC_BRANN, NPC_DARK_MATTER_TRIGGER, NPC_DARK_RUNE_PROTECTOR, NPC_DARK_RUNE_STORMCALLER, NPC_IRON_GOLEM_CUSTODIAN, NPC_KADDRAK, NPC_MARNAK, NPC_SEARING_GAZE_TRIGGER, pInstance, WorldObject::PlayDirectSound(), QUEST_HALLS_OF_STONE, Unit::ReplaceAllNpcFlags(), ResetEvent(), ScriptedAI::SelectTargetFromPlayerList(), ZoneScript::SetData(), npc_escortAI::SetEscortPaused(), SpeechCount, SpeechPause, SPELL_DARK_MATTER_VISUAL, SPELL_GLARE_OF_THE_TRIBUNAL, SPELL_GLARE_OF_THE_TRIBUNAL_H, SPELL_SEARING_GAZE, SPELL_SEARING_GAZE_H, WorldObject::SummonCreature(), SummonCreatures(), WorldObject::SummonGameObject(), summons, SwitchHeadVisaul(), TalkEvent, TEMPSUMMON_TIMED_DESPAWN, Yells::timer, UNIT_NPC_FLAG_GOSSIP, UNIT_NPC_FLAG_NONE, UNIT_NPC_FLAG_QUESTGIVER, urand(), WaveNum, and Unit::Yell().

◆ WaypointReached()

void brann_bronzebeard::brann_bronzebeardAI::WaypointReached ( uint32  id)
overridevirtual

Implements npc_escortAI.

651{
652 switch (id)
653 {
654 // Stop before stairs and ask to start
655 case 9:
656 SetEscortPaused(true);
658 if (pInstance)
660
661 break;
662 // In front of Console
663 case 11:
664 SetEscortPaused(true);
665 if (pInstance)
666 {
669 tribunal->SetGoState(GO_STATE_ACTIVE);
670 }
671 break;
672 // Before Sjonnir's door
673 case 27:
674 SetEscortPaused(true);
675 if (pInstance)
676 {
680 cr->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
681 me->SetOrientation(3.132660f);
682 DoCast(me, 58506, false);
683 }
684 break;
685 case 28:
686 SetEscortPaused(true);
687 break;
688 case 29:
689 SetEscortPaused(true);
691 if (pInstance)
693 console->SetGoState(GO_STATE_ACTIVE);
694
695 break;
696 }
697}
@ IN_PROGRESS
Definition: InstanceScript.h:58
@ UNIT_FLAG_NOT_SELECTABLE
Definition: UnitDefines.h:254
@ UNIT_NPC_EMOTESTATE
Definition: UpdateFields.h:140
@ NPC_SJONNIR
Definition: halls_of_stone.h:62
@ GO_SJONNIR_CONSOLE
Definition: halls_of_stone.h:49
@ EMOTE_STATE_USE_STANDING
Definition: SharedDefines.h:1944
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:177
void SetOrientation(float orientation)
Definition: Position.h:112
void SetUInt32Value(uint16 index, uint32 value)
Definition: Unit.cpp:21281

References BOSS_TRIBUNAL_OF_AGES, BRANN_BRONZEBEARD, EMOTE_STATE_USE_STANDING, ObjectAccessor::GetCreature(), ObjectAccessor::GetGameObject(), GO_SJONNIR_CONSOLE, GO_STATE_ACTIVE, GO_TRIBUNAL_CONSOLE, IN_PROGRESS, NPC_SJONNIR, UNIT_FLAG_NOT_SELECTABLE, UNIT_NPC_EMOTESTATE, UNIT_NPC_FLAG_GOSSIP, and UNIT_NPC_FLAG_QUESTGIVER.

Member Data Documentation

◆ AbedneumGUID

ObjectGuid brann_bronzebeard::brann_bronzebeardAI::AbedneumGUID

Referenced by GetAbedneum(), and InitializeEvent().

◆ events

EventMap brann_bronzebeard::brann_bronzebeardAI::events

◆ KaddrakGUID

ObjectGuid brann_bronzebeard::brann_bronzebeardAI::KaddrakGUID

Referenced by GetKaddrak(), and InitializeEvent().

◆ MarnakGUID

ObjectGuid brann_bronzebeard::brann_bronzebeardAI::MarnakGUID

Referenced by GetMarnak(), and InitializeEvent().

◆ pInstance

InstanceScript* brann_bronzebeard::brann_bronzebeardAI::pInstance

◆ SpeechCount

uint32 brann_bronzebeard::brann_bronzebeardAI::SpeechCount

Referenced by ResetEvent(), and UpdateEscortAI().

◆ SpeechPause

uint32 brann_bronzebeard::brann_bronzebeardAI::SpeechPause

Referenced by ResetEvent(), and UpdateEscortAI().

◆ summons

SummonList brann_bronzebeard::brann_bronzebeardAI::summons

◆ TalkEvent

bool brann_bronzebeard::brann_bronzebeardAI::TalkEvent

◆ WaveNum

uint8 brann_bronzebeard::brann_bronzebeardAI::WaveNum

Referenced by ResetEvent(), and UpdateEscortAI().