Fix AttackData constructor to use signed byte for priority instead of unsigned.

This commit is contained in:
Deukhoofd 2020-02-12 10:11:25 +01:00
parent 80708040a4
commit a8944e2026
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
2 changed files with 2 additions and 2 deletions

View File

@ -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<std::string> flags)
: _name(std::move(name)), _type(type), _category(category), _basePower(power), _accuracy(accuracy),
_baseUsages(baseUsage), _target(target), _priority(priority), _flags(std::move(flags)) {}

View File

@ -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<std::string> flags);
uint8_t baseUsage, AttackTarget target, int8_t priority, std::unordered_set<std::string> flags);
virtual ~AttackData() = default;
inline const std::string& GetName() const { return _name; }