Jump to content

[patch][8049] Lifebloom - mana return

Auntie Mangos

Recommended Posts

what about the coefficient of the bloom... now just heal what the power say ,but it should have a bonus equal 64.6% of your spell power and ti can crit... i make a topic explaining the bug http://getmangos.eu/community/viewtopic.php?id=8802&highlight=lifebloom

can you take a look pliz, is just a number you need to chance

I'll post an SQL fix for the coefficient later on in the coefficient topic.

Edit: not possible because the effect of the bloom is dummy

"Apply Aura: Dummy

Value: 970

Server-side script"

It can be fixed thru spell_bonus_data only if the spell to heal is separate, like http://www.wowhead.com/?spell=33778, but I'm pretty sure it has to be done in c++ code.

Link to comment
Share on other sites

  • 39 years later...

What bug does the patch fix? What features does the patch add?

It adds Lifebloom mana return effect, after final heal of Lifebloom.

For which repository revision was the patch created?


Who has been writing this patch? Please include either forum user names or email addresses.

Me - Dr Bobaz, and The Nosfu

--------------------------- src/game/SpellAuras.cpp ---------------------------
index 3c01c22..4437d09 100644
@@ -2375,6 +2375,9 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
                        int32 amount = m_modifier.m_amount / m_stackAmount;
                        m_target->CastCustomSpell(m_target, 33778, &amount, NULL, NULL, true, NULL, this, GetCasterGUID());
+            int32 returnmana = (GetSpellProto()->ManaCostPercentage * caster->GetCreateMana() / 100) * m_stackAmount / 2;
+            caster->CastCustomSpell(caster, 64372, &returnmana, NULL, NULL, true, NULL, this, GetCasterGUID());

Link to comment
Share on other sites

  • 2 weeks later...

Sorry for off topic, but...

The Bloom has "SPELL_DAMAGE_CLASS_NONE". That is why you won't get any bonus damage in spellHealingBonus().

How about just getting spell_bonus_data earlier and using that entry to override SPELL_DAMAGE_CLASS_NONE, like

@@ -8272,12 +8272,15 @@ uint32 Unit::SpellCriticalHealingBonus(SpellEntry const *spellProto, uint32 dama
    return damage;

uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack)
+    // Check for table values earlier so SPELL_DAMAGE_CLASS_NONE can be overridden
+    SpellBonusEntry const* bonus = spellmgr.GetSpellBonusData(spellProto->Id);
    // No heal amount for this class spells
-    if (spellProto->DmgClass == SPELL_DAMAGE_CLASS_NONE)
+    if (spellProto->DmgClass == SPELL_DAMAGE_CLASS_NONE && !bonus)
        return healamount;

    // For totems get healing bonus from owner (statue isn't totem in fact)
    if( GetTypeId()==TYPEID_UNIT && ((Creature*)this)->isTotem() && ((Totem*)this)->GetTotemType()!=TOTEM_STATUE)
        if(Unit* owner = GetOwner())
@@ -8365,12 +8368,10 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
    float SpellModSpellDamage = 100.0f;
    if(Player* modOwner = GetSpellModOwner())
        modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_SPELL_BONUS_DAMAGE, SpellModSpellDamage);
    SpellModSpellDamage /= 100.0f;

-    // Check for table values
-    SpellBonusEntry const* bonus = spellmgr.GetSpellBonusData(spellProto->Id);
    if (bonus)
        float coeff;
        if (damagetype == DOT)
            coeff = bonus->dot_damage * LvlPenalty * stack;

That way, you can also fix healing stream totem's triggered effect and anything else that needs it without having to add another hack.

Edit: Probably still need another work around to get it to crit though...

Edit2: I've misunderstood how this aura works. Ignore this post

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use