| 52 | |
| 53 | |
| 54 | MapHandler::MapHandler(const std::string& name) |
| 55 | : objName(name) |
| 56 | , luaRef(LUA_NOREF) { |
| 57 | mapHandlers[objName] = this; |
| 58 | |
| 59 | lua_State* L = LuaServer::GetL(); |
| 60 | if (L == NULL) { |
| 61 | return; |
| 62 | } |
| 63 | if (!lua_isfunction(L, -1)) { |
| 64 | return; |
| 65 | } |
| 66 | luaRef = luaL_ref(L, LUA_REGISTRYINDEX); |
| 67 | } |
| 68 | |
| 69 | |
| 70 | MapHandler::~MapHandler() { |
nothing calls this directly
no test coverage detected