[11023] Implement support for threat multiplier and AP based threat bonus for spells.

* Higher ranks are now automatically filled when not listed in spell_threat
* Added some loading checks to detect inconsistent data

Signed-off-by: Lynx3d <lynx3d@some-imaginary-isp.org>
This commit is contained in:
x3n 2011-01-17 11:54:13 +01:00 committed by Lynx3d
parent 77d8b41cc4
commit d35be7f4c1
12 changed files with 238 additions and 177 deletions

View file

@ -6879,7 +6879,7 @@ void Aura::PeriodicTick()
pCaster->CalculateHealAbsorb(heal, &absorbHeal);
int32 gain = pCaster->DealHeal(pCaster, heal - absorbHeal, spellProto, false, absorbHeal);
pCaster->getHostileRefManager().threatAssist(pCaster, gain * 0.5f, spellProto);
pCaster->getHostileRefManager().threatAssist(pCaster, gain * 0.5f * sSpellMgr.GetSpellThreatMultiplier(spellProto), spellProto);
break;
}
case SPELL_AURA_PERIODIC_HEAL:
@ -6951,7 +6951,7 @@ void Aura::PeriodicTick()
if( BattleGround *bg = ((Player*)pCaster)->GetBattleGround() )
bg->UpdatePlayerScore(((Player*)pCaster), SCORE_HEALING_DONE, gain);
target->getHostileRefManager().threatAssist(pCaster, float(gain) * 0.5f, spellProto);
target->getHostileRefManager().threatAssist(pCaster, float(gain) * 0.5f * sSpellMgr.GetSpellThreatMultiplier(spellProto), spellProto);
// heal for caster damage
if(target != pCaster && spellProto->SpellVisual[0] == 163)
@ -7091,7 +7091,7 @@ void Aura::PeriodicTick()
int32 gain = target->ModifyPower(power,pdamage);
if(Unit* pCaster = GetCaster())
target->getHostileRefManager().threatAssist(pCaster, float(gain) * 0.5f, spellProto);
target->getHostileRefManager().threatAssist(pCaster, float(gain) * 0.5f * sSpellMgr.GetSpellThreatMultiplier(spellProto), spellProto);
break;
}
case SPELL_AURA_OBS_MOD_MANA:
@ -7117,7 +7117,7 @@ void Aura::PeriodicTick()
int32 gain = target->ModifyPower(POWER_MANA, pdamage);
if(Unit* pCaster = GetCaster())
target->getHostileRefManager().threatAssist(pCaster, float(gain) * 0.5f, spellProto);
target->getHostileRefManager().threatAssist(pCaster, float(gain) * 0.5f * sSpellMgr.GetSpellThreatMultiplier(spellProto), spellProto);
break;
}
case SPELL_AURA_POWER_BURN_MANA:
@ -7179,7 +7179,7 @@ void Aura::PeriodicTick()
int32 gain = target->ModifyHealth(m_modifier.m_amount);
if (Unit *caster = GetCaster())
target->getHostileRefManager().threatAssist(caster, float(gain) * 0.5f, spellProto);
target->getHostileRefManager().threatAssist(caster, float(gain) * 0.5f * sSpellMgr.GetSpellThreatMultiplier(spellProto), spellProto);
break;
}
case SPELL_AURA_MOD_POWER_REGEN: