summaryrefslogtreecommitdiff
path: root/scripts/Entities/Items/ScrollConsumable.cs
diff options
context:
space:
mode:
authorMatheus <matheus.guedes.mg.m@gmail.com>2025-09-16 23:03:42 -0300
committerMatheus <matheus.guedes.mg.m@gmail.com>2025-09-16 23:03:42 -0300
commit39443bfadc4d8ce146b4fb02d686962d506d2739 (patch)
treee15731dc0f77ee653e9eda4b750db2a9f37e0144 /scripts/Entities/Items/ScrollConsumable.cs
parent862b399fa37e6ca692d38177a22ee34860d2251e (diff)
Correção de bug de inscrição de sinal
Diffstat (limited to 'scripts/Entities/Items/ScrollConsumable.cs')
-rw-r--r--scripts/Entities/Items/ScrollConsumable.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/Entities/Items/ScrollConsumable.cs b/scripts/Entities/Items/ScrollConsumable.cs
index de809a0..7fc3de7 100644
--- a/scripts/Entities/Items/ScrollConsumable.cs
+++ b/scripts/Entities/Items/ScrollConsumable.cs
@@ -92,6 +92,25 @@ public partial class ScrollConsumable(Vector2I initialPosition, MapData map, Scr
base.ConsumedBy(consumer);
}
+ public override void _Notification(int what)
+ {
+ if (what == NotificationPredelete)
+ {
+ if (bindSignal != null)
+ {
+ SignalBus.Instance.PlayerSpellCast -= bindSignal;
+ }
+ }
+ base._Notification(what);
+ }
+
+ /// <summary>
+ /// Este método é executado quando o feitiço deste pergaminho for executado
+ /// (depois do jogador escolher um alvo.)
+ /// </summary>
+ /// <param name="success">Se o feitiço for executado com sucesso.</param>
+
+
/// <summary>
/// Este método é executado quando o feitiço deste pergaminho for executado
/// (depois do jogador escolher um alvo.)