Use smart pointers for BattleSide.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -41,7 +41,7 @@ namespace CreatureLib::Battling {
|
||||
Library::StatisticSet<uint32_t> _flatStats;
|
||||
Library::StatisticSet<uint32_t> _boostedStats;
|
||||
|
||||
Battle* _battle = nullptr;
|
||||
ArbUt::BorrowedPtr<Battle> _battle = nullptr;
|
||||
BattleSide* _side = nullptr;
|
||||
bool _onBattleField = false;
|
||||
|
||||
@@ -101,8 +101,8 @@ namespace CreatureLib::Battling {
|
||||
|
||||
inline uint32_t GetCurrentHealth() const noexcept { return _currentHealth; }
|
||||
|
||||
void SetBattleData(Battle* battle, BattleSide* side);
|
||||
Battle* GetBattle() const;
|
||||
void SetBattleData(ArbUt::BorrowedPtr<Battle> battle, BattleSide* side);
|
||||
const ArbUt::BorrowedPtr<Battle>& GetBattle() const;
|
||||
BattleSide* GetBattleSide() const;
|
||||
void SetOnBattleField(bool value) { _onBattleField = value; }
|
||||
bool IsOnBattleField() const { return _onBattleField; }
|
||||
|
||||
Reference in New Issue
Block a user