mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-14 07:53:44 +00:00
fix(Core/Misc): Change const to be after type name (#10591)
This commit is contained in:
@@ -461,7 +461,7 @@ class spell_dk_wandering_plague_aura : public AuraScript
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
const SpellInfo* spellInfo = eventInfo.GetSpellInfo();
|
||||
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
|
||||
if (!spellInfo || !eventInfo.GetActionTarget() || !eventInfo.GetDamageInfo() || !eventInfo.GetActor())
|
||||
return false;
|
||||
|
||||
@@ -591,7 +591,7 @@ class spell_dk_dancing_rune_weapon : public AuraScript
|
||||
if (!eventInfo.GetActor() || !eventInfo.GetActionTarget() || !eventInfo.GetActionTarget()->IsAlive() || eventInfo.GetActor()->GetTypeId() != TYPEID_PLAYER)
|
||||
return false;
|
||||
|
||||
const SpellInfo* spellInfo = eventInfo.GetSpellInfo();
|
||||
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
|
||||
if (!spellInfo)
|
||||
return true;
|
||||
|
||||
@@ -636,7 +636,7 @@ class spell_dk_dancing_rune_weapon : public AuraScript
|
||||
return;
|
||||
|
||||
dancingRuneWeapon->SetOrientation(dancingRuneWeapon->GetAngle(target));
|
||||
if (const SpellInfo* procSpell = eventInfo.GetSpellInfo())
|
||||
if (SpellInfo const* procSpell = eventInfo.GetSpellInfo())
|
||||
{
|
||||
// xinef: ugly hack
|
||||
if (!procSpell->IsAffectingArea())
|
||||
@@ -1338,7 +1338,7 @@ class spell_dk_death_grip : public SpellScript
|
||||
else
|
||||
{
|
||||
caster->CastSpell(target, 49560, true);
|
||||
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(1766); // Rogue kick
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(1766); // Rogue kick
|
||||
if (!target->IsImmunedToSpellEffect(spellInfo, EFFECT_0))
|
||||
target->InterruptNonMeleeSpells(true);
|
||||
}
|
||||
@@ -1356,7 +1356,7 @@ class spell_dk_death_grip : public SpellScript
|
||||
{
|
||||
if (target != GetCaster())
|
||||
{
|
||||
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(1766); // Rogue kick
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(1766); // Rogue kick
|
||||
if (!target->IsImmunedToSpellEffect(spellInfo, EFFECT_0))
|
||||
target->InterruptNonMeleeSpells(false, 0, false);
|
||||
}
|
||||
|
||||
@@ -565,7 +565,7 @@ class spell_dru_lifebloom : public AuraScript
|
||||
// final heal
|
||||
int32 stack = GetStackAmount();
|
||||
int32 healAmount = aurEff->GetAmount();
|
||||
const SpellInfo* finalHeal = sSpellMgr->GetSpellInfo(SPELL_DRUID_LIFEBLOOM_FINAL_HEAL);
|
||||
SpellInfo const* finalHeal = sSpellMgr->GetSpellInfo(SPELL_DRUID_LIFEBLOOM_FINAL_HEAL);
|
||||
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
@@ -586,7 +586,7 @@ class spell_dru_lifebloom : public AuraScript
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
int32 healAmount = GetSpellInfo()->Effects[EFFECT_1].CalcValue(caster ? caster : target, 0, target) * dispelInfo->GetRemovedCharges();
|
||||
const SpellInfo* finalHeal = sSpellMgr->GetSpellInfo(SPELL_DRUID_LIFEBLOOM_FINAL_HEAL);
|
||||
SpellInfo const* finalHeal = sSpellMgr->GetSpellInfo(SPELL_DRUID_LIFEBLOOM_FINAL_HEAL);
|
||||
if (caster)
|
||||
{
|
||||
// healing with bonus
|
||||
|
||||
@@ -959,7 +959,7 @@ class spell_item_blade_ward_enchant : public AuraScript
|
||||
return;
|
||||
}
|
||||
|
||||
if (const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(64442 /*SPELL_BLADE_WARDING*/))
|
||||
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(64442 /*SPELL_BLADE_WARDING*/))
|
||||
{
|
||||
int32 basepoints = spellInfo->Effects[EFFECT_0].CalcValue() * this->GetStackAmount();
|
||||
eventInfo.GetActionTarget()->CastCustomSpell(spellInfo->Id, SPELLVALUE_BASE_POINT0, basepoints, eventInfo.GetActor(), true);
|
||||
@@ -984,14 +984,14 @@ class spell_item_blood_draining_enchant : public AuraScript
|
||||
return;
|
||||
}
|
||||
|
||||
if (const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(64569 /*SPELL_BLOOD_RESERVE*/))
|
||||
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(64569 /*SPELL_BLOOD_RESERVE*/))
|
||||
{
|
||||
int32 basepoints = spellInfo->Effects[EFFECT_0].CalcValue() * this->GetStackAmount();
|
||||
eventInfo.GetActionTarget()->CastCustomSpell(spellInfo->Id, SPELLVALUE_BASE_POINT0, basepoints, eventInfo.GetActionTarget(), true);
|
||||
eventInfo.GetActionTarget()->RemoveAurasDueToSpell(GetSpellInfo()->Id); // Remove rest auras
|
||||
}
|
||||
|
||||
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(64569 /*SPELL_BLOOD_RESERVE*/);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(64569 /*SPELL_BLOOD_RESERVE*/);
|
||||
int32 basepoints = spellInfo->Effects[EFFECT_0].CalcValue() * this->GetStackAmount();
|
||||
eventInfo.GetActionTarget()->CastCustomSpell(spellInfo->Id, SPELLVALUE_BASE_POINT0, basepoints, eventInfo.GetActionTarget(), true);
|
||||
eventInfo.GetActionTarget()->RemoveAurasDueToSpell(GetSpellInfo()->Id); // Remove rest auras
|
||||
@@ -2226,7 +2226,7 @@ class spell_item_shadowmourne : public AuraScript
|
||||
/*if (!GetTarget()->FindMap() || GetTarget()->FindMap()->IsBattlegroundOrArena())
|
||||
return false;*/
|
||||
|
||||
if (const SpellInfo* procSpell = eventInfo.GetSpellInfo())
|
||||
if (SpellInfo const* procSpell = eventInfo.GetSpellInfo())
|
||||
{
|
||||
if (eventInfo.GetDamageInfo() && !eventInfo.GetDamageInfo()->GetDamage())
|
||||
{
|
||||
|
||||
@@ -133,7 +133,7 @@ class spell_mage_molten_armor : public AuraScript
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
const SpellInfo* spellInfo = eventInfo.GetSpellInfo();
|
||||
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
|
||||
if (!spellInfo || (eventInfo.GetTypeMask() & PROC_FLAG_TAKEN_MELEE_AUTO_ATTACK))
|
||||
return true;
|
||||
|
||||
@@ -345,7 +345,7 @@ class spell_mage_brain_freeze : public AuraScript
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
const SpellInfo* spellInfo = eventInfo.GetSpellInfo();
|
||||
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
|
||||
if (!spellInfo)
|
||||
return false;
|
||||
|
||||
@@ -591,7 +591,7 @@ class spell_mage_ice_barrier_aura : public spell_mage_incanters_absorbtion_base_
|
||||
PrepareAuraScript(spell_mage_ice_barrier_aura);
|
||||
|
||||
// TODO: Rework
|
||||
static int32 CalculateSpellAmount(Unit* caster, int32 amount, const SpellInfo* spellInfo, const AuraEffect* aurEff)
|
||||
static int32 CalculateSpellAmount(Unit* caster, int32 amount, SpellInfo const* spellInfo, const AuraEffect* aurEff)
|
||||
{
|
||||
// +80.68% from sp bonus
|
||||
float bonus = 0.8068f;
|
||||
@@ -627,7 +627,7 @@ class spell_mage_ice_barrier : public SpellScript
|
||||
PrepareSpellScript(spell_mage_ice_barrier);
|
||||
|
||||
// TODO: Rework
|
||||
static int32 CalculateSpellAmount(Unit* caster, int32 amount, const SpellInfo* spellInfo, const AuraEffect* aurEff)
|
||||
static int32 CalculateSpellAmount(Unit* caster, int32 amount, SpellInfo const* spellInfo, const AuraEffect* aurEff)
|
||||
{
|
||||
// +80.68% from sp bonus
|
||||
float bonus = 0.8068f;
|
||||
@@ -919,7 +919,7 @@ class spell_mage_summon_water_elemental : public SpellScript
|
||||
if (pet->GetCharmInfo() && caster->ToPlayer())
|
||||
{
|
||||
pet->m_CreatureSpellCooldowns.clear();
|
||||
const SpellInfo* spellEntry = sSpellMgr->GetSpellInfo(31707);
|
||||
SpellInfo const* spellEntry = sSpellMgr->GetSpellInfo(31707);
|
||||
pet->GetCharmInfo()->ToggleCreatureAutocast(spellEntry, true);
|
||||
pet->GetCharmInfo()->SetSpellAutocast(spellEntry, true);
|
||||
caster->ToPlayer()->CharmSpellInitialize();
|
||||
|
||||
@@ -100,7 +100,7 @@ class spell_pal_seal_of_command_aura : public AuraScript
|
||||
return false;
|
||||
}
|
||||
|
||||
if (const SpellInfo* procSpell = eventInfo.GetSpellInfo())
|
||||
if (SpellInfo const* procSpell = eventInfo.GetSpellInfo())
|
||||
{
|
||||
if (procSpell->SpellIconID == 3025) // Righteous Vengeance, should not proc SoC
|
||||
{
|
||||
@@ -115,7 +115,7 @@ class spell_pal_seal_of_command_aura : public AuraScript
|
||||
{
|
||||
PreventDefaultAction();
|
||||
int32 targets = 3;
|
||||
if (const SpellInfo* procSpell = eventInfo.GetSpellInfo())
|
||||
if (SpellInfo const* procSpell = eventInfo.GetSpellInfo())
|
||||
{
|
||||
if (procSpell->IsAffectingArea())
|
||||
{
|
||||
@@ -146,7 +146,7 @@ class spell_pal_seal_of_command : public SpellScript
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
if (const SpellValue* spellValue = GetSpellValue())
|
||||
if (SpellValue const* spellValue = GetSpellValue())
|
||||
if (spellValue->MaxAffectedTargets == 1)
|
||||
targets.clear();
|
||||
}
|
||||
@@ -198,7 +198,7 @@ class spell_pal_sacred_shield_base : public AuraScript
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell);
|
||||
amount = spellInfo->Effects[EFFECT_0].CalcValue();
|
||||
|
||||
// +75.00% from sp bonus
|
||||
@@ -238,7 +238,7 @@ class spell_pal_sacred_shield_base : public AuraScript
|
||||
return;
|
||||
}
|
||||
|
||||
const SpellInfo* procSpell = damageInfo->GetSpellInfo();
|
||||
SpellInfo const* procSpell = damageInfo->GetSpellInfo();
|
||||
if (!procSpell)
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -546,7 +546,7 @@ class spell_pri_penance : public SpellScript
|
||||
};
|
||||
|
||||
// -17 - Power Word: Shield
|
||||
static int32 CalculateSpellAmount(Unit* caster, int32 amount, const SpellInfo* spellInfo, const AuraEffect* aurEff)
|
||||
static int32 CalculateSpellAmount(Unit* caster, int32 amount, SpellInfo const* spellInfo, const AuraEffect* aurEff)
|
||||
{
|
||||
// +80.68% from sp bonus
|
||||
float bonus = 0.8068f;
|
||||
|
||||
Reference in New Issue
Block a user