*Update to Mangos 7187.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-01-26 09:52:31 -06:00
parent 028ff8b163
commit 1be9f5dbdd
6 changed files with 191 additions and 67 deletions
-53
View File
@@ -5637,59 +5637,6 @@ void Aura::PeriodicTick()
//pdamage = pCaster->SpellDamageBonus(m_target,GetSpellProto(),pdamage,DOT);
// talent Soul Siphon add bonus to Drain Life spells
if( GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && (GetSpellProto()->SpellFamilyFlags & 0x8) )
{
// find talent max bonus percentage
Unit::AuraList const& mClassScriptAuras = pCaster->GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
for(Unit::AuraList::const_iterator i = mClassScriptAuras.begin(); i != mClassScriptAuras.end(); ++i)
{
if ((*i)->GetModifier()->m_miscvalue == 4992 || (*i)->GetModifier()->m_miscvalue == 4993)
{
if((*i)->GetEffIndex()!=1)
{
sLog.outError("Expected spell %u structure change, need code update",(*i)->GetId());
break;
}
// effect 1 m_amount
int32 maxPercent = (*i)->GetModifier()->m_amount;
// effect 0 m_amount
int32 stepPercent = pCaster->CalculateSpellDamage((*i)->GetSpellProto(),0,(*i)->GetSpellProto()->EffectBasePoints[0],pCaster);
// count affliction effects and calc additional damage in percentage
int32 modPercent = 0;
Unit::AuraMap const& victimAuras = m_target->GetAuras();
for (Unit::AuraMap::const_iterator itr = victimAuras.begin(); itr != victimAuras.end(); ++itr)
{
Aura* aura = itr->second;
if (aura->IsPositive())continue;
SpellEntry const* m_spell = aura->GetSpellProto();
if (m_spell->SpellFamilyName != SPELLFAMILY_WARLOCK)
continue;
SkillLineAbilityMap::const_iterator lower = spellmgr.GetBeginSkillLineAbilityMap(m_spell->Id);
SkillLineAbilityMap::const_iterator upper = spellmgr.GetEndSkillLineAbilityMap(m_spell->Id);
for(SkillLineAbilityMap::const_iterator _spell_idx = lower; _spell_idx != upper; ++_spell_idx)
{
if(_spell_idx->second->skillId == SKILL_AFFLICTION)
{
modPercent += stepPercent;
if (modPercent >= maxPercent)
{
modPercent = maxPercent;
break;
}
}
}
}
pdamage += (pdamage*modPercent/100);
break;
}
}
}
//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
if (m_target->GetTypeId()==TYPEID_PLAYER)