Jump to content

[Fix] Heirloom Weapons Missing Spell Power


Auntie Mangos

Recommended Posts

Bug:

Heirloom weapons such as Dignified Headmaster's Charge were not giving spell power bonuses when equiped.

Mangos Version: 8407

UDB Version: 382

Bug Report: None (though I mentioned something here.)

Author: me (Antonio593)

This is in player.cpp

@@ -6695,10 +6695,20 @@ void Player::_ApplyItemBonuses(ItemPrototype const *proto, uint8 slot, bool appl
                ApplySpellDamageBonus(int32(val), apply);
                break;
        }
    }

+	// Apply Spell Power from ScalingStatValue if set
+	if (ssv)
+    {
+        if (int32 spellbonus = ssv->getSpellBonus(proto->ScalingStatValue))
+		{
+            ApplySpellHealingBonus(spellbonus, apply);
+			ApplySpellDamageBonus(spellbonus, apply);
+		}
+    }
+
    // If set ScalingStatValue armor get it or use item armor
    uint32 armor = proto->Armor;
    if (ssv)
    {
        if (uint32 ssvarmor = ssv->getArmorMod(proto->ScalingStatValue))

Link to comment
Share on other sites

  • 39 years later...

mangos 8449 changed the spell bonus functions, so it should now look like this. Probably don't need the brackets anymore, but left them in for now.

This is in player.cpp

                break;
        }
    }

+    // Apply Spell Power from ScalingStatValue if set
+    if (ssv)
+    {
+        if (int32 spellbonus = ssv->getSpellBonus(proto->ScalingStatValue))
+        {
+            ApplySpellPowerBonus(spellbonus, apply);
+        }
+    }
+
    // If set ScalingStatValue armor get it or use item armor
    uint32 armor = proto->Armor;
    if (ssv)
    {
        if (uint32 ssvarmor = ssv->getArmorMod(proto->ScalingStatValue))

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
Guest
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