spell fixes

This commit is contained in:
Ed
2025-06-10 11:49:35 +03:00
parent 42d39a7c67
commit c0f4098ca9
7 changed files with 13 additions and 68 deletions

View File

@@ -54,7 +54,7 @@ public abstract partial class CP14SharedMagicSystem
RaiseLocalEvent(action, ref endEv);
if (cooldown is not null)
_action.CP14StartCustomDelay(action, TimeSpan.FromSeconds(cooldown.Value));
_action.SetCooldown(action.Owner, TimeSpan.FromSeconds(cooldown.Value));
}
private bool UseDelayedAction(ICP14DelayedMagicEffect delayedEffect, Entity<CP14MagicEffectComponent> action, DoAfterEvent doAfter, EntityUid performer, EntityUid? target = null, EntityCoordinates? worldTarget = null)
@@ -120,11 +120,11 @@ public abstract partial class CP14SharedMagicSystem
return;
var doAfter = new CP14DelayedEntityWorldTargetActionDoAfterEvent(
EntityManager.GetNetCoordinates(args.Coords),
EntityManager.GetNetCoordinates(args.Target),
EntityManager.GetNetEntity(args.Entity),
args.Cooldown);
if (!UseDelayedAction(delayedEffect, (args.Action, magicEffect), doAfter, args.Performer, args.Entity, args.Coords))
if (!UseDelayedAction(delayedEffect, (args.Action, magicEffect), doAfter, args.Performer, args.Entity, args.Target))
return;
args.Handled = true;