From 374a4d10a88e7e0f9eaef9254d2070119568e001 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sun, 28 Mar 2021 18:37:10 +0200 Subject: [PATCH] Pass creature along with OnEndTurn. Signed-off-by: Deukhoofd --- src/Battling/Flow/TurnHandler.cpp | 2 +- src/Battling/ScriptHandling/BattleScript.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Battling/Flow/TurnHandler.cpp b/src/Battling/Flow/TurnHandler.cpp index ad07ab3..a38cf24 100644 --- a/src/Battling/Flow/TurnHandler.cpp +++ b/src/Battling/Flow/TurnHandler.cpp @@ -30,7 +30,7 @@ void TurnHandler::RunTurn(const ArbUt::BorrowedPtr& queue, const Ar if (!creature.HasValue()) { continue; } - HOOK(OnEndTurn, creature.GetValue()); + HOOK(OnEndTurn, creature.GetValue(), creature.GetValue()); } } } diff --git a/src/Battling/ScriptHandling/BattleScript.hpp b/src/Battling/ScriptHandling/BattleScript.hpp index f270261..5090368 100644 --- a/src/Battling/ScriptHandling/BattleScript.hpp +++ b/src/Battling/ScriptHandling/BattleScript.hpp @@ -86,7 +86,7 @@ namespace CreatureLib::Battling { virtual void PreventOpponentRunAway([[maybe_unused]] const FleeTurnChoice* choice, [[maybe_unused]] bool* result){}; - virtual void OnEndTurn(){}; + virtual void OnEndTurn([[maybe_unused]] Creature* creature){}; }; }