*Move coefficients from Spell::SpellDamageSchoolDmg to spell_bonus_data.
--HG-- branch : trunk
This commit is contained in:
@@ -1763,7 +1763,35 @@ INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`
|
||||
(57970, -1, -1, -1, 0.03, 'Rogue - Deadly Poison Rank 9($AP*0.12 / number of ticks)'),
|
||||
(48628, -1, -1, -1, 0.15, 'Druid - Lock Jaw'),
|
||||
(1822, -1, -1, -1, 0.06, 'Druid - Rake ($AP*0.18 / number of ticks)'),
|
||||
(33745, -1, -1, -1, 0.01, 'Druid - Lacerate($AP*0.05 / number of ticks)');
|
||||
(33745, -1, -1, -1, 0.01, 'Druid - Lacerate($AP*0.05 / number of ticks)'),
|
||||
(6572, -1, -1, 0.207, -1, 'Warrior - Revenge'),
|
||||
(57755, -1, -1, 0.5, -1, 'Warrior - Heroic Throw'),
|
||||
(6343, -1, -1, 0.12, -1, 'Warrior - Thunder Clap'),
|
||||
(50256, -1, -1, 0.08, -1, 'Druid - Swipe'),
|
||||
(1776, -1, -1, 0.21, -1, 'Rogue - Gouge'),
|
||||
(8680, -1, -1, 0.1, -1, 'Rogue - Instant Poison Rank 1'),
|
||||
(8685, -1, -1, 0.1, -1, 'Rogue - Instant Poison Rank 2'),
|
||||
(8689, -1, -1, 0.1, -1, 'Rogue - Instant Poison Rank 3'),
|
||||
(11335, -1, -1, 0.1, -1, 'Rogue - Instant Poison Rank 4'),
|
||||
(11336, -1, -1, 0.1, -1, 'Rogue - Instant Poison Rank 5'),
|
||||
(11337, -1, -1, 0.1, -1, 'Rogue - Instant Poison Rank 6'),
|
||||
(26890, -1, -1, 0.1, -1, 'Rogue - Instant Poison Rank 7'),
|
||||
(57964, -1, -1, 0.1, -1, 'Rogue - Instant Poison Rank 8'),
|
||||
(57965, -1, -1, 0.1, -1, 'Rogue - Instant Poison Rank 9'),
|
||||
(13218, -1, -1, 0.04, -1, 'Rogue - Wound Poison Rank 1'),
|
||||
(13222, -1, -1, 0.04, -1, 'Rogue - Wound Poison Rank 2'),
|
||||
(13223, -1, -1, 0.04, -1, 'Rogue - Wound Poison Rank 3'),
|
||||
(13224, -1, -1, 0.04, -1, 'Rogue - Wound Poison Rank 4'),
|
||||
(27189, -1, -1, 0.04, -1, 'Rogue - Wound Poison Rank 5'),
|
||||
(57974, -1, -1, 0.04, -1, 'Rogue - Wound Poison Rank 6'),
|
||||
(57975, -1, -1, 0.04, -1, 'Rogue - Wound Poison Rank 7'),
|
||||
(1495, -1, -1, 0.2, -1, 'Hunter - Mongoose Bite'),
|
||||
(19306, -1, -1, 0.2, -1, 'Hunter - Counterattack'),
|
||||
(3044, -1, -1, 0.15, -1, 'Hunter - Arcane Shot'),
|
||||
(56641, -1, -1, 0.1, -1, 'Hunter - Steady Shot'),
|
||||
(13812, -1, -1, 0.1, -1, 'Hunter - Explosive Trap Effect'),
|
||||
(20253, -1, -1, 0.12, -1, 'Warrior - Intercept'),
|
||||
(61491, -1, -1, 0.12, -1, 'Warrior - Intercept');
|
||||
|
||||
-- --------
|
||||
-- SPELL AFFECT
|
||||
|
||||
@@ -8,7 +8,6 @@ CREATE TABLE `spell_bonus_data` (
|
||||
`comments` varchar(255) default NULL,
|
||||
PRIMARY KEY (`entry`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
TRUNCATE TABLE `spell_bonus_data`;
|
||||
INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
|
||||
(49941, -1, -1, 0.04, -1, 'Death Knight - Blood Boil'),
|
||||
(48721, -1, -1, 0.04, -1, 'Death Knight - Blood Boil'),
|
||||
@@ -242,6 +241,6 @@ INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`
|
||||
(57969, -1, -1, -1, 0.03, 'Rogue - Deadly Poison Rank 8($AP*0.12 / number of ticks)'),
|
||||
(57970, -1, -1, -1, 0.03, 'Rogue - Deadly Poison Rank 9($AP*0.12 / number of ticks)'),
|
||||
(48628, -1, -1, -1, 0.15, 'Druid - Lock Jaw'),
|
||||
(1822, -1, -1, -1, 0.06, 'Druid - Rake ($AP*0.18 / number of ticks)'),
|
||||
(1822, -1, -1, 0.01, 0.06, 'Druid - Rake ($AP*0.18 / number of ticks)'),
|
||||
(33745, -1, -1, -1, 0.01, 'Druid - Lacerate($AP*0.05 / number of ticks)');
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
DELETE FROM `spell_bonus_data` where `entry` IN(6572, 57755, 6343, 50256, 1776, 8680, 8685, 8689, 11335, 11336, 11337, 26890, 57964, 57965, 13218, 13222
|
||||
, 13223, 13224, 27189, 57974, 57975, 1495, 19306, 3044, 56641, 13812, 20253, 61491);
|
||||
INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
|
||||
(6572, -1, -1, 0.207, -1, 'Warrior - Revenge'),
|
||||
(57755, -1, -1, 0.5, -1, 'Warrior - Heroic Throw'),
|
||||
(6343, -1, -1, 0.12, -1, 'Warrior - Thunder Clap'),
|
||||
(50256, -1, -1, 0.08, -1, 'Druid - Swipe'),
|
||||
(1776, -1, -1, 0.21, -1, 'Rogue - Gouge'),
|
||||
(8680, -1, -1, 0.1, -1, 'Rogue - Instant Poison Rank 1'),
|
||||
(8685, -1, -1, 0.1, -1, 'Rogue - Instant Poison Rank 2'),
|
||||
(8689, -1, -1, 0.1, -1, 'Rogue - Instant Poison Rank 3'),
|
||||
(11335, -1, -1, 0.1, -1, 'Rogue - Instant Poison Rank 4'),
|
||||
(11336, -1, -1, 0.1, -1, 'Rogue - Instant Poison Rank 5'),
|
||||
(11337, -1, -1, 0.1, -1, 'Rogue - Instant Poison Rank 6'),
|
||||
(26890, -1, -1, 0.1, -1, 'Rogue - Instant Poison Rank 7'),
|
||||
(57964, -1, -1, 0.1, -1, 'Rogue - Instant Poison Rank 8'),
|
||||
(57965, -1, -1, 0.1, -1, 'Rogue - Instant Poison Rank 9'),
|
||||
(13218, -1, -1, 0.04, -1, 'Rogue - Wound Poison Rank 1'),
|
||||
(13222, -1, -1, 0.04, -1, 'Rogue - Wound Poison Rank 2'),
|
||||
(13223, -1, -1, 0.04, -1, 'Rogue - Wound Poison Rank 3'),
|
||||
(13224, -1, -1, 0.04, -1, 'Rogue - Wound Poison Rank 4'),
|
||||
(27189, -1, -1, 0.04, -1, 'Rogue - Wound Poison Rank 5'),
|
||||
(57974, -1, -1, 0.04, -1, 'Rogue - Wound Poison Rank 6'),
|
||||
(57975, -1, -1, 0.04, -1, 'Rogue - Wound Poison Rank 7'),
|
||||
(1495, -1, -1, 0.2, -1, 'Hunter - Mongoose Bite'),
|
||||
(19306, -1, -1, 0.2, -1, 'Hunter - Counterattack'),
|
||||
(3044, -1, -1, 0.15, -1, 'Hunter - Arcane Shot'),
|
||||
(56641, -1, -1, 0.1, -1, 'Hunter - Steady Shot'),
|
||||
(13812, -1, -1, 0.1, -1, 'Hunter - Explosive Trap Effect'),
|
||||
(20253, -1, -1, 0.12, -1, 'Warrior - Intercept'),
|
||||
(61491, -1, -1, 0.12, -1, 'Warrior - Intercept');
|
||||
@@ -386,13 +386,6 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
|
||||
damage = 200;
|
||||
break;
|
||||
}
|
||||
// Intercept (warrior spell trigger)
|
||||
case 20253:
|
||||
case 61491:
|
||||
{
|
||||
damage+= uint32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.12f);
|
||||
break;
|
||||
}
|
||||
// arcane charge. must only affect demons (also undead?)
|
||||
case 45072:
|
||||
{
|
||||
@@ -426,9 +419,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
|
||||
{
|
||||
// Bloodthirst
|
||||
if(m_spellInfo->SpellFamilyFlags[1] & 0x400)
|
||||
{
|
||||
damage = uint32(damage * (m_caster->GetTotalAttackPowerValue(BASE_ATTACK)) / 100);
|
||||
}
|
||||
// Shield Slam
|
||||
else if(m_spellInfo->SpellFamilyFlags[1] & 0x200 && m_spellInfo->Category==1209)
|
||||
damage += int32(m_caster->GetShieldBlockValue());
|
||||
@@ -438,12 +429,6 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
|
||||
damage = uint32(damage * m_caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
|
||||
m_caster->ModifyAuraState(AURA_STATE_WARRIOR_VICTORY_RUSH, false);
|
||||
}
|
||||
// Revenge ${$m1+$AP*0.207} to ${$M1+$AP*0.207}
|
||||
else if(m_spellInfo->SpellFamilyFlags[0] & 0x400)
|
||||
damage+= uint32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.207f);
|
||||
// Heroic Throw ${$m1+$AP*.50}
|
||||
else if(m_spellInfo->SpellFamilyFlags[1] & 0x00000001)
|
||||
damage+= uint32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.5f);
|
||||
// Shockwave ${$m3/100*$AP}
|
||||
else if(m_spellInfo->SpellFamilyFlags[1] & 0x00008000)
|
||||
{
|
||||
@@ -452,12 +437,6 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
|
||||
damage+= int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * pct / 100);
|
||||
break;
|
||||
}
|
||||
// Thunder Clap
|
||||
else if(m_spellInfo->SpellFamilyFlags[0] & 0x80)
|
||||
{
|
||||
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 12 / 100);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_WARLOCK:
|
||||
@@ -520,17 +499,6 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
|
||||
damage += int32(energy * multiple);
|
||||
damage += int32(((Player*)m_caster)->GetComboPoints() * ap * 7 / 100);
|
||||
}
|
||||
// Rake
|
||||
else if(m_spellInfo->SpellFamilyFlags[0] & 0x1000 && m_spellInfo->Effect[2]==SPELL_EFFECT_ADD_COMBO_POINTS)
|
||||
{
|
||||
// $AP*0.01 bonus
|
||||
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
|
||||
}
|
||||
// Swipe
|
||||
else if(m_spellInfo->SpellFamilyFlags[1] & 0x00100000)
|
||||
{
|
||||
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.08f);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_ROGUE:
|
||||
@@ -582,53 +550,14 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
|
||||
damage += combo*40;
|
||||
}
|
||||
}
|
||||
// Gouge
|
||||
else if(m_spellInfo->SpellFamilyFlags[0] & 0x8)
|
||||
{
|
||||
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.21f);
|
||||
}
|
||||
// Instant Poison
|
||||
else if(m_spellInfo->SpellFamilyFlags[0] & 0x2000)
|
||||
{
|
||||
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.10f);
|
||||
}
|
||||
// Wound Poison
|
||||
else if(m_spellInfo->SpellFamilyFlags[0] & 0x10000000)
|
||||
{
|
||||
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.04f);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_HUNTER:
|
||||
{
|
||||
// Gore
|
||||
if (m_spellInfo->SpellIconID == 1578)
|
||||
{
|
||||
damage+= rand()%2 ? damage : 0;
|
||||
}
|
||||
// Mongoose Bite
|
||||
else if((m_spellInfo->SpellFamilyFlags[0] & 0x2) && m_spellInfo->SpellVisual[0]==342)
|
||||
{
|
||||
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.2f);
|
||||
}
|
||||
// Counterattack
|
||||
else if(m_spellInfo->SpellFamilyFlags[1] & 0x00080000)
|
||||
{
|
||||
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.2f);
|
||||
}
|
||||
// Arcane Shot
|
||||
else if((m_spellInfo->SpellFamilyFlags[0] & 0x00000800) && m_spellInfo->maxLevel > 0)
|
||||
{
|
||||
damage += int32(m_caster->GetTotalAttackPowerValue(RANGED_ATTACK)*0.15f);
|
||||
}
|
||||
// Steady Shot
|
||||
else if(m_spellInfo->SpellFamilyFlags[1] & 0x1)
|
||||
if(m_spellInfo->SpellFamilyFlags[1] & 0x1)
|
||||
{
|
||||
int32 base = irand((int32)m_caster->GetWeaponDamageRange(RANGED_ATTACK, MINDAMAGE),(int32)m_caster->GetWeaponDamageRange(RANGED_ATTACK, MAXDAMAGE));
|
||||
damage += int32(float(base)/m_caster->GetAttackTime(RANGED_ATTACK)*2800 + m_caster->GetTotalAttackPowerValue(RANGED_ATTACK)*0.1f);
|
||||
|
||||
bool found = false;
|
||||
|
||||
// check dazed affect
|
||||
Unit::AuraEffectList const& decSpeedList = unitTarget->GetAurasByType(SPELL_AURA_MOD_DECREASE_SPEED);
|
||||
for(Unit::AuraEffectList::const_iterator iter = decSpeedList.begin(); iter != decSpeedList.end(); ++iter)
|
||||
@@ -644,11 +573,6 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
|
||||
if(found)
|
||||
damage += m_spellInfo->EffectBasePoints[1];
|
||||
}
|
||||
// Explosive Trap Effect
|
||||
else if(m_spellInfo->SpellFamilyFlags[0] & 0x00000004)
|
||||
{
|
||||
damage += int32(m_caster->GetTotalAttackPowerValue(RANGED_ATTACK)*0.1f);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_PALADIN:
|
||||
|
||||
+1
-1
@@ -322,7 +322,7 @@ inline bool IsAutoRepeatRangedSpell(SpellEntry const* spellInfo)
|
||||
inline bool IsRangedWeaponSpell(SpellEntry const* spellInfo)
|
||||
{
|
||||
//spell->DmgClass == SPELL_DAMAGE_CLASS_RANGED should be checked outside
|
||||
return (spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER) // for 53352, cannot find better way
|
||||
return (spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && !(spellInfo->SpellFamilyFlags[1] & 0x100000000)) // for 53352, cannot find better way
|
||||
|| (spellInfo->EquippedItemSubClassMask & ITEM_SUBCLASS_MASK_WEAPON_RANGED);
|
||||
}
|
||||
|
||||
|
||||
+8
-8
@@ -9326,15 +9326,15 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
||||
{
|
||||
coeff = bonus->dot_damage;
|
||||
if (bonus->ap_dot_bonus > 0)
|
||||
DoneTotal+=bonus->ap_dot_bonus * stack * ApCoeffMod *
|
||||
GetTotalAttackPowerValue(IsRangedWeaponSpell(spellProto) ? RANGED_ATTACK: BASE_ATTACK);
|
||||
DoneTotal+=bonus->ap_dot_bonus * stack * ApCoeffMod * GetTotalAttackPowerValue(
|
||||
(IsRangedWeaponSpell(spellProto) && spellProto->DmgClass !=SPELL_DAMAGE_CLASS_MELEE) ? RANGED_ATTACK : BASE_ATTACK);
|
||||
}
|
||||
else
|
||||
{
|
||||
coeff = bonus->direct_damage;
|
||||
if (bonus->ap_bonus > 0)
|
||||
DoneTotal+=bonus->ap_bonus * stack * ApCoeffMod *
|
||||
GetTotalAttackPowerValue(IsRangedWeaponSpell(spellProto) ? RANGED_ATTACK: BASE_ATTACK);
|
||||
DoneTotal+=bonus->ap_dot_bonus * stack * ApCoeffMod * GetTotalAttackPowerValue(
|
||||
(IsRangedWeaponSpell(spellProto) && spellProto->DmgClass !=SPELL_DAMAGE_CLASS_MELEE)? RANGED_ATTACK : BASE_ATTACK);
|
||||
}
|
||||
}
|
||||
// Default calculation
|
||||
@@ -9801,15 +9801,15 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
|
||||
{
|
||||
coeff = bonus->dot_damage;
|
||||
if (bonus->ap_dot_bonus > 0)
|
||||
DoneTotal+=bonus->ap_dot_bonus * stack *
|
||||
GetTotalAttackPowerValue(IsRangedWeaponSpell(spellProto) ? RANGED_ATTACK: BASE_ATTACK);
|
||||
DoneTotal+=bonus->ap_dot_bonus * stack * GetTotalAttackPowerValue(
|
||||
(IsRangedWeaponSpell(spellProto) && spellProto->DmgClass !=SPELL_DAMAGE_CLASS_MELEE)? RANGED_ATTACK : BASE_ATTACK);
|
||||
}
|
||||
else
|
||||
{
|
||||
coeff = bonus->direct_damage;
|
||||
if (bonus->ap_bonus > 0)
|
||||
DoneTotal+=bonus->ap_bonus * stack *
|
||||
GetTotalAttackPowerValue(IsRangedWeaponSpell(spellProto) ? RANGED_ATTACK: BASE_ATTACK);
|
||||
DoneTotal+=bonus->ap_dot_bonus * stack * GetTotalAttackPowerValue(
|
||||
(IsRangedWeaponSpell(spellProto) && spellProto->DmgClass !=SPELL_DAMAGE_CLASS_MELEE)? RANGED_ATTACK : BASE_ATTACK);
|
||||
}
|
||||
}
|
||||
else // scripted bonus
|
||||
|
||||
Reference in New Issue
Block a user