Fixes for effect.
This commit is contained in:
parent
0260f3688e
commit
a54459cc57
|
@ -50,6 +50,7 @@ const DamageLibrary* BattleLibrary::GetDamageLibrary() const noexcept { return _
|
|||
|
||||
const MiscLibrary* BattleLibrary::GetMiscLibrary() const noexcept { return _miscLibrary; }
|
||||
|
||||
Script* BattleLibrary::LoadScript(ScriptCategory category, const ConstString& scriptName) const {
|
||||
Script* BattleLibrary::LoadScript(ScriptCategory category,
|
||||
const Arbutils::CaseInsensitiveConstString& scriptName) const {
|
||||
return _scriptResolver->LoadScript(category, scriptName);
|
||||
}
|
||||
}
|
|
@ -39,7 +39,8 @@ namespace CreatureLib::Battling {
|
|||
[[nodiscard]] const MiscLibrary* GetMiscLibrary() const noexcept;
|
||||
[[nodiscard]] const ExperienceLibrary* GetExperienceLibrary() const noexcept { return _experienceLibrary; }
|
||||
|
||||
[[nodiscard]] Script* LoadScript(ScriptCategory category, const ConstString& scriptName) const;
|
||||
[[nodiscard]] Script* LoadScript(ScriptCategory category,
|
||||
const Arbutils::CaseInsensitiveConstString& scriptName) const;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,9 @@ 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 != nullptr; }
|
||||
inline bool HasSecondaryEffect() const noexcept {
|
||||
return _effect != nullptr && !_effect->GetEffectName().Empty();
|
||||
}
|
||||
inline const SecondaryEffect* GetSecondaryEffect() const noexcept { return _effect; }
|
||||
|
||||
bool HasFlag(const ConstString& key) const noexcept;
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace CreatureLib::Library {
|
|||
List<EffectParameter*> _parameters;
|
||||
|
||||
public:
|
||||
SecondaryEffect() noexcept : _chance(0), _effectName(Arbutils::CaseInsensitiveConstString("")) {}
|
||||
SecondaryEffect() noexcept : _chance(0), _effectName() {}
|
||||
SecondaryEffect(float chance, const Arbutils::CaseInsensitiveConstString& effectName,
|
||||
const List<EffectParameter*>& parameters) noexcept
|
||||
: _chance(chance), _effectName(effectName), _parameters(parameters) {}
|
||||
|
|
Loading…
Reference in New Issue