Trigger OnRemove on Creature when it faints.

This commit is contained in:
Deukhoofd 2021-11-19 13:52:18 +01:00
parent 364bac7de7
commit 53c27d35b6
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 1 additions and 0 deletions

View File

@ -178,6 +178,7 @@ namespace CreatureLib::Battling {
if (_battleData.Battle.HasValue()) {
_battleData.Battle.GetValue()->TriggerEventListener<FaintEvent>(this);
HOOK(OnFaint, this, this, damageSource);
HOOK(OnRemove, this);
}
_library->GetExperienceLibrary()->HandleExperienceGain(this, _battleData.SeenOpponents);
if (_battleData.Battle.HasValue() && _battleData.Side.HasValue()) {