rendered paste bodyIndex: game/SpellEffects.cpp
===================================================================
--- game/SpellEffects.cpp (revision 5470)
+++ game/SpellEffects.cpp (working copy)
@@ -3411,7 +3411,8 @@
// Seal of Command - receive benefit from Spell Damage and Healing
if(m_spellInfo->SpellFamilyFlags & 0x00000002000000LL)
{
- bonus = m_caster->SpellDamageBonus(unitTarget, m_spellInfo, bonus, SPELL_DIRECT_DAMAGE);
+ bonus += int32(0.20f*m_caster->SpellBaseDamageBonus((int32)(1<<m_spellInfo->School)));
+ bonus += int32(0.29f*m_caster->SpellBaseDamageBonusForVictim((int32)(1<<m_spellInfo->School), unitTarget));
}
break;
}
Index: game/Unit.cpp
===================================================================
--- game/Unit.cpp (revision 5470)
+++ game/Unit.cpp (working copy)
@@ -4408,7 +4408,13 @@
sLog.outError("Unit::HandleDummyAuraProc: non handled spell id: %u (IG)",dummySpell->Id);
return;
};
- CastCustomSpell(pVictim, 12654, &igniteDotBasePoints0, NULL, NULL, true, castItem, triggeredByAura);
+
+ SpellEntry const* igniteSpellTrigger = sSpellStore.LookupEntry(12654);
+
+ igniteDotBasePoints0 += int32(0.08f*SpellBaseDamageBonus((int32)(1<<igniteSpellTrigger->School)));
+ igniteDotBasePoints0 += int32(0.08f*SpellBaseDamageBonusForVictim((int32)(1<<igniteSpellTrigger->School), pVictim));
+
+ CastCustomSpell(pVictim, igniteSpellTrigger->Id, &igniteDotBasePoints0, NULL, NULL, true, castItem, triggeredByAura);
return;
}
@@ -6610,7 +6616,15 @@
if(!Channeled) DotFactor = DotDuration / 15000.0f;
int x = 0;
for(int j = 0; j < 3; j++)
- if(spellProto->Effect[j] == 6) x = j;
+ {
+ if(spellProto->Effect[j] == SPELL_EFFECT_APPLY_AURA &&
+ (spellProto->EffectApplyAuraName[j] == SPELL_AURA_PERIODIC_DAMAGE ||
+ spellProto->EffectApplyAuraName[j] == SPELL_AURA_PERIODIC_LEECH) )
+ {
+ x = j;
+ break;
+ }
+ }
int DotTicks = 6;
if(spellProto->EffectAmplitude[x] != 0)
DotTicks = DotDuration / spellProto->EffectAmplitude[x];
@@ -6665,11 +6679,10 @@
switch(spellProto->SpellFamilyName)
{
case SPELLFAMILY_MAGE:
- // Ignite - 8%
+ // Ignite already done at trigger cast
if(spellProto->Id==12654)
{
- DotFactor = 0.08f;
- break;
+ return pdamage;
}
// Ice Lance
else if((spellProto->SpellFamilyFlags & 0x20000LL) && spellProto->SpellIconID == 186)
@@ -6763,16 +6776,9 @@
}
break;
case SPELLFAMILY_PALADIN:
- // Seal of Command - 20% of Done Holy Damage, 29% of Taken Holy Damage
- if(spellProto->Id==20424)
+ // Consetration - 95% of Holy Damage
+ if((spellProto->SpellFamilyFlags & 0x20LL) && spellProto->SpellIconID == 51)
{
- CastingTime = 3500;
- DoneAdvertisedBenefit = int32(0.20f*DoneAdvertisedBenefit);
- TakenAdvertisedBenefit = int32(0.29f*TakenAdvertisedBenefit);
- }
- // Consecration - 95% of Holy Damage
- else if((spellProto->SpellFamilyFlags & 0x20LL) && spellProto->SpellIconID == 51)
- {
DotFactor = 0.95f;
CastingTime = 3500;
}
@@ -6795,7 +6801,7 @@
// Seal of Vengeance - 17% per Fully Stacked Tick - 5 Applications
else if ((spellProto->SpellFamilyFlags & 0x80000000000LL) && spellProto->SpellIconID == 2040)
{
- DotFactor = 0.136;
+ DotFactor = 0.17f;
CastingTime = 3500;
}
// Holy shield - 5% of Holy Damage
@@ -6808,6 +6814,11 @@
{
CastingTime = 0;
}
+ // Seal of Righteousness trigger - already computed for parent spell
+ else if ( spellProto->SpellFamilyName==SPELLFAMILY_PALADIN && spellProto->SpellIconID==25 && spellProto->AttributesExEx & 0x00800000LL )
+ {
+ return pdamage;
+ }
break;
case SPELLFAMILY_SHAMAN:
// totem attack
@@ -7067,11 +7078,12 @@
if(spellProto->Id == 15290 || spellProto->Id == 39373 || spellProto->Id == 33778 || spellProto->Id == 379)
return healamount;
+ bool Channeled = IsChanneledSpell(spellProto);
int32 AdvertisedBenefit = SpellBaseHealingBonus(1<<spellProto->School);
uint32 CastingTime = GetSpellCastTime(sCastTimesStore.LookupEntry(spellProto->CastingTimeIndex));
if (CastingTime > 7000) CastingTime = 7000;
if (CastingTime < 1500) CastingTime = 1500;
- if (spellProto->Effect[0] == SPELL_EFFECT_APPLY_AURA) CastingTime = 3500;
+ if (spellProto->Effect[0] == SPELL_EFFECT_APPLY_AURA && !Channeled) CastingTime = 3500;
// Healing Taken
AdvertisedBenefit += SpellBaseHealingBonusForVictim(1<<spellProto->School, pVictim);
@@ -7104,10 +7116,18 @@
{
// 200% limit
if(DotDuration > 30000) DotDuration = 30000;
- DotFactor = DotDuration / 15000.0f;
+ if(!Channeled) DotFactor = DotDuration / 15000.0f;
int x = 0;
for(int j = 0; j < 3; j++)
- if(spellProto->Effect[j] == 6) x = j;
+ {
+ if(spellProto->Effect[j] == SPELL_EFFECT_APPLY_AURA &&
+ (spellProto->EffectApplyAuraName[j] == SPELL_AURA_PERIODIC_HEAL ||
+ spellProto->EffectApplyAuraName[j] == SPELL_AURA_PERIODIC_LEECH) )
+ {
+ x = j;
+ break;
+ }
+ }
int DotTicks = 6;
if(spellProto->EffectAmplitude[x] != 0)
DotTicks = DotDuration / spellProto->EffectAmplitude[x];
@@ -7134,6 +7154,9 @@
// Lifebloom final heal
if (spellProto->SpellFamilyFlags & 0x1000000000LL && damagetype != DOT)
CastingTime = 1500;
+ // Tranquilitiy triggered spell
+ else if (spellProto->SpellFamilyFlags & 0x80LL)
+ CastingTime = 500;
break;
case SPELLFAMILY_WARRIOR:
case SPELLFAMILY_HUNTER:
@@ -9504,10 +9527,11 @@
uint32 Unit::GetCastingTimeForBonus( SpellEntry const *spellProto, DamageEffectType damagetype, uint32 CastingTime )
{
int32 overTime = 0;
+ uint8 effects = 0;
bool DirectDamage = false;
bool AreaEffect = false;
- for ( uint32 i=0; i<3;i++)
+ for (uint32 i=0;i<3;++i)
{
switch ( spellProto->Effect[i] )
{
@@ -9530,7 +9554,7 @@
break;
default:
// -5% per additional effect
- CastingTime *= 0.95f;
+ ++effects;
break;
}
default:
@@ -9541,6 +9565,9 @@
AreaEffect = true;
}
+ if ( CastingTime < 0 )
+ CastingTime = 0;
+
// Combined Spells with Both Over Time and Direct Damage
if ( overTime > 0 && CastingTime > 0 && DirectDamage )
{
@@ -9552,16 +9579,19 @@
float PtOT = (overTime / 15000.f) / ((overTime / 15000.f) + (OriginalCastTime / 3500.f));
if ( damagetype == DOT )
- CastingTime *= PtOT;
+ CastingTime = uint32(CastingTime*PtOT);
else if ( PtOT < 1.0f )
- CastingTime *= 1 - PtOT;
+ CastingTime = uint32(CastingTime*(1-PtOT));
else
CastingTime = 0;
}
// Area Effect Spells receive only half of bonus
if ( AreaEffect )
- CastingTime *= 0.5f;
+ CastingTime = uint32(CastingTime*0.5f);
- return CastingTime;
+ for ( uint8 i=0; i<effects; ++i)
+ CastingTime -= 175;
+
+ return CastingTime > 0 ? CastingTime : 0;
}