Beispiel #1
0
    protected override void SendParameter(NetWriter writer, ActionParam actionParam)
    {
        JsonData jsonData = actionParam.Get <JsonData>("json");
        int      cts      = actionParam.Get <int>("cts");

        writer.writeInt32("cts", cts);
        writer.writeWord("response", actionParam.Get <bool>("response") ? (ushort)1 : (ushort)0);
        writer.writeString("json", jsonData.ToJson());
    }
Beispiel #2
0
 protected override void SendParameter(NetWriter writer, ActionParam actionParam)
 {
     //default url param
     writer.writeString("UserName", actionParam.Get<string>("roleName"));
     writer.writeString("Sex",  actionParam.Get<string>("Sex"));
     writer.writeString("HeadID",  actionParam.Get<string>("HeadID"));
     writer.writeString("RetailID", GameSetting.Instance.RetailID);
     writer.writeString("Pid", GameSetting.Instance.Pid);
     writer.writeInt32("MobileType", GameSetting.Instance.MobileType);
     writer.writeInt32("ScreenX", GameSetting.Instance.ScreenX);
     writer.writeInt32("ScreenY", GameSetting.Instance.ScreenY);
     writer.writeString("ClientAppVersion", GameSetting.Instance.ClientAppVersion);
     writer.writeInt32("GameType", GameSetting.Instance.GameID);
     writer.writeInt32("ServerID", GameSetting.Instance.ServerID);
 }
Beispiel #3
0
 protected override void SendParameter(NetWriter writer, ActionParam actionParam)
 {
     //default url param
     writer.writeString("UserName", actionParam.Get <string>("roleName"));
     writer.writeString("Sex", actionParam.Get <string>("Sex"));
     writer.writeString("HeadID", actionParam.Get <string>("HeadID"));
     writer.writeString("RetailID", GameSetting.Instance.RetailID);
     writer.writeString("Pid", GameSetting.Instance.Pid);
     writer.writeInt32("MobileType", GameSetting.Instance.MobileType);
     writer.writeInt32("ScreenX", GameSetting.Instance.ScreenX);
     writer.writeInt32("ScreenY", GameSetting.Instance.ScreenY);
     writer.writeString("ClientAppVersion", GameSetting.Instance.ClientAppVersion);
     writer.writeInt32("GameType", GameSetting.Instance.GameID);
     writer.writeInt32("ServerID", GameSetting.Instance.ServerID);
 }
Beispiel #4
0
 protected override void SendParameter(NetWriter writer, ActionParam actionParam)
 {
     //default url param
     writer.writeString("Pid", GameSetting.Instance.Pid);
     writer.writeInt32("UserId", (int)NetWriter.UserID);
     writer.writeString("Uname", actionParam.Get <string>("roleName"));
 }
Beispiel #5
0
    protected override void SendParameter(NetWriter writer, ActionParam actionParam)
    {
        object obj = actionParam["obj"];
        int    cts = actionParam.Get <int>("cts");

        byte[] response = new byte[1];
        response[0] = actionParam.Get <bool>("response") ? (byte)1 : (byte)0;
        byte[] ctsBytes = BitConverter.GetBytes(cts);
        byte[] data     = ProtoBufUtils.Serialize(obj);
        byte[] bd       = new byte[ctsBytes.Length + 1 + data.Length];
        ctsBytes.CopyTo(bd, 0);
        response.CopyTo(bd, ctsBytes.Length);
        data.CopyTo(bd, ctsBytes.Length + 1);

        writer.SetBodyData(bd);
    }
Beispiel #6
0
    protected override void SendParameter(NetWriter writer, ActionParam actionParam)
    {
        RoomMsgInfo msg = new RoomMsgInfo()
        {
            Content = System.Text.Encoding.Default.GetBytes(actionParam.Get <string>("Content")), UID = 885999,
        };

        //writer.writeString("RoomMessage", JsonConvert.SerializeObject(msg));
        writer.writeString("RoomMessage", LitJson.JsonMapper.ToJson(msg));
    }
Beispiel #7
0
 protected override void SendParameter(NetWriter writer, ActionParam actionParam)
 {
     writer.writeString("qx", actionParam.Get <string>("qx"));
     writer.writeString("qy", actionParam.Get <string>("qy"));
     writer.writeString("qz", actionParam.Get <string>("qz"));
     writer.writeString("sx", actionParam.Get <string>("sx"));
     writer.writeString("sy", actionParam.Get <string>("sy"));
     writer.writeString("sz", actionParam.Get <string>("sz"));
 }
Beispiel #8
0
 protected override void SendParameter(NetWriter writer, ActionParam actionParam)
 {
     //1为准备 -1取消准备
     writer.writeInt32("IsGetReady", actionParam.Get <int>("IsGetReady"));
 }
Beispiel #9
0
 protected override void SendParameter(NetWriter writer, ActionParam actionParam)
 {
     writer.writeInt32("UserID", actionParam.Get <int>("UserID"));
 }
Beispiel #10
0
    protected override void SendParameter(NetWriter writer, ActionParam actionParam)
    {
        writer.writeString("x", actionParam.Get <string>("x"));
        writer.writeString("y", actionParam.Get <string>("y"));
        writer.writeString("z", actionParam.Get <string>("z"));
        writer.writeString("qx", actionParam.Get <string>("qx"));
        writer.writeString("qy", actionParam.Get <string>("qy"));
        writer.writeString("qz", actionParam.Get <string>("qz"));
        writer.writeString("sx", actionParam.Get <string>("sx"));
        writer.writeString("sy", actionParam.Get <string>("sy"));
        writer.writeString("sz", actionParam.Get <string>("sz"));

        m_fingerPos = new Vector3(float.Parse(actionParam.Get <string>("x")),
                                  float.Parse(actionParam.Get <string>("y")), float.Parse(actionParam.Get <string>("z")));
    }
Beispiel #11
0
 protected override void SendParameter(NetWriter writer, ActionParam actionParam)
 {
     writer.writeString("Pid", GameSetting.Instance.Pid);
     writer.writeInt64("UserId", NetWriter.UserID);
     writer.writeString("Message", actionParam.Get <string>("Message"));
 }
Beispiel #12
0
 protected override void SendParameter(NetWriter writer, ActionParam actionParam)
 {
     writer.writeString("AgentID", actionParam.Get <string>("AgentID"));
 }
Beispiel #13
0
 protected override void SendParameter(NetWriter writer, ActionParam actionParam)
 {
     writer.writeInt32("UserId", actionParam.Get <int>("UserId"));
     writer.writeString("Location", actionParam.Get <string>("Location"));
 }