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

Public Member Functions

 brann_bronzebeardAI (Creature *c)
 
void DespawnHeads ()
 
void SwitchHeadVisaul (uint8 headMask, bool activate)
 
void ResetEvent ()
 
void WaypointReached (uint32 id) override
 
void InitializeEvent ()
 
CreatureGetAbedneum ()
 
CreatureGetMarnak ()
 
CreatureGetKaddrak ()
 
void DamageTaken (Unit *, uint32 &damage, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
void Reset () override
 
void DoAction (int32 action) override
 
void JustSummoned (Creature *cr) override
 
void UpdateEscortAI (uint32 diff) override
 
void SummonCreatures (uint32 entry, uint8 count, uint8 pos)
 
void JustDied (Unit *) override
 
- Public Member Functions inherited from npc_escortAI
 npc_escortAI (Creature *creature)
 
 ~npc_escortAI () override
 
void AttackStart (Unit *who) override
 
void MoveInLineOfSight (Unit *who) override
 
void JustDied (Unit *) override
 
void JustRespawned () override
 
void ReturnToLastPoint ()
 
void EnterEvadeMode (EvadeReason=EVADE_REASON_OTHER) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void MovementInform (uint32, uint32) override
 
void AddWaypoint (uint32 id, float x, float y, float z, uint32 waitTime=0)
 
bool SetNextWaypoint (uint32 pointId, float x, float y, float z, float orientation)
 
bool SetNextWaypoint (uint32 pointId, bool setPosition=true)
 
bool GetWaypointPosition (uint32 pointId, float &x, float &y, float &z)
 
void GenerateWaypointArray (Movement::PointsArray *points)
 
virtual void WaypointStart (uint32)
 
void Start (bool isActiveAttacker=true, ObjectGuid playerGUID=ObjectGuid::Empty, Quest const *quest=nullptr, bool instantRespawn=false, bool canLoopPath=false, bool resetWaypoints=true)
 
void SetEscortPaused (bool on)
 
bool HasEscortState (uint32 escortState)
 
bool IsEscorted () override
 
void SetMaxPlayerDistance (float newMax)
 
float GetMaxPlayerDistance ()
 
void SetDespawnAtEnd (bool despawn)
 
void SetDespawnAtFar (bool despawn)
 
bool GetAttack ()
 
void SetCanAttack (bool attack)
 
ObjectGuid GetEventStarterGUID ()
 
void AddEscortState (uint32 escortState)
 
void RemoveEscortState (uint32 escortState)
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
 ~ScriptedAI () override
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *) override
 
void JustSummoned (Creature *) override
 
void SummonedCreatureDespawn (Creature *) override
 
void SpellHit (Unit *, SpellInfo const *) override
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void MovementInform (uint32, uint32) override
 
void OnPossess (bool)
 
bool IsInRoom (const Position *pos, Axis axis, bool above)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoCastSpell (Unit *target, SpellInfo const *spellInfo, bool triggered=false)
 
void DoPlaySoundToSet (WorldObject *source, uint32 soundId)
 
void DoPlayMusic (uint32 soundId, bool zone)
 
void DoAddThreat (Unit *unit, float amount)
 
void DoModifyThreatByPercent (Unit *unit, int32 pct)
 
void DoResetThreat (Unit *unit)
 
void DoResetThreatList ()
 
float DoGetThreat (Unit *unit)
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 
void DoTeleportPlayer (Unit *unit, Position pos)
 
void DoTeleportAll (float x, float y, float z, float o)
 
UnitDoSelectLowestHpFriendly (float range, uint32 minHPDiff=1)
 
std::list< Creature * > DoFindFriendlyCC (float range)
 
std::list< Creature * > DoFindFriendlyMissingBuff (float range, uint32 spellId)
 
PlayerGetPlayerAtMinimumRange (float minRange)
 
CreatureDoSpawnCreature (uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime)
 
bool IsUniqueTimedEventDone (uint32 id) const
 
void SetUniqueTimedEventDone (uint32 id)
 
void ResetUniqueTimedEvent (uint32 id)
 
void ClearUniqueTimedEventsDone ()
 
void ScheduleTimedEvent (Milliseconds timerMin, Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0ms, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0ms, uint32 uniqueId=0)
 
void ScheduleUniqueTimedEvent (Milliseconds timer, std::function< void()> exec, uint32 uniqueId)
 
bool HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo const * SelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, uint32 powerCostMin, uint32 powerCostMax, float rangeMin, float rangeMax, SelectEffect effect)
 
void SetEquipmentSlots (bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
 
virtual bool CheckEvadeIfOutOfCombatArea () const
 
bool IsHeroic () const
 
Difficulty GetDifficulty () const
 
bool Is25ManRaid () const
 
template<class T >
const T & DUNGEON_MODE (const T &normal5, const T &heroic10) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25, const T &heroic10, const T &heroic25) const
 
PlayerSelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
 
void SetInvincibility (bool apply)
 
bool IsInvincible () const
 
void SetAutoAttackAllowed (bool allow)
 
bool IsAutoAttackAllowed () const
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0ms)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
WorldObjectGetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon.
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void OnSpellCastFinished (SpellInfo const *, SpellFinishReason)
 
virtual void AttackedBy (Unit *)
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed.
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ==================
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields =======================================
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false, bool checkZ=false) const
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
virtual void DistancingStarted ()
 
virtual void DistancingEnded ()
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void InitializeAI ()
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid const &, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the following:
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 Called when the unit enters combat.
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage to any victim (before damage apply)
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal.
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates.
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals.
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations.
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT)
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoAddAuraToAllHostilePlayers (uint32 spellid)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastSelf (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastToAllHostilePlayers (uint32 spellid, bool triggered=false)
 To specify the caster as target if the spell is self-cast.
 
SpellCastResult DoCastVictim (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastAOE (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastRandomTarget (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false, bool withTank=true)
 Cast the spell on a random unit from the threat list.
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the top threat target, which may not be the current victim.
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
void DoSpellAttackToRandomTargetIfReady (uint32 spell, uint32 threatTablePosition=0, float dist=0.f, bool playerOnly=true)
 
virtual void SummonMovementInform (Creature *, uint32, uint32)
 Called when a summon reaches a waypoint or point movement finished.
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelect (Player *, uint32, uint32)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestAccept (Player *, Quest const *)
 
virtual void sQuestSelect (Player *, Quest const *)
 
virtual void sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Public Attributes

InstanceScriptpInstance
 
EventMap events
 
SummonList summons
 
ObjectGuid AbedneumGUID
 
ObjectGuid MarnakGUID
 
ObjectGuid KaddrakGUID
 
ObjectGuid darkMatterTargetGUID
 
uint8 WaveNum
 
bool TalkEvent
 
uint32 SpeechCount
 
uint32 SpeechPause
 
bool canExecuteEvents = true
 
bool leftEye = true
 
- Public Attributes inherited from ScriptedAI
Creatureme
 

Additional Inherited Members

- Public Types inherited from ScriptedAI
enum class  Axis {
  AXIS_X ,
  AXIS_Y
}
 
- Public Types inherited from CreatureAI
enum  EvadeReason {
  EVADE_REASON_NO_HOSTILES ,
  EVADE_REASON_BOUNDARY ,
  EVADE_REASON_SEQUENCE_BREAK ,
  EVADE_REASON_NO_PATH ,
  EVADE_REASON_OTHER
}
 
- Static Public Member Functions inherited from CreatureAI
static bool IsInBounds (CreatureBoundary const &boundary, Position const *who)
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from npc_escortAI
PlayerGetPlayerForEscort ()
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
bool UpdateVictimWithGaze ()
 
void SetGazeOn (Unit *target)
 
CreatureDoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
TaskScheduler scheduler
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ brann_bronzebeardAI()

brann_bronzebeard::brann_bronzebeardAI::brann_bronzebeardAI ( Creature c)
inline
239 : npc_escortAI(c), summons(me)
240 {
242 }
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1221
Creature * me
Definition ScriptedCreature.h:280
SummonList summons
Definition brann_bronzebeard.cpp:246
InstanceScript * pInstance
Definition brann_bronzebeard.cpp:244
Definition ScriptedEscortAI.h:53

References WorldObject::GetInstanceScript(), and pInstance.

Member Function Documentation

◆ DamageTaken()

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

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

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

Reimplemented from UnitAI.

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

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

◆ DespawnHeads()

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

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

Referenced by ResetEvent().

◆ DoAction()

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

Reimplemented from UnitAI.

384 {
385 switch (action)
386 {
388 Start(false, ObjectGuid::Empty, 0, true, false);
393 break;
395 {
397 Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
398 if (!PlayerList.IsEmpty())
399 for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
400 {
401 me->SetFaction(i->GetSource()->GetFaction());
402 break;
403 }
404
405 SetEscortPaused(false);
408 break;
409 }
411 SetNextWaypoint(1, false);
412 SetEscortPaused(false);
413 ResetEvent();
415 break;
421 SetEscortPaused(false);
422 ResetEvent();
424 DoCast(me, 58506, false);
427 break;
430 SetEscortPaused(false);
431 break;
433 if (pInstance)
435 SetEscortPaused(false);
438 me->SetOrientation(3.132660f);
440 events.ScheduleEvent(EVENT_SJONNIR_END_BRANN_YELL, 10s);
441 events.ScheduleEvent(EVENT_SJONNIR_END_BRANN_LAST_YELL, 22s);
442 break;
444 Reset();
445 SetNextWaypoint(33, true);
448 DoCast(me, 58506, false);
450 door->SetGoState(GO_STATE_READY);
451 break;
452 case ACTION_OPEN_DOOR:
453 Start(false, ObjectGuid::Empty, 0, true, false);
454 SetNextWaypoint(34, false);
455 SetEscortPaused(false);
456 me->RemoveAura(58506);
458 me->SetWalk(true);
459 me->SetSpeed(MOVE_WALK, 1.0f);
460 break;
461 }
462 }
@ GO_STATE_READY
Definition GameObjectData.h:692
@ EMOTE_STATE_STAND
Definition SharedDefines.h:1929
@ EMOTE_STATE_READY_UNARMED
Definition SharedDefines.h:1930
@ FACTION_ESCORTEE_N_NEUTRAL_PASSIVE
Definition SharedDefines.h:222
@ FACTION_FRIENDLY
Definition SharedDefines.h:212
@ 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:550
@ REACT_AGGRESSIVE
Definition Unit.h:552
@ UNIT_NPC_EMOTESTATE
Definition UpdateFields.h:140
events
Definition boss_sartura.cpp:43
@ EVENT_SJONNIR_END_BRANN_YELL
Definition brann_bronzebeard.cpp:109
@ EVENT_SJONNIR_END_BRANN_LAST_YELL
Definition brann_bronzebeard.cpp:110
void SetRegeneratingHealth(bool enable)
Definition Creature.h:321
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:99
bool SetWalk(bool enable) override
Enable or disable the creature's walk mode by removing: MOVEMENTFLAG_WALKING. Infom also the client.
Definition Creature.cpp:3222
Definition GameObject.h:120
ObjectGuid GetGuidData(uint32 type) const override
Definition InstanceScript.cpp:110
Definition LinkedList.h:139
bool IsEmpty() const
Definition LinkedList.h:97
Definition MapRefMgr.h:26
iterator begin()
Definition MapRefMgr.h:36
iterator end()
Definition MapRefMgr.h:37
PlayerList const & GetPlayers() const
Definition Map.h:326
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:4844
void SetFaction(uint32 faction)
Definition Unit.cpp:10107
void SendMovementFlagUpdate(bool self=false)
Definition Unit.cpp:16714
void StopMovingOnCurrentPos()
Definition Unit.cpp:16699
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
Definition Unit.cpp:14517
void SetUInt32Value(uint16 index, uint32 value)
Definition Unit.cpp:21198
void ReplaceAllNpcFlags(NPCFlags flags)
Definition Unit.h:751
Map * GetMap() const
Definition Object.h:621
@ BRANN_BRONZEBEARD
Definition halls_of_stone.h:50
@ ACTION_OPEN_DOOR
Definition halls_of_stone.h:86
@ ACTION_START_SJONNIR_FIGHT
Definition halls_of_stone.h:87
@ ACTION_START_ESCORT_EVENT
Definition halls_of_stone.h:82
@ ACTION_SJONNIR_WIPE_START
Definition halls_of_stone.h:89
@ ACTION_START_TRIBUNAL
Definition halls_of_stone.h:83
@ ACTION_GO_TO_SJONNIR
Definition halls_of_stone.h:85
@ ACTION_TRIBUNAL_WIPE_START
Definition halls_of_stone.h:84
@ ACTION_SJONNIR_DEAD
Definition halls_of_stone.h:88
@ GO_SJONNIR_DOOR
Definition halls_of_stone.h:67
@ SAY_BRANN_ESCORT_START
Definition halls_of_stone.h:33
@ SAY_BRANN_ENTRANCE_MEET
Definition halls_of_stone.h:41
Talk
Definition hyjal.cpp:82
GameObject * GetGameObject(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:184
void SetOrientation(float orientation)
Definition Position.h:116
void Reset() override
Definition brann_bronzebeard.cpp:351
void ResetEvent()
Definition brann_bronzebeard.cpp:318
void InitializeEvent()
Definition brann_bronzebeard.cpp:827
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, MapRefMgr::begin(), BRANN_BRONZEBEARD, UnitAI::DoCast(), EMOTE_STATE_READY_UNARMED, EMOTE_STATE_STAND, ObjectGuid::Empty, MapRefMgr::end(), EVENT_SJONNIR_END_BRANN_LAST_YELL, EVENT_SJONNIR_END_BRANN_YELL, FACTION_ESCORTEE_N_NEUTRAL_PASSIVE, FACTION_FRIENDLY, ObjectAccessor::GetGameObject(), InstanceScript::GetGuidData(), WorldObject::GetMap(), Map::GetPlayers(), GO_SJONNIR_DOOR, GO_STATE_READY, InitializeEvent(), LinkedListHead::IsEmpty(), 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::SetFaction(), npc_escortAI::SetNextWaypoint(), Position::SetOrientation(), Creature::SetReactState(), Creature::SetRegeneratingHealth(), Unit::SetSpeed(), Unit::SetUInt32Value(), Creature::SetWalk(), npc_escortAI::Start(), Unit::StopMovingOnCurrentPos(), UNIT_NPC_EMOTESTATE, UNIT_NPC_FLAG_GOSSIP, UNIT_NPC_FLAG_NONE, and UNIT_NPC_FLAG_QUESTGIVER.

◆ GetAbedneum()

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

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

Referenced by DespawnHeads(), and UpdateEscortAI().

◆ GetKaddrak()

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

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

Referenced by DespawnHeads(), and UpdateEscortAI().

◆ GetMarnak()

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

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

Referenced by DespawnHeads(), and UpdateEscortAI().

◆ InitializeEvent()

void brann_bronzebeard::brann_bronzebeardAI::InitializeEvent ( )
828{
829 Creature* cr = nullptr;
830 if ((cr = me->SummonCreature(NPC_KADDRAK, 923.7f, 326.9f, 219.5f, 2.1f, TEMPSUMMON_TIMED_DESPAWN, 580000)))
831 {
832 KaddrakGUID = cr->GetGUID();
833 }
834 if ((cr = me->SummonCreature(NPC_MARNAK, 895.974f, 363.571f, 219.337f, 5.5f, TEMPSUMMON_TIMED_DESPAWN, 580000)))
835 {
836 MarnakGUID = cr->GetGUID();
837 }
838 if ((cr = me->SummonCreature(NPC_ABEDNEUM, 892.25f, 331.25f, 223.86f, 0.6f, TEMPSUMMON_TIMED_DESPAWN, 580000)))
839 {
840 AbedneumGUID = cr->GetGUID();
841 }
842
843 TalkEvent = true;
844
845 events.Reset();
846
847 // Viusals
848 events.ScheduleEvent(EVENT_KADDRAK_VISUAL, 30s);
849 events.ScheduleEvent(EVENT_MARNAK_VISUAL, 105s);
850 events.ScheduleEvent(EVENT_ABEDNEUM_VISUAL, 207s);
851
852 events.ScheduleEvent(EVENT_SUMMON_MONSTERS, 52s);
853 events.ScheduleEvent(EVENT_SUMMON_STORMCALLER, 122s);
854 events.ScheduleEvent(EVENT_SUMMON_CUSTODIAN, 228s);
855 events.ScheduleEvent(EVENT_KADDRAK_HEAD, 47s);
856 events.ScheduleEvent(EVENT_MARNAK_HEAD, 115s);
857 events.ScheduleEvent(EVENT_ABEDNEUM_HEAD, 217s);
858 events.ScheduleEvent(EVENT_TRIBUNAL_END, 310s);
859}
@ TEMPSUMMON_TIMED_DESPAWN
Definition Object.h:50
@ EVENT_MARNAK_VISUAL
Definition brann_bronzebeard.cpp:77
@ EVENT_ABEDNEUM_VISUAL
Definition brann_bronzebeard.cpp:75
@ EVENT_ABEDNEUM_HEAD
Definition brann_bronzebeard.cpp:78
@ EVENT_SUMMON_STORMCALLER
Definition brann_bronzebeard.cpp:83
@ EVENT_TRIBUNAL_END
Definition brann_bronzebeard.cpp:100
@ EVENT_SUMMON_MONSTERS
Definition brann_bronzebeard.cpp:82
@ EVENT_KADDRAK_VISUAL
Definition brann_bronzebeard.cpp:76
@ EVENT_MARNAK_HEAD
Definition brann_bronzebeard.cpp:80
@ EVENT_KADDRAK_HEAD
Definition brann_bronzebeard.cpp:79
@ EVENT_SUMMON_CUSTODIAN
Definition brann_bronzebeard.cpp:84
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:113
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition Object.cpp:2359
@ NPC_KADDRAK
Definition halls_of_stone.h:76
@ NPC_MARNAK
Definition halls_of_stone.h:77
@ NPC_ABEDNEUM
Definition halls_of_stone.h:78
bool TalkEvent
Definition brann_bronzebeard.cpp:254

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

Referenced by DoAction().

◆ JustDied()

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

Reimplemented from CreatureAI.

801 {
802 ResetEvent();
803 if (pInstance)
804 {
806 {
807 brann->HandleEmoteCommand(EMOTE_STATE_DEAD);
808 brann->setDeathState(DeathState::JustDied);
809 brann->Respawn();
811 {
812 brann->AI()->DoAction(ACTION_TRIBUNAL_WIPE_START);
814 }
816 {
817 brann->AI()->DoAction(ACTION_SJONNIR_WIPE_START);
818 }
819 }
822 }
823 }
@ 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.

465 {
466 if (cr->GetEntry() == NPC_ABEDNEUM || cr->GetEntry() == NPC_KADDRAK || cr->GetEntry() == NPC_MARNAK)
467 cr->SetCanFly(true);
468 else
469 summons.Summon(cr);
470 }
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:20391

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

◆ Reset()

void brann_bronzebeard::brann_bronzebeardAI::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

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

References BOSS_SJONNIR, BOSS_TRIBUNAL_OF_AGES, BRANN_BRONZEBEARD, DATA_BRANN_ACHIEVEMENT, DONE, FACTION_FRIENDLY, 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(), Unit::SetFaction(), Creature::SetReactState(), UNIT_NPC_FLAG_GOSSIP, and UNIT_NPC_FLAG_QUESTGIVER.

Referenced by DoAction().

◆ ResetEvent()

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

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

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

◆ SummonCreatures()

void brann_bronzebeard::brann_bronzebeardAI::SummonCreatures ( uint32  entry,
uint8  count,
uint8  pos 
)
inline
782 {
783 Creature* cr;
784 for (int i = 0; i < count; ++i)
785 {
786 if (pos == 0)
787 cr = me->SummonCreature(entry, 943.088f + urand(0, 5), 401.378f + urand(0, 5), 206.078f, 3.8f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000); //left
788 else
789 cr = me->SummonCreature(entry, 964.302f + urand(0, 4), 378.942f + urand(0, 4), 206.078f, 3.85f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000); //right
790
791 if (cr)
792 {
793 cr->AI()->AttackStart(me);
794 cr->AddThreat(me, 100.0f);
796 }
797 }
798 }
@ 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:2829
CreatureAI * AI() const
Definition Creature.h:145
virtual void AttackStart(Unit *)
Definition UnitAI.cpp:27
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=nullptr)
Definition Unit.cpp:14682

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

Referenced by UpdateEscortAI().

◆ SwitchHeadVisaul()

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

473 {
474 events.Update(diff);
475
476 if (uint32 eventId = events.ExecuteEvent())
477 {
478 switch (eventId)
479 {
481 {
482 SwitchHeadVisaul(0x1, true);
483 break;
484 }
486 {
487 SwitchHeadVisaul(0x2, true);
488 break;
489 }
491 {
492 SwitchHeadVisaul(0x4, true);
493 break;
494 }
495 case EVENT_KADDRAK_HEAD: // Phase 1
496 {
497 if (!canExecuteEvents)
498 return;
499 if (Creature* kaddrak = GetKaddrak())
500 {
501 if (Player* plr = SelectTargetFromPlayerList(100.0f))
502 kaddrak->CastSpell(plr, SPELL_GLARE_OF_THE_TRIBUNAL, true);
503 }
504
505 events.RescheduleEvent(EVENT_KADDRAK_SWITCH_EYE, 1s);
506 events.Repeat(1500ms);
507 break;
508 }
510 {
511 if (!canExecuteEvents)
512 return;
513 if (Creature* kaddrak = GetKaddrak())
514 {
515 if (leftEye)
516 kaddrak->UpdatePosition(927.9f, 330.9f, 219.4f, 2.4f, true);
517 else
518 kaddrak->UpdatePosition(923.7f, 326.9f, 219.5f, 2.1f, true);
519
520 leftEye = !leftEye;
521 kaddrak->StopMovingOnCurrentPos();
522 }
523
524 break;
525 }
526 case EVENT_MARNAK_HEAD: // Phase 2
527 {
528 if (!canExecuteEvents)
529 return;
530
531 if (Creature* marnak = GetMarnak())
532 {
533 if (Creature* cr = me->SummonCreature(NPC_DARK_MATTER_TARGET, 899.843f, 355.271f, 214.301f, 0, TEMPSUMMON_TIMED_DESPAWN, 10000))
534 {
535 cr->SetCanFly(true);
536
537 //right eye
538 if (Creature* cra = me->SummonCreature(NPC_DARK_MATTER, marnak->GetPositionX(), marnak->GetPositionY(), marnak->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 5000))
539 cra->CastSpell(cra, SPELL_DARK_MATTER_VISUAL_CHANNEL, false);
540
541 //left eye
542 if (Creature* crb = me->SummonCreature(NPC_DARK_MATTER, 891.543f, 359.5252f, 219.338f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 5000))
543 crb->CastSpell(crb, SPELL_DARK_MATTER_VISUAL_CHANNEL, false);
544
545 darkMatterTargetGUID = cr->GetGUID();
546
547 events.RescheduleEvent(EVENT_DARK_MATTER_START, 5s);
548 }
549 }
550 events.Repeat(30s);
551 break;
552 }
554 {
556 {
557 darkMatterTarget->CastSpell(darkMatterTarget, SPELL_DARK_MATTER_VISUAL, false);
558 if (Player* plr = SelectTargetFromPlayerList(100.0f))
559 {
560 if (!plr)
561 return; //no target
562
563 float speed = 10.0f;
564 float tooFarAwaySpeed = me->GetDistance(plr->GetPositionX(), plr->GetPositionY(), plr->GetPositionZ()) / (5000.0f * 0.001f);
565 if (speed < tooFarAwaySpeed)
566 speed = tooFarAwaySpeed;
567
568 darkMatterTarget->GetMotionMaster()->MovePoint(0, plr->GetPositionX(), plr->GetPositionY(), plr->GetPositionZ(), FORCED_MOVEMENT_NONE, speed);
569
570 if (darkMatterTarget->GetDistance(plr) < 15.0f)
571 {
572 events.RescheduleEvent(EVENT_DARK_MATTER_END, 3s);
573 }
574 else if (darkMatterTarget->GetDistance(plr) < 30.0f)
575 {
576 events.RescheduleEvent(EVENT_DARK_MATTER_END, 3500ms);
577 }
578 else
579 {
580 events.RescheduleEvent(EVENT_DARK_MATTER_END, 4500ms);
581 }
582 }
583 }
584 break;
585 }
587 {
589 {
590 darkMatterTarget->CastSpell(darkMatterTarget, SPELL_DARK_MATTER, true);
591 darkMatterTarget->DespawnOrUnsummon(500ms);
592 }
593 break;
594 }
595 case EVENT_ABEDNEUM_HEAD: // Phase 3
596 {
597 if (!canExecuteEvents)
598 return;
599 if (GetAbedneum())
600 {
601 Player* plr = SelectTargetFromPlayerList(100.0f);
602 if (!plr)
603 break;
604
606 {
607 // summon another abedneum to create double beam, despawn just after trigger despawn
608 me->SummonCreature(NPC_ABEDNEUM, 897.0f, 326.9f, 223.5f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 12000);
609 cr->CastSpell(cr, SPELL_SEARING_GAZE, true);
610 }
611 }
612 events.Repeat(15s);
613 break;
614 }
616 {
617 if (!canExecuteEvents)
618 return;
620 events.Repeat(IsHeroic() ? 23500ms : 32500ms);
621 break;
622 }
624 {
625 if (!canExecuteEvents)
626 return;
627
629 events.Repeat(IsHeroic() ? 32s : 41500ms);
630 break;
631 }
633 {
634 if (!canExecuteEvents)
635 return;
636
638 events.Repeat(IsHeroic() ? 32s : 45s);
639 break;
640 }
642 {
643 canExecuteEvents = false;
644 // Has to be here!
645 events.Reset();
646 //DespawnHeads();
648
649 // Spawn Chest and quest credit
650 if (Player* plr = SelectTargetFromPlayerList(200.0f))
651 {
652 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))
653 {
654 plr->RemoveGameObject(go, false);
655 go->SetLootMode(1);
656 go->ReplaceAllGameObjectFlags((GameObjectFlags)0);
657 }
658
660 }
661
662 events.ScheduleEvent(EVENT_BREEN_WAITING, 11s);
663 events.ScheduleEvent(EVENT_SKY_ROOM_FLOOR_CHANGE, 92s);
664 events.ScheduleEvent(EVENT_TALK_FACE_CHANGE, 97s); //kaddrak speaks
665 events.ScheduleEvent(EVENT_SKY_ROOM_FLOOR_CHANGE, 168s);
666 events.ScheduleEvent(EVENT_TALK_FACE_CHANGE, 173s); //marnak speaks
667 events.ScheduleEvent(EVENT_SKY_ROOM_FLOOR_CHANGE, 239s);
668 events.ScheduleEvent(EVENT_TALK_FACE_CHANGE, 244s); //abedneum speaks
669 events.ScheduleEvent(EVENT_GO_TO_SJONNIR, 251s);
670 events.ScheduleEvent(EVENT_SKY_ROOM_FLOOR_CHANGE, 253s);
671 break;
672 }
674 {
675 SetEscortPaused(false);
676 if (pInstance)
677 {
680 me->CastSpell(me, 59046, true); // credit
681 }
682
686
687 break;
688 }
690 {
691 if (pInstance)
693 break;
694 }
696 {
697 if (pInstance)
699 break;
700 }
702 {
704 break;
705 }
706 case EVENT_DOOR_OPEN:
707 {
710
711 if (pInstance)
712 {
714 {
715 door->SetGoState(GO_STATE_ACTIVE);
718 }
719 }
720
721 break;
722 }
724 {
725 SetEscortPaused(false);
726 break;
727 }
729 {
731 break;
732 }
734 {
735 events.Reset();
736 SetEscortPaused(false);
738 break;
739 }
740 }
741 }
742
744
745 if (TalkEvent)
746 {
747 SpeechPause += diff;
749 {
750 Creature* cs = nullptr;
751 switch (Conversation[SpeechCount].creature)
752 {
753 case NPC_BRANN:
754 cs = me;
755 break;
756 case NPC_ABEDNEUM:
757 cs = GetAbedneum();
758 break;
759 case NPC_KADDRAK:
760 cs = GetKaddrak();
761 break;
762 case NPC_MARNAK:
763 cs = GetMarnak();
764 break;
765 }
766
767 if (cs)
768 {
771 }
772
773 if (SpeechCount < 38)
775 else
776 TalkEvent = false;
777 }
778 }
779 }
std::uint32_t uint32
Definition Define.h:107
@ SPECIAL
Definition InstanceScript.h:62
@ FORCED_MOVEMENT_NONE
Definition MotionMaster.h:85
@ LANG_UNIVERSAL
Definition SharedDefines.h:746
GameObjectFlags
Definition SharedDefines.h:1613
@ MOVEMENTFLAG_NONE
Definition UnitDefines.h:368
@ SPELL_SEARING_GAZE
Definition brann_bronzebeard.cpp:54
@ QUEST_HALLS_OF_STONE
Definition brann_bronzebeard.cpp:69
@ SPELL_DARK_MATTER
Definition brann_bronzebeard.cpp:53
@ SPELL_DARK_MATTER_VISUAL_CHANNEL
Definition brann_bronzebeard.cpp:52
@ SPELL_GLARE_OF_THE_TRIBUNAL
Definition brann_bronzebeard.cpp:50
@ SPELL_DARK_MATTER_VISUAL
Definition brann_bronzebeard.cpp:51
@ NPC_DARK_RUNE_STORMCALLER
Definition brann_bronzebeard.cpp:40
@ NPC_SEARING_GAZE_TRIGGER
Definition brann_bronzebeard.cpp:44
@ NPC_DARK_MATTER_TARGET
Definition brann_bronzebeard.cpp:43
@ NPC_DARK_MATTER
Definition brann_bronzebeard.cpp:42
@ NPC_IRON_GOLEM_CUSTODIAN
Definition brann_bronzebeard.cpp:41
@ NPC_DARK_RUNE_PROTECTOR
Definition brann_bronzebeard.cpp:39
@ EVENT_BREEN_WAITING
Definition brann_bronzebeard.cpp:101
@ EVENT_DARK_MATTER_START
Definition brann_bronzebeard.cpp:85
@ EVENT_SKY_ROOM_FLOOR_CHANGE
Definition brann_bronzebeard.cpp:103
@ EVENT_TALK_FACE_CHANGE
Definition brann_bronzebeard.cpp:102
@ EVENT_KADDRAK_SWITCH_EYE
Definition brann_bronzebeard.cpp:81
@ EVENT_GO_TO_SJONNIR
Definition brann_bronzebeard.cpp:106
@ EVENT_DARK_MATTER_END
Definition brann_bronzebeard.cpp:86
@ EVENT_RESUME_ESCORT
Definition brann_bronzebeard.cpp:108
@ EVENT_DOOR_OPEN
Definition brann_bronzebeard.cpp:107
static Yells Conversation[]
Definition brann_bronzebeard.cpp:120
Definition Player.h:1071
void GroupEventHappens(uint32 questId, WorldObject const *pEventObject)
Definition PlayerQuest.cpp:1818
virtual void DoAction(int32)
Definition UnitAI.h:217
void RemoveGameObject(GameObject *gameObj, bool del)
Definition Unit.cpp:6296
virtual void Yell(std::string_view text, Language language, WorldObject const *target=nullptr)
Definition Unit.cpp:21020
void AddUnitMovementFlag(uint32 f)
Definition Unit.h:757
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:2908
float GetDistance(WorldObject const *obj) const
Definition Object.cpp:1278
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:2373
@ 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:379
Player * SelectTargetFromPlayerList(float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
Definition ScriptedCreature.cpp:563
uint32 timer
Definition brann_bronzebeard.cpp:117
void SummonCreatures(uint32 entry, uint8 count, uint8 pos)
Definition brann_bronzebeard.cpp:781
ObjectGuid darkMatterTargetGUID
Definition brann_bronzebeard.cpp:250
bool leftEye
Definition brann_bronzebeard.cpp:343
bool canExecuteEvents
Definition brann_bronzebeard.cpp:256
virtual void UpdateEscortAI(uint32 diff)
Definition ScriptedEscortAI.cpp:309

References ACTION_GO_TO_SJONNIR, Unit::AddUnitMovementFlag(), Creature::AI(), BOSS_TRIBUNAL_OF_AGES, BRANN_BRONZEBEARD, canExecuteEvents, Unit::CastSpell(), Conversation, darkMatterTargetGUID, SummonList::DespawnAll(), UnitAI::DoAction(), DONE, EMOTE_STATE_READY_UNARMED, EMOTE_STATE_STAND, EVENT_ABEDNEUM_HEAD, EVENT_ABEDNEUM_VISUAL, EVENT_BREEN_WAITING, EVENT_DARK_MATTER_END, EVENT_DARK_MATTER_START, EVENT_DOOR_OPEN, EVENT_GO_TO_SJONNIR, EVENT_KADDRAK_HEAD, EVENT_KADDRAK_SWITCH_EYE, EVENT_KADDRAK_VISUAL, EVENT_MARNAK_HEAD, EVENT_MARNAK_VISUAL, EVENT_RESUME_ESCORT, EVENT_SJONNIR_END_BRANN_LAST_YELL, EVENT_SJONNIR_END_BRANN_YELL, EVENT_SKY_ROOM_FLOOR_CHANGE, EVENT_SUMMON_CUSTODIAN, EVENT_SUMMON_MONSTERS, EVENT_SUMMON_STORMCALLER, EVENT_TALK_FACE_CHANGE, EVENT_TRIBUNAL_END, FORCED_MOVEMENT_NONE, GetAbedneum(), ObjectAccessor::GetCreature(), WorldObject::GetDistance(), ObjectAccessor::GetGameObject(), InstanceScript::GetGuidData(), GetKaddrak(), GetMarnak(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), GO_SJONNIR_DOOR, GO_STATE_ACTIVE, GO_TRIBUNAL_CHEST, GO_TRIBUNAL_CHEST_H, ScriptedAI::IsHeroic(), LANG_UNIVERSAL, leftEye, ScriptedAI::me, MOVEMENTFLAG_NONE, NPC_ABEDNEUM, NPC_BRANN, NPC_DARK_MATTER, NPC_DARK_MATTER_TARGET, NPC_DARK_RUNE_PROTECTOR, NPC_DARK_RUNE_STORMCALLER, NPC_IRON_GOLEM_CUSTODIAN, NPC_KADDRAK, NPC_MARNAK, NPC_SEARING_GAZE_TRIGGER, pInstance, WorldObject::PlayDirectSound(), QUEST_HALLS_OF_STONE, Unit::ReplaceAllNpcFlags(), SAY_BRANN_VICTORY_SJONNIR_1, SAY_BRANN_VICTORY_SJONNIR_2, ScriptedAI::SelectTargetFromPlayerList(), Unit::SendMovementFlagUpdate(), ZoneScript::SetData(), npc_escortAI::SetEscortPaused(), Unit::SetUInt32Value(), SPECIAL, SpeechCount, SpeechPause, SPELL_DARK_MATTER, SPELL_DARK_MATTER_VISUAL, SPELL_DARK_MATTER_VISUAL_CHANNEL, SPELL_GLARE_OF_THE_TRIBUNAL, SPELL_SEARING_GAZE, WorldObject::SummonCreature(), SummonCreatures(), WorldObject::SummonGameObject(), summons, SwitchHeadVisaul(), TalkEvent, TEMPSUMMON_TIMED_DESPAWN, Yells::timer, UNIT_NPC_EMOTESTATE, UNIT_NPC_FLAG_GOSSIP, UNIT_NPC_FLAG_NONE, UNIT_NPC_FLAG_QUESTGIVER, npc_escortAI::UpdateEscortAI(), and Unit::Yell().

◆ WaypointReached()

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

Implements npc_escortAI.

862{
863 switch (id)
864 {
865 // Stop before stairs and ask to start
866 case 14:
867 SetEscortPaused(true);
868 if (pInstance)
869 {
874 }
875 break;
876 // In front of Console
877 case 16:
878 SetEscortPaused(true);
879 if (pInstance)
880 {
884 tribunal->SetGoState(GO_STATE_ACTIVE);
885 }
886 break;
887 //Tribunal end, stand in the middle of the sky room
888 case 17:
889 SetEscortPaused(true);
890 me->SetOrientation(3.91672f);
892 break;
893 //Run to the skyroom door and then teleport before Sjonnir's door
894 case 18:
895 SetEscortPaused(true);
896 SetNextWaypoint(33, false);
897 if (pInstance)
898 {
902 cr->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
903 me->SetOrientation(3.132660f);
904 DoCast(me, 58506, false);
906 me->SetHomePosition(1199.8f, 667.138f, 196.242f, 3.12967f);
907 me->Relocate(1199.8f, 667.138f, 196.242f, 3.12967f);
908 }
909 break;
910 // Before Sjonnir's door
911 case 33:
912 SetEscortPaused(true);
913 break;
914 //Walk to the door, run after opening it
915 case 34:
916 SetEscortPaused(true);
919 events.ScheduleEvent(EVENT_DOOR_OPEN, 1500ms);
920 me->SetWalk(false);
921 me->SetSpeed(MOVE_RUN, 1.0f, false);
922 events.ScheduleEvent(EVENT_RESUME_ESCORT, 3500ms);
923 break;
924 //Brann stops in front of Sjonnir and awaits the start of the battle.
925 case 36:
926 SetEscortPaused(true);
930 break;
931 //Brann steps back and uses the Sjonnir console.
932 case 38:
933 SetEscortPaused(true);
935 if (pInstance)
936 {
938 console->SetGoState(GO_STATE_ACTIVE);
939 }
940 break;
941 //After Sjonnir's death, Brann steps away from the console and talk.
942 case 39:
943 SetEscortPaused(true);
944 break;
945 //Brann steps back and uses the Sjonnir console.
946 case 40:
947 SetEscortPaused(true);
949 break;
950 }
951}
@ 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
@ UNIT_FLAG_NOT_SELECTABLE
Definition UnitDefines.h:279
void SetHomePosition(float x, float y, float z, float o)
Definition Creature.h:339
void HandleEmoteCommand(uint32 emoteId)
Definition Unit.cpp:2035
@ NPC_SJONNIR
Definition halls_of_stone.h:79
@ 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::GetCreature(), ObjectAccessor::GetGameObject(), GO_SJONNIR_CONSOLE, GO_STATE_ACTIVE, GO_TRIBUNAL_CONSOLE, IN_PROGRESS, MOVE_RUN, NPC_SJONNIR, SAY_BRANN_EVENT_INTRO_1, SAY_BRANN_FRONT_OF_SJONNIR, UNIT_FLAG_NOT_SELECTABLE, UNIT_NPC_EMOTESTATE, UNIT_NPC_FLAG_GOSSIP, and UNIT_NPC_FLAG_QUESTGIVER.

Member Data Documentation

◆ AbedneumGUID

ObjectGuid brann_bronzebeard::brann_bronzebeardAI::AbedneumGUID

Referenced by GetAbedneum(), and InitializeEvent().

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