diff options
| author | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-09-16 23:03:42 -0300 |
|---|---|---|
| committer | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-09-16 23:03:42 -0300 |
| commit | 39443bfadc4d8ce146b4fb02d686962d506d2739 (patch) | |
| tree | e15731dc0f77ee653e9eda4b750db2a9f37e0144 /scripts | |
| parent | 862b399fa37e6ca692d38177a22ee34860d2251e (diff) | |
Correção de bug de inscrição de sinal
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/Entities/Items/ScrollConsumable.cs | 19 |
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.) |
