*Set correct healing bonus for spells using coefficient.

*Always reapply aura mods as 'real' when adding aura to stack.
*Make blood frenzy expire when duration ends.
*Correct procflag for T.N.T once again.

--HG--
branch : trunk
rename : sql/updates/2685_world.sql => sql/updates/2702_world_spell_proc_event.sql
This commit is contained in:
QAston
2009-04-15 20:34:52 +02:00
parent 8089219695
commit 441d042d5c
5 changed files with 15 additions and 8 deletions
@@ -0,0 +1,5 @@
DELETE FROM `spell_proc_event` WHERE `entry` IN (56337, 56336, 56333);
INSERT INTO `spell_proc_event` VALUES
(56337, 0x00, 9, 0x00000004, 0x00000000, 0x00000200, 0x00011100, 0x0000000, 0.000000, 0.000000, 0),
(56336, 0x00, 9, 0x00000004, 0x00000000, 0x00000200, 0x00011100, 0x0000000, 0.000000, 0.000000, 0),
(56333, 0x00, 9, 0x00000004, 0x00000000, 0x00000200, 0x00011100, 0x0000000, 0.000000, 0.000000, 0);
+1
View File
@@ -1246,6 +1246,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
_duration = aur ? aur->GetAuraDuration() : -1; _duration = aur ? aur->GetAuraDuration() : -1;
} }
triggeredAur->SetAuraDuration(_duration); triggeredAur->SetAuraDuration(_duration);
triggeredAur->SetPermanent(false);
} }
} }
} }
+2 -3
View File
@@ -1207,11 +1207,10 @@ void Aura::SetStackAmount(uint8 stackAmount)
// Reapply if amount change // Reapply if amount change
if (amount!=part->GetAmount()) if (amount!=part->GetAmount())
{ {
bool Real = bool (part->m_spellmod);
// Auras which are applying spellmod should have removed spellmods for real // Auras which are applying spellmod should have removed spellmods for real
part->ApplyModifier(false,Real); part->ApplyModifier(false,true);
part->SetAmount(amount); part->SetAmount(amount);
part->ApplyModifier(true, Real); part->ApplyModifier(true,true);
} }
} }
} }
+1
View File
@@ -94,6 +94,7 @@ class TRINITY_DLL_SPEC Aura
void SetNegative() { m_positive = false; } void SetNegative() { m_positive = false; }
void SetPositive() { m_positive = true; } void SetPositive() { m_positive = true; }
bool IsPermanent() const { return m_permanent; } bool IsPermanent() const { return m_permanent; }
void SetPermanent(bool val) { m_permanent = val; }
bool IsPassive() const { return m_isPassive; } bool IsPassive() const { return m_isPassive; }
bool IsDeathPersistent() const { return m_isDeathPersist; } bool IsDeathPersistent() const { return m_isDeathPersist; }
+6 -5
View File
@@ -9017,10 +9017,11 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
break; 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; TakenTotal += TakenAdvertisedBenefit * coeff * coeff2;
if(Player* modOwner = GetSpellModOwner()) if(Player* modOwner = GetSpellModOwner())
{ {
@@ -9043,7 +9044,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
// Rejuvenation, Regrowth, Lifebloom, or Wild Growth // Rejuvenation, Regrowth, Lifebloom, or Wild Growth
if (pVictim->GetAura(SPELL_AURA_PERIODIC_HEAL, SPELLFAMILY_DRUID, 0x50, 0x4000010, 0)) if (pVictim->GetAura(SPELL_AURA_PERIODIC_HEAL, SPELLFAMILY_DRUID, 0x50, 0x4000010, 0))
//increase healing by 20% //increase healing by 20%
DoneTotalMod *= 1.2f; TakenTotalMod *= 1.2f;
} }
// Taken mods // Taken mods
@@ -9069,11 +9070,11 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
if(damagetype==DOT) if(damagetype==DOT)
{ {
// Healing over time taken percent // 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) if(minval_hot)
TakenTotalMod *= (100.0f + minval_hot) / 100.0f; 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) if(maxval_hot)
TakenTotalMod *= (100.0f + maxval_hot) / 100.0f; TakenTotalMod *= (100.0f + maxval_hot) / 100.0f;
} }