Update StarPlayerLuaBindings.cpp
This commit is contained in:
parent
c2b9f5ac07
commit
42a648ecc1
@ -484,6 +484,13 @@ LuaCallbacks LuaBindings::makePlayerCallbacks(Player* player) {
|
|||||||
return {};
|
return {};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
callbacks.registerCallback("questState", [player](String const& questId) -> Maybe<String> {
|
||||||
|
if (auto quest = player->questManager()->getQuest(questId))
|
||||||
|
return QuestStateNames.getRight(quest->state());
|
||||||
|
|
||||||
|
return {};
|
||||||
|
});
|
||||||
|
|
||||||
callbacks.registerCallback("callQuest", [player](String const& questId, String const& func, LuaVariadic<LuaValue> const& args) -> Maybe<LuaValue> {
|
callbacks.registerCallback("callQuest", [player](String const& questId, String const& func, LuaVariadic<LuaValue> const& args) -> Maybe<LuaValue> {
|
||||||
if (auto quest = player->questManager()->getQuest(questId))
|
if (auto quest = player->questManager()->getQuest(questId))
|
||||||
return quest->callScript(func, args);
|
return quest->callScript(func, args);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user