本文整理汇总了C#中PacketIn.GetParsedString方法的典型用法代码示例。如果您正苦于以下问题:C# PacketIn.GetParsedString方法的具体用法?C# PacketIn.GetParsedString怎么用?C# PacketIn.GetParsedString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PacketIn
的用法示例。
在下文中一共展示了PacketIn.GetParsedString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandlePacket
public int HandlePacket(BaseClient client, PacketIn packet)
{
WorldClient cclient = (WorldClient)client;
UInt32 whisperuid = packet.GetUint32Reversed();
String charname = packet.GetParsedString();
String message = packet.GetParsedString();
(client as WorldClient).Send(new ANS_CHAT_WHISPER(cclient, whisperuid, charname, message));
//cclient.Send(new CHAT_WHISPER(cclient.CharacterId, 1, message));
return 0;
}
示例2: HandlePacket
public int HandlePacket(BaseClient client, PacketIn packet)
{
LobbyClient cclient = client as LobbyClient;
UInt32 WorldUid = packet.GetUint32Reversed();
string Name = packet.GetParsedString();
PacketOut Out = new PacketOut((UInt32)Opcodes.ANS_CHARACTER_NAME_CHECK);
if (Databases.CharacterTable.Count(c => c.Name == Name) == 0)
{
cclient.Pending = new CharacterEntry();
cclient.Pending.Index = Databases.CharacterTable.GenerateIndex();
cclient.Pending.AccountIndex = cclient.Account.Index;
cclient.Pending.Name = Name;
cclient.Pending.World = (int)WorldUid;
cclient.Pending.Rank = 1;
cclient.Pending.Money = 0;
cclient.Pending.Threat = 1;
cclient.Pending.Playtime = 0;
cclient.Pending.Clan = "APB-EMU";
cclient.Pending.IsOnline = 0;
cclient.Pending.DistrictID = 0;
cclient.Pending.DistrictType = 0;
cclient.Pending.LFG = 0;
cclient.Pending.IsGroupPublic = 0;
cclient.Pending.GroupInvite = 0;
cclient.Pending.GroupStatus = 0;
Out.WriteUInt32Reverse((uint)ResponseCodes.RC_SUCCESS);
}
else
{
cclient.Pending = default(CharacterEntry);
Out.WriteUInt32Reverse((uint)ResponseCodes.RC_CHARACTER_NAME_CHECK_IN_USE);
}
cclient.Send(Out);
return 0;
}
示例3: HandlePacket
public int HandlePacket(BaseClient bcclient, PacketIn packet)
{
LobbyClient client = bcclient as LobbyClient;
packet.Skip(24);
String Email = packet.GetParsedString();
Log.Notice("ASK_LOGIN", "Account: " + Email);
Account account;
try
{
account = new Account(Email);
}
catch (ArgumentNullException)
{
Log.Error("ASK_LOGIN", "Database is busy");
ANS_LOGIN_FAILED.Send(client, (int)ResponseCodes.RC_DATABASE_BUSY);
client.Disconnect();
return 0;
}
catch (Exception e)
{
Log.Error("ASK_LOGIN", "Account's not found");
Log.Debug("ASK_LOGIN", e.ToString());
ANS_LOGIN_FAILED.Send(client, (int)ResponseCodes.RC_LOGIN_INVALID_ACCOUNT);
client.Disconnect();
return 0;
}
Log.Succes("ASK_LOGIN", "Account exists");
client.Account = account;
if (client.Account.extrn_login == 1)
{
if (client.Account.Verifier.Length <= 2 || client.Account.Salt.Length <= 2) Register(client);
client.Salt = new FrameWork.NetWork.Crypto.BigInteger(client.Account.Salt, 16).ToByteArrayUnsigned();
client.Verifier = new FrameWork.NetWork.Crypto.BigInteger(client.Account.Verifier, 16);
LOGIN_SALT.Send(client);
return 0;
}
else
{
ANS_LOGIN_FAILED.Send(client, (int)ResponseCodes.RC_LOGIN_APB_INACTIVATED);
client.Disconnect();
return 0;
}
}
示例4: HandlePacket
public int HandlePacket(BaseClient client, PacketIn packet)
{
LobbyClient cclient = client as LobbyClient;
UInt32 WorldUid = packet.GetUint32Reversed();
string Name = packet.GetParsedString();
PacketOut Out = new PacketOut((UInt32)Opcodes.ANS_CHARACTER_NAME_CHECK);
if (isValid(Name) && !cclient.Characters.Exists(Name))
{
cclient.Pending = new Character();
cclient.Pending.Name = Name;
cclient.Pending.WorldId = WorldUid;
Out.WriteUInt32Reverse((uint)ResponseCodes.RC_SUCCESS);
}
else
{
cclient.Pending = null;
Out.WriteUInt32Reverse((uint)ResponseCodes.RC_CHARACTER_NAME_CHECK_IN_USE);
}
cclient.Send(Out);
return 0;
}
示例5: HandlePacket
public int HandlePacket(BaseClient client, PacketIn packet)
{
WorldClient cclient = (WorldClient)client;
(client as WorldClient).Send(new ANS_IGNORELIST_ADD(packet.GetParsedString(), cclient));
return 0;
}
示例6: HandlePacket
public int HandlePacket(BaseClient client, PacketIn packet)
{
WorldClient cclient = (WorldClient)client;
(client as WorldClient).Send(new ANS_CHARACTERFINDER_INFO(packet.GetParsedString(), cclient));
return 0;
}
示例7: HandlePacket
public int HandlePacket(BaseClient client, PacketIn packet)
{
WorldClient cclient = (WorldClient)client;
cclient.Send(new ANS_GROUP_JOIN(packet.GetParsedString()));
return 0;
}
示例8: HandlePacket
public int HandlePacket(BaseClient client, PacketIn packet)
{
WorldClient cclient = (WorldClient)client;
(client as WorldClient).Send(new ANS_GROUP_INVITE(packet.GetParsedString(), cclient));
return 0;
}