本文整理汇总了C#中RealmPacketIn.ReadUInt64方法的典型用法代码示例。如果您正苦于以下问题:C# RealmPacketIn.ReadUInt64方法的具体用法?C# RealmPacketIn.ReadUInt64怎么用?C# RealmPacketIn.ReadUInt64使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RealmPacketIn
的用法示例。
在下文中一共展示了RealmPacketIn.ReadUInt64方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleSendMail
public static void HandleSendMail(IRealmClient client, RealmPacketIn packet)
{
var chr = client.ActiveCharacter;
var mailboxId = packet.ReadEntityId();
if (!CheckMailBox(chr, chr.Map.GetObject(mailboxId) as GameObject))
{
return;
}
var recipientName = packet.ReadCString();
var subject = packet.ReadCString();
var msg = packet.ReadCString();
var stationary = (MailStationary)Enum.ToObject(typeof(MailStationary), packet.ReadUInt32());
var unkowwn1 = packet.ReadUInt32(); // 4 unknown bytes
var itemCount = packet.ReadByte();
if (itemCount > MailMgr.MaxItemsPerMail)
return;
var items = new List<Item>(itemCount);
for (var i = 0; i < itemCount; i++)
{
var slot = packet.ReadByte();
var itemId = packet.ReadEntityId();
var item = chr.MailAccount.GetItemToMail(itemId);
if (item != null)
{
items.Add(item);
}
else
{
// invalid item
return;
}
}
var money = packet.ReadUInt32();
var cod = packet.ReadUInt32();
var unknown2 = packet.ReadUInt64();
var unknown4 = packet.ReadByte();
chr.MailAccount.SendMail(recipientName, subject, msg, stationary, items, money, cod);
}
示例2: AuthSessionRequest
public static void AuthSessionRequest(IRealmClient client, RealmPacketIn packet)
{
if (client.ActiveCharacter != null || client.Account != null)
{
// Already logged in
SendAuthSessionErrorReply(client, LoginErrorCode.AUTH_ALREADY_ONLINE);
client.Disconnect();
}
else if (!client.IsEncrypted)
{
var builtNumberClient = packet.ReadUInt32();
var new302 = packet.ReadUInt32(); // NEW 0.0.2.8970
var accName = packet.ReadCString();
var unk322 = packet.ReadUInt32();
client.ClientSeed = packet.ReadUInt32();
var unk1 = packet.ReadUInt32(); // 3.3.5a
var unk2 = packet.ReadUInt32(); // 3.3.5a
var unk3 = packet.ReadUInt32(); // 3.3.5a
var unk4 = packet.ReadUInt64();
client.ClientDigest = packet.ReadBigInteger(20);
#if DEBUG
log.Debug("builtNumberClient:{0} new302:{1} accName:{2} unk322:{3} client.ClientSeed:{4} unk4:{5} ClientDigest:{6}",
builtNumberClient,
new302, accName, unk322, client.ClientSeed, unk4, client.ClientDigest);
#endif
var decompressedDataLength = packet.ReadInt32();
var compressedData = packet.ReadBytes(packet.RemainingLength);
client.Addons = new byte[decompressedDataLength];
Compression.DecompressZLib(compressedData, client.Addons);
var acctLoadTask = Message.Obtain(() => RealmAccount.InitializeAccount(client, accName));
client.Server.AddMessage(acctLoadTask);
}
}