AzeorthCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI Struct Reference
Inheritance diagram for npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI:
ScriptedAI CreatureAI UnitAI

Public Member Functions

 npc_muradin_bronzebeard_igbAI (Creature *creature)
 
void sGossipSelect (Player *, uint32, uint32) override
 
void EnterCombat (Unit *) override
 
void EnterEvadeMode (EvadeReason) override
 
void DoAction (int32 action) override
 
void SetData (uint32 type, uint32 data) override
 
void DamageTaken (Unit *, uint32 &damage, DamageEffectType, SpellSchoolMask) override
 
void UpdateAI (uint32 diff) override
 
void AttackStart (Unit *victim) override
 
bool CanAIAttack (Unit const *target) const override
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
 ~ScriptedAI () override
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask) override
 
void UpdateAI (uint32 diff) override
 
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 EnterCombat (Unit *) override
 
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)
 Cast Spell. More...
 
void DoPlaySoundToSet (WorldObject *source, uint32 soundId)
 Play sound. More...
 
void DoPlayMusic (uint32 soundId, bool zone)
 
void DoResetThreat ()
 Reset Threat. More...
 
float DoGetThreat (Unit *unit)
 
void DoModifyThreatPercent (Unit *unit, int32 pct)
 Modify Unit Threat. More...
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 Teleport player. More...
 
void DoTeleportAll (float x, float y, float z, float o)
 Teleport all. More...
 
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 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)
 
void SetCombatMovement (bool allowMovement)
 Set Combat Movement. More...
 
bool IsCombatMovementAllowed () const
 
virtual bool CheckEvadeIfOutOfCombatArea () const
 
bool IsHeroic () const
 
Difficulty GetDifficulty () const
 
bool Is25ManRaid () const
 
template<class T >
const T & DUNGEON_MODE (const T &normal5, const T &heroic10) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25, const T &heroic10, const T &heroic25) const
 
PlayerSelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr)
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void EnterCombat (Unit *)
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (Unit *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ================== More...
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields ======================================= More...
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void AttackStart (Unit *)
 
virtual void UpdateAI (uint32)=0
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, float dist=0.0f, bool playerOnly=false, int32 aura=0)
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, PREDICATE const &predicate, uint32 maxTargets, SelectTargetMethod targetType)
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void HealDone (Unit *, uint32 &)
 
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)
 
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)
 
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)
 
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
 

Private Attributes

EventMap _events
 
PassengerController _controller
 
InstanceScript_instance
 
time_t _firstMageCooldown
 
time_t _riflemanYellCooldown
 
time_t _mortarYellCooldown
 
uint16 checkTimer
 

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 ()
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
bool IsFleeing
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
bool UpdateVictimWithGaze ()
 
void SetGazeOn (Unit *target)
 
CreatureDoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ npc_muradin_bronzebeard_igbAI()

npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::npc_muradin_bronzebeard_igbAI ( Creature creature)
inline
1082 : ScriptedAI(creature), _instance(creature->GetInstanceScript())
1083 {
1084 _events.Reset();
1086 me->SetRegeneratingHealth(false);
1087 me->m_CombatDistance = 70.0f;
1089 _riflemanYellCooldown = time_t(0);
1090 _mortarYellCooldown = time_t(0);
1091 checkTimer = 1000;
1092 }
@ TEAM_ALLIANCE
Definition: SharedDefines.h:732
Seconds GetGameTime()
Definition: GameTime.cpp:38
void Reset()
Definition: EventMap.cpp:21
Definition: ScriptedCreature.h:177
Creature * me
Definition: ScriptedCreature.h:267
void SetRegeneratingHealth(bool c)
Definition: Creature.h:302
float m_CombatDistance
Definition: Creature.h:355
MotionTransport * ToMotionTransport()
Definition: GameObject.h:1022
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1194
Transport * GetTransport() const
Definition: Object.h:585
void ResetSlots(TeamId teamId, MotionTransport *t)
Definition: boss_icecrown_gunship_battle.cpp:408
uint16 checkTimer
Definition: boss_icecrown_gunship_battle.cpp:1405
InstanceScript * _instance
Definition: boss_icecrown_gunship_battle.cpp:1401
time_t _firstMageCooldown
Definition: boss_icecrown_gunship_battle.cpp:1402
EventMap _events
Definition: boss_icecrown_gunship_battle.cpp:1399
time_t _riflemanYellCooldown
Definition: boss_icecrown_gunship_battle.cpp:1403
PassengerController _controller
Definition: boss_icecrown_gunship_battle.cpp:1400
time_t _mortarYellCooldown
Definition: boss_icecrown_gunship_battle.cpp:1404

References _controller, _events, _firstMageCooldown, _mortarYellCooldown, _riflemanYellCooldown, checkTimer, GameTime::GetGameTime(), WorldObject::GetTransport(), Creature::m_CombatDistance, ScriptedAI::me, EventMap::Reset(), PassengerController::ResetSlots(), Creature::SetRegeneratingHealth(), TEAM_ALLIANCE, and GameObject::ToMotionTransport().

Member Function Documentation

◆ AttackStart()

void npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::AttackStart ( Unit victim)
inlineoverridevirtual

Reimplemented from ScriptedAI.

1375 {
1376 if (victim && me->Attack(victim, true))
1377 {
1378 if (victim->GetPositionZ() < 478.0f)
1379 me->GetMotionMaster()->MoveChase(victim);
1380 else
1381 {
1382 float x, y, z, o;
1383 me->GetHomePosition(x, y, z, o);
1384 me->GetMotionMaster()->MovePoint(0, x, y, z, false);
1385 }
1386 }
1387 }
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition: Creature.h:322
float GetPositionZ() const
Definition: Position.h:119
MotionMaster * GetMotionMaster()
Definition: Unit.h:2530
bool Attack(Unit *victim, bool meleeAttack)
Definition: Unit.cpp:11089
void MoveChase(Unit *target, std::optional< ChaseRange > dist={}, std::optional< ChaseAngle > angle={})
Definition: MotionMaster.cpp:299
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition: MotionMaster.h:210

References Unit::Attack(), Creature::GetHomePosition(), Unit::GetMotionMaster(), Position::GetPositionZ(), ScriptedAI::me, MotionMaster::MoveChase(), and MotionMaster::MovePoint().

◆ CanAIAttack()

bool npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::CanAIAttack ( Unit const *  target) const
inlineoverridevirtual

Reimplemented from UnitAI.

1390 {
1392 return false;
1393 if (target->GetEntry() == NPC_KOR_KRON_REAVER || target->GetEntry() == NPC_KOR_KRON_SERGEANT)
1394 return target->ToCreature()->GetReactState() != REACT_PASSIVE;
1395 return target->GetTransport() == me->GetTransport() && target->GetPositionY() > (_instance->GetData(DATA_TEAMID_IN_INSTANCE) == TEAM_ALLIANCE ? 2042.0f : 2445.0f);
1396 }
@ REACT_PASSIVE
Definition: Unit.h:1023
@ IN_PROGRESS
Definition: InstanceScript.h:57
@ DATA_TEAMID_IN_INSTANCE
Definition: trial_of_the_champion.h:43
@ NPC_KOR_KRON_REAVER
Definition: icecrown_citadel.h:231
@ NPC_KOR_KRON_SERGEANT
Definition: icecrown_citadel.h:232
@ DATA_ICECROWN_GUNSHIP_BATTLE
Definition: icecrown_citadel.h:93
float GetPositionY() const
Definition: Position.h:118
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:52

References _instance, DATA_ICECROWN_GUNSHIP_BATTLE, DATA_TEAMID_IN_INSTANCE, InstanceScript::GetBossState(), ZoneScript::GetData(), Object::GetEntry(), Position::GetPositionY(), Creature::GetReactState(), WorldObject::GetTransport(), IN_PROGRESS, ScriptedAI::me, NPC_KOR_KRON_REAVER, NPC_KOR_KRON_SERGEANT, REACT_PASSIVE, TEAM_ALLIANCE, and Object::ToCreature().

Referenced by UpdateAI().

◆ DamageTaken()

void npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::DamageTaken ( Unit ,
uint32 damage,
DamageEffectType  ,
SpellSchoolMask   
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

1204 {
1207
1208 if (damage >= me->GetHealth())
1209 damage = me->GetHealth() - 1;
1210 }
@ SPELL_TASTE_OF_BLOOD
Definition: boss_icecrown_gunship_battle.cpp:151
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:6454
uint32 GetHealth() const
Definition: Unit.h:1438
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:1428
bool HealthBelowPctDamaged(int32 pct, uint32 damage) const
Definition: Unit.h:1443

References Unit::CastSpell(), Unit::GetHealth(), Unit::HasAura(), Unit::HealthBelowPctDamaged(), ScriptedAI::me, and SPELL_TASTE_OF_BLOOD.

◆ DoAction()

void npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

1130 {
1131 if (action == ACTION_ENEMY_GUNSHIP_TALK)
1132 {
1135
1137 saurfang->AI()->DoAction(ACTION_SPAWN_ALL_ADDS);
1138
1143
1144 if (Creature* orgrimsHammer = me->FindNearestCreature(NPC_ORGRIMS_HAMMER, 200.0f))
1146 if (Creature* skybreaker = me->FindNearestCreature(NPC_THE_SKYBREAKER, 200.0f))
1147 {
1149 skybreaker->CastSpell(skybreaker, SPELL_CHECK_FOR_PLAYERS, true);
1150 }
1151 }
1152 else if (action == ACTION_SPAWN_MAGE)
1153 {
1154 time_t now = GameTime::GetGameTime().count();
1155 if (_firstMageCooldown > now)
1157 else
1159 }
1160 else if (action == ACTION_SPAWN_ALL_ADDS)
1161 {
1165 if (Is25ManRaid())
1167 else
1168 {
1172 }
1173 }
1174 else if (action == ACTION_EXIT_SHIP)
1175 {
1176 G3D::Vector3 points[MuradinExitPathSize];
1177 for (uint8 i = 0; i < MuradinExitPathSize; ++i)
1178 {
1179 points[i].x = MuradinExitPath[i].GetPositionX();
1180 points[i].y = MuradinExitPath[i].GetPositionY();
1181 points[i].z = MuradinExitPath[i].GetPositionZ();
1182 }
1183 Movement::PointsArray path(points, points + MuradinExitPathSize);
1184 me->SetWalk(true);
1186 init.DisableTransportPathTransformations();
1187 init.MovebyPath(path, 0);
1188 init.Launch();
1189 me->DespawnOrUnsummon(18000);
1190 }
1191 }
constexpr auto IN_MILLISECONDS
Definition: Common.h:62
std::uint8_t uint8
Definition: Define.h:110
@ ENCOUNTER_FRAME_ENGAGE
Definition: InstanceScript.h:44
@ MUSIC_ENCOUNTER
Definition: boss_icecrown_gunship_battle.cpp:186
@ ACTION_SPAWN_MAGE
Definition: boss_icecrown_gunship_battle.cpp:191
@ ACTION_SPAWN_ALL_ADDS
Definition: boss_icecrown_gunship_battle.cpp:192
@ SPELL_CHECK_FOR_PLAYERS
Definition: boss_icecrown_gunship_battle.cpp:108
Position const MuradinExitPath[MuradinExitPathSize]
Definition: boss_icecrown_gunship_battle.cpp:213
@ SAY_MURADIN_INTRO_6
Definition: boss_icecrown_gunship_battle.cpp:53
uint32 const MuradinExitPathSize
Definition: boss_icecrown_gunship_battle.cpp:212
@ EVENT_CHECK_MORTAR
Definition: boss_icecrown_gunship_battle.cpp:96
@ EVENT_SUMMON_MAGE
Definition: boss_icecrown_gunship_battle.cpp:92
@ EVENT_INTRO_A_6
Definition: boss_icecrown_gunship_battle.cpp:88
@ EVENT_KEEP_PLAYER_IN_COMBAT
Definition: boss_icecrown_gunship_battle.cpp:91
@ EVENT_INTRO_A_7
Definition: boss_icecrown_gunship_battle.cpp:89
@ EVENT_CHECK_RIFLEMAN
Definition: boss_icecrown_gunship_battle.cpp:95
@ EVENT_ADDS
Definition: boss_icecrown_gunship_battle.cpp:93
@ SLOT_MORTAR_4
Definition: boss_icecrown_gunship_battle.cpp:272
@ SLOT_MAGE_2
Definition: boss_icecrown_gunship_battle.cpp:252
@ SLOT_MORTAR_1
Definition: boss_icecrown_gunship_battle.cpp:267
@ SLOT_MAGE_1
Definition: boss_icecrown_gunship_battle.cpp:251
@ SLOT_RIFLEMAN_4
Definition: boss_icecrown_gunship_battle.cpp:258
@ SLOT_RIFLEMAN_1
Definition: boss_icecrown_gunship_battle.cpp:255
@ SLOT_MORTAR_2
Definition: boss_icecrown_gunship_battle.cpp:268
@ NPC_ORGRIMS_HAMMER
Definition: icecrown_citadel.h:219
@ NPC_IGB_HIGH_OVERLORD_SAURFANG
Definition: icecrown_citadel.h:216
@ NPC_THE_SKYBREAKER
Definition: icecrown_citadel.h:218
@ ACTION_ENEMY_GUNSHIP_TALK
Definition: icecrown_citadel.h:509
@ ACTION_EXIT_SHIP
Definition: icecrown_citadel.h:510
@ AREA_ICECROWN_CITADEL
Definition: icecrown_citadel.h:575
Talk
Definition: boss_fathomlord_karathress.cpp:23
std::vector< Vector3 > PointsArray
Definition: MoveSplineInitArgs.h:28
void ScheduleEvent(uint32 eventId, uint32 time, uint32 group=0, uint32 phase=0)
Definition: EventMap.cpp:56
bool Is25ManRaid() const
Definition: ScriptedCreature.h:361
Definition: Creature.h:46
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Despawn or Unsummon creature. If creature is a TempSummon it will be unsummoned.
Definition: Creature.cpp:2154
bool SetWalk(bool enable) override
Definition: Creature.cpp:3186
Map * GetMap() const
Definition: Object.h:517
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2394
float GetPositionX() const
Definition: Position.h:117
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:305
void SendEncounterUnit(uint32 type, Unit *unit=nullptr, uint8 param1=0, uint8 param2=0)
Definition: InstanceScript.cpp:540
void SetZoneMusic(uint32 zoneId, uint32 musicId)
Definition: Map.cpp:3724
Definition: MoveSplineInit.h:71
bool SummonCreatures(Creature *summoner, PassengerSlots first, PassengerSlots last)
Definition: boss_icecrown_gunship_battle.cpp:422

References _controller, _events, _firstMageCooldown, _instance, ACTION_ENEMY_GUNSHIP_TALK, ACTION_EXIT_SHIP, ACTION_SPAWN_ALL_ADDS, ACTION_SPAWN_MAGE, AREA_ICECROWN_CITADEL, DATA_ICECROWN_GUNSHIP_BATTLE, Creature::DespawnOrUnsummon(), Movement::MoveSplineInit::DisableTransportPathTransformations(), ENCOUNTER_FRAME_ENGAGE, EVENT_ADDS, EVENT_CHECK_MORTAR, EVENT_CHECK_RIFLEMAN, EVENT_INTRO_A_6, EVENT_INTRO_A_7, EVENT_KEEP_PLAYER_IN_COMBAT, EVENT_SUMMON_MAGE, WorldObject::FindNearestCreature(), GameTime::GetGameTime(), WorldObject::GetMap(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), IN_MILLISECONDS, IN_PROGRESS, ScriptedAI::Is25ManRaid(), Movement::MoveSplineInit::Launch(), ScriptedAI::me, Movement::MoveSplineInit::MovebyPath(), MuradinExitPath, MuradinExitPathSize, MUSIC_ENCOUNTER, NPC_IGB_HIGH_OVERLORD_SAURFANG, NPC_ORGRIMS_HAMMER, NPC_THE_SKYBREAKER, SAY_MURADIN_INTRO_6, EventMap::ScheduleEvent(), InstanceScript::SendEncounterUnit(), InstanceScript::SetBossState(), Creature::SetWalk(), Map::SetZoneMusic(), SLOT_MAGE_1, SLOT_MAGE_2, SLOT_MORTAR_1, SLOT_MORTAR_2, SLOT_MORTAR_4, SLOT_RIFLEMAN_1, SLOT_RIFLEMAN_4, SPELL_CHECK_FOR_PLAYERS, and PassengerController::SummonCreatures().

◆ EnterCombat()

void npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::EnterCombat ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

1110 {
1117 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
@ SPELL_FRIENDLY_BOSS_DAMAGE_MOD
Definition: boss_icecrown_gunship_battle.cpp:107
@ SPELL_BATTLE_FURY
Definition: boss_icecrown_gunship_battle.cpp:128
@ EVENT_CLEAVE
Definition: boss_icecrown_gunship_battle.cpp:97
void CancelEvent(uint32 eventId)
Definition: EventMap.cpp:190

References _events, _instance, EventMap::CancelEvent(), Unit::CastSpell(), DATA_TEAMID_IN_INSTANCE, EVENT_CLEAVE, ZoneScript::GetData(), Unit::HasAura(), ScriptedAI::me, EventMap::ScheduleEvent(), SPELL_BATTLE_FURY, SPELL_FRIENDLY_BOSS_DAMAGE_MOD, TEAM_ALLIANCE, and urand().

◆ EnterEvadeMode()

void npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::EnterEvadeMode ( EvadeReason  )
inlineoverridevirtual

Reimplemented from CreatureAI.

1120 {
1121 if (!me->IsAlive())
1122 return;
1124 me->CombatStop(true);
1126 Reset();
1127 }
void Reset() override
Definition: ScriptedCreature.h:277
void ClearAllThreat()
Definition: ThreatMgr.cpp:418
void CombatStop(bool includingCast=false)
Definition: Unit.cpp:11245
bool IsAlive() const
Definition: Unit.h:2024
ThreatMgr & GetThreatMgr()
Definition: Unit.h:2404
void MoveTargetedHome()
Definition: MotionMaster.cpp:251

References ThreatMgr::ClearAllThreat(), Unit::CombatStop(), Unit::GetMotionMaster(), Unit::GetThreatMgr(), Unit::IsAlive(), ScriptedAI::me, MotionMaster::MoveTargetedHome(), and ScriptedAI::Reset().

◆ SetData()

void npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::SetData ( uint32  type,
uint32  data 
)
inlineoverridevirtual

Reimplemented from UnitAI.

1194 {
1195 if (type == ACTION_CLEAR_SLOT)
1196 {
1198 if (data == SLOT_FREEZE_MAGE)
1200 }
1201 }
@ ACTION_CLEAR_SLOT
Definition: boss_icecrown_gunship_battle.cpp:193
PassengerSlots
Definition: boss_icecrown_gunship_battle.cpp:246
@ SLOT_FREEZE_MAGE
Definition: boss_icecrown_gunship_battle.cpp:248
void ClearSlot(PassengerSlots slot)
Definition: boss_icecrown_gunship_battle.cpp:461

References _controller, _events, ACTION_CLEAR_SLOT, PassengerController::ClearSlot(), EVENT_SUMMON_MAGE, EventMap::ScheduleEvent(), SLOT_FREEZE_MAGE, and urand().

◆ sGossipSelect()

void npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::sGossipSelect ( Player ,
uint32  ,
uint32   
)
inlineoverridevirtual

Reimplemented from UnitAI.

1095 {
1097 return;
1099 me->GetTransport()->setActive(true);
1107 }
@ UNIT_NPC_FLAG_GOSSIP
Definition: Unit.h:516
@ EVENT_INTRO_SUMMON_ORGRIMS_HAMMER
Definition: boss_icecrown_gunship_battle.cpp:84
@ EVENT_INTRO_A_3
Definition: boss_icecrown_gunship_battle.cpp:85
@ EVENT_INTRO_A_4
Definition: boss_icecrown_gunship_battle.cpp:86
@ EVENT_INTRO_A_5
Definition: boss_icecrown_gunship_battle.cpp:87
@ EVENT_INTRO_A_1
Definition: boss_icecrown_gunship_battle.cpp:82
@ EVENT_INTRO_A_2
Definition: boss_icecrown_gunship_battle.cpp:83
void setActive(bool isActiveObject)
Definition: Object.cpp:1087
void EnableMovement(bool enabled)
Definition: Transport.cpp:454
void RemoveNpcFlag(NPCFlags flags)
Definition: Unit.h:1684
bool HasNpcFlag(NPCFlags flags) const
Definition: Unit.h:1682

References _events, MotionTransport::EnableMovement(), EVENT_INTRO_A_1, EVENT_INTRO_A_2, EVENT_INTRO_A_3, EVENT_INTRO_A_4, EVENT_INTRO_A_5, EVENT_INTRO_SUMMON_ORGRIMS_HAMMER, WorldObject::GetTransport(), Unit::HasNpcFlag(), ScriptedAI::me, Unit::RemoveNpcFlag(), EventMap::ScheduleEvent(), WorldObject::setActive(), GameObject::ToMotionTransport(), and UNIT_NPC_FLAG_GOSSIP.

◆ UpdateAI()

void npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from ScriptedAI.

1213 {
1215 {
1216 if (me->GetVictim())
1217 {
1219 {
1220 if (me->GetVictim()->GetPositionZ() >= 478.0f)
1221 {
1222 float x, y, z, o;
1223 me->GetHomePosition(x, y, z, o);
1224 me->GetMotionMaster()->MovePoint(0, x, y, z, false);
1225 }
1226 }
1227 else
1228 {
1229 if (me->GetVictim()->GetPositionZ() < 478.0f)
1231 }
1232 }
1233
1234 if (checkTimer <= diff)
1235 {
1236 checkTimer = 1000;
1237 Map::PlayerList const& pl = me->GetMap()->GetPlayers();
1238 for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
1239 if (Player* p = itr->GetSource())
1240 if (CanAIAttack(p) && me->IsValidAttackTarget(p))
1241 {
1242 me->SetInCombatWith(p);
1243 p->SetInCombatWith(me);
1244 me->AddThreat(p, 0.0f);
1245 }
1246 }
1247 else
1248 checkTimer -= diff;
1249 }
1250
1251 UpdateVictim();
1252 _events.Update(diff);
1253
1254 switch (_events.ExecuteEvent())
1255 {
1256 case 0:
1257 break;
1258 case EVENT_INTRO_A_1:
1260 break;
1261 case EVENT_INTRO_A_2:
1263 break;
1265 sTransportMgr->CreateTransport(GO_ORGRIMS_HAMMER_A, 0, me->GetMap());
1266 break;
1267 case EVENT_INTRO_A_3:
1269 break;
1270 case EVENT_INTRO_A_4:
1272 break;
1273 case EVENT_INTRO_A_5:
1275 break;
1276 case EVENT_INTRO_A_6:
1278 saurfang->AI()->Talk(SAY_SAURFANG_INTRO_A);
1279 break;
1280 case EVENT_INTRO_A_7:
1282 break;
1285 {
1286 //_instance->DoCastSpellOnPlayers(SPELL_LOCK_PLAYERS_AND_TAP_CHEST);
1287 Map::PlayerList const& pl = me->GetMap()->GetPlayers();
1288 for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
1289 if (Player* p = itr->GetSource())
1290 if (!p->IsGameMaster())
1291 p->SetInCombatState(true);
1293 }
1294 break;
1295
1296 case EVENT_SUMMON_MAGE:
1299 break;
1300 case EVENT_ADDS:
1305 if (MotionTransport* skybreaker = (me->GetTransport() ? me->GetTransport()->ToMotionTransport() : nullptr))
1306 {
1307 float x, y, z, o;
1309 skybreaker->CalculatePassengerPosition(x, y, z, &o);
1311 }
1312
1314 if (MotionTransport* orgrimsHammer = transport->ToMotionTransport())
1315 {
1316 float x, y, z, o;
1318 orgrimsHammer->CalculatePassengerPosition(x, y, z, &o);
1320 }
1321
1324 break;
1327 saurfang->AI()->Talk(SAY_SAURFANG_BOARD);
1328 break;
1331 {
1333 {
1336 }
1337 }
1339 break;
1340 case EVENT_CHECK_MORTAR:
1342 {
1344 {
1347 }
1348 }
1350 break;
1351 case EVENT_CLEAVE:
1352 if (me->GetVictim())
1353 me->CastSpell(me->GetVictim(), SPELL_CLEAVE, false);
1355 break;
1356
1357 default:
1358 break;
1359 }
1360
1362 return;
1363
1366 else if (me->isAttackReady())
1367 {
1371 }
1372 }
@ TEMPSUMMON_TIMED_DESPAWN
Definition: Object.h:44
@ UNIT_STATE_CASTING
Definition: Unit.h:340
#define sTransportMgr
Definition: TransportMgr.h:163
@ CHASE_MOTION_TYPE
Definition: MotionMaster.h:43
@ SPELL_CLEAVE
Definition: boss_icecrown_gunship_battle.cpp:127
@ SPELL_RENDING_THROW
Definition: boss_icecrown_gunship_battle.cpp:150
Position const SkybreakerTeleportPortal
Definition: boss_icecrown_gunship_battle.cpp:205
Position const OrgrimsHammerTeleportExit
Definition: boss_icecrown_gunship_battle.cpp:206
@ SAY_MURADIN_MORTAR
Definition: boss_icecrown_gunship_battle.cpp:59
@ SAY_SAURFANG_BOARD
Definition: boss_icecrown_gunship_battle.cpp:39
@ SAY_MURADIN_INTRO_2
Definition: boss_icecrown_gunship_battle.cpp:49
@ SAY_MURADIN_INTRO_3
Definition: boss_icecrown_gunship_battle.cpp:50
@ SAY_MURADIN_RIFLEMAN
Definition: boss_icecrown_gunship_battle.cpp:58
@ SAY_MURADIN_ENTER_ORGRIMMS_HAMMER
Definition: boss_icecrown_gunship_battle.cpp:57
@ SAY_MURADIN_INTRO_7
Definition: boss_icecrown_gunship_battle.cpp:54
@ SAY_MURADIN_INTRO_1
Definition: boss_icecrown_gunship_battle.cpp:48
@ SAY_MURADIN_INTRO_5
Definition: boss_icecrown_gunship_battle.cpp:52
@ SAY_MURADIN_INTRO_4
Definition: boss_icecrown_gunship_battle.cpp:51
@ SAY_MURADIN_SORCERERS
Definition: boss_icecrown_gunship_battle.cpp:60
@ SAY_SAURFANG_INTRO_A
Definition: boss_icecrown_gunship_battle.cpp:38
@ EVENT_ADDS_BOARD_YELL
Definition: boss_icecrown_gunship_battle.cpp:94
@ SLOT_MARINE_4
Definition: boss_icecrown_gunship_battle.cpp:280
@ SLOT_RIFLEMAN_8
Definition: boss_icecrown_gunship_battle.cpp:264
@ SLOT_MARINE_1
Definition: boss_icecrown_gunship_battle.cpp:275
@ SLOT_SERGEANT_2
Definition: boss_icecrown_gunship_battle.cpp:286
@ SLOT_SERGEANT_1
Definition: boss_icecrown_gunship_battle.cpp:283
@ SLOT_MARINE_2
Definition: boss_icecrown_gunship_battle.cpp:276
@ NPC_TELEPORT_PORTAL
Definition: icecrown_citadel.h:221
@ NPC_TELEPORT_EXIT
Definition: icecrown_citadel.h:222
@ GO_ORGRIMS_HAMMER_A
Definition: icecrown_citadel.h:400
Definition: LinkedList.h:139
uint32 ExecuteEvent()
Definition: EventMap.cpp:114
void Update(uint32 time)
Definition: EventMap.h:54
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:40
bool UpdateVictim()
Definition: CreatureAI.cpp:268
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr) const
Definition: Object.cpp:2303
void SetOrientation(float orientation)
Definition: Position.h:112
void GetPosition(float &x, float &y) const
Definition: Position.h:122
float GetAngle(const Position *pos) const
Definition: Position.cpp:77
Definition: Player.h:1046
Definition: Transport.h:29
Definition: Transport.h:48
bool IsValidAttackTarget(Unit const *target) const
Definition: Unit.cpp:14620
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=nullptr)
Definition: Unit.cpp:15379
void SetInCombatWith(Unit *enemy, uint32 duration=0)
Definition: Unit.cpp:14341
bool IsWithinMeleeRange(Unit const *obj, float dist=0.f) const
Definition: Unit.cpp:864
Unit * GetVictim() const
Definition: Unit.h:1386
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1398
bool isAttackReady(WeaponAttackType type=BASE_ATTACK) const
Definition: Unit.h:1343
void resetAttackTimer(WeaponAttackType type=BASE_ATTACK)
Definition: Unit.cpp:826
ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
Map * instance
Definition: InstanceScript.h:146
PlayerList const & GetPlayers() const
Definition: Map.h:484
Transport * GetTransport(ObjectGuid const guid)
Definition: Map.cpp:3305
Definition: MapRefMgr.h:26
iterator begin()
Definition: MapRefMgr.h:36
iterator end()
Definition: MapRefMgr.h:37
MovementGeneratorType GetCurrentMovementGeneratorType() const
Definition: MotionMaster.cpp:817
bool CanAIAttack(Unit const *target) const override
Definition: boss_icecrown_gunship_battle.cpp:1389

References _controller, _events, _instance, _mortarYellCooldown, _riflemanYellCooldown, Unit::AddThreat(), MapRefMgr::begin(), CanAIAttack(), Unit::CastSpell(), CHASE_MOTION_TYPE, checkTimer, DATA_ICECROWN_GUNSHIP_BATTLE, UnitAI::DoMeleeAttackIfReady(), MapRefMgr::end(), EVENT_ADDS, EVENT_ADDS_BOARD_YELL, EVENT_CHECK_MORTAR, EVENT_CHECK_RIFLEMAN, EVENT_CLEAVE, EVENT_INTRO_A_1, EVENT_INTRO_A_2, EVENT_INTRO_A_3, EVENT_INTRO_A_4, EVENT_INTRO_A_5, EVENT_INTRO_A_6, EVENT_INTRO_A_7, EVENT_INTRO_SUMMON_ORGRIMS_HAMMER, EVENT_KEEP_PLAYER_IN_COMBAT, EVENT_SUMMON_MAGE, EventMap::ExecuteEvent(), WorldObject::FindNearestCreature(), Position::GetAngle(), InstanceScript::GetBossState(), MotionMaster::GetCurrentMovementGeneratorType(), GameTime::GetGameTime(), InstanceScript::GetGuidData(), Creature::GetHomePosition(), WorldObject::GetMap(), Unit::GetMotionMaster(), Map::GetPlayers(), Position::GetPosition(), Position::GetPositionZ(), WorldObject::GetTransport(), Map::GetTransport(), Unit::GetVictim(), GO_ORGRIMS_HAMMER_A, Unit::HasUnitState(), IN_PROGRESS, InstanceScript::instance, ScriptedAI::Is25ManRaid(), Unit::isAttackReady(), Unit::IsValidAttackTarget(), Unit::IsWithinMeleeRange(), ScriptedAI::me, MotionMaster::MoveChase(), MotionMaster::MovePoint(), NPC_IGB_HIGH_OVERLORD_SAURFANG, NPC_TELEPORT_EXIT, NPC_TELEPORT_PORTAL, OrgrimsHammerTeleportExit, Unit::resetAttackTimer(), SAY_MURADIN_ENTER_ORGRIMMS_HAMMER, SAY_MURADIN_INTRO_1, SAY_MURADIN_INTRO_2, SAY_MURADIN_INTRO_3, SAY_MURADIN_INTRO_4, SAY_MURADIN_INTRO_5, SAY_MURADIN_INTRO_7, SAY_MURADIN_MORTAR, SAY_MURADIN_RIFLEMAN, SAY_MURADIN_SORCERERS, SAY_SAURFANG_BOARD, SAY_SAURFANG_INTRO_A, EventMap::ScheduleEvent(), Unit::SetInCombatWith(), Position::SetOrientation(), SkybreakerTeleportPortal, SLOT_FREEZE_MAGE, SLOT_MAGE_1, SLOT_MAGE_2, SLOT_MARINE_1, SLOT_MARINE_2, SLOT_MARINE_4, SLOT_MORTAR_1, SLOT_MORTAR_2, SLOT_MORTAR_4, SLOT_RIFLEMAN_1, SLOT_RIFLEMAN_4, SLOT_RIFLEMAN_8, SLOT_SERGEANT_1, SLOT_SERGEANT_2, SPELL_CLEAVE, SPELL_RENDING_THROW, sTransportMgr, WorldObject::SummonCreature(), PassengerController::SummonCreatures(), TEMPSUMMON_TIMED_DESPAWN, GameObject::ToMotionTransport(), UNIT_STATE_CASTING, EventMap::Update(), CreatureAI::UpdateVictim(), and urand().

Member Data Documentation

◆ _controller

PassengerController npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::_controller
private

◆ _events

EventMap npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::_events
private

◆ _firstMageCooldown

time_t npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::_firstMageCooldown
private

◆ _instance

InstanceScript* npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::_instance
private

◆ _mortarYellCooldown

time_t npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::_mortarYellCooldown
private

◆ _riflemanYellCooldown

time_t npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::_riflemanYellCooldown
private

◆ checkTimer

uint16 npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::checkTimer
private