Core/Auras: Implemented new spell modifier type to change aura stack size on apply
Port From (https://github.com/TrinityCore/TrinityCore/commit/51a9d2a9c20f36f5343049a340663601c1c1165b)
This commit is contained in:
@@ -870,7 +870,7 @@ namespace Game.Spells
|
||||
{
|
||||
Player modOwner = caster.GetSpellModOwner();
|
||||
if (modOwner != null)
|
||||
modOwner.ApplySpellMod(m_spellInfo.Id, SpellModOp.StackAmount2, ref maxStackAmount);
|
||||
modOwner.ApplySpellMod(m_spellInfo.Id, SpellModOp.MaxStackAmount, ref maxStackAmount);
|
||||
}
|
||||
return maxStackAmount;
|
||||
}
|
||||
|
||||
@@ -66,6 +66,10 @@ namespace Game.Spells
|
||||
}
|
||||
}
|
||||
|
||||
Player modOwner = caster.GetSpellModOwner();
|
||||
if (modOwner != null)
|
||||
modOwner.ApplySpellMod(info.Id, SpellModOp.StackAmount, ref m_spellValue.AuraStackAmount, this);
|
||||
|
||||
if (!originalCasterGUID.IsEmpty())
|
||||
m_originalCasterGUID = originalCasterGUID;
|
||||
else
|
||||
@@ -2160,7 +2164,7 @@ namespace Game.Spells
|
||||
if (m_spellValue.AuraStackAmount > 1)
|
||||
{
|
||||
if (!refresh)
|
||||
m_spellAura.SetStackAmount(m_spellValue.AuraStackAmount);
|
||||
m_spellAura.SetStackAmount((byte)m_spellValue.AuraStackAmount);
|
||||
else
|
||||
m_spellAura.ModStackAmount(m_spellValue.AuraStackAmount);
|
||||
}
|
||||
@@ -7718,7 +7722,7 @@ namespace Game.Spells
|
||||
public uint CustomBasePointsMask;
|
||||
public uint MaxAffectedTargets;
|
||||
public float RadiusMod;
|
||||
public byte AuraStackAmount;
|
||||
public int AuraStackAmount;
|
||||
}
|
||||
|
||||
// Spell modifier (used for modify other spells)
|
||||
|
||||
Reference in New Issue
Block a user