From cfb7663d7842b0327f9681a2770985b010f43565 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Wed, 23 Oct 2019 19:21:21 +0200 Subject: [PATCH] Fix build by adding get functions for otherwise inaccessible fields. --- src/Library/Living/LearnedAttack.cpp | 12 ++++++++++++ src/Library/Living/LearnedAttack.hpp | 8 ++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/Library/Living/LearnedAttack.cpp b/src/Library/Living/LearnedAttack.cpp index 7893377..3eb4cb9 100644 --- a/src/Library/Living/LearnedAttack.cpp +++ b/src/Library/Living/LearnedAttack.cpp @@ -5,3 +5,15 @@ CreatureLib::Library::LearnedAttack::LearnedAttack(CreatureLib::Library::AttackD { } + +const CreatureLib::Library::AttackData *CreatureLib::Library::LearnedAttack::GetAttack() const { + return _attack; +} + +uint8_t CreatureLib::Library::LearnedAttack::GetMaxUses() const { + return _maxUses; +} + +uint8_t CreatureLib::Library::LearnedAttack::GetRemainingUses() const { + return _remainingUses; +} diff --git a/src/Library/Living/LearnedAttack.hpp b/src/Library/Living/LearnedAttack.hpp index aa78224..19fbaa3 100644 --- a/src/Library/Living/LearnedAttack.hpp +++ b/src/Library/Living/LearnedAttack.hpp @@ -6,10 +6,14 @@ namespace CreatureLib::Library{ class LearnedAttack { const AttackData* _attack; - const uint8_t _maxUses; - const uint8_t _remainingUses; + uint8_t _maxUses; + uint8_t _remainingUses; public: LearnedAttack(AttackData* attack, uint8_t maxUses); + + const AttackData* GetAttack() const; + uint8_t GetMaxUses() const; + uint8_t GetRemainingUses() const; }; }