本文整理汇总了C#中FrameWork.PacketIn.GetUint32R方法的典型用法代码示例。如果您正苦于以下问题:C# PacketIn.GetUint32R方法的具体用法?C# PacketIn.GetUint32R怎么用?C# PacketIn.GetUint32R使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrameWork.PacketIn
的用法示例。
在下文中一共展示了PacketIn.GetUint32R方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandlePacket
public static void HandlePacket(BaseClient client, PacketIn packet)
{
LobbyClient cclient = client as LobbyClient;
byte freeslot = Program.CharMgr.GetFreeSlot(cclient.Account.Id);
if (freeslot == 0 || cclient.CreateChar == null)
ANS_CHARACTER_CREATE.Send(cclient);
else
{
cclient.CreateChar.SlotId = freeslot;
cclient.CreateChar.Faction = packet.GetUint8();
cclient.CreateChar.Gender = packet.GetUint8();
cclient.CreateChar.Version = (int)packet.GetUint32R();
cclient.CreateChar.Seconds = (int)packet.GetUint32R();
byte[] Custom = new byte[packet.Length - packet.Position];
packet.Read(Custom, 0, Custom.Length);
cclient.CreateChar.Custom = BitConverter.ToString(Custom);
Program.CharMgr.CreateCharacter(cclient.CreateChar);
ANS_CHARACTER_CREATE.Send(cclient);
}
}
示例2: OnReceive
protected override void OnReceive(byte[] Packet)
{
lock (this)
{
PacketIn packet = new PacketIn(Packet, 0, Packet.Length);
packet.Size = packet.GetUint32R();
packet = DeCrypt(packet);
packet.Opcode = packet.GetUint32R();
Server.HandlePacket(this, packet);
}
}
示例3: HandlePacket
public static void HandlePacket(BaseClient client, PacketIn packet)
{
LobbyClient cclient = (LobbyClient)client;
UInt32 WorldUid = packet.GetUint32R();
string Name = packet.GetUnicodeString();
PacketOut Out = new PacketOut((UInt32)Opcodes.ANS_CHARACTER_NAME_CHECK);
if (CheckName(Name) == 0)
{
cclient.CreateChar = new DBCharacter();
cclient.CreateChar.AcctId = cclient.Account.Id;
cclient.CreateChar.Name = Name;
if (cclient.Account.WorldId != WorldUid)
Program.CharMgr.SetAccountWorld(cclient.Account.Id, (int)WorldUid);
Out.WriteUInt32(0);
}
else
{
cclient.CreateChar = null;
Out.WriteUInt32(1);
}
cclient.SendTCP(Out);
}
示例4: HandlePacket
public static void HandlePacket(BaseClient client, PacketIn packet)
{
LobbyClient cclient = (LobbyClient)client;
byte FileId = packet.GetUint8();
UInt32 Version = packet.GetUint32R();
byte[] File = new byte[packet.Length - packet.Position];
packet.Read(File, 0, File.Length);
File = ZlibMgr.Decompress(File);
Log.Debug("ConfigSave", "Config saved : fileid=" + FileId + ", Version=" + Version + ",Size=" + File.Length);
Program.FileMgr.SaveInfo(cclient.Account.Id, FileId, File);
PacketOut Out = new PacketOut((UInt32)Opcodes.ANS_CONFIGFILE_SAVE);
Out.WriteUInt32R(0);
Out.WriteByte(FileId);
Out.Write(File, 0, File.Length);
cclient.SendTCP(Out);
}
示例5: HandlePacket
public static void HandlePacket(BaseClient client, PacketIn packet)
{
WorldClient cclient = (WorldClient)client;
UInt32 AcctId = packet.GetUint32R();
Log.Debug("AskWorldEnter", "New client, Account = " + AcctId);
cclient.Account = Program.CharMgr.GetAccount((int)AcctId);
cclient.Character = Program.CharMgr.GetInfoForEnter((int)AcctId);
PacketOut Out = new PacketOut((UInt32)Opcodes.ANS_WORLD_ENTER);
if (cclient.Account == null || cclient.Character == null)
Out.WriteInt32R(1);
else
{
Out.WriteInt32R(0);
Out.WriteInt32R(cclient.Character.Character.Id);
Out.WriteInt32R(cclient.Account.Points); // Points
Out.WriteByte(1);
Out.WriteInt64R(TCPManager.GetTimeStamp());
Out.WriteFloat(5.00f); // fMarketPlaceMinimumBidPct
Out.WriteByte(0); // GroupPublic
Out.WriteByte(0); // GroupInvite
Out.WriteInt32R(Program.FileMgr.GetFileVersion(cclient.Account.Id, 1, false, Program.Config.WorldName, cclient.Character.Character.Name)); // ConfigFileVersion
Out.WriteInt32R(Program.FileMgr.GetFileVersion(cclient.Account.Id, 2, false, Program.Config.WorldName, cclient.Character.Character.Name));
Out.WriteInt32R(Program.FileMgr.GetFileVersion(cclient.Account.Id, 3, false, Program.Config.WorldName, cclient.Character.Character.Name));
Out.WriteInt32R(Program.FileMgr.GetFileVersion(cclient.Account.Id, 4, false, Program.Config.WorldName, cclient.Character.Character.Name));
Out.WriteInt32R(Program.FileMgr.GetFileVersion(cclient.Account.Id, 5, false, Program.Config.WorldName, cclient.Character.Character.Name));
Out.WriteByte(1); // Tutorial Complete
Out.WriteByte(0); // lookInForGroup
}
cclient.SendTCP(Out);
}