Core/Spell: SpellAura Redux

Port From (https://github.com/TrinityCore/TrinityCore/commit/f7299dce9770a5b4a3a5ab289e930a390aa0407a)
This commit is contained in:
hondacrx
2021-11-29 14:38:37 -05:00
parent e08294d332
commit 06be062d91
7 changed files with 44 additions and 19 deletions
+17
View File
@@ -277,6 +277,9 @@ namespace Scripts.Spells.Generic
//CorruptinPlagueEntrys
public const uint CorruptingPlague = 40350;
//SiegeTankControl
public const uint SiegeTankControl = 47963;
//FreezingCircleMisc
public const uint FreezingCirclePitOfSaronNormal = 69574;
public const uint FreezingCirclePitOfSaronHeroic = 70276;
@@ -3724,6 +3727,20 @@ namespace Scripts.Spells.Generic
}
}
[Script]
class spell_gen_vehicle_control_link : AuraScript
{
void OnRemove(AuraEffect aurEff, AuraEffectHandleModes mode)
{
GetTarget().RemoveAurasDueToSpell(SpellIds.SiegeTankControl); //aurEff->GetAmount()
}
public override void Register()
{
AfterEffectRemove.Add(new EffectApplyHandler(OnRemove, 1, AuraType.Dummy, AuraEffectHandleModes.Real));
}
}
[Script] // 34779 - Freezing Circle
class spell_freezing_circle : SpellScript
{
+1 -1
View File
@@ -233,7 +233,7 @@ namespace Scripts.Spells.Warlock
{
AuraEffect aurEff = aura.GetEffect(1);
if (aurEff != null)
aurEff.SetAmount(MathFunctions.CalculatePct(aurEff.GetAmount(), GetHitDamage()));
aurEff.SetAmount(MathFunctions.CalculatePct(GetHitDamage(), aurEff.GetAmount()));
}
}