Misc: Use override and final C++11 keywords in a few places (mostly scripts)
OVERRIDE and FINAL are TC macros (expand to nothing if compiler does not support C++11)
This commit is contained in:
1 parent
0c911af24c
commit
3561ab98ba
577 files changed
+8945
-8757
No files matched your search
@@ -47,14 +47,14 @@ class spell_rog_blade_flurry : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_rog_blade_flurry_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_BLADE_FLURRY_EXTRA_ATTACK))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Load()
|
||||
bool Load() OVERRIDE
|
||||
{
|
||||
_procTarget = NULL;
|
||||
return true;
|
||||
@@ -76,7 +76,7 @@ class spell_rog_blade_flurry : public SpellScriptLoader
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_rog_blade_flurry_AuraScript::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_rog_blade_flurry_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_MOD_MELEE_HASTE);
|
||||
@@ -86,7 +86,7 @@ class spell_rog_blade_flurry : public SpellScriptLoader
|
||||
Unit* _procTarget;
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
AuraScript* GetAuraScript() const OVERRIDE
|
||||
{
|
||||
return new spell_rog_blade_flurry_AuraScript();
|
||||
}
|
||||
@@ -104,14 +104,14 @@ class spell_rog_cheat_death : public SpellScriptLoader
|
||||
|
||||
uint32 absorbChance;
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_CHEAT_DEATH_COOLDOWN))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Load()
|
||||
bool Load() OVERRIDE
|
||||
{
|
||||
absorbChance = GetSpellInfo()->Effects[EFFECT_0].CalcValue();
|
||||
return GetUnitOwner()->ToPlayer();
|
||||
@@ -142,14 +142,14 @@ class spell_rog_cheat_death : public SpellScriptLoader
|
||||
absorbAmount = dmgInfo.GetDamage();
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_rog_cheat_death_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
|
||||
OnEffectAbsorb += AuraEffectAbsorbFn(spell_rog_cheat_death_AuraScript::Absorb, EFFECT_0);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
AuraScript* GetAuraScript() const OVERRIDE
|
||||
{
|
||||
return new spell_rog_cheat_death_AuraScript();
|
||||
}
|
||||
@@ -165,7 +165,7 @@ class spell_rog_deadly_poison : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_rog_deadly_poison_SpellScript);
|
||||
|
||||
bool Load()
|
||||
bool Load() OVERRIDE
|
||||
{
|
||||
_stackAmount = 0;
|
||||
// at this point CastItem must already be initialized
|
||||
@@ -234,7 +234,7 @@ class spell_rog_deadly_poison : public SpellScriptLoader
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
BeforeHit += SpellHitFn(spell_rog_deadly_poison_SpellScript::HandleBeforeHit);
|
||||
AfterHit += SpellHitFn(spell_rog_deadly_poison_SpellScript::HandleAfterHit);
|
||||
@@ -243,7 +243,7 @@ class spell_rog_deadly_poison : public SpellScriptLoader
|
||||
uint8 _stackAmount;
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
SpellScript* GetSpellScript() const OVERRIDE
|
||||
{
|
||||
return new spell_rog_deadly_poison_SpellScript();
|
||||
}
|
||||
@@ -261,7 +261,7 @@ class spell_rog_nerves_of_steel : public SpellScriptLoader
|
||||
|
||||
uint32 absorbPct;
|
||||
|
||||
bool Load()
|
||||
bool Load() OVERRIDE
|
||||
{
|
||||
absorbPct = GetSpellInfo()->Effects[EFFECT_0].CalcValue(GetCaster());
|
||||
return true;
|
||||
@@ -280,14 +280,14 @@ class spell_rog_nerves_of_steel : public SpellScriptLoader
|
||||
absorbAmount = CalculatePct(dmgInfo.GetDamage(), absorbPct);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_rog_nerves_of_steel_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
|
||||
OnEffectAbsorb += AuraEffectAbsorbFn(spell_rog_nerves_of_steel_AuraScript::Absorb, EFFECT_0);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
AuraScript* GetAuraScript() const OVERRIDE
|
||||
{
|
||||
return new spell_rog_nerves_of_steel_AuraScript();
|
||||
}
|
||||
@@ -303,12 +303,12 @@ class spell_rog_preparation : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_rog_preparation_SpellScript);
|
||||
|
||||
bool Load()
|
||||
bool Load() OVERRIDE
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
|
||||
}
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_GLYPH_OF_PREPARATION))
|
||||
return false;
|
||||
@@ -348,13 +348,13 @@ class spell_rog_preparation : public SpellScriptLoader
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_rog_preparation_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
SpellScript* GetSpellScript() const OVERRIDE
|
||||
{
|
||||
return new spell_rog_preparation_SpellScript();
|
||||
}
|
||||
@@ -370,7 +370,7 @@ class spell_rog_prey_on_the_weak : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_rog_prey_on_the_weak_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_PREY_ON_THE_WEAK))
|
||||
return false;
|
||||
@@ -393,13 +393,13 @@ class spell_rog_prey_on_the_weak : public SpellScriptLoader
|
||||
target->RemoveAurasDueToSpell(SPELL_ROGUE_PREY_ON_THE_WEAK);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_rog_prey_on_the_weak_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
AuraScript* GetAuraScript() const OVERRIDE
|
||||
{
|
||||
return new spell_rog_prey_on_the_weak_AuraScript();
|
||||
}
|
||||
@@ -415,7 +415,7 @@ class spell_rog_rupture : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_rog_rupture_AuraScript);
|
||||
|
||||
bool Load()
|
||||
bool Load() OVERRIDE
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
return caster && caster->GetTypeId() == TYPEID_PLAYER;
|
||||
@@ -445,13 +445,13 @@ class spell_rog_rupture : public SpellScriptLoader
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_rog_rupture_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
AuraScript* GetAuraScript() const OVERRIDE
|
||||
{
|
||||
return new spell_rog_rupture_AuraScript();
|
||||
}
|
||||
@@ -467,12 +467,12 @@ class spell_rog_shiv : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_rog_shiv_SpellScript);
|
||||
|
||||
bool Load()
|
||||
bool Load() OVERRIDE
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
|
||||
}
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_SHIV_TRIGGERED))
|
||||
return false;
|
||||
@@ -486,13 +486,13 @@ class spell_rog_shiv : public SpellScriptLoader
|
||||
caster->CastSpell(unitTarget, SPELL_ROGUE_SHIV_TRIGGERED, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_rog_shiv_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
SpellScript* GetSpellScript() const OVERRIDE
|
||||
{
|
||||
return new spell_rog_shiv_SpellScript();
|
||||
}
|
||||
@@ -508,7 +508,7 @@ class spell_rog_tricks_of_the_trade : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_rog_tricks_of_the_trade_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_TRICKS_OF_THE_TRADE_DMG_BOOST))
|
||||
return false;
|
||||
@@ -517,7 +517,7 @@ class spell_rog_tricks_of_the_trade : public SpellScriptLoader
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Load()
|
||||
bool Load() OVERRIDE
|
||||
{
|
||||
_redirectTarget = NULL;
|
||||
return true;
|
||||
@@ -545,7 +545,7 @@ class spell_rog_tricks_of_the_trade : public SpellScriptLoader
|
||||
Remove(AURA_REMOVE_BY_DEFAULT); // maybe handle by proc charges
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
AfterEffectRemove += AuraEffectRemoveFn(spell_rog_tricks_of_the_trade_AuraScript::OnRemove, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
DoCheckProc += AuraCheckProcFn(spell_rog_tricks_of_the_trade_AuraScript::CheckProc);
|
||||
@@ -556,7 +556,7 @@ class spell_rog_tricks_of_the_trade : public SpellScriptLoader
|
||||
Unit* _redirectTarget;
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
AuraScript* GetAuraScript() const OVERRIDE
|
||||
{
|
||||
return new spell_rog_tricks_of_the_trade_AuraScript();
|
||||
}
|
||||
@@ -577,13 +577,13 @@ class spell_rog_tricks_of_the_trade_proc : public SpellScriptLoader
|
||||
GetTarget()->ResetRedirectThreat();
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
AfterEffectRemove += AuraEffectRemoveFn(spell_rog_tricks_of_the_trade_proc_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
AuraScript* GetAuraScript() const OVERRIDE
|
||||
{
|
||||
return new spell_rog_tricks_of_the_trade_proc_AuraScript();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user