[9865] Add support split damage for spells 66765, 67333.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also small cleanup in mangos_spell_check.sql
This commit is contained in:
Insider42 2010-05-11 09:56:11 +04:00 committed by VladimirMangos
parent fc91380b25
commit c4ee01422d
3 changed files with 20 additions and 7 deletions

View file

@ -4990,6 +4990,23 @@ void Spell::EffectWeaponDmg(SpellEffectIndex eff_idx)
int32 spell_bonus = 0; // bonus specific for spell
switch(m_spellInfo->SpellFamilyName)
{
case SPELLFAMILY_GENERIC:
{
switch(m_spellInfo->Id) // for spells with divided damage to targets
{
case 66765: case 67333: // Meteor Fists
{
uint32 count = 0;
for(std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
if(ihit->effectMask & (1<<eff_idx))
++count;
totalDamagePercentMod /= float(count); // divide to all targets
break;
}
}
break;
}
case SPELLFAMILY_WARRIOR:
{
// Devastate bonus and sunder armor refresh