Skip to content
Browse files

[mr1796] Fix unsafe coeffs calculating .

  • Loading branch information...
1 parent ad3fddb commit 2aa9db760c78a01c0886b5c511dc39c081d5c57d @mns mns committed
Showing with 7 additions and 3 deletions.
  1. +6 −2 src/game/SpellMgr.cpp
  2. +1 −1 src/shared/revision_R2.h
View
8 src/game/SpellMgr.cpp
@@ -1619,7 +1619,7 @@ void SpellMgr::LoadSpellBonuses()
SpellEntry const* spell = sSpellStore.LookupEntry(entry);
if (spell)
{
- // skip NPC spells?
+ // skip NPC spells?
if(spell->SpellFamilyName == SPELLFAMILY_GENERIC)
continue;
@@ -1669,6 +1669,10 @@ void SpellMgr::LoadSpellBonuses()
else
sbe.dot_damage = spell->EffectCoeffs[i];
+ // Disable ap_bonus/ap_dot_bonus by default
+ sbe.ap_bonus = 0.0f;
+ sbe.ap_dot_bonus = 0.0f;
+
dataAdded = true;
}
}
@@ -1722,7 +1726,7 @@ void SpellMgr::LoadSpellBonuses()
sbe.direct_damage = fields[1].GetFloat();
sbe.dot_damage = fields[2].GetFloat();
sbe.ap_bonus = fields[3].GetFloat();
- sbe.ap_dot_bonus = fields[4].GetFloat();
+ sbe.ap_dot_bonus = fields[4].GetFloat();
bool need_dot = false;
bool need_direct = false;
View
2 src/shared/revision_R2.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_R2_H__
#define __REVISION_R2_H__
- #define REVISION_R2 "1795"
+ #define REVISION_R2 "1796"
#endif // __REVISION_R2_H__

0 comments on commit 2aa9db7

Please sign in to comment.
Something went wrong with that request. Please try again.