public static int GetHeroPhantom(IntPtr l) { int result; try { HeroPhantomCollections heroPhantomCollections = (HeroPhantomCollections)LuaObject.checkSelf(l); int heroPhantomId; LuaObject.checkType(l, 2, out heroPhantomId); HeroPhantom heroPhantom = heroPhantomCollections.GetHeroPhantom(heroPhantomId); LuaObject.pushValue(l, true); LuaObject.pushValue(l, heroPhantom); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }