Store CreatureIndex on Creature, includes helper function to get a creatures party from a battle.
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
2021-05-08 11:53:32 +02:00
parent 305eb5efb2
commit 188e88ab80
7 changed files with 35 additions and 7 deletions

View File

@@ -85,6 +85,8 @@ namespace CreatureLib::Battling {
inline const BattleResult& GetResult() const noexcept { return _battleResult; }
const ArbUt::UniquePtrList<BattleParty>& GetParties() const noexcept { return _parties; }
ArbUt::OptionalBorrowedPtr<BattleParty> FindPartyForCreature(const ArbUt::BorrowedPtr<Creature>&);
const ArbUt::UniquePtrList<BattleSide>& GetSides() const noexcept { return _sides; }
ArbUt::OptionalBorrowedPtr<BattleScript> GetVolatileScript(const ArbUt::StringView& key) const {
return _volatile.Get(key);