refactor(Core): apply clang-tidy modernize-use-override (#3817)

This commit is contained in:
Francesco Borzì
2020-12-06 18:04:55 +01:00
committed by GitHub
parent 9facd81e54
commit d4a58700d4
561 changed files with 9574 additions and 9574 deletions

View File

@@ -229,7 +229,7 @@ class boss_sartharion : public CreatureScript
public:
boss_sartharion() : CreatureScript("boss_sartharion") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* pCreature) const override
{
return new boss_sartharionAI (pCreature);
}
@@ -1007,7 +1007,7 @@ class boss_sartharion_tenebron : public CreatureScript
public:
boss_sartharion_tenebron() : CreatureScript("boss_sartharion_tenebron") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* pCreature) const override
{
return new boss_sartharion_tenebronAI (pCreature);
}
@@ -1190,7 +1190,7 @@ class boss_sartharion_shadron : public CreatureScript
public:
boss_sartharion_shadron() : CreatureScript("boss_sartharion_shadron") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* pCreature) const override
{
return new boss_sartharion_shadronAI (pCreature);
}
@@ -1315,7 +1315,7 @@ class boss_sartharion_vesperon : public CreatureScript
public:
boss_sartharion_vesperon() : CreatureScript("boss_sartharion_vesperon") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* pCreature) const override
{
return new boss_sartharion_vesperonAI (pCreature);
}
@@ -1437,7 +1437,7 @@ class npc_twilight_summon : public CreatureScript
public:
npc_twilight_summon() : CreatureScript("npc_twilight_summon") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* pCreature) const override
{
return new npc_twilight_summonAI (pCreature);
}
@@ -1556,7 +1556,7 @@ public:
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_sartharion_lava_strike_SpellScript();
}

View File

@@ -12,7 +12,7 @@ class instance_obsidian_sanctum : public InstanceMapScript
public:
instance_obsidian_sanctum() : InstanceMapScript("instance_obsidian_sanctum", 615) { }
InstanceScript* GetInstanceScript(InstanceMap* pMap) const
InstanceScript* GetInstanceScript(InstanceMap* pMap) const override
{
return new instance_obsidian_sanctum_InstanceMapScript(pMap);
}

View File

@@ -74,7 +74,7 @@ class DelayedTalk : public BasicEvent
public:
DelayedTalk(Creature* owner, uint32 talkId) : _owner(owner), _talkId(talkId) { }
bool Execute(uint64 /*execTime*/, uint32 /*diff*/)
bool Execute(uint64 /*execTime*/, uint32 /*diff*/) override
{
_owner->AI()->Talk(_talkId);
return true;
@@ -90,7 +90,7 @@ class RestoreFight : public BasicEvent
public:
RestoreFight(Creature* owner) : _owner(owner) { }
bool Execute(uint64 /*execTime*/, uint32 /*diff*/)
bool Execute(uint64 /*execTime*/, uint32 /*diff*/) override
{
_owner->SetReactState(REACT_AGGRESSIVE);
_owner->SetInCombatWithZone();
@@ -113,24 +113,24 @@ public:
_introDone = false;
}
void Reset()
void Reset() override
{
BossAI::Reset();
}
void InitializeAI()
void InitializeAI() override
{
BossAI::InitializeAI();
me->CastSpell(me, SPELL_BARRIER_CHANNEL, false);
}
void JustReachedHome()
void JustReachedHome() override
{
BossAI::JustReachedHome();
me->CastSpell(me, SPELL_BARRIER_CHANNEL, false);
}
void DoAction(int32 action)
void DoAction(int32 action) override
{
if (action == ACTION_INTRO_BALTHARUS && !_introDone)
{
@@ -145,7 +145,7 @@ public:
}
}
void EnterCombat(Unit* who)
void EnterCombat(Unit* who) override
{
Talk(SAY_AGGRO);
BossAI::EnterCombat(who);
@@ -163,7 +163,7 @@ public:
}
}
void JustDied(Unit* killer)
void JustDied(Unit* killer) override
{
Talk(SAY_DEATH);
BossAI::JustDied(killer);
@@ -172,7 +172,7 @@ public:
xerestrasza->AI()->DoAction(ACTION_BALTHARUS_DEATH);
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) override
{
if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
{
@@ -181,7 +181,7 @@ public:
}
}
void JustSummoned(Creature* summon)
void JustSummoned(Creature* summon) override
{
summons.Summon(summon);
summon->SetHealth(me->GetHealth());
@@ -190,7 +190,7 @@ public:
summon->m_Events.AddEvent(new RestoreFight(summon), summon->m_Events.CalculateTime(2000));
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
return;
@@ -252,7 +252,7 @@ public:
bool _introDone;
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const override
{
return GetInstanceAI<boss_baltharus_the_warbornAI>(creature);
}
@@ -269,7 +269,7 @@ public:
{
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) override
{
_events.Reset();
_events.ScheduleEvent(EVENT_CLEAVE, urand(5000, 10000));
@@ -277,7 +277,7 @@ public:
_events.ScheduleEvent(EVENT_ENERVATING_BRAND, urand(10000, 15000));
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
return;
@@ -311,7 +311,7 @@ public:
EventMap _events;
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const override
{
return GetInstanceAI<npc_baltharus_the_warborn_cloneAI>(creature);
}
@@ -336,13 +336,13 @@ public:
target->CastSpell(caster, SPELL_SIPHONED_MIGHT, true);
}
void Register()
void Register() override
{
OnHit += SpellHitFn(spell_baltharus_enervating_brand_trigger_SpellScript::CheckDistance);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_baltharus_enervating_brand_trigger_SpellScript();
}
@@ -361,7 +361,7 @@ public:
_introDone = false;
}
void Reset()
void Reset() override
{
_events.Reset();
me->RemoveFlag(UNIT_NPC_FLAGS, GOSSIP_OPTION_QUESTGIVER);
@@ -371,7 +371,7 @@ public:
me->DespawnOrUnsummon(1);
}
void DoAction(int32 action)
void DoAction(int32 action) override
{
if (action == ACTION_BALTHARUS_DEATH)
{
@@ -394,7 +394,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) override
{
if (_isIntro)
return;
@@ -439,7 +439,7 @@ public:
bool _introDone;
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const override
{
return GetInstanceAI<npc_xerestraszaAI>(creature);
}
@@ -450,7 +450,7 @@ class at_baltharus_plateau : public AreaTriggerScript
public:
at_baltharus_plateau() : AreaTriggerScript("at_baltharus_plateau") { }
bool OnTrigger(Player* player, AreaTrigger const* /*areaTrigger*/)
bool OnTrigger(Player* player, AreaTrigger const* /*areaTrigger*/) override
{
if (InstanceScript* instance = player->GetInstanceScript())
{

View File

@@ -88,14 +88,14 @@ public:
{
}
void Reset()
void Reset() override
{
BossAI::Reset();
if (instance->GetBossState(DATA_SAVIANA_RAGEFIRE) == DONE && instance->GetBossState(DATA_BALTHARUS_THE_WARBORN) == DONE)
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
}
void EnterCombat(Unit* who)
void EnterCombat(Unit* who) override
{
BossAI::EnterCombat(who);
Talk(SAY_AGGRO);
@@ -107,18 +107,18 @@ public:
events.ScheduleEvent(EVENT_SUMMON_ADDS2, 20000);
}
void JustSummoned(Creature* summon)
void JustSummoned(Creature* summon) override
{
summons.Summon(summon);
}
void JustDied(Unit* killer)
void JustDied(Unit* killer) override
{
BossAI::JustDied(killer);
Talk(SAY_DEATH);
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) override
{
if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
{
@@ -127,7 +127,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
return;
@@ -167,13 +167,13 @@ public:
EnterEvadeIfOutOfCombatArea();
}
bool CheckEvadeIfOutOfCombatArea() const
bool CheckEvadeIfOutOfCombatArea() const override
{
return me->GetPositionX() > 3060.0f;
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const override
{
return GetInstanceAI<boss_general_zarithrianAI>(creature);
}
@@ -191,33 +191,33 @@ public:
npc_escortAI::SetDespawnAtEnd(false);
}
void Reset()
void Reset() override
{
_lavaGoutCount = 0;
AddWaypoints();
Start(true, true);
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) override
{
_events.Reset();
_events.ScheduleEvent(EVENT_BLAST_NOVA, urand(20000, 30000));
_events.ScheduleEvent(EVENT_LAVA_GOUT, 5000);
}
void EnterEvadeMode()
void EnterEvadeMode() override
{
// Prevent EvadeMode
}
void IsSummonedBy(Unit* /*summoner*/)
void IsSummonedBy(Unit* /*summoner*/) override
{
// Let Zarithrian count as summoner. _instance cant be null since we got GetRubySanctumAI
if (Creature* zarithrian = ObjectAccessor::GetCreature(*me, _instance->GetData64(NPC_GENERAL_ZARITHRIAN)))
zarithrian->AI()->JustSummoned(me);
}
void WaypointReached(uint32 waypointId)
void WaypointReached(uint32 waypointId) override
{
if (waypointId == MAX_PATH_FLAMECALLER_WAYPOINTS)
me->SetInCombatWithZone();
@@ -237,7 +237,7 @@ public:
}
}
void UpdateEscortAI(uint32 diff)
void UpdateEscortAI(uint32 diff) override
{
if (!UpdateVictim())
return;
@@ -273,7 +273,7 @@ public:
uint8 _lavaGoutCount;
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const override
{
return GetInstanceAI<npc_onyx_flamecallerAI>(creature);
}

View File

@@ -169,7 +169,7 @@ class SendEncounterUnit : public BasicEvent
public:
SendEncounterUnit(Player* owner) : _owner(owner) { }
bool Execute(uint64 /*execTime*/, uint32 /*diff*/)
bool Execute(uint64 /*execTime*/, uint32 /*diff*/) override
{
InstanceScript* instance = _owner->GetInstanceScript();
if (!instance || _owner->GetMapId() != 724)
@@ -202,7 +202,7 @@ public:
{
}
void Reset()
void Reset() override
{
_livingEmberCount = 0;
BossAI::Reset();
@@ -215,7 +215,7 @@ public:
_events2.RescheduleEvent(EVENT_HALION_VISIBILITY, 30000);
}
void JustSummoned(Creature* summon)
void JustSummoned(Creature* summon) override
{
summons.Summon(summon);
switch (summon->GetEntry())
@@ -244,7 +244,7 @@ public:
}
}
bool CanAIAttack(const Unit* who) const
bool CanAIAttack(const Unit* who) const override
{
return me->GetHomePosition().GetExactDist2d(who) < 52.0f;
}
@@ -259,7 +259,7 @@ public:
return false;
}
void EnterEvadeMode()
void EnterEvadeMode() override
{
if (IsAnyPlayerValid())
return;
@@ -267,13 +267,13 @@ public:
BossAI::EnterEvadeMode();
}
void AttackStart(Unit* who)
void AttackStart(Unit* who) override
{
me->SetReactState(REACT_AGGRESSIVE);
BossAI::AttackStart(who);
}
void JustReachedHome()
void JustReachedHome() override
{
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_HALION_CONTROLLER)))
@@ -281,7 +281,7 @@ public:
BossAI::JustReachedHome();
}
void EnterCombat(Unit* who)
void EnterCombat(Unit* who) override
{
BossAI::EnterCombat(who);
Talk(SAY_AGGRO);
@@ -297,7 +297,7 @@ public:
_events2.ScheduleEvent(EVENT_TRIGGER_BERSERK, 8 * MINUTE * IN_MILLISECONDS);
}
void KilledUnit(Unit* victim)
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER && events.GetNextEventTime(EVENT_KILL_TALK) == 0)
{
@@ -306,7 +306,7 @@ public:
}
}
void JustDied(Unit* killer)
void JustDied(Unit* killer) override
{
BossAI::JustDied(killer);
Talk(SAY_DEATH);
@@ -322,7 +322,7 @@ public:
Unit::Kill(controller, controller);
}
void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType, SpellSchoolMask)
void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType, SpellSchoolMask) override
{
if (events.GetNextEventTime(EVENT_CHECK_HEALTH) != 0)
return;
@@ -334,7 +334,7 @@ public:
controller->AI()->SetData(DATA_MATERIAL_DAMAGE_TAKEN, damage);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) override
{
_events2.Update(diff);
switch (_events2.ExecuteEvent())
@@ -410,7 +410,7 @@ public:
uint32 _livingEmberCount;
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const override
{
return GetInstanceAI<boss_halionAI>(creature);
}
@@ -437,7 +437,7 @@ public:
me->setActive(true);
}
void Reset()
void Reset() override
{
_events.Reset();
me->SetPhaseMask(0x21, true);
@@ -446,7 +446,7 @@ public:
me->SetReactState(REACT_DEFENSIVE);
}
void EnterCombat(Unit* /*who*/)
void EnterCombat(Unit* /*who*/) override
{
_events.Reset();
_events.ScheduleEvent(EVENT_CLEAVE, urand(8000, 10000));
@@ -460,11 +460,11 @@ public:
me->SetInCombatWithZone();
}
void EnterEvadeMode()
void EnterEvadeMode() override
{
}
void KilledUnit(Unit* victim)
void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER && _events.GetNextEventTime(EVENT_KILL_TALK) == 0)
{
@@ -473,7 +473,7 @@ public:
}
}
void JustDied(Unit* killer)
void JustDied(Unit* killer) override
{
if (Creature* halion = ObjectAccessor::GetCreature(*me, _instance->GetData64(NPC_HALION)))
{
@@ -493,7 +493,7 @@ public:
me->CastSpell(me, SPELL_CLEAR_DEBUFFS, false);
}
void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType, SpellSchoolMask)
void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType, SpellSchoolMask) override
{
if (!attacker || !me->InSamePhase(attacker))
return;
@@ -502,7 +502,7 @@ public:
controller->AI()->SetData(DATA_TWILIGHT_DAMAGE_TAKEN, damage);
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
return;
@@ -563,7 +563,7 @@ public:
InstanceScript* _instance;
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const override
{
return GetInstanceAI<boss_twilight_halionAI>(creature);
}
@@ -580,12 +580,12 @@ public:
{
}
void Reset()
void Reset() override
{
_events.Reset();
}
void SetData(uint32 id, uint32 value)
void SetData(uint32 id, uint32 value) override
{
if (_events.GetNextEventTime(EVENT_CHECK_CORPOREALITY) == 0)
return;
@@ -596,7 +596,7 @@ public:
_twilightDamage += value;
}
void DoAction(int32 action)
void DoAction(int32 action) override
{
if (action == ACTION_INTRO_HALION)
_events.ScheduleEvent(EVENT_START_INTRO, 2000);
@@ -616,7 +616,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) override
{
_events.Update(diff);
switch (_events.ExecuteEvent())
@@ -731,7 +731,7 @@ public:
uint32 _twilightDamage;
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const override
{
return GetInstanceAI<npc_halion_controllerAI>(creature);
}
@@ -749,13 +749,13 @@ public:
ASSERT(creature->GetVehicleKit());
}
void UpdateAI(uint32 /*diff*/)
void UpdateAI(uint32 /*diff*/) override
{
if (!me->HasUnitState(UNIT_STATE_CASTING))
me->CastSpell((Unit*)NULL, SPELL_TRACK_ROTATION, false);
}
void DoAction(int32 action)
void DoAction(int32 action) override
{
if (action == ACTION_SHOOT)
{
@@ -783,7 +783,7 @@ public:
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const override
{
return GetInstanceAI<npc_orb_carrierAI>(creature);
}
@@ -804,13 +804,13 @@ public:
GetCaster()->CastSpell(target, SPELL_METEOR_STRIKE, true);
}
void Register()
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_halion_meteor_strike_targeting_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_halion_meteor_strike_targeting_SpellScript();
}
@@ -844,14 +844,14 @@ public:
}
}
void Register()
void Register() override
{
OnEffectApply += AuraEffectApplyFn(spell_halion_meteor_strike_marker_AuraScript::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_halion_meteor_strike_marker_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const override
{
return new spell_halion_meteor_strike_marker_AuraScript();
}
@@ -875,13 +875,13 @@ public:
GetUnitOwner()->CastSpell(GetUnitOwner(), RAND(SPELL_SUMMON_METEOR_FLAME1, SPELL_SUMMON_METEOR_FLAME2, SPELL_SUMMON_METEOR_FLAME2, SPELL_SUMMON_METEOR_FLAME2, SPELL_SUMMON_METEOR_FLAME3), true);
}
void Register()
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_halion_meteor_strike_spread_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const override
{
return new spell_halion_meteor_strike_spread_AuraScript();
}
@@ -903,13 +903,13 @@ public:
target->CastSpell(target, GetSpellInfo()->Effects[effIndex].TriggerSpell, true);
}
void Register()
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_halion_blazing_aura_SpellScript::HandleForceCast, EFFECT_1, SPELL_EFFECT_FORCE_CAST);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_halion_blazing_aura_SpellScript();
}
@@ -942,7 +942,7 @@ public:
GetTarget()->CastSpell(GetTarget(), _markSpell, true);
}
void Register()
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_halion_combustion_consumption_AuraScript::AddMarkStack, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
AfterEffectApply += AuraEffectApplyFn(spell_halion_combustion_consumption_AuraScript::OnApply, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL);
@@ -952,7 +952,7 @@ public:
uint32 _markSpell;
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const override
{
return new spell_halion_combustion_consumption_AuraScript(_spellID);
}
@@ -993,7 +993,7 @@ public:
GetTarget()->CastCustomSpell(_summonSpellId, SPELLVALUE_BASE_POINT1, GetAura()->GetStackAmount(), GetTarget(), TRIGGERED_FULL_MASK, nullptr, nullptr, GetCasterGUID());
}
void Register()
void Register() override
{
OnDispel += AuraDispelFn(spell_halion_marks_AuraScript::BeforeDispel);
AfterEffectRemove += AuraEffectRemoveFn(spell_halion_marks_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
@@ -1003,7 +1003,7 @@ public:
uint32 _removeSpellId;
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const override
{
return new spell_halion_marks_AuraScript(_summonSpell, _removeSpell);
}
@@ -1055,7 +1055,7 @@ public:
}
}
void Register()
void Register() override
{
OnEffectHit += SpellEffectFn(spell_halion_damage_aoe_summon_SpellScript::HandleSummon, EFFECT_0, SPELL_EFFECT_SUMMON);
}
@@ -1064,7 +1064,7 @@ public:
uint32 _auraSpell;
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_halion_damage_aoe_summon_SpellScript(_explosionSpell, _auraSpell);
}
@@ -1093,13 +1093,13 @@ public:
}
}
void Register()
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_halion_clear_debuffs_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_halion_clear_debuffs_SpellScript();
}
@@ -1114,7 +1114,7 @@ public:
{
PrepareSpellScript(spell_halion_twilight_phasing_SpellScript);
bool Load()
bool Load() override
{
return GetCaster()->GetTypeId() == TYPEID_UNIT;
}
@@ -1126,13 +1126,13 @@ public:
caster->GetMap()->SummonCreature(NPC_TWILIGHT_HALION, caster->ToCreature()->GetHomePosition(), NULL, 0, caster);
}
void Register()
void Register() override
{
OnHit += SpellHitFn(spell_halion_twilight_phasing_SpellScript::Phase);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_halion_twilight_phasing_SpellScript();
}
@@ -1161,14 +1161,14 @@ public:
GetTarget()->AttackStop();
}
void Register()
void Register() override
{
OnEffectApply += AuraEffectApplyFn(spell_halion_twilight_phasing_AuraScript::OnApply, EFFECT_0, SPELL_AURA_TRANSFORM, AURA_EFFECT_HANDLE_REAL);
OnEffectRemove += AuraEffectRemoveFn(spell_halion_twilight_phasing_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_TRANSFORM, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const override
{
return new spell_halion_twilight_phasing_AuraScript();
}
@@ -1195,13 +1195,13 @@ public:
GetTarget()->m_Events.AddEvent(new SendEncounterUnit(GetTarget()->ToPlayer()), GetTarget()->m_Events.CalculateTime(500));
}
void Register()
void Register() override
{
AfterEffectApply += AuraEffectApplyFn(spell_halion_twilight_realm_AuraScript::OnApply, EFFECT_0, SPELL_AURA_PHASE, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const override
{
return new spell_halion_twilight_realm_AuraScript();
}
@@ -1234,14 +1234,14 @@ public:
GetTarget()->m_Events.AddEvent(new SendEncounterUnit(GetTarget()->ToPlayer()), GetTarget()->m_Events.CalculateTime(500));
}
void Register()
void Register() override
{
AfterEffectApply += AuraEffectApplyFn(spell_halion_leave_twilight_realm_AuraScript::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_halion_leave_twilight_realm_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const override
{
return new spell_halion_leave_twilight_realm_AuraScript();
}
@@ -1262,13 +1262,13 @@ public:
GetUnitOwner()->CastSpell((Unit*)NULL, GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell, true);
}
void Register()
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_halion_twilight_cutter_periodic_AuraScript::HandlePeriodic, EFFECT_1, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const override
{
return new spell_halion_twilight_cutter_periodic_AuraScript();
}
@@ -1313,13 +1313,13 @@ public:
unitList.clear();
}
void Register()
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_halion_twilight_cutter_SpellScript::RemoveNotBetween, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_halion_twilight_cutter_SpellScript();
}
@@ -1349,14 +1349,14 @@ public:
GetHitDest()->RelocateOffset(offset);
}
void Register()
void Register() override
{
OnEffectLaunch += SpellEffectFn(spell_halion_summon_exit_portals_SpellScript::OnSummon, EFFECT_0, SPELL_EFFECT_SUMMON_OBJECT_WILD);
OnEffectLaunch += SpellEffectFn(spell_halion_summon_exit_portals_SpellScript::OnSummon, EFFECT_1, SPELL_EFFECT_SUMMON_OBJECT_WILD);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_halion_summon_exit_portals_SpellScript();
}
@@ -1396,13 +1396,13 @@ public:
instance->DoUpdateWorldState(WORLDSTATE_CORPOREALITY_TWILIGHT, 50);
}
void Register()
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_halion_twilight_division_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_halion_twilight_division_SpellScript();
}
@@ -1423,13 +1423,13 @@ public:
target->AI()->Talk(SAY_REGENERATE);
}
void Register()
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_halion_twilight_mending_SpellScript::HandleHealPct, EFFECT_ALL, SPELL_EFFECT_HEAL_PCT);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_halion_twilight_mending_SpellScript();
}
@@ -1444,7 +1444,7 @@ public:
{
npc_living_infernoAI(Creature* creature) : ScriptedAI(creature) { }
void IsSummonedBy(Unit* /*summoner*/)
void IsSummonedBy(Unit* /*summoner*/) override
{
me->SetInCombatWithZone();
me->CastSpell(me, SPELL_BLAZING_AURA, true);
@@ -1454,13 +1454,13 @@ public:
controller->AI()->JustSummoned(me);
}
void JustDied(Unit* /*killer*/)
void JustDied(Unit* /*killer*/) override
{
me->DespawnOrUnsummon(1);
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const override
{
return GetInstanceAI<npc_living_infernoAI>(creature);
}

View File

@@ -55,13 +55,13 @@ public:
{
}
void Reset()
void Reset() override
{
BossAI::Reset();
me->SetReactState(REACT_AGGRESSIVE);
}
void EnterCombat(Unit* who)
void EnterCombat(Unit* who) override
{
BossAI::EnterCombat(who);
Talk(SAY_AGGRO);
@@ -71,13 +71,13 @@ public:
events.ScheduleEvent(EVENT_FLIGHT, 30000);
}
void JustDied(Unit* killer)
void JustDied(Unit* killer) override
{
BossAI::JustDied(killer);
me->PlayDirectSound(SOUND_ID_DEATH);
}
void MovementInform(uint32 type, uint32 point)
void MovementInform(uint32 type, uint32 point) override
{
if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE)
return;
@@ -97,14 +97,14 @@ public:
}
}
void JustReachedHome()
void JustReachedHome() override
{
BossAI::JustReachedHome();
me->SetDisableGravity(false);
me->SetHover(false);
}
void KilledUnit(Unit* /*victim*/)
void KilledUnit(Unit* /*victim*/) override
{
if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
{
@@ -113,7 +113,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
return;
@@ -164,7 +164,7 @@ public:
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const override
{
return GetInstanceAI<boss_saviana_ragefireAI>(creature);
}
@@ -186,13 +186,13 @@ public:
GetCaster()->CastSpell(GetHitUnit(), SPELL_CONFLAGRATION_MISSLE, true);
}
void Register()
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_saviana_conflagration_init_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_saviana_conflagration_init_SpellScript();
}
@@ -213,13 +213,13 @@ public:
GetHitUnit()->CastSpell(GetCaster(), uint32(GetEffectValue()), true);
}
void Register()
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_saviana_conflagration_throwback_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_saviana_conflagration_throwback_SpellScript();
}

View File

@@ -47,7 +47,7 @@ public:
FlameRingGUID = 0;
}
void OnPlayerEnter(Player* /*player*/)
void OnPlayerEnter(Player* /*player*/) override
{
if (GetBossState(DATA_HALION_INTRO_DONE) != DONE && GetBossState(DATA_GENERAL_ZARITHRIAN) == DONE)
{
@@ -57,7 +57,7 @@ public:
}
}
void OnCreatureCreate(Creature* creature)
void OnCreatureCreate(Creature* creature) override
{
switch (creature->GetEntry())
{
@@ -105,7 +105,7 @@ public:
}
}
void OnGameObjectCreate(GameObject* go)
void OnGameObjectCreate(GameObject* go) override
{
switch (go->GetEntry())
{
@@ -124,7 +124,7 @@ public:
}
}
void OnGameObjectRemove(GameObject* go)
void OnGameObjectRemove(GameObject* go) override
{
switch (go->GetEntry())
{
@@ -139,7 +139,7 @@ public:
}
}
uint64 GetData64(uint32 type) const
uint64 GetData64(uint32 type) const override
{
switch (type)
{
@@ -168,7 +168,7 @@ public:
return 0;
}
bool SetBossState(uint32 type, EncounterState state)
bool SetBossState(uint32 type, EncounterState state) override
{
if (!InstanceScript::SetBossState(type, state))
return false;
@@ -197,7 +197,7 @@ public:
return true;
}
std::string GetSaveData()
std::string GetSaveData() override
{
OUT_SAVE_INST_DATA;
@@ -208,14 +208,14 @@ public:
return saveStream.str();
}
void FillInitialWorldStates(WorldPacket& data)
void FillInitialWorldStates(WorldPacket& data) override
{
data << uint32(WORLDSTATE_CORPOREALITY_MATERIAL) << uint32(50);
data << uint32(WORLDSTATE_CORPOREALITY_TWILIGHT) << uint32(50);
data << uint32(WORLDSTATE_CORPOREALITY_TOGGLE) << uint32(0);
}
void Load(char const* str)
void Load(char const* str) override
{
if (!str)
{
@@ -268,7 +268,7 @@ public:
uint64 FlameRingGUID;
};
InstanceScript* GetInstanceScript(InstanceMap* map) const
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
return new instance_ruby_sanctum_InstanceMapScript(map);
}
@@ -294,13 +294,13 @@ public:
GetCaster()->CastCustomSpell(SPELL_RALLY, SPELLVALUE_AURA_STACK, count, GetCaster(), true);
}
void Register()
void Register() override
{
AfterHit += SpellHitFn(spell_ruby_sanctum_rallying_shout_SpellScript::CountAllies);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const override
{
return new spell_ruby_sanctum_rallying_shout_SpellScript();
}