Core/Spell: SpellValueOverrides encapsulation
Port From (https://github.com/TrinityCore/TrinityCore/commit/5fbddef85f48f6b9140d025d7f2e14faae0af178)
This commit is contained in:
@@ -1276,7 +1276,7 @@ namespace Game.Spells
|
||||
if (caster.HasAura(64760))
|
||||
{
|
||||
CastSpellExtraArgs args = new(GetEffect(0));
|
||||
args.SpellValueOverrides.Add(SpellValueMod.BasePoint0, GetEffect(0).GetAmount());
|
||||
args.AddSpellMod(SpellValueMod.BasePoint0, GetEffect(0).GetAmount());
|
||||
caster.CastSpell(target, 64801, args);
|
||||
}
|
||||
}
|
||||
@@ -1331,7 +1331,7 @@ namespace Game.Spells
|
||||
{
|
||||
float multiplier = aurEff.GetAmount();
|
||||
CastSpellExtraArgs args = new(TriggerCastFlags.FullMask);
|
||||
args.SpellValueOverrides.Add(SpellValueMod.BasePoint0, MathFunctions.CalculatePct(caster.GetMaxPower(PowerType.Mana), multiplier));
|
||||
args.AddSpellMod(SpellValueMod.BasePoint0, MathFunctions.CalculatePct(caster.GetMaxPower(PowerType.Mana), multiplier));
|
||||
caster.CastSpell(caster, 47755, args);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user