Tweaks and fixes for AttackData, added C interface.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -20,11 +20,11 @@ namespace CreatureLib::Library {
|
||||
uint8_t _baseUsages;
|
||||
AttackTarget _target;
|
||||
int8_t _priority;
|
||||
std::unordered_set<ConstString> _flags;
|
||||
std::unordered_set<uint32_t> _flags;
|
||||
|
||||
public:
|
||||
AttackData(const ConstString& name, uint8_t type, AttackCategory category, uint8_t power, uint8_t accuracy,
|
||||
uint8_t baseUsage, AttackTarget target, int8_t priority, std::unordered_set<ConstString> flags);
|
||||
uint8_t baseUsage, AttackTarget target, int8_t priority, std::unordered_set<uint32_t> flags);
|
||||
virtual ~AttackData() = default;
|
||||
|
||||
inline const ConstString& GetName() const { return _name; }
|
||||
@@ -37,6 +37,7 @@ namespace CreatureLib::Library {
|
||||
inline int8_t GetPriority() const { return _priority; }
|
||||
|
||||
bool HasFlag(const ConstString& key) const;
|
||||
bool HasFlag(uint32_t keyHash) const;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user