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 DamageTaken (Unit *, uint32 &damage, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
void Reset () override
 
void DoAction (int32 action) override
 
void JustSummoned (Creature *cr) override
 
void UpdateEscortAI (uint32 diff) override
 
void SummonCreatures (uint32 entry, uint8 count, uint8 pos)
 
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()
 
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 WaypointStart (uint32)
 
void Start (bool isActiveAttacker=true, ObjectGuid playerGUID=ObjectGuid::Empty, Quest const *quest=nullptr, bool instantRespawn=false, bool canLoopPath=false, bool resetWaypoints=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)
 
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 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 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 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

InstanceScriptpInstance
 
EventMap events
 
SummonList summons
 
ObjectGuid AbedneumGUID
 
ObjectGuid MarnakGUID
 
ObjectGuid KaddrakGUID
 
ObjectGuid darkMatterTargetGUID
 
uint8 WaveNum
 
bool TalkEvent
 
uint32 SpeechCount
 
uint32 SpeechPause
 
bool canExecuteEvents = true
 
bool leftEye = true
 
- 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)
 
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
239 : npc_escortAI(c), summons(me)
240 {
242 }
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1214
Creature * me
Definition ScriptedCreature.h:281
SummonList summons
Definition brann_bronzebeard.cpp:246
InstanceScript * pInstance
Definition brann_bronzebeard.cpp:244
Definition ScriptedEscortAI.h:53

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 UnitAI.

346 {
347 if (damage && pInstance)
349 }
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:52
@ DATA_BRANN_ACHIEVEMENT
Definition halls_of_stone.h:54

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

◆ DespawnHeads()

void brann_bronzebeard::brann_bronzebeardAI::DespawnHeads ( )
inline
259 {
260 Creature* cr;
261 if ((cr = GetAbedneum())) cr->DespawnOrUnsummon();
262 if ((cr = GetMarnak())) cr->DespawnOrUnsummon();
263 if ((cr = GetKaddrak())) cr->DespawnOrUnsummon();
264
265 SwitchHeadVisaul(0x7, false);
266 }
Definition Creature.h:47
void DespawnOrUnsummon(Milliseconds msTimeToDespawn=0ms, Seconds forcedRespawnTimer=0s)
Definition Creature.cpp:2178
Creature * GetKaddrak()
Definition brann_bronzebeard.cpp:341
Creature * GetMarnak()
Definition brann_bronzebeard.cpp:340
void SwitchHeadVisaul(uint8 headMask, bool activate)
Definition brann_bronzebeard.cpp:268
Creature * GetAbedneum()
Definition brann_bronzebeard.cpp:339

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

Referenced by ResetEvent().

◆ DoAction()

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

Reimplemented from UnitAI.

383 {
384 switch (action)
385 {
387 Start(false, ObjectGuid::Empty, 0, true, false);
391 break;
393 {
395 SetEscortPaused(false);
398 break;
399 }
401 SetNextWaypoint(1, false);
402 SetEscortPaused(false);
403 ResetEvent();
405 break;
410 SetEscortPaused(false);
411 ResetEvent();
413 DoCast(me, 58506, false);
416 me->SetImmuneToAll(true);
417 break;
419 SetEscortPaused(false);
420 break;
422 if (pInstance)
424 SetEscortPaused(false);
427 me->SetOrientation(3.132660f);
429 events.ScheduleEvent(EVENT_SJONNIR_END_BRANN_YELL, 10s);
430 events.ScheduleEvent(EVENT_SJONNIR_END_BRANN_LAST_YELL, 22s);
431 break;
433 Reset();
434 SetNextWaypoint(33, true);
437 DoCast(me, 58506, false);
439 door->SetGoState(GO_STATE_READY);
440 break;
441 case ACTION_OPEN_DOOR:
442 Start(false, ObjectGuid::Empty, 0, true, false);
443 SetNextWaypoint(34, false);
444 SetEscortPaused(false);
445 me->RemoveAura(58506);
447 me->SetWalk(true);
448 me->SetSpeed(MOVE_WALK, 1.0f);
449 break;
450 }
451 }
@ GO_STATE_READY
Definition GameObjectData.h:692
@ EMOTE_STATE_STAND
Definition SharedDefines.h:1929
@ EMOTE_STATE_READY_UNARMED
Definition SharedDefines.h:1930
@ UNIT_NPC_FLAG_GOSSIP
Definition UnitDefines.h:319
@ UNIT_NPC_FLAG_NONE
Definition UnitDefines.h:318
@ UNIT_NPC_FLAG_QUESTGIVER
Definition UnitDefines.h:320
@ MOVE_WALK
Definition UnitDefines.h:353
@ REACT_PASSIVE
Definition Unit.h:555
@ REACT_AGGRESSIVE
Definition Unit.h:557
@ UNIT_NPC_EMOTESTATE
Definition UpdateFields.h:140
events
Definition boss_sartura.cpp:43
@ EVENT_SJONNIR_END_BRANN_YELL
Definition brann_bronzebeard.cpp:109
@ EVENT_SJONNIR_END_BRANN_LAST_YELL
Definition brann_bronzebeard.cpp:110
void SetRegeneratingHealth(bool enable)
Definition Creature.h:321
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:99
bool SetWalk(bool enable) override
Enable or disable the creature's walk mode by removing: MOVEMENTFLAG_WALKING. Infom also the client.
Definition Creature.cpp:3218
Definition GameObject.h:120
ObjectGuid GetGuidData(uint32 type) const override
Definition InstanceScript.cpp:110
static ObjectGuid const Empty
Definition ObjectGuid.h:120
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:177
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:4895
void SendMovementFlagUpdate(bool self=false)
Definition Unit.cpp:16920
void StopMovingOnCurrentPos()
Definition Unit.cpp:16905
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
Definition Unit.cpp:14593
void SetUInt32Value(uint16 index, uint32 value)
Definition Unit.cpp:21414
void ReplaceAllNpcFlags(NPCFlags flags)
Definition Unit.h:756
void SetImmuneToAll(bool apply, bool keepCombat=false)
Definition Unit.h:914
@ BRANN_BRONZEBEARD
Definition halls_of_stone.h:50
@ ACTION_OPEN_DOOR
Definition halls_of_stone.h:87
@ ACTION_START_SJONNIR_FIGHT
Definition halls_of_stone.h:88
@ ACTION_START_ESCORT_EVENT
Definition halls_of_stone.h:83
@ ACTION_SJONNIR_WIPE_START
Definition halls_of_stone.h:90
@ ACTION_START_TRIBUNAL
Definition halls_of_stone.h:84
@ ACTION_GO_TO_SJONNIR
Definition halls_of_stone.h:86
@ ACTION_TRIBUNAL_WIPE_START
Definition halls_of_stone.h:85
@ ACTION_SJONNIR_DEAD
Definition halls_of_stone.h:89
@ GO_SJONNIR_DOOR
Definition halls_of_stone.h:67
@ SAY_BRANN_ESCORT_START
Definition halls_of_stone.h:33
@ SAY_BRANN_ENTRANCE_MEET
Definition halls_of_stone.h:41
Talk
Definition hyjal.cpp:82
GameObject * GetGameObject(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:184
void SetOrientation(float orientation)
Definition Position.h:116
void Reset() override
Definition brann_bronzebeard.cpp:351
void ResetEvent()
Definition brann_bronzebeard.cpp:318
void InitializeEvent()
Definition brann_bronzebeard.cpp:810
void Start(bool isActiveAttacker=true, ObjectGuid playerGUID=ObjectGuid::Empty, Quest const *quest=nullptr, bool instantRespawn=false, bool canLoopPath=false, bool resetWaypoints=true)
Definition ScriptedEscortAI.cpp:419
void SetEscortPaused(bool on)
Definition ScriptedEscortAI.cpp:486
bool SetNextWaypoint(uint32 pointId, float x, float y, float z, float orientation)
Definition ScriptedEscortAI.cpp:497

References ACTION_GO_TO_SJONNIR, ACTION_OPEN_DOOR, ACTION_SJONNIR_DEAD, ACTION_SJONNIR_WIPE_START, ACTION_START_ESCORT_EVENT, ACTION_START_SJONNIR_FIGHT, ACTION_START_TRIBUNAL, ACTION_TRIBUNAL_WIPE_START, BRANN_BRONZEBEARD, UnitAI::DoCast(), EMOTE_STATE_READY_UNARMED, EMOTE_STATE_STAND, ObjectGuid::Empty, EVENT_SJONNIR_END_BRANN_LAST_YELL, EVENT_SJONNIR_END_BRANN_YELL, ObjectAccessor::GetGameObject(), InstanceScript::GetGuidData(), GO_SJONNIR_DOOR, GO_STATE_READY, InitializeEvent(), ScriptedAI::me, MOVE_WALK, pInstance, REACT_AGGRESSIVE, REACT_PASSIVE, Unit::RemoveAura(), Unit::ReplaceAllNpcFlags(), Reset(), ResetEvent(), SAY_BRANN_ENTRANCE_MEET, SAY_BRANN_ESCORT_START, Unit::SendMovementFlagUpdate(), ZoneScript::SetData(), npc_escortAI::SetEscortPaused(), Unit::SetImmuneToAll(), npc_escortAI::SetNextWaypoint(), Position::SetOrientation(), Creature::SetReactState(), Creature::SetRegeneratingHealth(), Unit::SetSpeed(), Unit::SetUInt32Value(), Creature::SetWalk(), npc_escortAI::Start(), Unit::StopMovingOnCurrentPos(), UNIT_NPC_EMOTESTATE, UNIT_NPC_FLAG_GOSSIP, UNIT_NPC_FLAG_NONE, and UNIT_NPC_FLAG_QUESTGIVER.

◆ GetAbedneum()

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

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:249

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:248

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

Referenced by DespawnHeads(), and UpdateEscortAI().

◆ InitializeEvent()

void brann_bronzebeard::brann_bronzebeardAI::InitializeEvent ( )
811{
812 Creature* cr = nullptr;
813 if ((cr = me->SummonCreature(NPC_KADDRAK, 923.7f, 326.9f, 219.5f, 2.1f, TEMPSUMMON_TIMED_DESPAWN, 580000)))
814 {
815 KaddrakGUID = cr->GetGUID();
816 }
817 if ((cr = me->SummonCreature(NPC_MARNAK, 895.974f, 363.571f, 219.337f, 5.5f, TEMPSUMMON_TIMED_DESPAWN, 580000)))
818 {
819 MarnakGUID = cr->GetGUID();
820 }
821 if ((cr = me->SummonCreature(NPC_ABEDNEUM, 892.25f, 331.25f, 223.86f, 0.6f, TEMPSUMMON_TIMED_DESPAWN, 580000)))
822 {
823 AbedneumGUID = cr->GetGUID();
824 }
825
826 TalkEvent = true;
827
828 events.Reset();
829
830 // Viusals
831 events.ScheduleEvent(EVENT_KADDRAK_VISUAL, 30s);
832 events.ScheduleEvent(EVENT_MARNAK_VISUAL, 105s);
833 events.ScheduleEvent(EVENT_ABEDNEUM_VISUAL, 207s);
834
835 events.ScheduleEvent(EVENT_SUMMON_MONSTERS, 52s);
836 events.ScheduleEvent(EVENT_SUMMON_STORMCALLER, 122s);
837 events.ScheduleEvent(EVENT_SUMMON_CUSTODIAN, 228s);
838 events.ScheduleEvent(EVENT_KADDRAK_HEAD, 47s);
839 events.ScheduleEvent(EVENT_MARNAK_HEAD, 115s);
840 events.ScheduleEvent(EVENT_ABEDNEUM_HEAD, 217s);
841 events.ScheduleEvent(EVENT_TRIBUNAL_END, 310s);
842}
@ TEMPSUMMON_TIMED_DESPAWN
Definition Object.h:50
@ EVENT_MARNAK_VISUAL
Definition brann_bronzebeard.cpp:77
@ EVENT_ABEDNEUM_VISUAL
Definition brann_bronzebeard.cpp:75
@ EVENT_ABEDNEUM_HEAD
Definition brann_bronzebeard.cpp:78
@ EVENT_SUMMON_STORMCALLER
Definition brann_bronzebeard.cpp:83
@ EVENT_TRIBUNAL_END
Definition brann_bronzebeard.cpp:100
@ EVENT_SUMMON_MONSTERS
Definition brann_bronzebeard.cpp:82
@ EVENT_KADDRAK_VISUAL
Definition brann_bronzebeard.cpp:76
@ EVENT_MARNAK_HEAD
Definition brann_bronzebeard.cpp:80
@ EVENT_KADDRAK_HEAD
Definition brann_bronzebeard.cpp:79
@ EVENT_SUMMON_CUSTODIAN
Definition brann_bronzebeard.cpp:84
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:113
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:2352
@ NPC_KADDRAK
Definition halls_of_stone.h:76
@ NPC_MARNAK
Definition halls_of_stone.h:77
@ NPC_ABEDNEUM
Definition halls_of_stone.h:78
bool TalkEvent
Definition brann_bronzebeard.cpp:254

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

Referenced by DoAction().

◆ JustDied()

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

Reimplemented from CreatureAI.

784 {
785 ResetEvent();
786 if (pInstance)
787 {
789 {
790 brann->HandleEmoteCommand(EMOTE_STATE_DEAD);
791 brann->setDeathState(DeathState::JustDied);
792 brann->Respawn();
794 {
795 brann->AI()->DoAction(ACTION_TRIBUNAL_WIPE_START);
797 }
799 {
800 brann->AI()->DoAction(ACTION_SJONNIR_WIPE_START);
801 }
802 }
805 }
806 }
@ FAIL
Definition InstanceScript.h:60
@ DONE
Definition InstanceScript.h:61
@ NOT_STARTED
Definition InstanceScript.h:58
@ EMOTE_STATE_DEAD
Definition SharedDefines.h:1952
virtual uint32 GetData(uint32) const
Definition ZoneScript.h:51
@ BOSS_TRIBUNAL_OF_AGES
Definition halls_of_stone.h:48
@ NPC_BRANN
Definition halls_of_stone.h:80

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

◆ JustSummoned()

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

Reimplemented from CreatureAI.

454 {
455 if (cr->GetEntry() == NPC_ABEDNEUM || cr->GetEntry() == NPC_KADDRAK || cr->GetEntry() == NPC_MARNAK)
456 cr->SetCanFly(true);
457 else
458 summons.Summon(cr);
459 }
uint32 GetEntry() const
Definition Object.h:116
void Summon(Creature const *summon)
Definition ScriptedCreature.h:88
void SetCanFly(bool enable)
Add the movement flag: MOVEMENTFLAGCAN_FLY. Generaly only use by players, allowing them to fly by pre...
Definition Unit.cpp:20607

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

◆ Reset()

void brann_bronzebeard::brann_bronzebeardAI::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

352 {
353 RemoveEscortState(0x7); // all states
354 SetDespawnAtFar(false);
355 SetDespawnAtEnd(false);
356 ResetEvent();
357
360
361 if (pInstance)
362 {
365
367 {
370 door->SetGoState(GO_STATE_ACTIVE);
371 }
372
374 {
377 door->SetGoState(GO_STATE_ACTIVE);
378 }
379 }
380 }
@ GO_STATE_ACTIVE
Definition GameObjectData.h:691
@ BOSS_SJONNIR
Definition halls_of_stone.h:49
@ GO_TRIBUNAL_ACCESS_DOOR
Definition halls_of_stone.h:61
void SetDespawnAtFar(bool despawn)
Definition ScriptedEscortAI.h:104
void RemoveEscortState(uint32 escortState)
Definition ScriptedEscortAI.h:110
void SetDespawnAtEnd(bool despawn)
Definition ScriptedEscortAI.h:103

References BOSS_SJONNIR, BOSS_TRIBUNAL_OF_AGES, BRANN_BRONZEBEARD, DATA_BRANN_ACHIEVEMENT, DONE, ZoneScript::GetData(), ObjectAccessor::GetGameObject(), InstanceScript::GetGuidData(), GO_SJONNIR_DOOR, GO_STATE_ACTIVE, GO_TRIBUNAL_ACCESS_DOOR, ScriptedAI::me, pInstance, REACT_PASSIVE, npc_escortAI::RemoveEscortState(), Unit::ReplaceAllNpcFlags(), ResetEvent(), ZoneScript::SetData(), npc_escortAI::SetDespawnAtEnd(), npc_escortAI::SetDespawnAtFar(), Creature::SetReactState(), UNIT_NPC_FLAG_GOSSIP, and UNIT_NPC_FLAG_QUESTGIVER.

Referenced by DoAction().

◆ ResetEvent()

void brann_bronzebeard::brann_bronzebeardAI::ResetEvent ( )
inline
319 {
321 tribunal->SetGoState(GO_STATE_READY);
322
324 tribunalSkyFloor->SetGoState(GO_STATE_READY);
325
326 events.Reset();
328 DespawnHeads();
329
330 WaveNum = 0;
331 SpeechCount = 0;
332 SpeechPause = 0;
333 TalkEvent = false;
334 }
void DespawnAll(Milliseconds delay=0ms)
Definition ScriptedCreature.cpp:72
@ GO_TRIBUNAL_CONSOLE
Definition halls_of_stone.h:60
@ GO_SKY_FLOOR
Definition halls_of_stone.h:65
void DespawnHeads()
Definition brann_bronzebeard.cpp:258
uint32 SpeechPause
Definition brann_bronzebeard.cpp:255
uint32 SpeechCount
Definition brann_bronzebeard.cpp:255
uint8 WaveNum
Definition brann_bronzebeard.cpp:252

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

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

◆ SummonCreatures()

void brann_bronzebeard::brann_bronzebeardAI::SummonCreatures ( uint32  entry,
uint8  count,
uint8  pos 
)
inline
765 {
766 Creature* cr;
767 for (int i = 0; i < count; ++i)
768 {
769 if (pos == 0)
770 cr = me->SummonCreature(entry, 943.088f + urand(0, 5), 401.378f + urand(0, 5), 206.078f, 3.8f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000); //left
771 else
772 cr = me->SummonCreature(entry, 964.302f + urand(0, 4), 378.942f + urand(0, 4), 206.078f, 3.85f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000); //right
773
774 if (cr)
775 {
776 cr->AI()->AttackStart(me);
777 cr->AddThreat(me, 100.0f);
779 }
780 }
781 }
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
Definition Object.h:53
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:44
void SetInCombatWithZone()
Set in combat all units in the dungeon/raid. Affect only units with IsAIEnabled.
Definition Creature.cpp:2825
CreatureAI * AI() const
Definition Creature.h:145
virtual void AttackStart(Unit *)
Definition UnitAI.cpp:27
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=nullptr)
Definition Unit.cpp:14758

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
269 {
270 if (!pInstance)
271 return;
272
273 GameObject* go = nullptr;
274 if (headMask & 0x1) // Kaddrak
276 {
277 if (activate)
278 {
279 go->SendCustomAnim(0);
280 }
281 else
282 {
283 go->SendCustomAnim(1);
284 if (go->GetGoState() == GO_STATE_ACTIVE)
286 }
287 }
288 if (headMask & 0x2) // Marnak
290 {
291 if (activate)
292 {
293 go->SendCustomAnim(0);
294 }
295 else
296 {
297 go->SendCustomAnim(1);
298 if (go->GetGoState() == GO_STATE_ACTIVE)
300 }
301 }
302 if (headMask & 0x4) // Abedneum
304 {
305 if (activate)
306 {
307 go->SendCustomAnim(0);
308 }
309 else
310 {
311 go->SendCustomAnim(1);
312 if (go->GetGoState() == GO_STATE_ACTIVE)
314 }
315 }
316 }
void SetGoState(GOState state)
Definition GameObject.cpp:2469
GOState GetGoState() const
Definition GameObject.h:204
void SendCustomAnim(uint32 anim)
Definition GameObject.cpp:2142
GameObject * GetGameObject(ObjectGuid const &guid)
Definition Map.cpp:2362
Map * GetMap() const
Definition Object.h:620
@ GO_ABEDNEUM
Definition halls_of_stone.h:64
@ GO_KADDRAK
Definition halls_of_stone.h:62
@ GO_MARNAK
Definition halls_of_stone.h:63

References Map::GetGameObject(), GameObject::GetGoState(), InstanceScript::GetGuidData(), WorldObject::GetMap(), GO_ABEDNEUM, GO_KADDRAK, GO_MARNAK, GO_STATE_ACTIVE, 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.

462 {
463 events.Update(diff);
464
465 if (uint32 eventId = events.ExecuteEvent())
466 {
467 switch (eventId)
468 {
470 {
471 SwitchHeadVisaul(0x1, true);
472 break;
473 }
475 {
476 SwitchHeadVisaul(0x2, true);
477 break;
478 }
480 {
481 SwitchHeadVisaul(0x4, true);
482 break;
483 }
484 case EVENT_KADDRAK_HEAD: // Phase 1
485 {
486 if (!canExecuteEvents)
487 return;
488 if (Creature* kaddrak = GetKaddrak())
489 {
490 if (Player* plr = SelectTargetFromPlayerList(100.0f))
491 kaddrak->CastSpell(plr, SPELL_GLARE_OF_THE_TRIBUNAL, true);
492 }
493
494 events.RescheduleEvent(EVENT_KADDRAK_SWITCH_EYE, 1s);
495 events.Repeat(1500ms);
496 break;
497 }
499 {
500 if (!canExecuteEvents)
501 return;
502 if (Creature* kaddrak = GetKaddrak())
503 {
504 if (leftEye)
505 kaddrak->UpdatePosition(927.9f, 330.9f, 219.4f, 2.4f, true);
506 else
507 kaddrak->UpdatePosition(923.7f, 326.9f, 219.5f, 2.1f, true);
508
509 leftEye = !leftEye;
510 kaddrak->StopMovingOnCurrentPos();
511 }
512
513 break;
514 }
515 case EVENT_MARNAK_HEAD: // Phase 2
516 {
517 if (!canExecuteEvents)
518 return;
519
520 if (Creature* marnak = GetMarnak())
521 {
522 if (Creature* cr = me->SummonCreature(NPC_DARK_MATTER_TARGET, 899.843f, 355.271f, 214.301f, 0, TEMPSUMMON_TIMED_DESPAWN, 10000))
523 {
524 cr->SetCanFly(true);
525
526 //right eye
527 if (Creature* cra = me->SummonCreature(NPC_DARK_MATTER, marnak->GetPositionX(), marnak->GetPositionY(), marnak->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 5000))
528 cra->CastSpell(cra, SPELL_DARK_MATTER_VISUAL_CHANNEL, false);
529
530 //left eye
531 if (Creature* crb = me->SummonCreature(NPC_DARK_MATTER, 891.543f, 359.5252f, 219.338f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 5000))
532 crb->CastSpell(crb, SPELL_DARK_MATTER_VISUAL_CHANNEL, false);
533
534 darkMatterTargetGUID = cr->GetGUID();
535
536 events.RescheduleEvent(EVENT_DARK_MATTER_START, 5s);
537 }
538 }
539 events.Repeat(30s);
540 break;
541 }
543 {
545 {
546 darkMatterTarget->CastSpell(darkMatterTarget, SPELL_DARK_MATTER_VISUAL, false);
547 if (Player* plr = SelectTargetFromPlayerList(100.0f))
548 {
549 if (!plr)
550 return; //no target
551
552 darkMatterTarget->GetMotionMaster()->MovePoint(0, plr->GetPositionX(), plr->GetPositionY(), plr->GetPositionZ());
553
554 if (darkMatterTarget->GetDistance(plr) < 5.0f)
555 {
556 events.RescheduleEvent(EVENT_DARK_MATTER_END, 3s);
557 }
558 else if (darkMatterTarget->GetDistance(plr) < 30.0f)
559 {
560 events.RescheduleEvent(EVENT_DARK_MATTER_END, 3500ms);
561 }
562 else
563 {
564 events.RescheduleEvent(EVENT_DARK_MATTER_END, 4500ms);
565 }
566 }
567 }
568 break;
569 }
571 {
573 {
574 darkMatterTarget->CastSpell(darkMatterTarget, SPELL_DARK_MATTER, true);
575 darkMatterTarget->DespawnOrUnsummon(500ms);
576 }
577 break;
578 }
579 case EVENT_ABEDNEUM_HEAD: // Phase 3
580 {
581 if (!canExecuteEvents)
582 return;
583 if (GetAbedneum())
584 {
585 Player* plr = SelectTargetFromPlayerList(100.0f);
586 if (!plr)
587 break;
588
590 {
591 // summon another abedneum to create double beam, despawn just after trigger despawn
592 me->SummonCreature(NPC_ABEDNEUM, 897.0f, 326.9f, 223.5f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 12000);
593 cr->CastSpell(cr, SPELL_SEARING_GAZE, true);
594 }
595 }
596 events.Repeat(15s);
597 break;
598 }
600 {
601 if (!canExecuteEvents)
602 return;
604 events.Repeat(IsHeroic() ? 23500ms : 32500ms);
605 break;
606 }
608 {
609 if (!canExecuteEvents)
610 return;
611
613 events.Repeat(IsHeroic() ? 32s : 41500ms);
614 break;
615 }
617 {
618 if (!canExecuteEvents)
619 return;
620
622 events.Repeat(IsHeroic() ? 32s : 45s);
623 break;
624 }
626 {
627 canExecuteEvents = false;
628 // Has to be here!
629 events.Reset();
630 //DespawnHeads();
632
633 // Spawn Chest and quest credit
634 if (Player* plr = SelectTargetFromPlayerList(200.0f))
635 {
636 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))
637 {
638 plr->RemoveGameObject(go, false);
639 go->SetLootMode(1);
640 go->ReplaceAllGameObjectFlags((GameObjectFlags)0);
641 }
642
644 }
645
646 events.ScheduleEvent(EVENT_BREEN_WAITING, 11s);
647 events.ScheduleEvent(EVENT_SKY_ROOM_FLOOR_CHANGE, 92s);
648 events.ScheduleEvent(EVENT_TALK_FACE_CHANGE, 97s); //kaddrak speaks
649 events.ScheduleEvent(EVENT_SKY_ROOM_FLOOR_CHANGE, 168s);
650 events.ScheduleEvent(EVENT_TALK_FACE_CHANGE, 173s); //marnak speaks
651 events.ScheduleEvent(EVENT_SKY_ROOM_FLOOR_CHANGE, 239s);
652 events.ScheduleEvent(EVENT_TALK_FACE_CHANGE, 244s); //abedneum speaks
653 events.ScheduleEvent(EVENT_GO_TO_SJONNIR, 251s);
654 events.ScheduleEvent(EVENT_SKY_ROOM_FLOOR_CHANGE, 253s);
655 break;
656 }
658 {
659 SetEscortPaused(false);
660 if (pInstance)
661 {
664 me->CastSpell(me, 59046, true); // credit
665 }
666
669
670 break;
671 }
673 {
674 if (pInstance)
676 break;
677 }
679 {
680 if (pInstance)
682 break;
683 }
685 {
687 break;
688 }
689 case EVENT_DOOR_OPEN:
690 {
693
694 if (pInstance)
695 {
697 {
698 door->SetGoState(GO_STATE_ACTIVE);
701 }
702 }
703
704 break;
705 }
707 {
708 SetEscortPaused(false);
709 break;
710 }
712 {
714 break;
715 }
717 {
718 events.Reset();
719 SetEscortPaused(false);
721 break;
722 }
723 }
724 }
725
727
728 if (TalkEvent)
729 {
730 SpeechPause += diff;
732 {
733 Creature* cs = nullptr;
734 switch (Conversation[SpeechCount].creature)
735 {
736 case NPC_BRANN:
737 cs = me;
738 break;
739 case NPC_ABEDNEUM:
740 cs = GetAbedneum();
741 break;
742 case NPC_KADDRAK:
743 cs = GetKaddrak();
744 break;
745 case NPC_MARNAK:
746 cs = GetMarnak();
747 break;
748 }
749
750 if (cs)
751 {
754 }
755
756 if (SpeechCount < 38)
758 else
759 TalkEvent = false;
760 }
761 }
762 }
std::uint32_t uint32
Definition Define.h:107
@ SPECIAL
Definition InstanceScript.h:62
@ LANG_UNIVERSAL
Definition SharedDefines.h:746
GameObjectFlags
Definition SharedDefines.h:1613
@ MOVEMENTFLAG_NONE
Definition UnitDefines.h:368
@ SPELL_SEARING_GAZE
Definition brann_bronzebeard.cpp:54
@ QUEST_HALLS_OF_STONE
Definition brann_bronzebeard.cpp:69
@ SPELL_DARK_MATTER
Definition brann_bronzebeard.cpp:53
@ SPELL_DARK_MATTER_VISUAL_CHANNEL
Definition brann_bronzebeard.cpp:52
@ SPELL_GLARE_OF_THE_TRIBUNAL
Definition brann_bronzebeard.cpp:50
@ SPELL_DARK_MATTER_VISUAL
Definition brann_bronzebeard.cpp:51
@ NPC_DARK_RUNE_STORMCALLER
Definition brann_bronzebeard.cpp:40
@ NPC_SEARING_GAZE_TRIGGER
Definition brann_bronzebeard.cpp:44
@ NPC_DARK_MATTER_TARGET
Definition brann_bronzebeard.cpp:43
@ NPC_DARK_MATTER
Definition brann_bronzebeard.cpp:42
@ NPC_IRON_GOLEM_CUSTODIAN
Definition brann_bronzebeard.cpp:41
@ NPC_DARK_RUNE_PROTECTOR
Definition brann_bronzebeard.cpp:39
@ EVENT_BREEN_WAITING
Definition brann_bronzebeard.cpp:101
@ EVENT_DARK_MATTER_START
Definition brann_bronzebeard.cpp:85
@ EVENT_SKY_ROOM_FLOOR_CHANGE
Definition brann_bronzebeard.cpp:103
@ EVENT_TALK_FACE_CHANGE
Definition brann_bronzebeard.cpp:102
@ EVENT_KADDRAK_SWITCH_EYE
Definition brann_bronzebeard.cpp:81
@ EVENT_GO_TO_SJONNIR
Definition brann_bronzebeard.cpp:106
@ EVENT_DARK_MATTER_END
Definition brann_bronzebeard.cpp:86
@ EVENT_RESUME_ESCORT
Definition brann_bronzebeard.cpp:108
@ EVENT_DOOR_OPEN
Definition brann_bronzebeard.cpp:107
static Yells Conversation[]
Definition brann_bronzebeard.cpp:120
Definition Player.h:1071
void GroupEventHappens(uint32 questId, WorldObject const *pEventObject)
Definition PlayerQuest.cpp:1816
virtual void DoAction(int32)
Definition UnitAI.h:217
void RemoveGameObject(GameObject *gameObj, bool del)
Definition Unit.cpp:6424
virtual void Yell(std::string_view text, Language language, WorldObject const *target=nullptr)
Definition Unit.cpp:21236
void AddUnitMovementFlag(uint32 f)
Definition Unit.h:762
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:1194
void PlayDirectSound(uint32 sound_id, Player *target=nullptr)
Definition Object.cpp:2901
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:2366
@ GO_TRIBUNAL_CHEST
Definition halls_of_stone.h:68
@ GO_TRIBUNAL_CHEST_H
Definition halls_of_stone.h:69
@ SAY_BRANN_VICTORY_SJONNIR_2
Definition halls_of_stone.h:40
@ SAY_BRANN_VICTORY_SJONNIR_1
Definition halls_of_stone.h:39
float GetPositionZ() const
Definition Position.h:123
float GetPositionX() const
Definition Position.h:121
float GetPositionY() const
Definition Position.h:122
bool IsHeroic() const
Definition ScriptedCreature.h:380
Player * SelectTargetFromPlayerList(float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
Definition ScriptedCreature.cpp:581
uint32 timer
Definition brann_bronzebeard.cpp:117
void SummonCreatures(uint32 entry, uint8 count, uint8 pos)
Definition brann_bronzebeard.cpp:764
ObjectGuid darkMatterTargetGUID
Definition brann_bronzebeard.cpp:250
bool leftEye
Definition brann_bronzebeard.cpp:343
bool canExecuteEvents
Definition brann_bronzebeard.cpp:256
virtual void UpdateEscortAI(uint32 diff)
Definition ScriptedEscortAI.cpp:309

References ACTION_GO_TO_SJONNIR, Unit::AddUnitMovementFlag(), Creature::AI(), BOSS_TRIBUNAL_OF_AGES, BRANN_BRONZEBEARD, canExecuteEvents, Unit::CastSpell(), Conversation, darkMatterTargetGUID, SummonList::DespawnAll(), UnitAI::DoAction(), DONE, EMOTE_STATE_READY_UNARMED, EMOTE_STATE_STAND, EVENT_ABEDNEUM_HEAD, EVENT_ABEDNEUM_VISUAL, EVENT_BREEN_WAITING, EVENT_DARK_MATTER_END, EVENT_DARK_MATTER_START, EVENT_DOOR_OPEN, EVENT_GO_TO_SJONNIR, EVENT_KADDRAK_HEAD, EVENT_KADDRAK_SWITCH_EYE, EVENT_KADDRAK_VISUAL, EVENT_MARNAK_HEAD, EVENT_MARNAK_VISUAL, EVENT_RESUME_ESCORT, EVENT_SJONNIR_END_BRANN_LAST_YELL, EVENT_SJONNIR_END_BRANN_YELL, EVENT_SKY_ROOM_FLOOR_CHANGE, EVENT_SUMMON_CUSTODIAN, EVENT_SUMMON_MONSTERS, EVENT_SUMMON_STORMCALLER, EVENT_TALK_FACE_CHANGE, EVENT_TRIBUNAL_END, GetAbedneum(), ObjectAccessor::GetCreature(), 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, leftEye, ScriptedAI::me, MOVEMENTFLAG_NONE, NPC_ABEDNEUM, NPC_BRANN, NPC_DARK_MATTER, NPC_DARK_MATTER_TARGET, 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(), SAY_BRANN_VICTORY_SJONNIR_1, SAY_BRANN_VICTORY_SJONNIR_2, ScriptedAI::SelectTargetFromPlayerList(), Unit::SendMovementFlagUpdate(), ZoneScript::SetData(), npc_escortAI::SetEscortPaused(), Unit::SetUInt32Value(), SPECIAL, SpeechCount, SpeechPause, SPELL_DARK_MATTER, SPELL_DARK_MATTER_VISUAL, SPELL_DARK_MATTER_VISUAL_CHANNEL, SPELL_GLARE_OF_THE_TRIBUNAL, SPELL_SEARING_GAZE, WorldObject::SummonCreature(), SummonCreatures(), WorldObject::SummonGameObject(), summons, SwitchHeadVisaul(), TalkEvent, TEMPSUMMON_TIMED_DESPAWN, Yells::timer, UNIT_NPC_EMOTESTATE, UNIT_NPC_FLAG_NONE, npc_escortAI::UpdateEscortAI(), and Unit::Yell().

◆ WaypointReached()

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

Implements npc_escortAI.

845{
846 switch (id)
847 {
848 // Stop before stairs and ask to start
849 case 14:
850 SetEscortPaused(true);
851 if (pInstance)
852 {
857 }
858 break;
859 // In front of Console
860 case 16:
861 SetEscortPaused(true);
862 if (pInstance)
863 {
867 tribunal->SetGoState(GO_STATE_ACTIVE);
868 }
869 break;
870 //Tribunal end, stand in the middle of the sky room
871 case 17:
872 SetEscortPaused(true);
874 me->SetOrientation(3.91672f);
876 break;
877 //Run to the skyroom door and then teleport before Sjonnir's door
878 case 18:
879 SetEscortPaused(true);
880 SetNextWaypoint(33, false);
881 if (pInstance)
882 {
885 me->SetOrientation(3.132660f);
886 DoCast(me, 58506, false);
888 me->SetHomePosition(1199.8f, 667.138f, 196.242f, 3.12967f);
889 me->Relocate(1199.8f, 667.138f, 196.242f, 3.12967f);
890 }
891 break;
892 // Before Sjonnir's door
893 case 33:
894 SetEscortPaused(true);
895 break;
896 //Walk to the door, run after opening it
897 case 34:
898 SetEscortPaused(true);
901 events.ScheduleEvent(EVENT_DOOR_OPEN, 1500ms);
902 me->SetWalk(false);
903 me->SetSpeed(MOVE_RUN, 1.0f, false);
904 events.ScheduleEvent(EVENT_RESUME_ESCORT, 3500ms);
905 break;
906 //Brann stops in front of Sjonnir and awaits the start of the battle.
907 case 36:
908 SetEscortPaused(true);
912 break;
913 //Brann steps back and uses the Sjonnir console.
914 case 38:
915 SetEscortPaused(true);
917 if (pInstance)
918 {
920 console->SetGoState(GO_STATE_ACTIVE);
921 }
922 break;
923 //After Sjonnir's death, Brann steps away from the console and talk.
924 case 39:
925 SetEscortPaused(true);
926 break;
927 //Brann steps back and uses the Sjonnir console.
928 case 40:
929 SetEscortPaused(true);
931 break;
932 }
933}
@ IN_PROGRESS
Definition InstanceScript.h:59
@ EMOTE_ONESHOT_CHEER
Definition SharedDefines.h:1909
@ EMOTE_STATE_USE_STANDING
Definition SharedDefines.h:1955
@ MOVE_RUN
Definition UnitDefines.h:354
void SetHomePosition(float x, float y, float z, float o)
Definition Creature.h:339
void HandleEmoteCommand(uint32 emoteId)
Definition Unit.cpp:2036
@ GO_SJONNIR_CONSOLE
Definition halls_of_stone.h:66
@ SAY_BRANN_FRONT_OF_SJONNIR
Definition halls_of_stone.h:34
@ SAY_BRANN_EVENT_INTRO_1
Definition halls_of_stone.h:38
void Relocate(float x, float y)
Definition Position.h:77

References BOSS_TRIBUNAL_OF_AGES, BRANN_BRONZEBEARD, EMOTE_ONESHOT_CHEER, EMOTE_STATE_READY_UNARMED, EMOTE_STATE_USE_STANDING, EVENT_DOOR_OPEN, EVENT_RESUME_ESCORT, ObjectAccessor::GetGameObject(), GO_SJONNIR_CONSOLE, GO_STATE_ACTIVE, GO_TRIBUNAL_CONSOLE, IN_PROGRESS, MOVE_RUN, SAY_BRANN_EVENT_INTRO_1, SAY_BRANN_FRONT_OF_SJONNIR, 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().

◆ canExecuteEvents

bool brann_bronzebeard::brann_bronzebeardAI::canExecuteEvents = true

Referenced by UpdateEscortAI().

◆ darkMatterTargetGUID

ObjectGuid brann_bronzebeard::brann_bronzebeardAI::darkMatterTargetGUID

Referenced by UpdateEscortAI().

◆ events

EventMap brann_bronzebeard::brann_bronzebeardAI::events

◆ KaddrakGUID

ObjectGuid brann_bronzebeard::brann_bronzebeardAI::KaddrakGUID

Referenced by GetKaddrak(), and InitializeEvent().

◆ leftEye

bool brann_bronzebeard::brann_bronzebeardAI::leftEye = true

Referenced by UpdateEscortAI().

◆ 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().


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