Use Item pointer for Script resolving for item use script.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
parent
d908efff9d
commit
3a4171f565
|
@ -15,6 +15,6 @@ export uint8_t CreatureLib_ScriptResolver_LoadScript(BattleScript*& out, ScriptR
|
||||||
};
|
};
|
||||||
|
|
||||||
export uint8_t CreatureLib_ScriptResolver_LoadItemScript(ItemUseScript*& out, ScriptResolver* p,
|
export uint8_t CreatureLib_ScriptResolver_LoadItemScript(ItemUseScript*& out, ScriptResolver* p,
|
||||||
const char* scriptName) {
|
const CreatureLib::Library::Item* item) {
|
||||||
Try(out = p->LoadItemScript(ArbUt::StringView(scriptName));)
|
Try(out = p->LoadItemScript(item);)
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#ifndef CREATURELIB_SCRIPTRESOLVER_HPP
|
#ifndef CREATURELIB_SCRIPTRESOLVER_HPP
|
||||||
#define CREATURELIB_SCRIPTRESOLVER_HPP
|
#define CREATURELIB_SCRIPTRESOLVER_HPP
|
||||||
|
|
||||||
|
#include "../../Library/Items/Item.hpp"
|
||||||
#include "BattleScript.hpp"
|
#include "BattleScript.hpp"
|
||||||
#include "ItemUseScript.hpp"
|
#include "ItemUseScript.hpp"
|
||||||
#include "ScriptCategory.hpp"
|
#include "ScriptCategory.hpp"
|
||||||
|
@ -21,7 +22,9 @@ namespace CreatureLib::Battling {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual ItemUseScript* LoadItemScript([[maybe_unused]] const ArbUt::StringView& scriptName) { return nullptr; };
|
virtual ItemUseScript* LoadItemScript([[maybe_unused]] const CreatureLib::Library::Item* item) {
|
||||||
|
return nullptr;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue