Core/Auras: Implemented SPELLMOD_EFFECT4 and SPELLMOD_EFFECT5

This commit is contained in:
Shauren
2015-03-08 17:36:44 +01:00
parent eb158e1847
commit 75db12bf41
2 changed files with 21 additions and 3 deletions

View File

@@ -10757,6 +10757,12 @@ float Unit::ApplyEffectModifiers(SpellInfo const* spellProto, uint8 effect_index
case 2:
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_EFFECT3, value);
break;
case 3:
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_EFFECT4, value);
break;
case 4:
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_EFFECT5, value);
break;
}
}
return value;

View File

@@ -924,6 +924,8 @@ void AuraEffect::ApplySpellMod(Unit* target, bool apply)
case SPELLMOD_EFFECT1:
case SPELLMOD_EFFECT2:
case SPELLMOD_EFFECT3:
case SPELLMOD_EFFECT4:
case SPELLMOD_EFFECT5:
{
ObjectGuid guid = target->GetGUID();
Unit::AuraApplicationMap & auras = target->GetAppliedAuras();
@@ -936,7 +938,7 @@ void AuraEffect::ApplySpellMod(Unit* target, bool apply)
{
if (GetMiscValue() == SPELLMOD_ALL_EFFECTS)
{
for (uint8 i = 0; i<MAX_SPELL_EFFECTS; ++i)
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
if (AuraEffect* aurEff = aura->GetEffect(i))
aurEff->RecalculateAmount();
@@ -952,9 +954,19 @@ void AuraEffect::ApplySpellMod(Unit* target, bool apply)
if (AuraEffect* aurEff = aura->GetEffect(1))
aurEff->RecalculateAmount();
}
else //if (modOp == SPELLMOD_EFFECT3)
else if (GetMiscValue() == SPELLMOD_EFFECT3)
{
if (AuraEffect* aurEff = aura->GetEffect(2))
if (AuraEffect* aurEff = aura->GetEffect(2))
aurEff->RecalculateAmount();
}
else if (GetMiscValue() == SPELLMOD_EFFECT4)
{
if (AuraEffect* aurEff = aura->GetEffect(3))
aurEff->RecalculateAmount();
}
else if (GetMiscValue() == SPELLMOD_EFFECT5)
{
if (AuraEffect* aurEff = aura->GetEffect(4))
aurEff->RecalculateAmount();
}
}