本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例6: HandlePacket
public int HandlePacket(GameClient client, GSPacketIn packet)
{
GSPacketIn pkg = packet.Clone();
client.SendTCP(pkg);
return 0;
}