mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 10:37:06 +00:00
[9457] Implement spell/attack power bonus for 59547 and similar spells.
Signed-off-by: VladimirMangos <vladimir@getmangos.com> Also fix build in prev. rev. in result my not added changes.
This commit is contained in:
parent
1e05a737bd
commit
530be51dc5
3 changed files with 26 additions and 2 deletions
|
|
@ -4684,6 +4684,30 @@ void Aura::HandleAuraPeriodicDummy(bool apply, bool Real)
|
|||
void Aura::HandlePeriodicHeal(bool apply, bool /*Real*/)
|
||||
{
|
||||
m_isPeriodic = apply;
|
||||
|
||||
// For prevent double apply bonuses
|
||||
bool loading = (m_target->GetTypeId() == TYPEID_PLAYER && ((Player*)m_target)->GetSession()->PlayerLoading());
|
||||
|
||||
// Custom damage calculation after
|
||||
if (apply)
|
||||
{
|
||||
if(loading)
|
||||
return;
|
||||
|
||||
Unit *caster = GetCaster();
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
// Gift of the Naaru (have diff spellfamilies)
|
||||
if (m_spellProto->SpellIconID == 329 && m_spellProto->SpellVisual[0] == 7625)
|
||||
{
|
||||
int32 ap = int32 (0.22f * caster->GetTotalAttackPowerValue(BASE_ATTACK));
|
||||
int32 holy = caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto))
|
||||
+ caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellProto), m_target);
|
||||
holy = int32(holy * 377 / 1000);
|
||||
m_modifier.m_amount += ap > holy ? ap : holy;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Aura::HandlePeriodicDamage(bool apply, bool Real)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue