From a8944e2026b5b129a4aeb77ac0fba0a55841f2fc Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Wed, 12 Feb 2020 10:11:25 +0100 Subject: [PATCH] Fix AttackData constructor to use signed byte for priority instead of unsigned. --- src/Library/Attacks/AttackData.cpp | 2 +- src/Library/Attacks/AttackData.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Library/Attacks/AttackData.cpp b/src/Library/Attacks/AttackData.cpp index 78eba85..c860790 100644 --- a/src/Library/Attacks/AttackData.cpp +++ b/src/Library/Attacks/AttackData.cpp @@ -4,7 +4,7 @@ CreatureLib::Library::AttackData::AttackData(std::string name, uint8_t type, CreatureLib::Library::AttackCategory category, uint8_t power, uint8_t accuracy, uint8_t baseUsage, - CreatureLib::Library::AttackTarget target, uint8_t priority, + CreatureLib::Library::AttackTarget target, int8_t priority, std::unordered_set flags) : _name(std::move(name)), _type(type), _category(category), _basePower(power), _accuracy(accuracy), _baseUsages(baseUsage), _target(target), _priority(priority), _flags(std::move(flags)) {} diff --git a/src/Library/Attacks/AttackData.hpp b/src/Library/Attacks/AttackData.hpp index 82d13cf..303d451 100644 --- a/src/Library/Attacks/AttackData.hpp +++ b/src/Library/Attacks/AttackData.hpp @@ -21,7 +21,7 @@ namespace CreatureLib::Library { public: AttackData(std::string name, uint8_t type, AttackCategory category, uint8_t power, uint8_t accuracy, - uint8_t baseUsage, AttackTarget target, uint8_t priority, std::unordered_set flags); + uint8_t baseUsage, AttackTarget target, int8_t priority, std::unordered_set flags); virtual ~AttackData() = default; inline const std::string& GetName() const { return _name; }