rendered paste bodyIndex: game/Unit.cpp
===================================================================
--- game/Unit.cpp (revision 5199)
+++ game/Unit.cpp (working copy)
@@ -5976,6 +5976,7 @@
// Taken/Done fixed damage bonus auras
int32 DoneAdvertisedBenefit = SpellBaseDamageBonus((int32)(1<<spellProto->School));
+ if ( spellProto->DmgType != SPELL_DAMAGE_CLASS_MAGIC ) DoneAdvertisedBenefit = 0; // These Spells does not benefit from your Spell Damage bonuses
int32 TakenAdvertisedBenefit = SpellBaseDamageBonusForVictim((int32)(1<<spellProto->School), pVictim);
// Damage over Time spells bonus calculation
@@ -6040,9 +6041,120 @@
}
}
+ int32 overTime=0;
+ bool direct=false;
+ bool AreaEffect=false;
+
+ for ( uint32 i=0; i<3;i++)
+ {
+ switch ( spellProto->Effect[i] )
+ {
+ case SPELL_EFFECT_SCHOOL_DAMAGE:
+ case SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL:
+ case SPELL_EFFECT_WEAPON_PERCENT_DAMAGE:
+ case SPELL_EFFECT_MANA_DRAIN:
+ case SPELL_EFFECT_HEALTH_LEECH:
+ case SPELL_EFFECT_ENVIRONMENTAL_DAMAGE:
+ case SPELL_EFFECT_POWER_BURN:
+ direct = true;
+ break;
+ case SPELL_EFFECT_APPLY_AURA:
+ switch ( spellProto->EffectApplyAuraName[i] )
+ {
+ case SPELL_AURA_PERIODIC_DAMAGE:
+ case SPELL_AURA_PERIODIC_HEAL:
+ case SPELL_AURA_PERIODIC_LEECH:
+ if ( GetDuration(spellProto) )
+ overTime = GetDuration(spellProto);
+ break;
+ default:
+ // -5% per additional effect
+ CastingTime *= 0.95f;
+ break;
+ }
+ default:
+ // -5% per additional effect
+ CastingTime *= 0.95f;
+ break;
+ }
+ switch (spellProto->EffectImplicitTargetA[i])
+ {
+ case TARGET_ALL_AROUND_CASTER:
+ case TARGET_ALL_PARTY_AROUND_CASTER:
+ case TARGET_ALL_PARTY:
+ case TARGET_ALL_ENEMY_IN_AREA:
+ case TARGET_ALL_ENEMY_IN_AREA_INSTANT:
+ case TARGET_IN_FRONT_OF_CASTER:
+ AreaEffect = true;
+ break;
+ default:
+ break;
+ }
+ }
+
+ // Combined Spells with Both Over Time and Direct Damage
+ if ( overTime > 0 && CastingTime > 0 && direct )
+ {
+ // Portion to Over Time
+ float PtOT = (overTime / 15000.f) / ((overTime / 15000.f) + (CastingTime / 3500.f));
+
+ if ( damagetype == DOT )
+ CastingTime *= PtOT;
+ else if ( PtOT < 1 )
+ CastingTime *= 1 - PtOT;
+ else
+ CastingTime = 0;
+ }
+
+ // Area Effect Spells recieve only half of bonus
+ if ( AreaEffect )
+ CastingTime *= 0.5f;
+
// Exceptions
switch(spellProto->SpellFamilyName)
{
+ case SPELLFAMILY_PALADIN:
+ // Consecration
+ if((spellProto->SpellFamilyFlags & 0x20LL) && spellProto->SpellIconID == 51 )
+ {
+ CastingTime = 416;
+ DoneTotalMod = 1.0f;
+ TakenTotalMod = 1.0f;
+ }
+ // Seal of Righteousness
+ else if((spellProto->SpellFamilyFlags & 0x8000000LL) && spellProto->SpellIconID == 25)
+ {
+ Item *item = ((Player*)this)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND);
+ if(item){
+ float wspeed = item->GetProto()->Delay/1000.0f;
+
+ if( item->GetProto()->InventoryType == INVTYPE_2HWEAPON)
+ CastingTime = wspeed*3500*0.102f;
+ else
+ CastingTime = wspeed*3500*0.098f;
+ }
+ }
+ // Seal of Vengeance
+ else if ((spellProto->SpellFamilyFlags & 0x80000000000LL) && spellProto->SpellIconID == 2040)
+ {
+ CastingTime = 119; // 17% pef full stack
+ DoneTotalMod = 1.0f;
+ TakenTotalMod = 1.0f;
+ }
+ // Seal of Command
+ else if (spellProto->Id == 20424)
+ {
+ CastingTime = 3500;
+ DoneTotalMod = 0.2f;
+ TakenTotalMod = 0.29f;
+
+ }
+ // Holy shield
+ else if ((spellProto->SpellFamilyFlags & 0x4000000000LL) && spellProto->SpellIconID == 453)
+ {
+ CastingTime = 3500*0.05f;
+ }
+ break;
case SPELLFAMILY_WARLOCK:
// Life Tap
if((spellProto->SpellFamilyFlags & 0x40000LL) && spellProto->SpellIconID == 208)
@@ -6058,6 +6170,42 @@
DoneTotalMod = 1.0f;
TakenTotalMod = 1.0f;
}
+ // Soul Fire
+ else if((spellProto->SpellFamilyFlags & 0x8000000000LL) && spellProto->SpellIconID == 184)
+ {
+ CastingTime = 4025;
+ }
+ // Death Coil
+ else if((spellProto->SpellFamilyFlags & 0x80000LL) && spellProto->SpellIconID == 177)
+ {
+ CastingTime = 749;
+ }
+ // Curse of Agony
+ else if((spellProto->SpellFamilyFlags & 0x0000000400LL) && spellProto->SpellIconID == 544)
+ {
+ CastingTime = 4200; // 120% instead of 160%
+ DoneTotalMod = 1.0f;
+ TakenTotalMod = 1.0f;
+ }
+ // Siphon Life
+ else if((spellProto->SpellFamilyFlags & 0x0100000000LL) && spellProto->SpellIconID == 152)
+ {
+ CastingTime = 3500; // 100% instead of 200%
+ DoneTotalMod = 1.0f;
+ TakenTotalMod = 1.0f;
+ }
+ // Drain Mana
+ else if((spellProto->SpellFamilyFlags & 0x10LL) && spellProto->SpellIconID == 548)
+ {
+ CastingTime = 0; // 0%
+ }
+ // Seed of Corruption
+ else if((spellProto->SpellFamilyFlags & 0x1000000000LL) && spellProto->SpellIconID == 1932 && damagetype == DOT)
+ {
+ CastingTime = 770; // 22%
+ DoneTotalMod = 1.0f;
+ TakenTotalMod = 1.0f;
+ }
break;
case SPELLFAMILY_MAGE:
// Ice Lance
@@ -6069,7 +6217,30 @@
}
// Molten armor
else if (spellProto->SpellFamilyFlags & 0x0000000800000000LL)
+ {
CastingTime = 0;
+ }
+ // Pyroblast
+ else if((spellProto->SpellFamilyFlags & 0x400000LL) && spellProto->SpellIconID == 184 )
+ {
+ if ( damagetype == DOT )
+ {
+ CastingTime = 700;
+ DoneTotalMod = 1.0f;
+ TakenTotalMod = 1.0f;
+ }
+ else
+ {
+ CastingTime = 4025;
+ }
+ }
+ // Fireball
+ else if((spellProto->SpellFamilyFlags & 0x1LL) && spellProto->SpellIconID == 185)
+ {
+ CastingTime = 3500;
+ if ( damagetype == DOT )
+ CastingTime = 0;
+ }
break;
case SPELLFAMILY_SHAMAN:
// totem attack
@@ -6086,6 +6257,20 @@
else if (spellProto->SpellFamilyFlags & 000000400LL)
CastingTime = 1155; // ignore CastingTimePenalty and use as modifier
break;
+ case SPELLFAMILY_PRIEST:
+ // Mana Burn
+ if((spellProto->SpellFamilyFlags & 0x10LL) && spellProto->SpellIconID == 212 )
+ {
+ CastingTime = 0;
+ }
+ // Mind Flay
+ else if(spellProto->SpellFamilyFlags & 0x000000800000)
+ {
+ CastingTime = 2065; // 59% instead of 20%
+ DoneTotalMod = 1.0f;
+ TakenTotalMod = 1.0f;
+ }
+ break;
}
// Level Factor
Index: shared/Database/DBCfmt.cpp
===================================================================
--- shared/Database/DBCfmt.cpp (revision 5199)
+++ shared/Database/DBCfmt.cpp (working copy)
@@ -52,7 +52,7 @@
const char SkillLineAbilityfmt[]="xiniixxiixiixxi";
const char SpellCastTimefmt[]="nixx";
const char SpellDurationfmt[]="niii";
-const char SpellEntryfmt[]="niixiiiiiiixixiiiiixxiiiiiiiiiiiiiiiiiiifiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffffffiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiifffixiiissssssssssssssssxssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiiiiiiiiixxfffxxxiii";
+const char SpellEntryfmt[]="niixiiiiiiixixiiiiixxiiiiiiiiiiiiiiiiiiifiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffffffiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiifffixiiissssssssssssssssxssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiiiiiiiiiixfffxxxiii";
//const char SpellFocusObjectfmt[]="nsxxxxxxxx";
const char SpellItemEnchantmentfmt[]="niiiiiixxxiiissssssssssssssssxiiii";
const char SpellItemEnchantmentConditionfmt[]="nbbbbbxxxxxbbbbbbbbbbiiiiiXXXXX";
Index: shared/Database/DBCStructure.h
===================================================================
--- shared/Database/DBCStructure.h (revision 5199)
+++ shared/Database/DBCStructure.h (working copy)
@@ -495,7 +495,8 @@
uint64 SpellFamilyFlags; // 196+197
uint32 MaxAffectedTargets; // 198
uint32 DmgClass; // 199
- //uint32 unk2[2]; // 200-201 not used
+ uint32 DmgType; // 200
+ //uint32 unk2; // 201 not used
float DmgMultiplier[3]; // 202-204
//uint32 unk3[3]; // 205-207 not used null
uint32 TotemCategory[2]; // 208-209