Adds getter for Script for ExecutingAttack. Mostly useful for unit tests etc.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-07-04 18:13:36 +02:00
parent 47515399fe
commit c6974b6b5b
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 2 additions and 0 deletions

View File

@ -96,6 +96,8 @@ namespace CreatureLib::Battling {
inline const ArbUt::BorrowedPtr<LearnedAttack>& GetAttack() noexcept { return _attack; }
size_t ScriptCount() const override { return _user->ScriptCount() + 1; }
inline ArbUt::BorrowedPtr<Script> GetScript() const noexcept { return _script; }
protected:
void GetActiveScripts(ArbUt::List<ScriptWrapper>& scripts) override {
scripts.Append(ScriptWrapper::FromScript(&_script));