diff --git a/CInterface/Battling/Battle.cpp b/CInterface/Battling/Battle.cpp index a594366..795617a 100644 --- a/CInterface/Battling/Battle.cpp +++ b/CInterface/Battling/Battle.cpp @@ -48,6 +48,9 @@ export bool CreatureLib_Battle_GetWinningSide(const Battle* p) { return p->GetRe export size_t CreatureLib_Battle_GetSidesCount(const Battle* p) { return p->GetSides().Count(); } export BattleSide* const* CreatureLib_Battle_GetSides(const Battle* p) { return p->GetSides().RawData(); } +export size_t CreatureLib_Battle_GetPartiesCount(const Battle* p) { return p->GetParties().Count(); } +export BattleParty* const* CreatureLib_Battle_GetParties(const Battle* p) { return p->GetParties().RawData(); } + export Script* CreatureLib_Battle_GetVolatileScript(Battle* p, const char* key) { return p->GetVolatileScript(ConstString::GetHash(key)); } @@ -71,4 +74,4 @@ export uint8_t CreatureLib_Battle_RegisterEventListener(Battle* p, void (*func)( } export uint8_t CreatureLib_Battle_TriggerEventListener(Battle* p, EventData* data) { Try(p->TriggerEventListener(data);) -} +} \ No newline at end of file diff --git a/src/Battling/Models/Battle.hpp b/src/Battling/Models/Battle.hpp index 4099380..9b1bc89 100644 --- a/src/Battling/Models/Battle.hpp +++ b/src/Battling/Models/Battle.hpp @@ -88,6 +88,7 @@ namespace CreatureLib::Battling { inline bool HasEnded() const noexcept { return _hasEnded; } inline const BattleResult& GetResult() const noexcept { return _battleResult; } + const List& GetParties() const noexcept { return _parties; } const List& GetSides() const noexcept { return _sides; } Script* GetVolatileScript(const ConstString& key) const { return _volatile.Get(key); } Script* GetVolatileScript(uint32_t keyHash) const noexcept { return _volatile.Get(keyHash); }