Exemple #1
0
    static int Close(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 1);
        MsgUnPacker obj = (MsgUnPacker)LuaScriptMgr.GetNetObjectSelf(L, 1, "MsgUnPacker");

        obj.Close();
        return(0);
    }
Exemple #2
0
    public Dictionary <string, string> GetKStringVString(int index)
    {
        MsgUnPacker _unpacker = new MsgUnPacker(this.buff);

        _unpacker.skip(index);
        Dictionary <string, string> rst = _unpacker.PopKStringVStringMap();

        _unpacker.Close();
        return(rst);
    }
Exemple #3
0
    public List <double> GetDoubleList(int index)
    {
        MsgUnPacker _unpacker = new MsgUnPacker(this.buff);

        _unpacker.skip(index);
        List <double> rst = _unpacker.PopDoubleList();

        _unpacker.Close();
        return(rst);
    }
Exemple #4
0
    public List <string> GetStringList(int index)
    {
        MsgUnPacker _unpacker = new MsgUnPacker(this.buff);

        _unpacker.skip(index);
        List <string> rst = _unpacker.PopStringList();

        _unpacker.Close();
        return(rst);
    }
Exemple #5
0
    public List <float> GetFloatList(int index)
    {
        MsgUnPacker _unpacker = new MsgUnPacker(this.buff);

        _unpacker.skip(index);
        List <float> rst = _unpacker.PopFloatList();

        _unpacker.Close();
        return(rst);
    }
Exemple #6
0
    public string GetString(int index)
    {
        MsgUnPacker _unpacker = new MsgUnPacker(this.buff);

        _unpacker.skip(index);
        string rst = _unpacker.PopString();

        _unpacker.Close();
        return(rst);
    }
Exemple #7
0
    public double GetDouble(int index)
    {
        MsgUnPacker _unpacker = new MsgUnPacker(this.buff);

        _unpacker.skip(index);
        double rst = _unpacker.PopDouble();

        _unpacker.Close();
        return(rst);
    }
Exemple #8
0
    public float GetFloat(int index)
    {
        MsgUnPacker _unpacker = new MsgUnPacker(this.buff);

        _unpacker.skip(index);
        float rst = _unpacker.PopFloat();

        _unpacker.Close();
        return(rst);
    }
Exemple #9
0
    public int GetInt(int index)
    {
        MsgUnPacker _unpacker = new MsgUnPacker(this.buff);

        _unpacker.skip(index);
        int rst = _unpacker.PopInt();

        _unpacker.Close();
        return(rst);
    }
Exemple #10
0
    public void HandleMsg(MsgHandlerMgr ctx, MsgUnPacker unpacker)
    {
        UITools.log("MsgFilterHandler");
        int status = unpacker.PopInt();

        if (status == MsgProtocol.Error)
        {
            UITools.log("MsgFilterHandler === > Error");
            string msg = unpacker.PopString();
            unpacker.Close();
            UITools.log(msg);
            UITools.ShowMsg(msg);
        }
        else if (status == MsgProtocol.Success)
        {
            ctx.NextHandler(unpacker);
        }
    }