Index: game/SpellEffects.cpp =================================================================== --- game/SpellEffects.cpp (revision 5452) +++ 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<School))); + bonus += int32(0.29f*m_caster->SpellBaseDamageBonusForVictim((int32)(1<School), unitTarget)); } break; } Index: game/Unit.cpp =================================================================== --- game/Unit.cpp (revision 5452) +++ game/Unit.cpp (working copy) @@ -4407,6 +4407,10 @@ sLog.outError("Unit::HandleDummyAuraProc: non handled spell id: %u (IG)",dummySpell->Id); return; }; + + igniteDotBasePoints0 += int32(0.08f*m_caster->SpellBaseDamageBonus((int32)(1<School))); + igniteDotBasePoints0 += int32(0.08f*m_caster->SpellBaseDamageBonusForVictim((int32)(1<School), unitTarget)); + CastCustomSpell(pVictim, 12654, &igniteDotBasePoints0, NULL, NULL, true, castItem, triggeredByAura); return; } @@ -6609,7 +6613,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]; @@ -6667,8 +6679,7 @@ // Ignite - 8% if(spellProto->Id==12654) { - DotFactor = 0.08f; - break; + return pdamage; } // Ice Lance else if((spellProto->SpellFamilyFlags & 0x20000LL) && spellProto->SpellIconID == 186) @@ -6763,15 +6774,8 @@ break; case SPELLFAMILY_PALADIN: // Seal of Command - 20% of Done Holy Damage, 29% of Taken Holy Damage - if(spellProto->Id==20424) + 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; } @@ -6794,7 +6798,7 @@ // Seal of Vengeance - 17% per Fully Stacked Tick - 5 Applications else if ((spellProto->SpellFamilyFlags & 0x80000000000LL) && spellProto->SpellIconID == 2040) { - DotFactor = 0.136; + DotFactor = 0.7f; CastingTime = 3500; } // Holy shield - 5% of Holy Damage @@ -6807,6 +6811,11 @@ { CastingTime = 0; } + // Seal of Righteousness trigger - already computed for parent spell + else if ( spellProto->SpellFamilyName==SPELLFAMILY_PALADIN && spellProto->SpellIconID==25 && spellProto->AttrExEx & 0x00800000LL ) + { + return pdamage; + } break; case SPELLFAMILY_SHAMAN: // totem attack @@ -7066,11 +7075,12 @@ if(spellProto->Id == 15290 || spellProto->Id == 39373 || spellProto->Id == 33778 || spellProto->Id == 379) return healamount; + bool Channeled = IsChanneledSpell(spellProto); int32 AdvertisedBenefit = SpellBaseHealingBonus(1<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<School, pVictim); @@ -7103,10 +7113,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]; @@ -7133,6 +7151,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: @@ -9516,10 +9537,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] ) { @@ -9542,7 +9564,7 @@ break; default: // -5% per additional effect - CastingTime *= 0.95f; + ++effects; break; } default: @@ -9553,6 +9575,9 @@ AreaEffect = true; } + if ( CastingTime < 0 ) + CastingTime = 0; + // Combined Spells with Both Over Time and Direct Damage if ( overTime > 0 && CastingTime > 0 && DirectDamage ) { @@ -9564,16 +9589,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 0 ? CastingTime : 0; }