From 53c27d35b69fef96f56c50266a7774e6293e6f12 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Fri, 19 Nov 2021 13:52:18 +0100 Subject: [PATCH] Trigger OnRemove on Creature when it faints. --- src/Battling/Models/Creature.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Battling/Models/Creature.cpp b/src/Battling/Models/Creature.cpp index 83bce2c..ddce6e5 100644 --- a/src/Battling/Models/Creature.cpp +++ b/src/Battling/Models/Creature.cpp @@ -178,6 +178,7 @@ namespace CreatureLib::Battling { if (_battleData.Battle.HasValue()) { _battleData.Battle.GetValue()->TriggerEventListener(this); HOOK(OnFaint, this, this, damageSource); + HOOK(OnRemove, this); } _library->GetExperienceLibrary()->HandleExperienceGain(this, _battleData.SeenOpponents); if (_battleData.Battle.HasValue() && _battleData.Side.HasValue()) {