Jump to content

[fix][bug]Weapon Mod Damage


Guest DrKLO

Recommended Posts

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

If you fully broke you weapon, wear it and learn talent(for example Two-Handed Weapon Specialization),

then you weapon damage increase. Then unwear this weapon and unlearn talents. You damage doesn't decrease. You can do it a lot of times, and you melee damage will be increase and increase. So we shouldn't increase damage with broken item.

For which repository revision was the patch created?

8809+

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

Didn't find any

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

Me

diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index b93b34c..62bc9e7 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -6889,6 +6889,10 @@ void Player::_ApplyWeaponDependentAuraCritMod(Item *item, WeaponAttackType attac

void Player::_ApplyWeaponDependentAuraDamageMod(Item *item, WeaponAttackType attackType, Aura* aura, bool apply)
{
+    //don't apply mod if item is broken
+    if(item->IsBroken())
+        return;
+
    // ignore spell mods for not wands
    Modifier const* modifier = aura->GetModifier();
    if((modifier->m_miscvalue & SPELL_SCHOOL_MASK_NORMAL)==0 && (getClassMask() & CLASSMASK_WAND_USERS)==0)

Link to comment
Share on other sites

×
×
  • 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