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
218 : npc_escortAI(c), summons(me)
219 {
221 }
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1214
Creature * me
Definition ScriptedCreature.h:281
SummonList summons
Definition brann_bronzebeard.cpp:225
InstanceScript * pInstance
Definition brann_bronzebeard.cpp:223
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.

325 {
326 if (damage && pInstance)
328 }
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
238 {
239 Creature* cr;
240 if ((cr = GetAbedneum())) cr->DespawnOrUnsummon();
241 if ((cr = GetMarnak())) cr->DespawnOrUnsummon();
242 if ((cr = GetKaddrak())) cr->DespawnOrUnsummon();
243
244 SwitchHeadVisaul(0x7, false);
245 }
Definition Creature.h:47
void DespawnOrUnsummon(Milliseconds msTimeToDespawn=0ms, Seconds forcedRespawnTimer=0s)
Definition Creature.cpp:2130
Creature * GetKaddrak()
Definition brann_bronzebeard.cpp:320
Creature * GetMarnak()
Definition brann_bronzebeard.cpp:319
void SwitchHeadVisaul(uint8 headMask, bool activate)
Definition brann_bronzebeard.cpp:247
Creature * GetAbedneum()
Definition brann_bronzebeard.cpp:318

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

Referenced by ResetEvent().

◆ DoAction()

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

Reimplemented from UnitAI.

362 {
363 switch (action)
364 {
366 Start(false, ObjectGuid::Empty, 0, true, false);
370 break;
372 {
374 SetEscortPaused(false);
377 break;
378 }
380 SetNextWaypoint(1, false);
381 SetEscortPaused(false);
382 ResetEvent();
384 break;
389 SetEscortPaused(false);
390 ResetEvent();
392 DoCast(me, 58506, false);
395 me->SetImmuneToAll(true);
396 break;
398 SetEscortPaused(false);
399 break;
401 if (pInstance)
403 SetEscortPaused(false);
406 me->SetOrientation(3.132660f);
408 events.ScheduleEvent(EVENT_SJONNIR_END_BRANN_YELL, 10s);
409 events.ScheduleEvent(EVENT_SJONNIR_END_BRANN_LAST_YELL, 22s);
410 break;
412 Reset();
413 SetNextWaypoint(33, true);
416 DoCast(me, 58506, false);
418 door->SetGoState(GO_STATE_READY);
419 break;
420 case ACTION_OPEN_DOOR:
421 Start(false, ObjectGuid::Empty, 0, true, false);
422 SetNextWaypoint(34, false);
423 SetEscortPaused(false);
424 me->RemoveAura(58506);
426 me->SetWalk(true);
427 me->SetSpeed(MOVE_WALK, 1.0f);
428 break;
429 }
430 }
@ GO_STATE_READY
Definition GameObjectData.h:706
@ 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:88
@ EVENT_SJONNIR_END_BRANN_LAST_YELL
Definition brann_bronzebeard.cpp:89
void SetRegeneratingHealth(bool enable)
Definition Creature.h:320
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:3165
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:4899
void SendMovementFlagUpdate(bool self=false)
Definition Unit.cpp:16933
void StopMovingOnCurrentPos()
Definition Unit.cpp:16918
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
Definition Unit.cpp:14606
void SetUInt32Value(uint16 index, uint32 value)
Definition Unit.cpp:21429
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:330
void ResetEvent()
Definition brann_bronzebeard.cpp:297
void InitializeEvent()
Definition brann_bronzebeard.cpp:788
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:226

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

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

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

Referenced by DespawnHeads(), and UpdateEscortAI().

◆ InitializeEvent()

void brann_bronzebeard::brann_bronzebeardAI::InitializeEvent ( )
789{
790 Creature* cr = nullptr;
791 if ((cr = me->SummonCreature(NPC_KADDRAK, 923.7f, 326.9f, 219.5f, 2.1f, TEMPSUMMON_TIMED_DESPAWN, 580000)))
792 {
793 KaddrakGUID = cr->GetGUID();
794 }
795 if ((cr = me->SummonCreature(NPC_MARNAK, 895.974f, 363.571f, 219.337f, 5.5f, TEMPSUMMON_TIMED_DESPAWN, 580000)))
796 {
797 MarnakGUID = cr->GetGUID();
798 }
799 if ((cr = me->SummonCreature(NPC_ABEDNEUM, 892.25f, 331.25f, 223.86f, 0.6f, TEMPSUMMON_TIMED_DESPAWN, 580000)))
800 {
801 AbedneumGUID = cr->GetGUID();
802 }
803
804 TalkEvent = true;
805
806 events.Reset();
807
808 // Viusals
809 events.ScheduleEvent(EVENT_KADDRAK_VISUAL, 30s);
810 events.ScheduleEvent(EVENT_MARNAK_VISUAL, 105s);
811 events.ScheduleEvent(EVENT_ABEDNEUM_VISUAL, 207s);
812
813 events.ScheduleEvent(EVENT_SUMMON_MONSTERS, 52s);
814 events.ScheduleEvent(EVENT_SUMMON_STORMCALLER, 122s);
815 events.ScheduleEvent(EVENT_SUMMON_CUSTODIAN, 228s);
816 events.ScheduleEvent(EVENT_KADDRAK_HEAD, 47s);
817 events.ScheduleEvent(EVENT_MARNAK_HEAD, 115s);
818 events.ScheduleEvent(EVENT_ABEDNEUM_HEAD, 217s);
819 events.ScheduleEvent(EVENT_TRIBUNAL_END, 310s);
820}
@ TEMPSUMMON_TIMED_DESPAWN
Definition Object.h:50
@ EVENT_MARNAK_VISUAL
Definition brann_bronzebeard.cpp:68
@ EVENT_ABEDNEUM_VISUAL
Definition brann_bronzebeard.cpp:66
@ EVENT_ABEDNEUM_HEAD
Definition brann_bronzebeard.cpp:69
@ EVENT_SUMMON_STORMCALLER
Definition brann_bronzebeard.cpp:74
@ EVENT_TRIBUNAL_END
Definition brann_bronzebeard.cpp:79
@ EVENT_SUMMON_MONSTERS
Definition brann_bronzebeard.cpp:73
@ EVENT_KADDRAK_VISUAL
Definition brann_bronzebeard.cpp:67
@ EVENT_MARNAK_HEAD
Definition brann_bronzebeard.cpp:71
@ EVENT_KADDRAK_HEAD
Definition brann_bronzebeard.cpp:70
@ EVENT_SUMMON_CUSTODIAN
Definition brann_bronzebeard.cpp:75
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:233

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.

762 {
763 ResetEvent();
764 if (pInstance)
765 {
767 {
768 brann->HandleEmoteCommand(EMOTE_STATE_DEAD);
769 brann->setDeathState(DeathState::JustDied);
770 brann->Respawn();
772 {
773 brann->AI()->DoAction(ACTION_TRIBUNAL_WIPE_START);
775 }
777 {
778 brann->AI()->DoAction(ACTION_SJONNIR_WIPE_START);
779 }
780 }
783 }
784 }
@ 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.

433 {
434 if (cr->GetEntry() == NPC_ABEDNEUM || cr->GetEntry() == NPC_KADDRAK || cr->GetEntry() == NPC_MARNAK)
435 cr->SetCanFly(true);
436 else
437 summons.Summon(cr);
438 }
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:20622

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.

331 {
332 RemoveEscortState(0x7); // all states
333 SetDespawnAtFar(false);
334 SetDespawnAtEnd(false);
335 ResetEvent();
336
339
340 if (pInstance)
341 {
344
346 {
349 door->SetGoState(GO_STATE_ACTIVE);
350 }
351
353 {
356 door->SetGoState(GO_STATE_ACTIVE);
357 }
358 }
359 }
@ GO_STATE_ACTIVE
Definition GameObjectData.h:705
@ 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
298 {
300 tribunal->SetGoState(GO_STATE_READY);
301
303 tribunalSkyFloor->SetGoState(GO_STATE_READY);
304
305 events.Reset();
307 DespawnHeads();
308
309 WaveNum = 0;
310 SpeechCount = 0;
311 SpeechPause = 0;
312 TalkEvent = false;
313 }
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:237
uint32 SpeechPause
Definition brann_bronzebeard.cpp:234
uint32 SpeechCount
Definition brann_bronzebeard.cpp:234
uint8 WaveNum
Definition brann_bronzebeard.cpp:231

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
744 {
745 Creature* cr;
746 for (int i = 0; i < count; ++i)
747 {
748 if (pos == 0)
749 cr = me->SummonCreature(entry, 943.088f + urand(0, 5), 401.378f + urand(0, 5), 206.078f, 3.8f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000); //left
750 else
751 cr = me->SummonCreature(entry, 964.302f + urand(0, 4), 378.942f + urand(0, 4), 206.078f, 3.85f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000); //right
752
753 if (cr)
754 {
755 cr->AI()->AttackStart(me);
757 }
758 }
759 }
@ 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:2777
CreatureAI * AI() const
Definition Creature.h:144
virtual void AttackStart(Unit *)
Definition UnitAI.cpp:27

References 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
248 {
249 if (!pInstance)
250 return;
251
252 GameObject* go = nullptr;
253 if (headMask & 0x1) // Kaddrak
255 {
256 if (activate)
257 {
258 go->SendCustomAnim(0);
259 }
260 else
261 {
262 go->SendCustomAnim(1);
263 if (go->GetGoState() == GO_STATE_ACTIVE)
265 }
266 }
267 if (headMask & 0x2) // Marnak
269 {
270 if (activate)
271 {
272 go->SendCustomAnim(0);
273 }
274 else
275 {
276 go->SendCustomAnim(1);
277 if (go->GetGoState() == GO_STATE_ACTIVE)
279 }
280 }
281 if (headMask & 0x4) // Abedneum
283 {
284 if (activate)
285 {
286 go->SendCustomAnim(0);
287 }
288 else
289 {
290 go->SendCustomAnim(1);
291 if (go->GetGoState() == GO_STATE_ACTIVE)
293 }
294 }
295 }
void SetGoState(GOState state)
Definition GameObject.cpp:2451
GOState GetGoState() const
Definition GameObject.h:204
void SendCustomAnim(uint32 anim)
Definition GameObject.cpp:2126
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.

441 {
442 events.Update(diff);
443
444 if (uint32 eventId = events.ExecuteEvent())
445 {
446 switch (eventId)
447 {
449 {
450 SwitchHeadVisaul(0x1, true);
451 break;
452 }
454 {
455 SwitchHeadVisaul(0x2, true);
456 break;
457 }
459 {
460 SwitchHeadVisaul(0x4, true);
461 break;
462 }
463 case EVENT_KADDRAK_HEAD: // Phase 1
464 {
465 if (!canExecuteEvents)
466 return;
467 if (Creature* kaddrak = GetKaddrak())
468 {
469 if (Player* plr = SelectTargetFromPlayerList(100.0f))
470 kaddrak->CastSpell(plr, SPELL_GLARE_OF_THE_TRIBUNAL, true);
471 }
472
473 events.RescheduleEvent(EVENT_KADDRAK_SWITCH_EYE, 1s);
474 events.Repeat(1500ms);
475 break;
476 }
478 {
479 if (!canExecuteEvents)
480 return;
481 if (Creature* kaddrak = GetKaddrak())
482 {
483 if (leftEye)
484 kaddrak->UpdatePosition(927.9f, 330.9f, 219.4f, 2.4f, true);
485 else
486 kaddrak->UpdatePosition(923.7f, 326.9f, 219.5f, 2.1f, true);
487
488 leftEye = !leftEye;
489 kaddrak->StopMovingOnCurrentPos();
490 }
491
492 break;
493 }
494 case EVENT_MARNAK_HEAD: // Phase 2
495 {
496 if (!canExecuteEvents)
497 return;
498
499 if (Creature* marnak = GetMarnak())
500 {
501 if (Creature* cr = me->SummonCreature(NPC_DARK_MATTER_TARGET, 899.843f, 355.271f, 214.301f, 0, TEMPSUMMON_TIMED_DESPAWN, 10000))
502 {
503 cr->SetCanFly(true);
504
505 //right eye
506 if (Creature* cra = me->SummonCreature(NPC_DARK_MATTER, marnak->GetPositionX(), marnak->GetPositionY(), marnak->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 5000))
507 cra->CastSpell(cra, SPELL_DARK_MATTER_VISUAL_CHANNEL, false);
508
509 //left eye
510 if (Creature* crb = me->SummonCreature(NPC_DARK_MATTER, 891.543f, 359.5252f, 219.338f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 5000))
511 crb->CastSpell(crb, SPELL_DARK_MATTER_VISUAL_CHANNEL, false);
512
513 darkMatterTargetGUID = cr->GetGUID();
514
515 events.RescheduleEvent(EVENT_DARK_MATTER_START, 5s);
516 }
517 }
518 events.Repeat(30s);
519 break;
520 }
522 {
524 {
525 darkMatterTarget->CastSpell(darkMatterTarget, SPELL_DARK_MATTER_VISUAL, false);
526 if (Player* plr = SelectTargetFromPlayerList(100.0f))
527 {
528 if (!plr)
529 return; //no target
530
531 darkMatterTarget->GetMotionMaster()->MovePoint(0, plr->GetPositionX(), plr->GetPositionY(), plr->GetPositionZ());
532
533 if (darkMatterTarget->GetDistance(plr) < 5.0f)
534 {
535 events.RescheduleEvent(EVENT_DARK_MATTER_END, 3s);
536 }
537 else if (darkMatterTarget->GetDistance(plr) < 30.0f)
538 {
539 events.RescheduleEvent(EVENT_DARK_MATTER_END, 3500ms);
540 }
541 else
542 {
543 events.RescheduleEvent(EVENT_DARK_MATTER_END, 4500ms);
544 }
545 }
546 }
547 break;
548 }
550 {
552 {
553 darkMatterTarget->CastSpell(darkMatterTarget, SPELL_DARK_MATTER, true);
554 darkMatterTarget->DespawnOrUnsummon(500ms);
555 }
556 break;
557 }
558 case EVENT_ABEDNEUM_HEAD: // Phase 3
559 {
560 if (!canExecuteEvents)
561 return;
562 if (GetAbedneum())
563 {
564 Player* plr = SelectTargetFromPlayerList(100.0f);
565 if (!plr)
566 break;
567
569 {
570 // summon another abedneum to create double beam, despawn just after trigger despawn
571 me->SummonCreature(NPC_ABEDNEUM, 897.0f, 326.9f, 223.5f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 12000);
572 cr->CastSpell(cr, SPELL_SEARING_GAZE, true);
573 }
574 }
575 events.Repeat(15s);
576 break;
577 }
579 {
580 if (!canExecuteEvents)
581 return;
583 events.Repeat(IsHeroic() ? 23500ms : 32500ms);
584 break;
585 }
587 {
588 if (!canExecuteEvents)
589 return;
590
592 events.Repeat(IsHeroic() ? 32s : 41500ms);
593 break;
594 }
596 {
597 if (!canExecuteEvents)
598 return;
599
601 events.Repeat(IsHeroic() ? 32s : 45s);
602 break;
603 }
605 {
606 canExecuteEvents = false;
607 // Has to be here!
608 events.Reset();
609 //DespawnHeads();
611
612 // Spawn Chest and quest credit
613 if (Player* plr = SelectTargetFromPlayerList(200.0f))
614 {
615 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))
616 {
617 plr->RemoveGameObject(go, false);
618 go->SetLootMode(1);
619 go->ReplaceAllGameObjectFlags((GameObjectFlags)0);
620 }
621
623 }
624
625 events.ScheduleEvent(EVENT_BREEN_WAITING, 11s);
626 events.ScheduleEvent(EVENT_SKY_ROOM_FLOOR_CHANGE, 92s);
627 events.ScheduleEvent(EVENT_TALK_FACE_CHANGE, 97s); //kaddrak speaks
628 events.ScheduleEvent(EVENT_SKY_ROOM_FLOOR_CHANGE, 168s);
629 events.ScheduleEvent(EVENT_TALK_FACE_CHANGE, 173s); //marnak speaks
630 events.ScheduleEvent(EVENT_SKY_ROOM_FLOOR_CHANGE, 239s);
631 events.ScheduleEvent(EVENT_TALK_FACE_CHANGE, 244s); //abedneum speaks
632 events.ScheduleEvent(EVENT_GO_TO_SJONNIR, 251s);
633 events.ScheduleEvent(EVENT_SKY_ROOM_FLOOR_CHANGE, 253s);
634 break;
635 }
637 {
638 SetEscortPaused(false);
639 if (pInstance)
640 {
643 me->CastSpell(me, SPELL_TRIBUNAL_CREDIT_MARKER, true); // credit
644 }
645
648
649 break;
650 }
652 {
653 if (pInstance)
655 break;
656 }
658 {
659 if (pInstance)
661 break;
662 }
664 {
666 break;
667 }
668 case EVENT_DOOR_OPEN:
669 {
672
673 if (pInstance)
674 {
676 {
677 door->SetGoState(GO_STATE_ACTIVE);
680 }
681 }
682
683 break;
684 }
686 {
687 SetEscortPaused(false);
688 break;
689 }
691 {
693 break;
694 }
696 {
697 events.Reset();
698 SetEscortPaused(false);
700 break;
701 }
702 }
703 }
704
706
707 if (TalkEvent)
708 {
709 SpeechPause += diff;
711 {
712 Creature* cs = nullptr;
713 switch (Conversation[SpeechCount].creature)
714 {
715 case NPC_BRANN:
716 cs = me;
717 break;
718 case NPC_ABEDNEUM:
719 cs = GetAbedneum();
720 break;
721 case NPC_KADDRAK:
722 cs = GetKaddrak();
723 break;
724 case NPC_MARNAK:
725 cs = GetMarnak();
726 break;
727 }
728
729 if (cs)
730 {
733 }
734
735 if (SpeechCount < 38)
737 else
738 TalkEvent = false;
739 }
740 }
741 }
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:60
@ 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_TRIBUNAL_CREDIT_MARKER
Definition brann_bronzebeard.cpp:57
@ 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:80
@ EVENT_DARK_MATTER_START
Definition brann_bronzebeard.cpp:76
@ EVENT_SKY_ROOM_FLOOR_CHANGE
Definition brann_bronzebeard.cpp:82
@ EVENT_TALK_FACE_CHANGE
Definition brann_bronzebeard.cpp:81
@ EVENT_KADDRAK_SWITCH_EYE
Definition brann_bronzebeard.cpp:72
@ EVENT_GO_TO_SJONNIR
Definition brann_bronzebeard.cpp:85
@ EVENT_DARK_MATTER_END
Definition brann_bronzebeard.cpp:77
@ EVENT_RESUME_ESCORT
Definition brann_bronzebeard.cpp:87
@ EVENT_DOOR_OPEN
Definition brann_bronzebeard.cpp:86
static Yells Conversation[]
Definition brann_bronzebeard.cpp:99
Definition Player.h:1066
void GroupEventHappens(uint32 questId, WorldObject const *pEventObject)
Definition PlayerQuest.cpp:1850
virtual void DoAction(int32)
Definition UnitAI.h:217
void RemoveGameObject(GameObject *gameObj, bool del)
Definition Unit.cpp:6435
virtual void Yell(std::string_view text, Language language, WorldObject const *target=nullptr)
Definition Unit.cpp:21251
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:96
void SummonCreatures(uint32 entry, uint8 count, uint8 pos)
Definition brann_bronzebeard.cpp:743
ObjectGuid darkMatterTargetGUID
Definition brann_bronzebeard.cpp:229
bool leftEye
Definition brann_bronzebeard.cpp:322
bool canExecuteEvents
Definition brann_bronzebeard.cpp:235
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, SPELL_TRIBUNAL_CREDIT_MARKER, 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.

823{
824 switch (id)
825 {
826 // Stop before stairs and ask to start
827 case 14:
828 SetEscortPaused(true);
829 if (pInstance)
830 {
835 }
836 break;
837 // In front of Console
838 case 16:
839 SetEscortPaused(true);
840 if (pInstance)
841 {
845 tribunal->SetGoState(GO_STATE_ACTIVE);
846 }
847 break;
848 //Tribunal end, stand in the middle of the sky room
849 case 17:
850 SetEscortPaused(true);
852 me->SetOrientation(3.91672f);
854 break;
855 //Run to the skyroom door and then teleport before Sjonnir's door
856 case 18:
857 SetEscortPaused(true);
858 SetNextWaypoint(33, false);
859 if (pInstance)
860 {
863 me->SetOrientation(3.132660f);
864 DoCast(me, 58506, false);
866 me->SetHomePosition(1199.8f, 667.138f, 196.242f, 3.12967f);
867 me->Relocate(1199.8f, 667.138f, 196.242f, 3.12967f);
868 }
869 break;
870 // Before Sjonnir's door
871 case 33:
872 SetEscortPaused(true);
873 break;
874 //Walk to the door, run after opening it
875 case 34:
876 SetEscortPaused(true);
879 events.ScheduleEvent(EVENT_DOOR_OPEN, 1500ms);
880 me->SetWalk(false);
881 me->SetSpeed(MOVE_RUN, 1.0f, false);
882 events.ScheduleEvent(EVENT_RESUME_ESCORT, 3500ms);
883 break;
884 //Brann stops in front of Sjonnir and awaits the start of the battle.
885 case 36:
886 SetEscortPaused(true);
890 break;
891 //Brann steps back and uses the Sjonnir console.
892 case 38:
893 SetEscortPaused(true);
895 if (pInstance)
896 {
898 console->SetGoState(GO_STATE_ACTIVE);
899 }
900 break;
901 //After Sjonnir's death, Brann steps away from the console and talk.
902 case 39:
903 SetEscortPaused(true);
904 break;
905 //Brann steps back and uses the Sjonnir console.
906 case 40:
907 SetEscortPaused(true);
909 break;
910 }
911}
@ 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:338
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: