[Quest API] Add secondstotime(duration) to Perl and Lua. (#1281)

- Add quest::converttime(duration) to Perl.
- Add eq.convert_time(duration) to Lua.
This commit is contained in:
Alex
2021-03-11 21:38:47 -05:00
committed by GitHub
parent ac4a993259
commit cd08c96fa4
4 changed files with 53 additions and 0 deletions
+5
View File
@@ -2300,6 +2300,10 @@ void lua_remove_all_expedition_lockouts_by_char_id(uint32 char_id, std::string e
Expedition::RemoveLockoutsByCharacterID(char_id, expedition_name);
}
std::string lua_seconds_to_time(int duration) {
return quest_manager.secondstotime(duration);
}
#define LuaCreateNPCParse(name, c_type, default_value) do { \
cur = table[#name]; \
if(luabind::type(cur) != LUA_TNIL) { \
@@ -2836,6 +2840,7 @@ luabind::scope lua_register_general() {
luabind::def("debug", (void(*)(std::string))&lua_debug),
luabind::def("debug", (void(*)(std::string, int))&lua_debug),
luabind::def("log_combat", (void(*)(std::string))&lua_log_combat),
luabind::def("seconds_to_time", &lua_seconds_to_time),
/**
* Expansions