mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[10923] Cleanup some magic numbers
This commit is contained in:
parent
3c58f25ad9
commit
72b1d30a1c
3 changed files with 7 additions and 6 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue