diff --git a/src/Battling/Flow/TurnHandler.cpp b/src/Battling/Flow/TurnHandler.cpp index c4b16c9..0266c0f 100644 --- a/src/Battling/Flow/TurnHandler.cpp +++ b/src/Battling/Flow/TurnHandler.cpp @@ -31,7 +31,7 @@ void TurnHandler::ExecuteChoice(ArbUt::BorrowedPtr choice) { auto battle = user->GetBattle(); AssertNotNull(battle) // If the user is not in the field, we don't want to execute its choice. - if (!battle->CreatureInField(user)) { + if (!user->IsOnBattleField()) { return; } // If the choice is not valid, we don't want to execute it. diff --git a/src/Battling/Models/Creature.hpp b/src/Battling/Models/Creature.hpp index 19456d7..b49de6b 100644 --- a/src/Battling/Models/Creature.hpp +++ b/src/Battling/Models/Creature.hpp @@ -102,10 +102,10 @@ namespace CreatureLib::Battling { void SetBattleData(ArbUt::BorrowedPtr battle, ArbUt::BorrowedPtr side); const ArbUt::BorrowedPtr& GetBattle() const; const ArbUt::BorrowedPtr& GetBattleSide() const; - void SetOnBattleField(bool value) { _onBattleField = value; } - bool IsOnBattleField() const { return _onBattleField; } + inline void SetOnBattleField(bool value) { _onBattleField = value; } + inline bool IsOnBattleField() const { return _onBattleField; } - const std::string& GetNickname() const noexcept { return _nickname; } + inline const std::string& GetNickname() const noexcept { return _nickname; } const ArbUt::CaseInsensitiveConstString& GetActiveTalent() const; [[nodiscard]] bool IsFainted() const noexcept;