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
 
virtual void WaypointReached (uint32, uint32)
 
- 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)
 
virtual void WaypointReached (uint32, uint32)
 
- 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 - this happens after JustEnteredCombat.
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoRewardPlayersInArea ()
 
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
 
bool IsEngaged () const
 Check if creature is currently engaged in combat.
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
void JustEnteredCombat (Unit *who) override
 Called when the unit enters combat.
 
virtual void JustStartedThreateningMe (Unit *who)
 
void EngagementStart (Unit *who)
 
void EngagementOver ()
 
void JustExitedCombat () override
 Called when the unit leaves combat.
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void OnSpellStart (SpellInfo const *)
 
virtual void OnSpellCast (SpellInfo const *)
 
virtual void OnSpellFailed (SpellInfo const *)
 
virtual void OnChannelFinished (SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual void PathEndReached (uint32)
 
virtual void WaypointPathStarted (uint32)
 == Waypoints system =============================
 
virtual void WaypointStarted (uint32, uint32)
 
virtual void WaypointPathEnded (uint32, 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 *attacker)
 
virtual void OwnerAttacked (Unit *target)
 
void OnOwnerCombatInteraction (Unit *target)
 
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 EvadeTimerExpired ()
 Called when evade timer expires (target unreachable for too long)
 
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
 
bool _isEngaged
 
- 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:1238
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.

326 {
327 if (damage && pInstance)
329 }
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:2126
Creature * GetKaddrak()
Definition brann_bronzebeard.cpp:321
Creature * GetMarnak()
Definition brann_bronzebeard.cpp:320
void SwitchHeadVisaul(uint8 headMask, bool activate)
Definition brann_bronzebeard.cpp:247
Creature * GetAbedneum()
Definition brann_bronzebeard.cpp:319

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

Referenced by ResetEvent().

◆ DoAction()

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

Reimplemented from UnitAI.

363 {
364 switch (action)
365 {
367 Start(false, ObjectGuid::Empty, 0, true, false);
371 break;
373 {
375 SetEscortPaused(false);
378 break;
379 }
381 SetNextWaypoint(1, false);
382 SetEscortPaused(false);
383 ResetEvent();
385 break;
390 SetEscortPaused(false);
391 ResetEvent();
393 DoCast(me, 58506, false);
396 me->SetImmuneToAll(true);
397 break;
399 SetEscortPaused(false);
400 break;
402 if (pInstance)
404 SetEscortPaused(false);
407 me->SetOrientation(3.132660f);
409 events.ScheduleEvent(EVENT_SJONNIR_END_BRANN_YELL, 10s);
410 events.ScheduleEvent(EVENT_SJONNIR_END_BRANN_LAST_YELL, 22s);
411 break;
413 Reset();
414 SetNextWaypoint(33, true);
417 DoCast(me, 58506, false);
419 door->SetGoState(GO_STATE_READY);
420 break;
421 case ACTION_OPEN_DOOR:
422 Start(false, ObjectGuid::Empty, 0, true, false);
423 SetNextWaypoint(34, false);
424 SetEscortPaused(false);
425 me->RemoveAura(58506);
427 me->SetWalk(true);
428 me->SetSpeed(MOVE_WALK, 1.0f);
429 break;
430 }
431 }
@ GO_STATE_READY
Definition GameObjectData.h:709
@ EMOTE_STATE_STAND
Definition SharedDefines.h:1924
@ EMOTE_STATE_READY_UNARMED
Definition SharedDefines.h:1925
@ UNIT_NPC_FLAG_GOSSIP
Definition UnitDefines.h:322
@ UNIT_NPC_FLAG_NONE
Definition UnitDefines.h:321
@ UNIT_NPC_FLAG_QUESTGIVER
Definition UnitDefines.h:323
@ MOVE_WALK
Definition UnitDefines.h:356
@ REACT_PASSIVE
Definition Unit.h:566
@ REACT_AGGRESSIVE
Definition Unit.h:568
@ 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:326
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:3247
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:178
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:5024
void SendMovementFlagUpdate(bool self=false)
Definition Unit.cpp:13051
void StopMovingOnCurrentPos()
Definition Unit.cpp:13036
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
Definition Unit.cpp:11270
void SetUInt32Value(uint16 index, uint32 value)
Definition Unit.cpp:17323
void ReplaceAllNpcFlags(NPCFlags flags)
Definition Unit.h:766
void SetImmuneToAll(bool apply, bool keepCombat=false)
Definition Unit.h:924
@ 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:331
void ResetEvent()
Definition brann_bronzebeard.cpp:297
void InitializeEvent()
Definition brann_bronzebeard.cpp:789
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 ( )
790{
791 Creature* cr = nullptr;
792 if ((cr = me->SummonCreature(NPC_KADDRAK, 923.7f, 326.9f, 219.5f, 2.1f, TEMPSUMMON_TIMED_DESPAWN, 580000)))
793 {
794 KaddrakGUID = cr->GetGUID();
795 }
796 if ((cr = me->SummonCreature(NPC_MARNAK, 895.974f, 363.571f, 219.337f, 5.5f, TEMPSUMMON_TIMED_DESPAWN, 580000)))
797 {
798 MarnakGUID = cr->GetGUID();
799 }
800 if ((cr = me->SummonCreature(NPC_ABEDNEUM, 892.25f, 331.25f, 223.86f, 0.6f, TEMPSUMMON_TIMED_DESPAWN, 580000)))
801 {
802 AbedneumGUID = cr->GetGUID();
803 }
804
805 TalkEvent = true;
806
807 events.Reset();
808
809 // Viusals
810 events.ScheduleEvent(EVENT_KADDRAK_VISUAL, 30s);
811 events.ScheduleEvent(EVENT_MARNAK_VISUAL, 105s);
812 events.ScheduleEvent(EVENT_ABEDNEUM_VISUAL, 207s);
813
814 events.ScheduleEvent(EVENT_SUMMON_MONSTERS, 52s);
815 events.ScheduleEvent(EVENT_SUMMON_STORMCALLER, 122s);
816 events.ScheduleEvent(EVENT_SUMMON_CUSTODIAN, 228s);
817 events.ScheduleEvent(EVENT_KADDRAK_HEAD, 47s);
818 events.ScheduleEvent(EVENT_MARNAK_HEAD, 115s);
819 events.ScheduleEvent(EVENT_ABEDNEUM_HEAD, 217s);
820 events.ScheduleEvent(EVENT_TRIBUNAL_END, 310s);
821}
@ TEMPSUMMON_TIMED_DESPAWN
Definition Object.h:51
@ 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:114
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:2394
@ 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.

763 {
764 ResetEvent();
765 if (pInstance)
766 {
768 {
769 brann->HandleEmoteCommand(EMOTE_STATE_DEAD);
770 brann->setDeathState(DeathState::JustDied);
771 brann->Respawn();
773 {
774 brann->AI()->DoAction(ACTION_TRIBUNAL_WIPE_START);
776 }
778 {
779 brann->AI()->DoAction(ACTION_SJONNIR_WIPE_START);
780 }
781 }
784 }
785 }
@ FAIL
Definition InstanceScript.h:60
@ DONE
Definition InstanceScript.h:61
@ NOT_STARTED
Definition InstanceScript.h:58
@ EMOTE_STATE_DEAD
Definition SharedDefines.h:1947
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.

434 {
435 if (cr->GetEntry() == NPC_ABEDNEUM || cr->GetEntry() == NPC_KADDRAK || cr->GetEntry() == NPC_MARNAK)
436 cr->SetCanFly(true);
437 else
438 summons.Summon(cr);
439 }
uint32 GetEntry() const
Definition Object.h:117
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:16522

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.

332 {
333 RemoveEscortState(0x7); // all states
334 SetDespawnAtFar(false);
335 SetDespawnAtEnd(false);
336 ResetEvent();
337
340
341 if (pInstance)
342 {
345
347 {
350 door->SetGoState(GO_STATE_ACTIVE);
351 }
352
354 {
357 door->SetGoState(GO_STATE_ACTIVE);
358 }
359 }
360 }
@ GO_STATE_ACTIVE
Definition GameObjectData.h:708
@ 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:105
void RemoveEscortState(uint32 escortState)
Definition ScriptedEscortAI.h:111
void SetDespawnAtEnd(bool despawn)
Definition ScriptedEscortAI.h:104

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

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:2492
GOState GetGoState() const
Definition GameObject.h:204
void SendCustomAnim(uint32 anim)
Definition GameObject.cpp:2137
GameObject * GetGameObject(ObjectGuid const &guid)
Definition Map.cpp:2341
Map * GetMap() const
Definition Object.h:625
@ 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.

442 {
443 events.Update(diff);
444
445 if (uint32 eventId = events.ExecuteEvent())
446 {
447 switch (eventId)
448 {
450 {
451 SwitchHeadVisaul(0x1, true);
452 break;
453 }
455 {
456 SwitchHeadVisaul(0x2, true);
457 break;
458 }
460 {
461 SwitchHeadVisaul(0x4, true);
462 break;
463 }
464 case EVENT_KADDRAK_HEAD: // Phase 1
465 {
466 if (!canExecuteEvents)
467 return;
468 if (Creature* kaddrak = GetKaddrak())
469 {
470 if (Player* plr = SelectTargetFromPlayerList(100.0f))
471 kaddrak->CastSpell(plr, SPELL_GLARE_OF_THE_TRIBUNAL, true);
472 }
473
474 events.RescheduleEvent(EVENT_KADDRAK_SWITCH_EYE, 1s);
475 events.Repeat(1500ms);
476 break;
477 }
479 {
480 if (!canExecuteEvents)
481 return;
482 if (Creature* kaddrak = GetKaddrak())
483 {
484 if (leftEye)
485 kaddrak->UpdatePosition(927.9f, 330.9f, 219.4f, 2.4f, true);
486 else
487 kaddrak->UpdatePosition(923.7f, 326.9f, 219.5f, 2.1f, true);
488
489 leftEye = !leftEye;
490 kaddrak->StopMovingOnCurrentPos();
491 }
492
493 break;
494 }
495 case EVENT_MARNAK_HEAD: // Phase 2
496 {
497 if (!canExecuteEvents)
498 return;
499
500 if (Creature* marnak = GetMarnak())
501 {
502 if (Creature* cr = me->SummonCreature(NPC_DARK_MATTER_TARGET, 899.843f, 355.271f, 214.301f, 0, TEMPSUMMON_TIMED_DESPAWN, 10000))
503 {
504 cr->SetCanFly(true);
505
506 //right eye
507 if (Creature* cra = me->SummonCreature(NPC_DARK_MATTER, marnak->GetPositionX(), marnak->GetPositionY(), marnak->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 5000))
508 cra->CastSpell(cra, SPELL_DARK_MATTER_VISUAL_CHANNEL, false);
509
510 //left eye
511 if (Creature* crb = me->SummonCreature(NPC_DARK_MATTER, 891.543f, 359.5252f, 219.338f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 5000))
512 crb->CastSpell(crb, SPELL_DARK_MATTER_VISUAL_CHANNEL, false);
513
514 darkMatterTargetGUID = cr->GetGUID();
515
516 events.RescheduleEvent(EVENT_DARK_MATTER_START, 5s);
517 }
518 }
519 events.Repeat(30s);
520 break;
521 }
523 {
525 {
526 darkMatterTarget->CastSpell(darkMatterTarget, SPELL_DARK_MATTER_VISUAL, false);
527 if (Player* plr = SelectTargetFromPlayerList(100.0f))
528 {
529 if (!plr)
530 return; //no target
531
532 darkMatterTarget->GetMotionMaster()->MovePoint(0, plr->GetPositionX(), plr->GetPositionY(), plr->GetPositionZ());
533
534 if (darkMatterTarget->GetDistance(plr) < 5.0f)
535 {
536 events.RescheduleEvent(EVENT_DARK_MATTER_END, 3s);
537 }
538 else if (darkMatterTarget->GetDistance(plr) < 30.0f)
539 {
540 events.RescheduleEvent(EVENT_DARK_MATTER_END, 3500ms);
541 }
542 else
543 {
544 events.RescheduleEvent(EVENT_DARK_MATTER_END, 4500ms);
545 }
546 }
547 }
548 break;
549 }
551 {
553 {
554 darkMatterTarget->CastSpell(darkMatterTarget, SPELL_DARK_MATTER, true);
555 darkMatterTarget->DespawnOrUnsummon(500ms);
556 }
557 break;
558 }
559 case EVENT_ABEDNEUM_HEAD: // Phase 3
560 {
561 if (!canExecuteEvents)
562 return;
563 if (GetAbedneum())
564 {
565 Player* plr = SelectTargetFromPlayerList(100.0f);
566 if (!plr)
567 break;
568
570 {
571 // summon another abedneum to create double beam, despawn just after trigger despawn
572 me->SummonCreature(NPC_ABEDNEUM, 897.0f, 326.9f, 223.5f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 12000);
573 cr->CastSpell(cr, SPELL_SEARING_GAZE, true);
574 }
575 }
576 events.Repeat(15s);
577 break;
578 }
580 {
581 if (!canExecuteEvents)
582 return;
584 events.Repeat(IsHeroic() ? 23500ms : 32500ms);
585 break;
586 }
588 {
589 if (!canExecuteEvents)
590 return;
591
593 events.Repeat(IsHeroic() ? 32s : 41500ms);
594 break;
595 }
597 {
598 if (!canExecuteEvents)
599 return;
600
602 events.Repeat(IsHeroic() ? 32s : 45s);
603 break;
604 }
606 {
607 canExecuteEvents = false;
608 // Has to be here!
609 events.Reset();
610 //DespawnHeads();
612
613 // Spawn Chest and quest credit
614 if (Player* plr = SelectTargetFromPlayerList(200.0f))
615 {
616 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))
617 {
618 plr->RemoveGameObject(go, false);
619 go->SetLootMode(1);
620 go->ReplaceAllGameObjectFlags((GameObjectFlags)0);
621 }
622
624 }
625
626 events.ScheduleEvent(EVENT_BREEN_WAITING, 11s);
627 events.ScheduleEvent(EVENT_SKY_ROOM_FLOOR_CHANGE, 92s);
628 events.ScheduleEvent(EVENT_TALK_FACE_CHANGE, 97s); //kaddrak speaks
629 events.ScheduleEvent(EVENT_SKY_ROOM_FLOOR_CHANGE, 168s);
630 events.ScheduleEvent(EVENT_TALK_FACE_CHANGE, 173s); //marnak speaks
631 events.ScheduleEvent(EVENT_SKY_ROOM_FLOOR_CHANGE, 239s);
632 events.ScheduleEvent(EVENT_TALK_FACE_CHANGE, 244s); //abedneum speaks
633 events.ScheduleEvent(EVENT_GO_TO_SJONNIR, 251s);
634 events.ScheduleEvent(EVENT_SKY_ROOM_FLOOR_CHANGE, 253s);
635 break;
636 }
638 {
639 SetEscortPaused(false);
640 if (pInstance)
641 {
644 me->CastSpell(me, SPELL_TRIBUNAL_CREDIT_MARKER, true); // credit
645 }
646
649
650 break;
651 }
653 {
654 if (pInstance)
656 break;
657 }
659 {
660 if (pInstance)
662 break;
663 }
665 {
667 break;
668 }
669 case EVENT_DOOR_OPEN:
670 {
673
674 if (pInstance)
675 {
677 {
678 door->SetGoState(GO_STATE_ACTIVE);
681 }
682 }
683
684 break;
685 }
687 {
688 SetEscortPaused(false);
689 break;
690 }
692 {
694 break;
695 }
697 {
698 events.Reset();
699 SetEscortPaused(false);
701 break;
702 }
703 }
704 }
705
707
708 if (TalkEvent)
709 {
710 SpeechPause += diff;
712 {
713 Creature* cs = nullptr;
714 switch (Conversation[SpeechCount].creature)
715 {
716 case NPC_BRANN:
717 cs = me;
718 break;
719 case NPC_ABEDNEUM:
720 cs = GetAbedneum();
721 break;
722 case NPC_KADDRAK:
723 cs = GetKaddrak();
724 break;
725 case NPC_MARNAK:
726 cs = GetMarnak();
727 break;
728 }
729
730 if (cs)
731 {
734 }
735
736 if (SpeechCount < 38)
738 else
739 TalkEvent = false;
740 }
741 }
742 }
std::uint32_t uint32
Definition Define.h:107
@ SPECIAL
Definition InstanceScript.h:62
@ LANG_UNIVERSAL
Definition SharedDefines.h:723
GameObjectFlags
Definition SharedDefines.h:1608
@ MOVEMENTFLAG_NONE
Definition UnitDefines.h:371
@ 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:1084
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:6566
virtual void Yell(std::string_view text, Language language, WorldObject const *target=nullptr)
Definition Unit.cpp:17145
void AddUnitMovementFlag(uint32 f)
Definition Unit.h:772
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:1350
void PlayDirectSound(uint32 sound_id, Player *target=nullptr)
Definition Object.cpp:2957
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:2408
@ 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:383
Player * SelectTargetFromPlayerList(float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
Definition ScriptedCreature.cpp:591
uint32 timer
Definition brann_bronzebeard.cpp:96
void SummonCreatures(uint32 entry, uint8 count, uint8 pos)
Definition brann_bronzebeard.cpp:744
ObjectGuid darkMatterTargetGUID
Definition brann_bronzebeard.cpp:229
bool leftEye
Definition brann_bronzebeard.cpp:323
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() [1/2]

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

Implements npc_escortAI.

824{
825 switch (id)
826 {
827 // Stop before stairs and ask to start
828 case 14:
829 SetEscortPaused(true);
830 if (pInstance)
831 {
836 }
837 break;
838 // In front of Console
839 case 16:
840 SetEscortPaused(true);
841 if (pInstance)
842 {
846 tribunal->SetGoState(GO_STATE_ACTIVE);
847 }
848 break;
849 //Tribunal end, stand in the middle of the sky room
850 case 17:
851 SetEscortPaused(true);
853 me->SetOrientation(3.91672f);
855 break;
856 //Run to the skyroom door and then teleport before Sjonnir's door
857 case 18:
858 SetEscortPaused(true);
859 SetNextWaypoint(33, false);
860 if (pInstance)
861 {
864 me->SetOrientation(3.132660f);
865 DoCast(me, 58506, false);
867 me->SetHomePosition(1199.8f, 667.138f, 196.242f, 3.12967f);
868 me->Relocate(1199.8f, 667.138f, 196.242f, 3.12967f);
869 }
870 break;
871 // Before Sjonnir's door
872 case 33:
873 SetEscortPaused(true);
874 break;
875 //Walk to the door, run after opening it
876 case 34:
877 SetEscortPaused(true);
880 events.ScheduleEvent(EVENT_DOOR_OPEN, 1500ms);
881 me->SetWalk(false);
882 me->SetSpeed(MOVE_RUN, 1.0f, false);
883 events.ScheduleEvent(EVENT_RESUME_ESCORT, 3500ms);
884 break;
885 //Brann stops in front of Sjonnir and awaits the start of the battle.
886 case 36:
887 SetEscortPaused(true);
891 break;
892 //Brann steps back and uses the Sjonnir console.
893 case 38:
894 SetEscortPaused(true);
896 if (pInstance)
897 {
899 console->SetGoState(GO_STATE_ACTIVE);
900 }
901 break;
902 //After Sjonnir's death, Brann steps away from the console and talk.
903 case 39:
904 SetEscortPaused(true);
905 break;
906 //Brann steps back and uses the Sjonnir console.
907 case 40:
908 SetEscortPaused(true);
910 break;
911 }
912}
@ IN_PROGRESS
Definition InstanceScript.h:59
@ EMOTE_ONESHOT_CHEER
Definition SharedDefines.h:1904
@ EMOTE_STATE_USE_STANDING
Definition SharedDefines.h:1950
@ MOVE_RUN
Definition UnitDefines.h:357
void SetHomePosition(float x, float y, float z, float o)
Definition Creature.h:345
void HandleEmoteCommand(uint32 emoteId)
Definition Unit.cpp:2172
@ 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.

◆ WaypointReached() [2/2]

virtual void CreatureAI::WaypointReached ( uint32  ,
uint32   
)
inlinevirtual

Reimplemented from CreatureAI.

193{ }

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: