本文整理汇总了C#中FrameWork.PacketIn.GetUnicodeString方法的典型用法代码示例。如果您正苦于以下问题:C# PacketIn.GetUnicodeString方法的具体用法?C# PacketIn.GetUnicodeString怎么用?C# PacketIn.GetUnicodeString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrameWork.PacketIn
的用法示例。
在下文中一共展示了PacketIn.GetUnicodeString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
示例2: HandlePacket
public static void HandlePacket(BaseClient client, PacketIn packet)
{
LobbyClient cclient = client as LobbyClient;
packet.Skip(24);
string Email = packet.GetUnicodeString().ToUpper();
Log.Notice("ASK_LOGIN", "Authentification de : " + Email);
SendLoginResult(cclient, Email,Program.CharMgr.LoadAccount(Email));
}