mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Auras: Implemented SPELLMOD_EFFECT4 and SPELLMOD_EFFECT5
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user