Rework for C Interfaces to handle exceptions a bit better.
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:
@@ -32,21 +32,21 @@ namespace CreatureLib::Battling {
|
||||
AssertNotNull(attack)
|
||||
ResolveScript();
|
||||
}
|
||||
AttackTurnChoice(Creature* user, LearnedAttack* attack, const CreatureIndex& target, Script* script)
|
||||
AttackTurnChoice(Creature* user, LearnedAttack* attack, const CreatureIndex& target, Script* script) noexcept
|
||||
: BaseTurnChoice(user), _attack(attack), _target(target), _attackScript(script) {}
|
||||
|
||||
inline LearnedAttack* GetAttack() const { return _attack; }
|
||||
inline LearnedAttack* GetAttack() const noexcept { return _attack; }
|
||||
|
||||
TurnChoiceKind GetKind() const override { return TurnChoiceKind ::Attack; }
|
||||
TurnChoiceKind GetKind() const noexcept override { return TurnChoiceKind ::Attack; }
|
||||
|
||||
int8_t GetPriority() const {
|
||||
// HOOK: Change priority
|
||||
return _attack->GetAttack()->GetPriority();
|
||||
}
|
||||
|
||||
const CreatureIndex& GetTarget() const { return _target; }
|
||||
const CreatureIndex& GetTarget() const noexcept { return _target; }
|
||||
|
||||
Script* GetAttackScript() const { return _attackScript; }
|
||||
Script* GetAttackScript() const noexcept { return _attackScript; }
|
||||
|
||||
protected:
|
||||
void GetActiveScripts(Arbutils::Collections::List<ScriptWrapper>& scripts) override {
|
||||
|
||||
Reference in New Issue
Block a user