Cleans up HistoryHolder to be a lot less complicated (although possibly a bit slower), adds DamageHistory.

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
2021-10-23 16:57:58 +02:00
parent 1ed57e51af
commit 20b53833c4
8 changed files with 54 additions and 69 deletions

View File

@@ -112,7 +112,7 @@ namespace CreatureLib::Battling {
const EventHook& GetEventHook() const noexcept { return _eventHook; }
template <HistoryElementType T, class... parameters> void RegisterHistoryElement(parameters... args) {
try_creature(this->_historyHolder.Register<T>(args...);
try_creature(this->_historyHolder.Register<T>(this->GetCurrentTurn(), args...);
, "Exception occurred during history element registration.");
}
const HistoryHolder& GetHistory() const noexcept { return _historyHolder; }