Core/Auras: Implement spell effect attribute NoScaleWithStack (0x40)
Port From (https://github.com/TrinityCore/TrinityCore/commit/b832ed2479c039958bce40c3c26294fc67acf744)
This commit is contained in:
@@ -1672,6 +1672,16 @@ namespace Framework.Constants
|
|||||||
CooldownExpiresAtDailyReset = 0x08
|
CooldownExpiresAtDailyReset = 0x08
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum SpellEffectAttributes
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
UnaffectedByInvulnerability = 0x01, // not cancelled by immunities
|
||||||
|
NoScaleWithStack = 0x40,
|
||||||
|
StackAuraAmountOnRecast = 0x8000, // refreshing periodic auras with this attribute will add remaining damage to new aura
|
||||||
|
AllowAnyExplicitTarget = 0x100000,
|
||||||
|
IgnoreDuringCooldownTimeRateCalculation = 0x800000
|
||||||
|
}
|
||||||
|
|
||||||
public enum SpellProcsPerMinuteModType : byte
|
public enum SpellProcsPerMinuteModType : byte
|
||||||
{
|
{
|
||||||
Haste = 1,
|
Haste = 1,
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ namespace Game.DataStorage
|
|||||||
public uint EffectIndex;
|
public uint EffectIndex;
|
||||||
public uint Effect;
|
public uint Effect;
|
||||||
public float EffectAmplitude;
|
public float EffectAmplitude;
|
||||||
public int EffectAttributes;
|
public SpellEffectAttributes EffectAttributes;
|
||||||
public uint EffectAuraPeriod;
|
public uint EffectAuraPeriod;
|
||||||
public float EffectBonusCoefficient;
|
public float EffectBonusCoefficient;
|
||||||
public float EffectChainAmplitude;
|
public float EffectChainAmplitude;
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ namespace Game.Spells
|
|||||||
}
|
}
|
||||||
|
|
||||||
GetBase().CallScriptEffectCalcAmountHandlers(this, ref amount, ref m_canBeRecalculated);
|
GetBase().CallScriptEffectCalcAmountHandlers(this, ref amount, ref m_canBeRecalculated);
|
||||||
|
if (!GetSpellEffectInfo().EffectAttributes.HasFlag(SpellEffectAttributes.NoScaleWithStack))
|
||||||
amount *= GetBase().GetStackAmount();
|
amount *= GetBase().GetStackAmount();
|
||||||
return amount;
|
return amount;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3666,6 +3666,7 @@ namespace Game.Spells
|
|||||||
Scaling.Coefficient = effect.Coefficient;
|
Scaling.Coefficient = effect.Coefficient;
|
||||||
Scaling.Variance = effect.Variance;
|
Scaling.Variance = effect.Variance;
|
||||||
Scaling.ResourceCoefficient = effect.ResourceCoefficient;
|
Scaling.ResourceCoefficient = effect.ResourceCoefficient;
|
||||||
|
EffectAttributes = effect.EffectAttributes;
|
||||||
|
|
||||||
ImplicitTargetConditions = null;
|
ImplicitTargetConditions = null;
|
||||||
|
|
||||||
@@ -4408,6 +4409,7 @@ namespace Game.Spells
|
|||||||
public FlagArray128 SpellClassMask;
|
public FlagArray128 SpellClassMask;
|
||||||
public float BonusCoefficientFromAP;
|
public float BonusCoefficientFromAP;
|
||||||
public List<Condition> ImplicitTargetConditions;
|
public List<Condition> ImplicitTargetConditions;
|
||||||
|
public SpellEffectAttributes EffectAttributes;
|
||||||
public ScalingInfo Scaling;
|
public ScalingInfo Scaling;
|
||||||
|
|
||||||
ImmunityInfo _immunityInfo;
|
ImmunityInfo _immunityInfo;
|
||||||
|
|||||||
Reference in New Issue
Block a user