Use nullptr as non existing effect.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
5146a70d8b
commit
78a42deb90
|
@ -21,7 +21,7 @@ namespace CreatureLib::Library {
|
|||
uint8_t _baseUsages;
|
||||
AttackTarget _target;
|
||||
int8_t _priority;
|
||||
const SecondaryEffect* _effect;
|
||||
const SecondaryEffect* _effect = nullptr;
|
||||
std::unordered_set<uint32_t> _flags;
|
||||
|
||||
public:
|
||||
|
@ -38,9 +38,7 @@ namespace CreatureLib::Library {
|
|||
inline uint8_t GetBaseUsages() const noexcept { return _baseUsages; }
|
||||
inline AttackTarget GetTarget() const noexcept { return _target; }
|
||||
inline int8_t GetPriority() const noexcept { return _priority; }
|
||||
inline bool HasSecondaryEffect() const noexcept {
|
||||
return _effect->GetChance() != 0 && _effect->GetEffectName() != ""_cnc;
|
||||
}
|
||||
inline bool HasSecondaryEffect() const noexcept { return _effect != nullptr; }
|
||||
inline const SecondaryEffect* GetSecondaryEffect() const noexcept { return _effect; }
|
||||
|
||||
bool HasFlag(const ConstString& key) const noexcept;
|
||||
|
|
Loading…
Reference in New Issue