Esempio n. 1
0
    private static int CallBroker(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 3);
        uint   callId    = (uint)LuaScriptMgr.GetNumber(L, 1);
        string luaString = LuaScriptMgr.GetLuaString(L, 2);
        int    cmdId     = (int)LuaScriptMgr.GetNumber(L, 3);

        CSharpInterface.CallBroker(callId, luaString, cmdId);
        return(0);
    }
    public static int CallBroker_s(IntPtr l)
    {
        int result;

        try
        {
            uint callId;
            LuaObject.checkType(l, 1, out callId);
            string jsonStr;
            LuaObject.checkType(l, 2, out jsonStr);
            int commandId;
            LuaObject.checkType(l, 3, out commandId);
            CSharpInterface.CallBroker(callId, jsonStr, commandId);
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }