Compile time option to change bit size of level.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
using namespace CreatureLib::Library;
|
||||
|
||||
void LearnableAttacks::AddLevelAttack(uint8_t level, ArbUt::BorrowedPtr<const AttackData> attack) {
|
||||
void LearnableAttacks::AddLevelAttack(level_int_t level, ArbUt::BorrowedPtr<const AttackData> attack) {
|
||||
if (_learnedByLevel.Has(level)) {
|
||||
_learnedByLevel[level].Append(attack);
|
||||
} else {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <Arbutils/Memory/BorrowedPtr.hpp>
|
||||
#include <Arbutils/Random.hpp>
|
||||
#include <unordered_map>
|
||||
#include "../../Defines.hpp"
|
||||
#include "../Attacks/AttackData.hpp"
|
||||
|
||||
namespace CreatureLib::Library {
|
||||
@@ -22,7 +23,7 @@ namespace CreatureLib::Library {
|
||||
|
||||
virtual ~LearnableAttacks() = default;
|
||||
|
||||
void AddLevelAttack(uint8_t level, ArbUt::BorrowedPtr<const AttackData> attack);
|
||||
void AddLevelAttack(level_int_t level, ArbUt::BorrowedPtr<const AttackData> attack);
|
||||
|
||||
inline bool HasAttacksForLevel(uint8_t level) const noexcept { return _learnedByLevel.Has(level); }
|
||||
inline const ArbUt::List<ArbUt::BorrowedPtr<const AttackData>>& GetAttacksForLevel(uint8_t level) const {
|
||||
|
||||
Reference in New Issue
Block a user