本文整理汇总了C#中Game.Base.Packets.GSPacketIn.WriteDateTime方法的典型用法代码示例。如果您正苦于以下问题:C# GSPacketIn.WriteDateTime方法的具体用法?C# GSPacketIn.WriteDateTime怎么用?C# GSPacketIn.WriteDateTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Game.Base.Packets.GSPacketIn
的用法示例。
在下文中一共展示了GSPacketIn.WriteDateTime方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandlePacket
public int HandlePacket(GameClient client, GSPacketIn packet)
{
packet.ClearContext();
packet.WriteDateTime(DateTime.Now);
client.Out.SendTCP(packet);
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();
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;
}
示例4: HandlePacket
public int HandlePacket(GameClient client, GSPacketIn packet)
{
int num = packet.ReadInt();
try
{
TankHotSpringLogicProcessor processor = new TankHotSpringLogicProcessor();
HotSpringRoomInfo info = new HotSpringRoomInfo {
RoomID = num
};
client.Player.CurrentHotSpringRoom = new HotSpringRoom(info, processor);
}
catch
{
Console.WriteLine("System Error!");
}
HotSpringRoom room = client.Player.CurrentHotSpringRoom;
using (PlayerBussiness db = new PlayerBussiness())
{
db.UpdateHotSpringRoomInfo(room.Info);
}
string str = packet.ReadString();
GSPacketIn pkg = new GSPacketIn(0xca);
pkg.WriteInt(num);
pkg.WriteInt(num);
pkg.WriteString(room.Info.RoomName);
pkg.WriteString(room.Info.Pwd);
pkg.WriteInt(1);
pkg.WriteInt(1);
pkg.WriteInt(client.Player.PlayerCharacter.ID);
pkg.WriteString(client.Player.PlayerCharacter.NickName);
pkg.WriteDateTime(room.Info.BeginTime);
pkg.WriteString(room.Info.RoomIntroduction);
pkg.WriteInt(1);
pkg.WriteInt(10);
pkg.WriteDateTime(DateTime.Now);
pkg.WriteInt(10);
client.SendTCP(pkg);
return 0;
}
示例5: SendBufferList
public static GSPacketIn SendBufferList(Player player, List<BufferInfo> infos)
{
GSPacketIn pkg = new GSPacketIn((byte)ePackageType.BUFF_OBTAIN, player.Id);
pkg.WriteInt(infos.Count);
foreach (BufferInfo info in infos)
{
pkg.WriteInt(info.Type);
pkg.WriteBoolean(info.IsExist);
pkg.WriteDateTime(info.BeginDate);
pkg.WriteInt(info.ValidDate);
pkg.WriteInt(info.Value);
}
return pkg;
}
示例6: SendAuctionRefresh
public GSPacketIn SendAuctionRefresh(AuctionInfo info, int auctionID, bool isExist, ItemInfo item)
{
GSPacketIn pkg = new GSPacketIn((byte)ePackageType.AUCTION_REFRESH);
pkg.WriteInt(auctionID);
pkg.WriteBoolean(isExist);
if (isExist)
{
pkg.WriteInt(info.AuctioneerID);
pkg.WriteString(info.AuctioneerName);
pkg.WriteDateTime(info.BeginDate);
pkg.WriteInt(info.BuyerID);
pkg.WriteString(info.BuyerName);
pkg.WriteInt(info.ItemID);
pkg.WriteInt(info.Mouthful);
pkg.WriteInt(info.PayType);
pkg.WriteInt(info.Price);
pkg.WriteInt(info.Rise);
pkg.WriteInt(info.ValidDate);
pkg.WriteBoolean(item != null);
if (item != null)
{
pkg.WriteInt(item.Count);
pkg.WriteInt(item.TemplateID);
pkg.WriteInt(item.AttackCompose);
pkg.WriteInt(item.DefendCompose);
pkg.WriteInt(item.AgilityCompose);
pkg.WriteInt(item.LuckCompose);
pkg.WriteInt(item.StrengthenLevel);
pkg.WriteBoolean(item.IsBinds);
pkg.WriteBoolean(item.IsJudge);
pkg.WriteDateTime(item.BeginDate);
pkg.WriteInt(item.ValidDate);
pkg.WriteString(item.Color);
pkg.WriteString(item.Skin);
pkg.WriteBoolean(item.IsUsed);
}
}
pkg.Compress();
SendTCP(pkg);
return pkg;
}
示例7: SendBufferList
public GSPacketIn SendBufferList(GamePlayer player, List<AbstractBuffer> infos)
{
GSPacketIn pkg = new GSPacketIn((byte)ePackageType.BUFF_OBTAIN, player.PlayerId);
pkg.WriteInt(infos.Count);
foreach (AbstractBuffer bufferInfo in infos)
{
BufferInfo info = bufferInfo.Info;
pkg.WriteInt(info.Type);
pkg.WriteBoolean(info.IsExist);
pkg.WriteDateTime(info.BeginDate);
pkg.WriteInt(info.ValidDate);
pkg.WriteInt(info.Value);
}
SendTCP(pkg);
return pkg;
}
示例8: SendUpdateBuffer
public GSPacketIn SendUpdateBuffer(GamePlayer player, BufferInfo[] infos)
{
GSPacketIn pkg = new GSPacketIn((byte)ePackageType.BUFF_UPDATE, player.PlayerId);
pkg.WriteInt(infos.Length);
foreach (BufferInfo info in infos)
{
pkg.WriteInt(info.Type);
pkg.WriteBoolean(info.IsExist);
pkg.WriteDateTime(info.BeginDate);
pkg.WriteInt(info.ValidDate);
pkg.WriteInt(info.Value);
}
SendTCP(pkg);
return pkg;
}
示例9: SendUpdateQuests
/// <summary>
/// 发送当前用户的任务数据
/// </summary>
/// <param name="player"></param>
/// <param name="infos"></param>
/// <returns></returns>
public GSPacketIn SendUpdateQuests(GamePlayer player, byte[] states, BaseQuest[] infos)
{
//TODO:完成任务列表的同步
if (m_gameClient.Player == null)
return null;
try
{
var length = 0;
var numSend = infos.Length;
var j = 0;
do
{
GSPacketIn pkg = new GSPacketIn((byte)ePackageType.QUEST_UPDATE, m_gameClient.Player.PlayerCharacter.ID);
length = (numSend > 7) ? 7 : numSend;
pkg.WriteInt(length);
for (int i = 0; i < length; i++, j++)
{
var info = infos[j];
if (info.Data.IsExist)
{
pkg.WriteInt(info.Data.QuestID); //任务编号
pkg.WriteBoolean(info.Data.IsComplete); //是否完成
pkg.WriteInt(info.Data.Condition1); //用户条件一
pkg.WriteInt(info.Data.Condition2); //用户条件二
pkg.WriteInt(info.Data.Condition3); //用户条件三
pkg.WriteInt(info.Data.Condition4); //用户条件四
pkg.WriteDateTime(info.Data.CompletedDate);//用户条件完成日期
pkg.WriteInt(info.Data.RepeatFinish); //该任务剩余接受次数。
pkg.WriteInt(info.Data.RandDobule); //用户接受任务机会
pkg.WriteBoolean(info.Data.IsExist); //是否为新任务
}
}
//输出所有的任务
for (int i = 0; i < states.Length; i++)
{
pkg.WriteByte(states[i]);
}
numSend -= length;
SendTCP(pkg);
} while (j < infos.Length);
}
catch (Exception e)
{
Console.WriteLine(e.InnerException);
}
return new GSPacketIn((byte)ePackageType.QUEST_UPDATE, m_gameClient.Player.PlayerCharacter.ID);
}
示例10: SendUserEquip
public GSPacketIn SendUserEquip(PlayerInfo player, List<ItemInfo> items)
{
GSPacketIn pkg = new GSPacketIn((byte)ePackageType.ITEM_EQUIP, player.ID, 10240);
pkg.WriteInt(player.ID);
pkg.WriteString(player.NickName);
pkg.WriteInt(player.Agility);
pkg.WriteInt(player.Attack);
pkg.WriteString(player.Colors);
pkg.WriteString(player.Skin);
pkg.WriteInt(player.Defence);
pkg.WriteInt(player.GP);
pkg.WriteInt(player.Grade);
pkg.WriteInt(player.Luck);
pkg.WriteInt(player.hp);//_loc_5.hp = _loc_2.readInt();
pkg.WriteInt(player.Hide);
pkg.WriteInt(player.Repute);
pkg.WriteBoolean(player.Sex);
pkg.WriteString(player.Style);
pkg.WriteInt(player.Offer);
pkg.WriteByte(player.typeVIP);
pkg.WriteInt(player.VIPLevel);
pkg.WriteInt(player.Win);
pkg.WriteInt(player.Total);
pkg.WriteInt(player.Escape);
pkg.WriteInt(player.ConsortiaID);
pkg.WriteString(player.ConsortiaName);
pkg.WriteInt(0);//_loc_5.badgeID = _loc_2.readInt();
pkg.WriteInt(player.RichesOffer);
pkg.WriteInt(player.RichesRob);
pkg.WriteBoolean(player.IsMarried);
pkg.WriteInt(player.SpouseID);
pkg.WriteString(player.SpouseName);
pkg.WriteString(player.DutyName);
pkg.WriteInt(player.Nimbus);
pkg.WriteInt(player.FightPower);
pkg.WriteInt(5);//apprenticeshipState = _loc_2.readInt();
pkg.WriteInt(-1);//masterID = _loc_2.readInt();
pkg.WriteString("Master");//setMasterOrApprentices(_loc_2.readUTF());
pkg.WriteInt(0);//graduatesCount = _loc_2.readInt();
pkg.WriteString("HoNorMaster");//honourOfMaster = _loc_2.readUTF();
pkg.WriteInt(player.AchievementPoint);//
pkg.WriteString("Tân Binh");//honor = _loc_2.readUTF();
pkg.WriteDateTime(DateTime.Now.AddDays(-2));
pkg.WriteInt(player.Offer); //_loc_5.spdTexpExp = _loc_2.readInt();
pkg.WriteInt(player.Offer); //_loc_5.attTexpExp = _loc_2.readInt();
pkg.WriteInt(player.Offer); //_loc_5.defTexpExp = _loc_2.readInt();
pkg.WriteInt(player.Offer); //_loc_5.hpTexpExp = _loc_2.readInt();
pkg.WriteInt(player.Offer); //_loc_5.lukTexpExp = _loc_2.readInt();
pkg.WriteBoolean(false); //_loc_5.DailyLeagueFirst = _loc_2.readBoolean();
pkg.WriteInt(player.Offer); //_loc_5.DailyLeagueLastScore = _loc_2.readInt();
pkg.WriteInt(items.Count);
foreach (ItemInfo info in items)
{
pkg.WriteByte((byte)info.BagType);
pkg.WriteInt(info.UserID);
pkg.WriteInt(info.ItemID);
pkg.WriteInt(info.Count);
pkg.WriteInt(info.Place);
pkg.WriteInt(info.TemplateID);
pkg.WriteInt(info.AttackCompose);
pkg.WriteInt(info.DefendCompose);
pkg.WriteInt(info.AgilityCompose);
pkg.WriteInt(info.LuckCompose);
pkg.WriteInt(info.StrengthenLevel);
pkg.WriteBoolean(info.IsBinds);
pkg.WriteBoolean(info.IsJudge);
pkg.WriteDateTime(info.BeginDate);
pkg.WriteInt(info.ValidDate);
pkg.WriteString(info.Color);
pkg.WriteString(info.Skin);
pkg.WriteBoolean(info.IsUsed);
pkg.WriteInt(info.Hole1);
pkg.WriteInt(info.Hole2);
pkg.WriteInt(info.Hole3);
pkg.WriteInt(info.Hole4);
pkg.WriteInt(info.Hole5);
pkg.WriteInt(info.Hole6);
pkg.WriteString(info.Template.Pic);
pkg.WriteInt(info.Template.RefineryLevel);
pkg.WriteDateTime(DateTime.Now);
pkg.WriteByte((byte)info.Hole5Level);
pkg.WriteInt(info.Hole5Exp);
pkg.WriteByte((byte)info.Hole6Level);
pkg.WriteInt(info.Hole6Exp);
if (info.IsGold)
{
pkg.WriteBoolean(info.IsGold);//_loc_8.isGold = _loc_2.readBoolean();
pkg.WriteInt(365);//_loc_8.goldValidDate = _loc_2.readInt();
pkg.WriteDateTime(DateTime.Now);//_loc_8.goldBeginTime = _loc_2.readDateString();
}
else { pkg.WriteBoolean(false); }
}
pkg.Compress();
SendTCP(pkg);
return pkg;
}
示例11: SendUserEquip
public GSPacketIn SendUserEquip(PlayerInfo player, List<ItemInfo> items)
{
GSPacketIn pkg = new GSPacketIn((byte)ePackageType.ITEM_EQUIP, player.ID, 10240);
pkg.WriteInt(player.ID);
pkg.WriteInt(player.Agility);
pkg.WriteInt(player.Attack);
pkg.WriteString(player.Colors);
pkg.WriteString(player.Skin);
pkg.WriteInt(player.Defence);
pkg.WriteInt(player.GP);
pkg.WriteInt(player.Grade);
pkg.WriteInt(player.Luck);
pkg.WriteInt(player.Hide);
pkg.WriteInt(player.Repute);
pkg.WriteBoolean(player.Sex);
pkg.WriteString(player.Style);
pkg.WriteInt(player.Offer);
pkg.WriteString(player.NickName);
pkg.WriteBoolean(true);
pkg.WriteInt(5);
pkg.WriteInt(player.Win);
pkg.WriteInt(player.Total);
pkg.WriteInt(player.Escape);
pkg.WriteInt(player.ConsortiaID);
pkg.WriteString(player.ConsortiaName);
pkg.WriteInt(player.RichesOffer);
pkg.WriteInt(player.RichesRob);
pkg.WriteBoolean(player.IsMarried);
pkg.WriteInt(player.SpouseID);
pkg.WriteString(player.SpouseName);
pkg.WriteString(player.DutyName);
pkg.WriteInt(player.Nimbus);
pkg.WriteInt(player.FightPower);
pkg.WriteInt(5);
pkg.WriteInt(-1);
pkg.WriteString("Master");
pkg.WriteInt(5);
pkg.WriteString("HoNorMaster");
//AchievementPoint
pkg.WriteInt(9999);
pkg.WriteString("Honor");
pkg.WriteDateTime(DateTime.Now.AddDays(-2));
pkg.WriteInt(items.Count);
foreach (ItemInfo info in items)
{
pkg.WriteByte((byte)info.BagType);
pkg.WriteInt(info.UserID);
pkg.WriteInt(info.ItemID);
pkg.WriteInt(info.Count);
pkg.WriteInt(info.Place);
pkg.WriteInt(info.TemplateID);
pkg.WriteInt(info.AttackCompose);
pkg.WriteInt(info.DefendCompose);
pkg.WriteInt(info.AgilityCompose);
pkg.WriteInt(info.LuckCompose);
pkg.WriteInt(info.StrengthenLevel);
pkg.WriteBoolean(info.IsBinds);
pkg.WriteBoolean(info.IsJudge);
pkg.WriteDateTime(info.BeginDate);
pkg.WriteInt(info.ValidDate);
pkg.WriteString(info.Color);
pkg.WriteString(info.Skin);
pkg.WriteBoolean(info.IsUsed);
pkg.WriteInt(info.Hole1);
pkg.WriteInt(info.Hole2);
pkg.WriteInt(info.Hole3);
pkg.WriteInt(info.Hole4);
pkg.WriteInt(info.Hole5);
pkg.WriteInt(info.Hole6);
pkg.WriteString(info.Template.Pic);
pkg.WriteInt(info.Template.RefineryLevel);
pkg.WriteDateTime(DateTime.Now);
pkg.WriteByte(5);
pkg.WriteInt(5);
pkg.WriteByte(5);
pkg.WriteInt(5);
//item.Hole5Level = pkg.readByte();
//item.Hole5Exp = pkg.readInt();
//item.Hole6Level = pkg.readByte();
//item.Hole6Exp = pkg.readInt();
}
pkg.Compress();
SendTCP(pkg);
return pkg;
}
示例12: SendMarryRoomInfoToPlayer
public GSPacketIn SendMarryRoomInfoToPlayer(GamePlayer player, bool state, MarryRoomInfo info)
{
GSPacketIn pkg = new GSPacketIn((byte)ePackageType.MARRY_ROOM_STATE, player.PlayerCharacter.ID);
pkg.WriteBoolean(state);
if (state)
{
pkg.WriteInt(info.ID);
pkg.WriteString(info.Name);
pkg.WriteInt(info.MapIndex);
pkg.WriteInt(info.AvailTime);
//pkg.WriteInt(info.Count);
//pkg.WriteInt(room.Player.PlayerCharacter.ID);
//pkg.WriteInt(room.Groom.PlayerCharacter.ID);
//pkg.WriteInt(room.Bride.PlayerCharacter.ID);
pkg.WriteInt(info.PlayerID);
pkg.WriteInt(info.GroomID);
pkg.WriteInt(info.BrideID);
pkg.WriteDateTime(info.BeginTime);
//pkg.WriteBoolean(info.IsHymeneal);
pkg.WriteBoolean(info.IsGunsaluteUsed);
}
SendTCP(pkg);
return pkg;
}
示例13: SendCreateGame
internal void SendCreateGame()
{
GSPacketIn pkg = new GSPacketIn((byte)ePackageType.GAME_CMD);
pkg.WriteByte((byte)eTankCmdType.GAME_CREATE);
//pkg.WriteInt(m_map.Info.ID);
pkg.WriteInt((byte)m_roomType);
pkg.WriteInt((byte)m_gameType);
pkg.WriteInt(m_timeType);
List<Player> players = GetAllFightPlayers();
pkg.WriteInt(players.Count);
foreach (Player p in players)
{
IGamePlayer gp = p.PlayerDetail;
pkg.WriteInt(4);
pkg.WriteString("zonename");
pkg.WriteInt(gp.PlayerCharacter.ID);
pkg.WriteString(gp.PlayerCharacter.NickName);
//isvip
pkg.WriteBoolean(true);
//viplevel
pkg.WriteInt(5);
pkg.WriteBoolean(gp.PlayerCharacter.Sex);
pkg.WriteInt(gp.PlayerCharacter.Hide);
pkg.WriteString(gp.PlayerCharacter.Style);
pkg.WriteString(gp.PlayerCharacter.Colors);
pkg.WriteString(gp.PlayerCharacter.Skin);
pkg.WriteInt(gp.PlayerCharacter.Grade);
pkg.WriteInt(gp.PlayerCharacter.Repute);
if (gp.MainWeapon == null)
{
pkg.WriteInt(0);
}
else
{
pkg.WriteInt(gp.MainWeapon.TemplateID);
}
pkg.WriteInt(12);
pkg.WriteString(" ");
pkg.WriteDateTime(DateTime.Now);
pkg.WriteInt(0);
pkg.WriteInt(gp.PlayerCharacter.Nimbus);
pkg.WriteInt(gp.PlayerCharacter.ConsortiaID);// pkg.WriteInt(0);
pkg.WriteString(gp.PlayerCharacter.ConsortiaName);
pkg.WriteInt(gp.PlayerCharacter.ConsortiaLevel);
pkg.WriteInt(gp.PlayerCharacter.ConsortiaRepute);
pkg.WriteInt(gp.PlayerCharacter.Win);
pkg.WriteInt(gp.PlayerCharacter.Total);
pkg.WriteInt(gp.PlayerCharacter.FightPower);
pkg.WriteInt(5);
pkg.WriteInt(0);
pkg.WriteString("Master");
//pkg.WriteInt(5);
pkg.WriteInt(5);
pkg.WriteString("honor");
pkg.WriteBoolean(gp.PlayerCharacter.IsMarried);
if (gp.PlayerCharacter.IsMarried)
{
pkg.WriteInt(gp.PlayerCharacter.SpouseID);
pkg.WriteString(gp.PlayerCharacter.SpouseName);
}
pkg.WriteInt(5); pkg.WriteInt(5); pkg.WriteInt(5); pkg.WriteInt(5); pkg.WriteInt(5);
pkg.WriteInt(5);
pkg.WriteInt(p.Team);
pkg.WriteInt(p.Id);
pkg.WriteInt(p.MaxBlood);
}
SendToAll(pkg);
}
示例14: SendCreateGameToSingle
private void SendCreateGameToSingle(PVEGame game, IGamePlayer gamePlayer)
{
GSPacketIn pkg = new GSPacketIn((byte)ePackageType.GAME_CMD);
pkg.WriteByte((byte)eTankCmdType.GAME_ROOM_INFO);
pkg.WriteInt(game.Map.Info.ID);
pkg.WriteInt((byte)game.RoomType);
pkg.WriteInt((byte)game.GameType);
pkg.WriteInt(game.TimeType);
List<Player> players = game.GetAllFightPlayers();
pkg.WriteInt(players.Count);
foreach (Player p in players)
{
IGamePlayer gp = p.PlayerDetail;
pkg.WriteInt(gp.PlayerCharacter.ID);
//zoneid
//pkg.WriteInt(4);
pkg.WriteString(gp.PlayerCharacter.NickName);
//isvip
pkg.WriteBoolean(true);
pkg.WriteInt(5);
pkg.WriteBoolean(gp.PlayerCharacter.Sex);
pkg.WriteInt(gp.PlayerCharacter.Hide);
pkg.WriteString(gp.PlayerCharacter.Style);
pkg.WriteString(gp.PlayerCharacter.Colors);
pkg.WriteString(gp.PlayerCharacter.Skin);
pkg.WriteInt(gp.PlayerCharacter.Grade);
pkg.WriteInt(gp.PlayerCharacter.Repute);
if (gp.MainWeapon == null)
{
pkg.WriteInt(0);
}
else
{
pkg.WriteInt(gp.MainWeapon.TemplateID);
pkg.WriteInt(0);
pkg.WriteString("");
pkg.WriteDateTime(DateTime.MinValue);
}
pkg.WriteInt(0);
pkg.WriteInt(gp.PlayerCharacter.ConsortiaID);
pkg.WriteString(gp.PlayerCharacter.ConsortiaName);
pkg.WriteInt(gp.PlayerCharacter.ConsortiaLevel);
pkg.WriteInt(gp.PlayerCharacter.ConsortiaRepute);
pkg.WriteInt(p.Team);
pkg.WriteInt(p.Id);
pkg.WriteInt(p.MaxBlood);
pkg.WriteBoolean(p.Ready);
}
MissionInfo missionInfo = game.Misssions[game.SessionId - 1];
pkg.WriteString(missionInfo.Name);
pkg.WriteString(missionInfo.Name);
pkg.WriteString(missionInfo.Success);
pkg.WriteString(missionInfo.Failure);
pkg.WriteString(missionInfo.Description);
pkg.WriteInt(game.TotalMissionCount);
pkg.WriteInt(game.SessionId - 1);
gamePlayer.SendTCP(pkg);
}
示例15: SendOpenWorldBoss
public void SendOpenWorldBoss()
{
GSPacketIn packet = new GSPacketIn((byte)ePackageType.WORLDBOSS_CMD);
packet.WriteByte((byte)WorldBossPackageType.OPEN);
packet.WriteInt(1243);//_currentPVE_ID = event.pkg.readInt();
packet.WriteString("World Boss1");//event.pkg.readUTF();
packet.WriteString("Cuồng Long");//_bossInfo.name = event.pkg.readUTF();
packet.WriteLong(8000);//_bossInfo.total_Blood = event.pkg.readLong();
packet.WriteInt(0);//var _loc_2:* = event.pkg.readInt();
packet.WriteInt(0);//var _loc_3:* = event.pkg.readInt();
packet.WriteString("World Boss2");//event.pkg.readUTF();
packet.WriteInt(800); packet.WriteInt(560);//_bossInfo.playerDefaultPos = new Point(event.pkg.readInt(), event.pkg.readInt());
packet.WriteDateTime(DateTime.Now);//_bossInfo.begin_time = event.pkg.readDate();
packet.WriteDateTime(DateTime.Now.AddDays(1));//_bossInfo.end_time = event.pkg.readDate();
packet.WriteInt(45);//_bossInfo.fight_time = event.pkg.readInt();
packet.WriteBoolean(false);//_bossInfo.fightOver = event.pkg.readBoolean();
packet.WriteBoolean(false);//_bossInfo.roomClose = event.pkg.readBoolean();
packet.WriteInt(1);//_bossInfo.ticketID = event.pkg.readInt();
packet.WriteInt(1);//_bossInfo.need_ticket_count = event.pkg.readInt();
packet.WriteInt(33);//_bossInfo.timeCD = event.pkg.readInt();
packet.WriteInt(0);//_bossInfo.reviveMoney = event.pkg.readInt();
packet.WriteInt(0);//var _loc_4:* = event.pkg.readInt();
//while (_loc_5 < _loc_4)
//{
packet.WriteInt(0); //_loc_6.ID = event.pkg.readInt();
packet.WriteString("Tăng dame"); //_loc_6.name = event.pkg.readUTF();
packet.WriteInt(30); //_loc_6.price = event.pkg.readInt();
packet.WriteString("Tăng dame gấp 10000 lần"); //_loc_6.decription = event.pkg.readUTF();
//}
SendTCP(packet);
//return packet;
}