コード例 #1
0
    static int IsSendService(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 1 && LuaScriptMgr.CheckTypes(L, 1, typeof(Games.Module.Wars.LegionData)))
        {
            Games.Module.Wars.LegionData arg0 = (Games.Module.Wars.LegionData)LuaScriptMgr.GetLuaObject(L, 1);
            bool o = Games.Module.Wars.War.IsSendService(arg0);
            LuaScriptMgr.Push(L, o);
            return(1);
        }
        else if (count == 1 && LuaScriptMgr.CheckTypes(L, 1, typeof(int)))
        {
            int  arg0 = (int)LuaDLL.lua_tonumber(L, 1);
            bool o    = Games.Module.Wars.War.IsSendService(arg0);
            LuaScriptMgr.Push(L, o);
            return(1);
        }
        else if (count == 2)
        {
            int arg0 = (int)LuaScriptMgr.GetNumber(L, 1);
            Games.Module.Wars.LegionType arg1 = (Games.Module.Wars.LegionType)LuaScriptMgr.GetNetObject(L, 2, typeof(Games.Module.Wars.LegionType));
            bool o = Games.Module.Wars.War.IsSendService(arg0, arg1);
            LuaScriptMgr.Push(L, o);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: Games.Module.Wars.War.IsSendService");
        }

        return(0);
    }
コード例 #2
0
    static int IntToEnum(IntPtr L)
    {
        int arg0 = (int)LuaDLL.lua_tonumber(L, 1);

        Games.Module.Wars.LegionType o = (Games.Module.Wars.LegionType)arg0;
        LuaScriptMgr.Push(L, o);
        return(1);
    }