[10923] Cleanup some magic numbers

This commit is contained in:
zergtmn 2010-12-27 19:04:54 +05:00
parent 3c58f25ad9
commit 72b1d30a1c
3 changed files with 7 additions and 6 deletions

View file

@ -8733,18 +8733,19 @@ int32 Unit::CalculateSpellDamage(Unit const* target, SpellEntry const* spellProt
if (comboDamage != 0 && unitPlayer && target && (target->GetObjectGuid() == unitPlayer->GetComboTargetGuid()))
value += (int32)(comboDamage * comboPoints);
if(Player* modOwner = GetSpellModOwner())
if (Player* modOwner = GetSpellModOwner())
{
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_ALL_EFFECTS, value);
switch(effect_index)
{
case 0:
case EFFECT_INDEX_0:
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_EFFECT1, value);
break;
case 1:
case EFFECT_INDEX_1:
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_EFFECT2, value);
break;
case 2:
case EFFECT_INDEX_2:
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_EFFECT3, value);
break;
}