MCPcopy Create free account
hub / github.com/EQEmu/EQEmu / lua_handin

Function lua_handin

zone/lua_general.cpp:5653–5676  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5651}
5652
5653bool lua_handin(luabind::adl::object handin_table)
5654{
5655 std::map<std::string, uint32> handin_map;
5656
5657 for (luabind::iterator i(handin_table), end; i != end; i++) {
5658 std::string key;
5659 if (luabind::type(i.key()) == LUA_TSTRING) {
5660 key = luabind::object_cast<std::string>(i.key());
5661 }
5662 else if (luabind::type(i.key()) == LUA_TNUMBER) {
5663 key = fmt::format("{}", luabind::object_cast<int>(i.key()));
5664 }
5665 else {
5666 LogError("Handin key type [{}] not supported", luabind::type(i.key()));
5667 }
5668
5669 if (!key.empty()) {
5670 handin_map[key] = luabind::object_cast<uint32>(handin_table[i.key()]);
5671 LogNpcHandinDetail("Handin key [{}] value [{}]", key, handin_map[key]);
5672 }
5673 }
5674
5675 return quest_manager.handin(handin_map);
5676}
5677
5678luabind::object lua_get_paused_timers(lua_State* L, Mob* m) {
5679 auto t = luabind::newtable(L);

Callers

nothing calls this directly

Calls 4

handinMethod · 0.80
typeFunction · 0.50
keyMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected