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:
Nay committed 2013-07-06 20:21:45 +01:00
1 parent 0c911af24c
commit 3561ab98ba
577 files changed
+8945 -8757

No files matched your search

+47 -47
View File
@@ -63,12 +63,12 @@ class spell_hun_aspect_of_the_beast : public SpellScriptLoader
{
PrepareAuraScript(spell_hun_aspect_of_the_beast_AuraScript);
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_HUNTER_ASPECT_OF_THE_BEAST_PET))
return false;
@@ -89,14 +89,14 @@ class spell_hun_aspect_of_the_beast : public SpellScriptLoader
caster->CastSpell(caster, SPELL_HUNTER_ASPECT_OF_THE_BEAST_PET, true);
}
void Register()
void Register() OVERRIDE
{
AfterEffectApply += AuraEffectApplyFn(spell_hun_aspect_of_the_beast_AuraScript::OnApply, EFFECT_0, SPELL_AURA_UNTRACKABLE, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_hun_aspect_of_the_beast_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_UNTRACKABLE, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_hun_aspect_of_the_beast_AuraScript();
}
@@ -112,7 +112,7 @@ class spell_hun_ascpect_of_the_viper : public SpellScriptLoader
{
PrepareAuraScript(spell_hun_ascpect_of_the_viper_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_ASPECT_OF_THE_VIPER_ENERGIZE))
return false;
@@ -134,13 +134,13 @@ class spell_hun_ascpect_of_the_viper : public SpellScriptLoader
GetTarget()->CastCustomSpell(SPELL_HUNTER_ASPECT_OF_THE_VIPER_ENERGIZE, SPELLVALUE_BASE_POINT0, mana, GetTarget(), true, NULL, aurEff);
}
void Register()
void Register() OVERRIDE
{
OnEffectProc += AuraEffectProcFn(spell_hun_ascpect_of_the_viper_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_OBS_MOD_POWER);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_hun_ascpect_of_the_viper_AuraScript();
}
@@ -156,7 +156,7 @@ class spell_hun_chimera_shot : public SpellScriptLoader
{
PrepareSpellScript(spell_hun_chimera_shot_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_CHIMERA_SHOT_SERPENT) || !sSpellMgr->GetSpellInfo(SPELL_HUNTER_CHIMERA_SHOT_VIPER) || !sSpellMgr->GetSpellInfo(SPELL_HUNTER_CHIMERA_SHOT_SCORPID))
return false;
@@ -227,13 +227,13 @@ class spell_hun_chimera_shot : public SpellScriptLoader
}
}
void Register()
void Register() OVERRIDE
{
OnEffectHitTarget += SpellEffectFn(spell_hun_chimera_shot_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_hun_chimera_shot_SpellScript();
}
@@ -258,13 +258,13 @@ class spell_hun_disengage : public SpellScriptLoader
return SPELL_CAST_OK;
}
void Register()
void Register() OVERRIDE
{
OnCheckCast += SpellCheckCastFn(spell_hun_disengage_SpellScript::CheckCast);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_hun_disengage_SpellScript();
}
@@ -280,7 +280,7 @@ class spell_hun_invigoration : public SpellScriptLoader
{
PrepareSpellScript(spell_hun_invigoration_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_INVIGORATION_TRIGGERED))
return false;
@@ -295,13 +295,13 @@ class spell_hun_invigoration : public SpellScriptLoader
unitTarget->CastSpell(unitTarget, SPELL_HUNTER_INVIGORATION_TRIGGERED, true);
}
void Register()
void Register() OVERRIDE
{
OnEffectHitTarget += SpellEffectFn(spell_hun_invigoration_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_hun_invigoration_SpellScript();
}
@@ -317,7 +317,7 @@ class spell_hun_last_stand_pet : public SpellScriptLoader
{
PrepareSpellScript(spell_hun_last_stand_pet_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_PET_LAST_STAND_TRIGGERED))
return false;
@@ -331,13 +331,13 @@ class spell_hun_last_stand_pet : public SpellScriptLoader
caster->CastCustomSpell(caster, SPELL_HUNTER_PET_LAST_STAND_TRIGGERED, &healthModSpellBasePoints0, NULL, NULL, true, NULL);
}
void Register()
void Register() OVERRIDE
{
OnEffectHitTarget += SpellEffectFn(spell_hun_last_stand_pet_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_hun_last_stand_pet_SpellScript();
}
@@ -353,7 +353,7 @@ class spell_hun_masters_call : public SpellScriptLoader
{
PrepareSpellScript(spell_hun_masters_call_SpellScript);
bool Validate(SpellInfo const* spellInfo)
bool Validate(SpellInfo const* spellInfo) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_MASTERS_CALL_TRIGGERED) || !sSpellMgr->GetSpellInfo(spellInfo->Effects[EFFECT_0].CalcValue()) || !sSpellMgr->GetSpellInfo(spellInfo->Effects[EFFECT_1].CalcValue()))
return false;
@@ -382,14 +382,14 @@ class spell_hun_masters_call : public SpellScriptLoader
}
}
void Register()
void Register() OVERRIDE
{
OnEffectHitTarget += SpellEffectFn(spell_hun_masters_call_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnEffectHitTarget += SpellEffectFn(spell_hun_masters_call_SpellScript::HandleScriptEffect, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_hun_masters_call_SpellScript();
}
@@ -405,7 +405,7 @@ class spell_hun_misdirection : public SpellScriptLoader
{
PrepareAuraScript(spell_hun_misdirection_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_MISDIRECTION_PROC))
return false;
@@ -429,7 +429,7 @@ class spell_hun_misdirection : public SpellScriptLoader
GetTarget()->CastSpell(GetTarget(), SPELL_HUNTER_MISDIRECTION_PROC, true, NULL, aurEff);
}
void Register()
void Register() OVERRIDE
{
AfterEffectRemove += AuraEffectRemoveFn(spell_hun_misdirection_AuraScript::OnRemove, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
DoCheckProc += AuraCheckProcFn(spell_hun_misdirection_AuraScript::CheckProc);
@@ -437,7 +437,7 @@ class spell_hun_misdirection : public SpellScriptLoader
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_hun_misdirection_AuraScript();
}
@@ -458,13 +458,13 @@ class spell_hun_misdirection_proc : public SpellScriptLoader
GetTarget()->ResetRedirectThreat();
}
void Register()
void Register() OVERRIDE
{
AfterEffectRemove += AuraEffectRemoveFn(spell_hun_misdirection_proc_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_hun_misdirection_proc_AuraScript();
}
@@ -480,14 +480,14 @@ class spell_hun_pet_carrion_feeder : public SpellScriptLoader
{
PrepareSpellScript(spell_hun_pet_carrion_feeder_SpellScript);
bool Load()
bool Load() OVERRIDE
{
if (!GetCaster()->IsPet())
return false;
return true;
}
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_PET_CARRION_FEEDER_TRIGGERED))
return false;
@@ -514,14 +514,14 @@ class spell_hun_pet_carrion_feeder : public SpellScriptLoader
caster->CastSpell(caster, SPELL_HUNTER_PET_CARRION_FEEDER_TRIGGERED, false);
}
void Register()
void Register() OVERRIDE
{
OnEffectHit += SpellEffectFn(spell_hun_pet_carrion_feeder_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnCheckCast += SpellCheckCastFn(spell_hun_pet_carrion_feeder_SpellScript::CheckIfCorpseNear);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_hun_pet_carrion_feeder_SpellScript();
}
@@ -537,14 +537,14 @@ class spell_hun_pet_heart_of_the_phoenix : public SpellScriptLoader
{
PrepareSpellScript(spell_hun_pet_heart_of_the_phoenix_SpellScript);
bool Load()
bool Load() OVERRIDE
{
if (!GetCaster()->IsPet())
return false;
return true;
}
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_PET_HEART_OF_THE_PHOENIX_TRIGGERED) || !sSpellMgr->GetSpellInfo(SPELL_HUNTER_PET_HEART_OF_THE_PHOENIX_DEBUFF))
return false;
@@ -562,13 +562,13 @@ class spell_hun_pet_heart_of_the_phoenix : public SpellScriptLoader
}
}
void Register()
void Register() OVERRIDE
{
OnEffectHitTarget += SpellEffectFn(spell_hun_pet_heart_of_the_phoenix_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_hun_pet_heart_of_the_phoenix_SpellScript();
}
@@ -584,7 +584,7 @@ class spell_hun_readiness : public SpellScriptLoader
{
PrepareSpellScript(spell_hun_readiness_SpellScript);
bool Load()
bool Load() OVERRIDE
{
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
@@ -611,13 +611,13 @@ class spell_hun_readiness : public SpellScriptLoader
}
}
void Register()
void Register() OVERRIDE
{
OnEffectHitTarget += SpellEffectFn(spell_hun_readiness_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_hun_readiness_SpellScript();
}
@@ -633,7 +633,7 @@ class spell_hun_scatter_shot : public SpellScriptLoader
{
PrepareSpellScript(spell_hun_scatter_shot_SpellScript);
bool Load()
bool Load() OVERRIDE
{
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
@@ -647,13 +647,13 @@ class spell_hun_scatter_shot : public SpellScriptLoader
caster->SendAttackSwingCancelAttack();
}
void Register()
void Register() OVERRIDE
{
OnEffectHitTarget += SpellEffectFn(spell_hun_scatter_shot_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_hun_scatter_shot_SpellScript();
}
@@ -669,7 +669,7 @@ class spell_hun_sniper_training : public SpellScriptLoader
{
PrepareAuraScript(spell_hun_sniper_training_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/)
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_SNIPER_TRAINING_R1) || !sSpellMgr->GetSpellInfo(SPELL_HUNTER_SNIPER_TRAINING_BUFF_R1))
return false;
@@ -705,14 +705,14 @@ class spell_hun_sniper_training : public SpellScriptLoader
}
}
void Register()
void Register() OVERRIDE
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_hun_sniper_training_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_hun_sniper_training_AuraScript::HandleUpdatePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_hun_sniper_training_AuraScript();
}
@@ -758,13 +758,13 @@ class spell_hun_tame_beast : public SpellScriptLoader
return SPELL_CAST_OK;
}
void Register()
void Register() OVERRIDE
{
OnCheckCast += SpellCheckCastFn(spell_hun_tame_beast_SpellScript::CheckCast);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_hun_tame_beast_SpellScript();
}
@@ -789,14 +789,14 @@ class spell_hun_target_only_pet_and_owner : public SpellScriptLoader
targets.push_back(owner);
}
void Register()
void Register() OVERRIDE
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_target_only_pet_and_owner_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_CASTER_AREA_PARTY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_target_only_pet_and_owner_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_CASTER_AREA_PARTY);
}
};
SpellScript* GetSpellScript() const
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_hun_target_only_pet_and_owner_SpellScript();
}