Index: game/Unit.cpp =================================================================== --- game/Unit.cpp (revision 5407) +++ game/Unit.cpp (working copy) @@ -4952,6 +4952,8 @@ damageBasePoints=0.85f*ceil(triggeredByAura->GetModifier()->m_amount * 1.2f * 1.03f * speed/100.0f) - 1; int32 damagePoint = int32(damageBasePoints + 0.03f * (GetWeaponDamageRange(BASE_ATTACK,MINDAMAGE)+GetWeaponDamageRange(BASE_ATTACK,MAXDAMAGE))/2.0f) + 1; + + damagePoint = SpellDamageBonus(pVictim, dummySpell, damagePoint, SPELL_DIRECT_DAMAGE); CastCustomSpell(pVictim,spellId,&damagePoint,NULL,NULL,true,NULL, triggeredByAura); } @@ -6519,7 +6521,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]; @@ -6571,6 +6581,14 @@ // Distribute Damage over multiple effects, reduce by AoE CastingTime = GetCastingTimeForBonus( spellProto, damagetype, CastingTime ); + // Level Factor + float LvlPenalty = 0.0f; + if(spellProto->spellLevel < 20) + LvlPenalty = (20.0f - (float)(spellProto->spellLevel)) * 3.75f; + float LvlFactor = ((float)(spellProto->spellLevel) + 6.0f) / (float)(getLevel()); + if(LvlFactor > 1.0f) + LvlFactor = 1.0f; + switch(spellProto->SpellFamilyName) { case SPELLFAMILY_MAGE: @@ -6678,6 +6696,8 @@ CastingTime = 3500; DoneAdvertisedBenefit = int32(0.20f*DoneAdvertisedBenefit); TakenAdvertisedBenefit = int32(0.29f*TakenAdvertisedBenefit); + LvlPenalty = 0.0f; + LvlFactor = 1.0f; } // Consecration - 95% of Holy Damage else if((spellProto->SpellFamilyFlags & 0x20LL) && spellProto->SpellIconID == 51) @@ -6692,9 +6712,9 @@ float wspeed = GetAttackTime(BASE_ATTACK)/1000; if( item && item->GetProto()->InventoryType == INVTYPE_2HWEAPON) - CastingTime = (uint32)wspeed*3500*0.102f; + CastingTime = uint32(wspeed*3500*0.102f); else - CastingTime = (uint32)wspeed*3500*0.098f; + CastingTime = uint32(wspeed*3500*0.098f); } // Judgement of Righteousness - 73% else if ((spellProto->SpellFamilyFlags & 1024) && spellProto->SpellIconID == 25) @@ -6704,7 +6724,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 @@ -6782,14 +6802,6 @@ break; } - // Level Factor - float LvlPenalty = 0.0f; - if(spellProto->spellLevel < 20) - LvlPenalty = (20.0f - (float)(spellProto->spellLevel)) * 3.75f; - float LvlFactor = ((float)(spellProto->spellLevel) + 6.0f) / (float)(getLevel()); - if(LvlFactor > 1.0f) - LvlFactor = 1.0f; - // Spellmod SpellDamage float SpellModSpellDamage = 100.0f; @@ -6980,9 +6992,10 @@ int32 AdvertisedBenefit = SpellBaseHealingBonus(1<School); uint32 CastingTime = GetSpellCastTime(sCastTimesStore.LookupEntry(spellProto->CastingTimeIndex)); + bool Channeled = IsChanneledSpell(spellProto); 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); @@ -7015,10 +7028,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]; @@ -7045,6 +7066,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: