mirror of
https://gitcode.com/GitHub_Trending/az/azerothcore-wotlk.git
synced 2026-10-10 07:06:38 +08:00
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
This commit is contained in:
co-authored by
Copilot Autofix powered by AI
parent
c3fb24a827
commit
0b902c61a6
@@ -639,6 +639,12 @@ class spell_dru_lifebloom : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_dru_lifebloom);
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_DRUID_AURA_OF_DESPAIR_1 = 62692,
|
||||
SPELL_DRUID_AURA_OF_DESPAIR_2 = 64848
|
||||
};
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, SPELL_DRUID_LIFEBLOOM_ENERGIZE });
|
||||
@@ -659,8 +665,12 @@ class spell_dru_lifebloom : public AuraScript
|
||||
{
|
||||
healAmount = caster->SpellHealingBonusDone(GetTarget(), finalHeal, healAmount, HEAL, aurEff->GetEffIndex(), 0.0f, stack);
|
||||
healAmount = GetTarget()->SpellHealingBonusTaken(caster, finalHeal, healAmount, HEAL, stack);
|
||||
|
||||
// restore mana
|
||||
int32 returnmana = (GetSpellInfo()->ManaCostPercentage * caster->GetCreateMana() / 100) * stack / 2;
|
||||
int32 returnmana = GetSpellInfo()->ManaCostPercentage * caster->GetCreateMana() * stack / 100 / 2;
|
||||
if (caster->HasAnyAuras(SPELL_DRUID_AURA_OF_DESPAIR_1, SPELL_DRUID_AURA_OF_DESPAIR_2))
|
||||
returnmana /= 2;
|
||||
|
||||
caster->CastCustomSpell(caster, SPELL_DRUID_LIFEBLOOM_ENERGIZE, &returnmana, nullptr, nullptr, true, nullptr, aurEff, GetCasterGUID());
|
||||
}
|
||||
GetTarget()->CastCustomSpell(GetTarget(), SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, nullptr, nullptr, true, nullptr, aurEff, GetCasterGUID());
|
||||
@@ -683,6 +693,9 @@ class spell_dru_lifebloom : public AuraScript
|
||||
|
||||
// mana amount
|
||||
int32 mana = CalculatePct(caster->GetCreateMana(), GetSpellInfo()->ManaCostPercentage) * dispelInfo->GetRemovedCharges() / 2;
|
||||
if (caster->HasAnyAuras(SPELL_DRUID_AURA_OF_DESPAIR_1, SPELL_DRUID_AURA_OF_DESPAIR_2))
|
||||
mana /= 2;
|
||||
|
||||
caster->CastCustomSpell(caster, SPELL_DRUID_LIFEBLOOM_ENERGIZE, &mana, nullptr, nullptr, true, nullptr, nullptr, GetCasterGUID());
|
||||
}
|
||||
target->CastCustomSpell(target, SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, nullptr, nullptr, true, nullptr, nullptr, GetCasterGUID());
|
||||
|
||||
Reference in New Issue
Block a user