mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
fix(Core/Spells): Use base mana cost for Illumination and Thrill of the Hunt (#24776)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
-- Fix spell_pal_illumination bound to wrong spell (-20234 = Improved Lay on Hands instead of -20210 = Illumination)
|
||||||
|
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_pal_illumination';
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (-20210, 'spell_pal_illumination');
|
||||||
@@ -1349,10 +1349,13 @@ class spell_hun_thrill_of_the_hunt : public AuraScript
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (AuraEffect const* pEff = victim->GetAuraEffect(SPELL_AURA_PERIODIC_DUMMY, SPELLFAMILY_HUNTER, 0x0, 0x80000000, 0x0, caster->GetGUID()))
|
if (AuraEffect const* pEff = victim->GetAuraEffect(SPELL_AURA_PERIODIC_DUMMY, SPELLFAMILY_HUNTER, 0x0, 0x80000000, 0x0, caster->GetGUID()))
|
||||||
mana = pEff->GetSpellInfo()->CalcPowerCost(caster, SpellSchoolMask(pEff->GetSpellInfo()->SchoolMask)) * 4 / 10 / 3;
|
{
|
||||||
|
SpellInfo const* expSpell = pEff->GetSpellInfo();
|
||||||
|
mana = (expSpell->ManaCost + int32(CalculatePct(caster->GetCreateMana(), expSpell->ManaCostPercentage))) * 4 / 10 / 3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mana = procSpell->CalcPowerCost(caster, SpellSchoolMask(procSpell->SchoolMask)) * 4 / 10;
|
mana = (procSpell->ManaCost + int32(CalculatePct(caster->GetCreateMana(), procSpell->ManaCostPercentage))) * 4 / 10;
|
||||||
|
|
||||||
if (spell)
|
if (spell)
|
||||||
caster->ToPlayer()->SetSpellModTakingSpell(spell, true);
|
caster->ToPlayer()->SetSpellModTakingSpell(spell, true);
|
||||||
|
|||||||
@@ -2063,7 +2063,7 @@ private:
|
|||||||
bool _isVengeance = true;
|
bool _isVengeance = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
// -20234 - Illumination
|
// -20210 - Illumination
|
||||||
class spell_pal_illumination : public AuraScript
|
class spell_pal_illumination : public AuraScript
|
||||||
{
|
{
|
||||||
PrepareAuraScript(spell_pal_illumination);
|
PrepareAuraScript(spell_pal_illumination);
|
||||||
@@ -2095,7 +2095,8 @@ class spell_pal_illumination : public AuraScript
|
|||||||
if (originalSpell && aurEff->GetSpellInfo())
|
if (originalSpell && aurEff->GetSpellInfo())
|
||||||
{
|
{
|
||||||
Unit* target = eventInfo.GetActor(); // Paladin is the target of the energize
|
Unit* target = eventInfo.GetActor(); // Paladin is the target of the energize
|
||||||
int32 bp = CalculatePct(static_cast<int32>(originalSpell->CalcPowerCost(target, originalSpell->GetSchoolMask())), aurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue());
|
int32 baseCost = originalSpell->ManaCost + int32(CalculatePct(target->GetCreateMana(), originalSpell->ManaCostPercentage));
|
||||||
|
int32 bp = CalculatePct(baseCost, aurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue());
|
||||||
target->CastCustomSpell(target, SPELL_PALADIN_ILLUMINATION_ENERGIZE, &bp, nullptr, nullptr, true, nullptr, aurEff);
|
target->CastCustomSpell(target, SPELL_PALADIN_ILLUMINATION_ENERGIZE, &bp, nullptr, nullptr, true, nullptr, aurEff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user