diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Spell.cpp | 1 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 5 | ||||
-rw-r--r-- | src/game/SpellAuras.h | 1 | ||||
-rw-r--r-- | src/game/Unit.cpp | 11 |
4 files changed, 10 insertions, 8 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 82293f91f34..073425741d7 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1246,6 +1246,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask) _duration = aur ? aur->GetAuraDuration() : -1; } triggeredAur->SetAuraDuration(_duration); + triggeredAur->SetPermanent(false); } } } diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 08ce7a59844..b9f440188d2 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -1207,11 +1207,10 @@ void Aura::SetStackAmount(uint8 stackAmount) // Reapply if amount change if (amount!=part->GetAmount()) { - bool Real = bool (part->m_spellmod); // Auras which are applying spellmod should have removed spellmods for real - part->ApplyModifier(false,Real); + part->ApplyModifier(false,true); part->SetAmount(amount); - part->ApplyModifier(true, Real); + part->ApplyModifier(true,true); } } } diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h index fe9c18d19b5..bd8e9d00c3b 100644 --- a/src/game/SpellAuras.h +++ b/src/game/SpellAuras.h @@ -94,6 +94,7 @@ class TRINITY_DLL_SPEC Aura void SetNegative() { m_positive = false; } void SetPositive() { m_positive = true; } bool IsPermanent() const { return m_permanent; } + void SetPermanent(bool val) { m_permanent = val; } bool IsPassive() const { return m_isPassive; } bool IsDeathPersistent() const { return m_isDeathPersist; } diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 0ee053745aa..1e403577dbd 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9017,10 +9017,11 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint break; } } - coeff = (CastingTime / 3500.0f) * DotFactor; + // As wowwiki says: C = (Cast Time / 3.5) * 1.88 (for healing spells) + coeff = (CastingTime / 3500.0f) * DotFactor * 1.88f; } - float coeff2 = CalculateLevelPenalty(spellProto) * 1.88f * stack; + float coeff2 = CalculateLevelPenalty(spellProto)* stack; TakenTotal += TakenAdvertisedBenefit * coeff * coeff2; if(Player* modOwner = GetSpellModOwner()) { @@ -9043,7 +9044,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint // Rejuvenation, Regrowth, Lifebloom, or Wild Growth if (pVictim->GetAura(SPELL_AURA_PERIODIC_HEAL, SPELLFAMILY_DRUID, 0x50, 0x4000010, 0)) //increase healing by 20% - DoneTotalMod *= 1.2f; + TakenTotalMod *= 1.2f; } // Taken mods @@ -9069,11 +9070,11 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint if(damagetype==DOT) { // Healing over time taken percent - float minval_hot = GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HOT_PCT); + float minval_hot = pVictim->GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HOT_PCT); if(minval_hot) TakenTotalMod *= (100.0f + minval_hot) / 100.0f; - float maxval_hot = GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HOT_PCT); + float maxval_hot = pVictim->GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HOT_PCT); if(maxval_hot) TakenTotalMod *= (100.0f + maxval_hot) / 100.0f; } |