[9411] More SpellEffectIndex using in apropriate cases

This commit is contained in:
VladimirMangos 2010-02-19 04:27:24 +03:00
parent 6469c21c41
commit 84080aaf60
26 changed files with 199 additions and 196 deletions

View file

@ -1899,7 +1899,7 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
{
Unit::AttackerSet::iterator aItr = attackers.begin();
std::advance(aItr, rand() % attackers.size());
AddUnitTarget((*aItr), 1);
AddUnitTarget((*aItr), EFFECT_INDEX_1);
attackers.erase(aItr);
}
@ -4792,14 +4792,14 @@ void Spell::EffectWeaponDmg(SpellEffectIndex eff_idx)
{
case SPELL_EFFECT_WEAPON_DAMAGE:
case SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL:
fixed_bonus += CalculateDamage(j, unitTarget);
fixed_bonus += CalculateDamage(SpellEffectIndex(j), unitTarget);
break;
case SPELL_EFFECT_NORMALIZED_WEAPON_DMG:
fixed_bonus += CalculateDamage(j, unitTarget);
fixed_bonus += CalculateDamage(SpellEffectIndex(j), unitTarget);
normalized = true;
break;
case SPELL_EFFECT_WEAPON_PERCENT_DAMAGE:
weaponDamagePercentMod *= float(CalculateDamage(j, unitTarget)) / 100.0f;
weaponDamagePercentMod *= float(CalculateDamage(SpellEffectIndex(j), unitTarget)) / 100.0f;
// applied only to prev.effects fixed damage
fixed_bonus = int32(fixed_bonus*weaponDamagePercentMod);