mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
Use spell_bonus_data table for store custom damage/healing bonus coefficients
Big thanks ApoC for help create table. Fixed bonuses for stacked periodic Warning need test all coefficients for correct bonus amount. TODO: use this table for absorb bonus calculation use this table for melee spells AP bonuses use chain multipler in final damage/heal amount Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
parent
6d9a099a19
commit
4ecfbcc2f5
13 changed files with 711 additions and 402 deletions
|
|
@ -2055,7 +2055,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
|||
{
|
||||
// prevent double apply bonuses
|
||||
if(m_target->GetTypeId()!=TYPEID_PLAYER || !((Player*)m_target)->GetSession()->PlayerLoading())
|
||||
m_modifier.m_amount = caster->SpellHealingBonus(GetSpellProto(), m_modifier.m_amount, SPELL_DIRECT_DAMAGE, m_target);
|
||||
m_modifier.m_amount = caster->SpellHealingBonus(m_target, GetSpellProto(), m_modifier.m_amount, SPELL_DIRECT_DAMAGE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -2252,7 +2252,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
|||
if ( caster )
|
||||
// prevent double apply bonuses
|
||||
if(m_target->GetTypeId()!=TYPEID_PLAYER || !((Player*)m_target)->GetSession()->PlayerLoading())
|
||||
m_modifier.m_amount = caster->SpellHealingBonus(GetSpellProto(), m_modifier.m_amount, SPELL_DIRECT_DAMAGE, m_target);
|
||||
m_modifier.m_amount = caster->SpellHealingBonus(m_target, GetSpellProto(), m_modifier.m_amount, SPELL_DIRECT_DAMAGE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -4240,29 +4240,6 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_PALADIN:
|
||||
{
|
||||
// Consecration
|
||||
if (m_spellProto->SpellFamilyFlags & 0x0000000000000020LL)
|
||||
{
|
||||
// ($m1+0.04*$SPH+0.04*$AP)
|
||||
float ap = caster->GetTotalAttackPowerValue(BASE_ATTACK);
|
||||
int32 holy = caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) +
|
||||
caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellProto), m_target);
|
||||
m_modifier.m_amount += int32(0.04f*holy + 0.04f*ap);
|
||||
return;
|
||||
}
|
||||
// Seal of Vengeance 0.013*$SPH+0.025*$AP per tick (also can stack)
|
||||
if(m_spellProto->SpellFamilyFlags & 0x0000080000000000LL)
|
||||
{
|
||||
float ap = caster->GetTotalAttackPowerValue(BASE_ATTACK);
|
||||
int32 holy = caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) +
|
||||
caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellProto), m_target);
|
||||
m_modifier.m_amount += int32((0.013f*holy + 0.025f*ap) * GetStackAmount());
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -5619,7 +5596,7 @@ void Aura::PeriodicTick()
|
|||
pdamage = pdamageReductedArmor;
|
||||
}
|
||||
|
||||
pdamage = pCaster->SpellDamageBonus(m_target,GetSpellProto(),pdamage,DOT);
|
||||
pdamage = pCaster->SpellDamageBonus(m_target, GetSpellProto(), pdamage, DOT, GetStackAmount());
|
||||
|
||||
// Curse of Agony damage-per-tick calculation
|
||||
if (GetSpellProto()->SpellFamilyName==SPELLFAMILY_WARLOCK && (GetSpellProto()->SpellFamilyFlags & 0x0000000000000400LL) && GetSpellProto()->SpellIconID==544)
|
||||
|
|
@ -5705,7 +5682,7 @@ void Aura::PeriodicTick()
|
|||
pdamage = pdamageReductedArmor;
|
||||
}
|
||||
|
||||
pdamage = pCaster->SpellDamageBonus(m_target,GetSpellProto(),pdamage,DOT);
|
||||
pdamage = pCaster->SpellDamageBonus(m_target, GetSpellProto(), pdamage, DOT, GetStackAmount());
|
||||
|
||||
//As of 2.2 resilience reduces damage from DoT ticks as much as the chance to not be critically hit
|
||||
// Reduce dot damage from resilience for players
|
||||
|
|
@ -5749,7 +5726,7 @@ void Aura::PeriodicTick()
|
|||
if(Player *modOwner = pCaster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_MULTIPLE_VALUE, multiplier);
|
||||
|
||||
uint32 heal = pCaster->SpellHealingBonus(spellProto, uint32(new_damage * multiplier), DOT, pCaster);
|
||||
uint32 heal = pCaster->SpellHealingBonus(pCaster, spellProto, uint32(new_damage * multiplier), DOT, GetStackAmount());
|
||||
|
||||
int32 gain = pCaster->ModifyHealth(heal);
|
||||
pCaster->getHostilRefManager().threatAssist(pCaster, gain * 0.5f, spellProto);
|
||||
|
|
@ -5778,7 +5755,7 @@ void Aura::PeriodicTick()
|
|||
else
|
||||
pdamage = amount;
|
||||
|
||||
pdamage = pCaster->SpellHealingBonus(GetSpellProto(), pdamage, DOT, m_target);
|
||||
pdamage = pCaster->SpellHealingBonus(m_target, GetSpellProto(), pdamage, DOT, GetStackAmount());
|
||||
|
||||
sLog.outDetail("PeriodicTick: %u (TypeId: %u) heal of %u (TypeId: %u) for %u health inflicted by %u",
|
||||
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), m_target->GetGUIDLow(), m_target->GetTypeId(), pdamage, GetId());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue