*Try to fix the bug that some -AP spells increase players' AP.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-12-19 10:03:00 -06:00
parent c27ef3542b
commit 2027e1918c
+1 -1
View File
@@ -10502,7 +10502,7 @@ int32 Unit::CalculateSpellDamage(SpellEntry const* spellProto, uint8 effect_inde
spellProto->Effect[effect_index] != SPELL_EFFECT_KNOCK_BACK) spellProto->Effect[effect_index] != SPELL_EFFECT_KNOCK_BACK)
//there are many more: slow speed, -healing pct //there are many more: slow speed, -healing pct
//value = int32(value*0.25f*exp(getLevel()*(70-spellProto->spellLevel)/1000.0f)); //value = int32(value*0.25f*exp(getLevel()*(70-spellProto->spellLevel)/1000.0f));
value = int32(value * getLevel() / (spellProto->spellLevel ? spellProto->spellLevel : 1)); value = int32(value * (int32)getLevel() / (int32)(spellProto->spellLevel ? spellProto->spellLevel : 1));
return value; return value;
} }