aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2008-12-24 16:22:19 -0600
committermegamage <none@none>2008-12-24 16:22:19 -0600
commit4481ad517f9107992a4c0043f44e254c67a822fd (patch)
tree360e6ea32d4cae735cfb232f65f432adb829a7cb
parentf5216efa2497b73a29783cc480069a5de1c71624 (diff)
*Fix the bug that auras have one less point.
--HG-- branch : trunk
-rw-r--r--src/game/SpellAuras.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 1597b4a2b25..449867c0022 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -331,14 +331,26 @@ m_periodicTimer(0), m_PeriodicEventId(0), m_AuraDRGroup(DIMINISHING_NONE)
m_spellProto = spellproto;
- m_currentBasePoints = currentBasePoints ? *currentBasePoints : m_spellProto->EffectBasePoints[eff];
+ int32 damage;
+ if(currentBasePoints)
+ {
+ damage = *currentBasePoints;
+ m_currentBasePoints = damage - 1;
+ }
+ else
+ {
+ m_currentBasePoints = m_spellProto->EffectBasePoints[eff];
+ if(caster)
+ damage = caster->CalculateSpellDamage(m_spellProto, m_effIndex, m_currentBasePoints, target);
+ else
+ damage = m_currentBasePoints + 1;
+ }
m_isPassive = IsPassiveSpell(GetId());
m_positive = IsPositiveEffect(GetId(), m_effIndex);
m_applyTime = time(NULL);
- int32 damage;
if(!caster)
{
m_caster_guid = target->GetGUID();
@@ -349,7 +361,7 @@ m_periodicTimer(0), m_PeriodicEventId(0), m_AuraDRGroup(DIMINISHING_NONE)
{
m_caster_guid = caster->GetGUID();
- damage = caster->CalculateSpellDamage(m_spellProto,m_effIndex,m_currentBasePoints,target);
+ //damage = caster->CalculateSpellDamage(m_spellProto,m_effIndex,m_currentBasePoints,target);
m_maxduration = caster->CalculateSpellDuration(m_spellProto, m_effIndex, target);
if (!damage && castItem && castItem->GetItemSuffixFactor())