当前位置: 首页>>代码示例>>C#>>正文


C# GameClient.SendTCP方法代码示例

本文整理汇总了C#中GameClient.SendTCP方法的典型用法代码示例。如果您正苦于以下问题:C# GameClient.SendTCP方法的具体用法?C# GameClient.SendTCP怎么用?C# GameClient.SendTCP使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GameClient的用法示例。


在下文中一共展示了GameClient.SendTCP方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: HandlePacket

        public int HandlePacket(GameClient client, GSPacketIn packet)
        {
            //if (client.Player.CurrentHotSpringRoom != null)
            //{
            //    client.Player.CurrentHotSpringRoom.ProcessData(client.Player, packet);
            //}
            GSPacketIn pkg = new GSPacketIn((byte)ePackageType.HOTSPRING_ROOM_PLAYER_ADD);
            var player = client.Player.PlayerCharacter;
            pkg.WriteInt(player.ID);
            pkg.WriteInt(player.Grade);
            pkg.WriteInt(player.Hide);

            pkg.WriteInt(player.Repute);
            pkg.WriteString(player.NickName);
            pkg.WriteBoolean(true);
            pkg.WriteInt(5);
  
            pkg.WriteBoolean(player.Sex);
            pkg.WriteString(player.Style);
            pkg.WriteString(player.Colors);
            pkg.WriteString(player.Skin);
            pkg.WriteInt(405);
            pkg.WriteInt(405);
            //var _loc_6:* = new Point(_loc_2.readInt(), _loc_2.readInt());
            pkg.WriteInt(player.FightPower);
            pkg.WriteInt(player.Win);
            pkg.WriteInt(player.Total);
            pkg.WriteInt(45);
            //_loc_5.FightPower = _loc_2.readInt();
            //_loc_5.WinCount = _loc_2.readInt();
            //_loc_5.TotalCount = _loc_2.readInt();
            //_loc_4.playerDirection = _loc_2.readInt();
            client.SendTCP(pkg);
            return 0;
        }
开发者ID:geniushuai,项目名称:DDTank-3.0,代码行数:35,代码来源:HotSpringRoomEnterViewHandler.cs

示例2: HandlePacket

 public int HandlePacket(GameClient client, GSPacketIn packet)
 {
     //Lay Danh Sach tat ca cac phong
     GSPacketIn pkg = new GSPacketIn((byte)ePackageType.HOTSPRING_ROOM_LIST_GET);
     pkg.WriteInt(10);
     for (int i = 0; i < 10; i++)
     {
         //loc_2.roomNumber = _loc_3.readInt();
         pkg.WriteInt(i);
         //_loc_2.roomID = _loc_3.readInt();
         pkg.WriteInt(i);
         //_loc_2.roomName = _loc_3.readUTF();
         pkg.WriteString("Room" + i);
         //_loc_2.roomPassword = _loc_3.readUTF();
         pkg.WriteString("");
         //_loc_2.effectiveTime = _loc_3.readInt();
         pkg.WriteInt(1);
         //_loc_2.curCount = _loc_3.readInt();
         pkg.WriteInt(1);
         //_loc_2.playerID = _loc_3.readInt();
         pkg.WriteInt(client.Player.PlayerCharacter.ID);
         //_loc_2.playerName = _loc_3.readUTF();
         pkg.WriteString("abc");
         //_loc_2.startTime = _loc_3.readDate();
         pkg.WriteDateTime(DateTime.Now.AddDays(-50));
         //_loc_2.roomIntroduction = _loc_3.readUTF();
         pkg.WriteString("Room Intro");
         //_loc_2.roomType = _loc_3.readInt();
         pkg.WriteInt(1);
         //_loc_2.maxCount = _loc_3.readInt();
         pkg.WriteInt(10);
     }
     client.SendTCP(pkg);
     return 0;
 }
开发者ID:geniushuai,项目名称:DDTank-3.0,代码行数:35,代码来源:HotSpringEnterHandler.cs

示例3: HandlePacket

 public int HandlePacket(GameClient client, GSPacketIn packet)
 {
     var roomId = packet.ReadInt();
     //if (client.Player.CurrentHotSpringRoom != null)
     //{
     //    client.Player.CurrentHotSpringRoom.ProcessData(client.Player, packet);
     //}
     GSPacketIn pkg = new GSPacketIn((byte)ePackageType.HOTSPRING_ROOM_ENTER_CONFIRM);
     pkg.WriteInt(roomId);
     client.SendTCP(pkg);
     return 0;
 }
开发者ID:geniushuai,项目名称:DDTank-3.0,代码行数:12,代码来源:HotSpringEnterConfirmHandler.cs

示例4: HandlePacket

 public int HandlePacket(GameClient client, GSPacketIn packet)
 {
     GSPacketIn pkg = packet.Clone();
     //if (DateTime.Now.Date != client.Player.PlayerCharacter.LastDate.Date)
     //{
         pkg.WriteBoolean(true);
     //}
     //else
     //{
     //    pkg.WriteBoolean(false);
     //}
     client.SendTCP(pkg);
     return 0;
 }
开发者ID:vancourt,项目名称:BaseGunnyII,代码行数:14,代码来源:UserWeeklyClickHandler.cs

示例5: HandlePacket

        public int HandlePacket(GameClient client, GSPacketIn packet)
        {
            var roomId = packet.ReadInt();
            var passString = packet.ReadString();

            GSPacketIn pkg = new GSPacketIn((byte)ePackageType.HOTSPRING_ROOM_ENTER);
            pkg.WriteInt(roomId);
            pkg.WriteInt(roomId);
           
            //_loc_3.roomID = _loc_2.readInt();
            //_loc_3.roomNumber = _loc_2.readInt();
            //_loc_3.roomName = _loc_2.readUTF();
            pkg.WriteString("RoomName");
            //_loc_3.roomPassword = _loc_2.readUTF();
            pkg.WriteString("");

            //_loc_2.effectiveTime = _loc_3.readInt();
            pkg.WriteInt(1);
            //_loc_2.curCount = _loc_3.readInt();
            pkg.WriteInt(1);
            //_loc_2.playerID = _loc_3.readInt();
            pkg.WriteInt(client.Player.PlayerCharacter.ID);
            //_loc_2.playerName = _loc_3.readUTF();
            pkg.WriteString("abc");
            //_loc_2.startTime = _loc_3.readDate();
            pkg.WriteDateTime(DateTime.Now.AddDays(-50));
            //_loc_2.roomIntroduction = _loc_3.readUTF();
            pkg.WriteString("Room Intro");
            //_loc_2.roomType = _loc_3.readInt();
            pkg.WriteInt(1);
            //_loc_2.maxCount = _loc_3.readInt();
            pkg.WriteInt(10);
            //this._playerEnterRoomTime = _loc_2.readDate();
            //this._playerEffectiveTime = _loc_2.readInt();
            pkg.WriteDateTime(DateTime.Now);
            pkg.WriteDateTime(DateTime.Now.AddDays(1));
            client.SendTCP(pkg);
            return 0;
        }
开发者ID:geniushuai,项目名称:DDTank-3.0,代码行数:39,代码来源:HotSpringRoomEnterDataHandler.cs

示例6: HandlePacket

 public int HandlePacket(GameClient client, GSPacketIn packet)
 {
     GSPacketIn pkg = packet.Clone();
     client.SendTCP(pkg);
     return 0;
 }
开发者ID:vancourt,项目名称:BaseGunnyII,代码行数:6,代码来源:ForSwitchHandler.cs


注:本文中的GameClient.SendTCP方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。