diff --git a/src/Battling/Models/Battle.hpp b/src/Battling/Models/Battle.hpp index eed2aa8..a7608af 100644 --- a/src/Battling/Models/Battle.hpp +++ b/src/Battling/Models/Battle.hpp @@ -26,7 +26,7 @@ namespace CreatureLib::Battling { bool _hasEnded = false; BattleResult _battleResult = BattleResult::Empty(); EventHook _eventHook; - HistoryHolder* _historyHolder = new HistoryHolder(); + ArbUt::UniquePtr _historyHolder = new HistoryHolder(); uint32_t _currentTurn = 0; @@ -115,7 +115,7 @@ namespace CreatureLib::Battling { try_creature(this->_historyHolder->Register(this->GetCurrentTurn(), args...); , "Exception occurred during history element registration."); } - const HistoryHolder* GetHistory() const noexcept { return _historyHolder; } + const HistoryHolder* GetHistory() const noexcept { return _historyHolder.GetRaw(); } long GetLastTurnTimeMicroseconds() const noexcept { return _lastTurnTime; }