本文整理汇总了C#中WowPacketParser.Misc.Packet.ReadBoolean方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.ReadBoolean方法的具体用法?C# Packet.ReadBoolean怎么用?C# Packet.ReadBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WowPacketParser.Misc.Packet
的用法示例。
在下文中一共展示了Packet.ReadBoolean方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleDestroyObject
public static void HandleDestroyObject(Packet packet)
{
packet.ReadGuid("GUID");
if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_0_2_9056))
packet.ReadBoolean("Despawn Animation");
}
示例2: HandleBotDetected
public static void HandleBotDetected(Packet packet)
{
packet.ReadBoolean("Glider 1 Detected");
packet.ReadBoolean("Glider 2 Detected");
packet.ReadBoolean("Inner Space Detected");
packet.ReadBytes(20); // Hash
}
示例3: HandleServerAddonsList
public static void HandleServerAddonsList(Packet packet)
{
// This packet requires _addonCount from CMSG_AUTH_SESSION to be parsed.
if (_addonCount == -1)
{
packet.WriteLine("CMSG_AUTH_SESSION was not received - cannot successfully parse this packet.");
packet.ReadToEnd();
return;
}
for (var i = 0; i < _addonCount; i++)
{
packet.ReadByte("Addon State", i);
var sendCrc = packet.ReadBoolean("Use CRC", i);
if (sendCrc)
{
var usePublicKey = packet.ReadBoolean("Use Public Key", i);
if (usePublicKey)
{
var pubKey = packet.ReadChars(256);
packet.Write("[{0}] Public Key: ", i);
foreach (var t in pubKey)
packet.Write(t.ToString(CultureInfo.InvariantCulture));
}
packet.ReadInt32("Unk Int32", i);
}
if (packet.ReadBoolean("Use URL File", i))
packet.ReadCString("Addon URL File", i);
}
if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_0_8_9464))
{
var bannedCount = packet.ReadInt32("Banned Addons Count");
for (var i = 0; i < bannedCount; i++)
{
packet.ReadInt32("ID", i);
var unkStr2 = packet.ReadBytes(16);
packet.WriteLine("[{0}] Unk Hash 1: {1}", i, Utilities.ByteArrayToHexString(unkStr2));
var unkStr3 = packet.ReadBytes(16);
packet.WriteLine("[{0}] Unk Hash 2: {1}", i, Utilities.ByteArrayToHexString(unkStr3));
packet.ReadInt32("Unk Int32 3", i);
if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_3_3a_11723))
packet.ReadInt32("Unk Int32 4", i);
}
}
}
示例4: HandleInstanceLockWarningQuery
public static void HandleInstanceLockWarningQuery(Packet packet)
{
packet.ReadInt32("Time");
packet.ReadInt32("Encounters Completed Mask");
packet.ReadBoolean("Extending");
if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_0_6a_13623)) // guessing
packet.ReadBoolean("Locked warning"); // Displays a window asking if the player choose to join an instance which is saved.
}
示例5: HandleLfgBootProposalUpdate
public static void HandleLfgBootProposalUpdate(Packet packet)
{
packet.ReadBoolean("In Progress");
packet.ReadBoolean("Did Vote");
packet.ReadBoolean("Vote");
packet.ReadGuid("Victim GUID");
packet.ReadInt32("Total Votes");
packet.ReadInt32("Agree Count");
packet.ReadInt32("Time Left");
packet.ReadInt32("Needed Votes");
packet.ReadCString("Comment");
}
示例6: HandleRaidInstanceMessage
public static void HandleRaidInstanceMessage(Packet packet)
{
var type = packet.ReadEnum<RaidInstanceResetWarning>("Warning Type", TypeCode.Int32);
packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Map Id");
packet.ReadEnum<MapDifficulty>("Difficulty", TypeCode.Int32);
packet.ReadInt32("Reset time");
if (type == RaidInstanceResetWarning.Welcome)
{
packet.ReadBoolean("Unk bool");
packet.ReadBoolean("Is Extended");
}
}
示例7: HandleServerAddonsList
public static void HandleServerAddonsList(Packet packet)
{
for (var i = 0; i < _addonCount; i++)
{
packet.ReadByte("Addon State");
var sendCrc = packet.ReadBoolean("Use CRC");
if (sendCrc)
{
var usePublicKey = packet.ReadBoolean("Use Public Key");
if (usePublicKey)
{
var pubKey = packet.ReadChars(256);
packet.Writer.Write("Public Key: ");
foreach (var t in pubKey)
packet.Writer.Write(t);
}
packet.ReadInt32("Unk Int32");
}
var unkByte2 = packet.ReadBoolean("Use URL File");
if (!unkByte2)
continue;
packet.ReadCString("Addon URL File");
}
if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_0_8_9464))
{
var bannedCount = packet.ReadInt32("Banned Addons Count");
for (var i = 0; i < bannedCount; i++)
{
packet.ReadInt32("ID");
var unkStr2 = packet.ReadBytes(16);
packet.Writer.WriteLine("Unk Hash 1: " + Utilities.ByteArrayToHexString(unkStr2));
var unkStr3 = packet.ReadBytes(16);
packet.Writer.WriteLine("Unk Hash 2: " + Utilities.ByteArrayToHexString(unkStr3));
packet.ReadInt32("Unk Int32 3");
if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_3_3a_11723))
packet.ReadInt32("Unk Int32 4");
}
}
}
示例8: HandleNpcGossip
public static void HandleNpcGossip(Packet packet)
{
var gossip = new Gossip();
var guid = packet.ReadGuid("GUID");
gossip.ObjectType = guid.GetObjectType();
gossip.ObjectEntry = guid.GetEntry();
var menuId = packet.ReadUInt32("Menu Id");
if (ClientVersion.AddedInVersion(ClientType.MistsOfPandaria))
packet.ReadUInt32("Unk int32");
var textId = packet.ReadUInt32("Text Id");
if (guid.GetObjectType() == ObjectType.Unit)
if (Storage.Objects.ContainsKey(guid))
((Unit) Storage.Objects[guid].Item1).GossipId = menuId;
var count = packet.ReadUInt32("Amount of Options");
gossip.GossipOptions = new List<GossipOption>((int) count);
for (var i = 0; i < count; i++)
{
var gossipOption = new GossipOption
{
Index = packet.ReadUInt32("Index", i),
OptionIcon = packet.ReadEnum<GossipOptionIcon>("Icon", TypeCode.Byte, i),
Box = packet.ReadBoolean("Box", i),
RequiredMoney = packet.ReadUInt32("Required money", i),
OptionText = packet.ReadCString("Text", i),
BoxText = packet.ReadCString("Box Text", i)
};
gossip.GossipOptions.Add(gossipOption);
}
Storage.Gossips.Add(Tuple.Create(menuId, textId), gossip, packet.TimeSpan);
packet.AddSniffData(StoreNameType.Gossip, (int)menuId, guid.GetEntry().ToString(CultureInfo.InvariantCulture));
var questgossips = packet.ReadUInt32("Amount of Quest gossips");
for (var i = 0; i < questgossips; i++)
{
packet.ReadEntryWithName<UInt32>(StoreNameType.Quest, "Quest ID", i);
packet.ReadUInt32("Icon", i);
packet.ReadInt32("Level", i);
packet.ReadEnum<QuestFlags>("Flags", TypeCode.UInt32, i);
packet.ReadBoolean("Unk Bool", i);
packet.ReadCString("Title", i);
}
}
示例9: HandleRaidInstanceInfo
public static void HandleRaidInstanceInfo(Packet packet)
{
var counter = packet.ReadInt32("Counter");
for (var i = 0; i < counter; ++i)
{
packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Map ID", i);
packet.ReadEnum<MapDifficulty>("Map Difficulty", TypeCode.UInt32, i);
packet.ReadGuid("Instance GUID", i);
packet.ReadBoolean("Expired", i);
packet.ReadBoolean("Extended", i);
packet.ReadUInt32("Reset Time", i);
}
}
示例10: HandleNpcGossip
public static void HandleNpcGossip(Packet packet)
{
var guid = packet.ReadGuid("GUID");
var menuid = packet.ReadUInt32("Menu id");
var textid = packet.ReadUInt32("Text id");
GossipMenu gossip = new GossipMenu
{
MenuId = menuid,
GossipOptions = new List<GossipOption>(),
NpcTextId = textid
};
gossip = Stuffing.Gossips.GetOrAdd(Tuple.Create<uint,uint>(guid.GetEntry(),menuid), gossip);
var count = packet.ReadUInt32("Amount of Options");
for (var i = 0; i < count; i++)
{
GossipOption opt = new GossipOption
{
Index = packet.ReadUInt32("Index", i),
OptionIcon = packet.ReadByte("Icon", i),
Box = packet.ReadBoolean("Box", i),
RequiredMoney = packet.ReadUInt32("Required money", i),
OptionText = packet.ReadCString("Text", i),
BoxText = packet.ReadCString("Box Text", i)
};
gossip.GossipOptions.Add(opt);
}
Stuffing.Gossips.AddOrUpdate(Tuple.Create<uint,uint>(guid.GetEntry(),menuid), gossip, (a,b) =>
{
b.GossipOptions = gossip.GossipOptions;
b.NpcTextId = gossip.NpcTextId;
return b;
});
var questgossips = packet.ReadUInt32("Amount of Quest gossips");
for (var i = 0; i < questgossips; i++)
{
packet.ReadEntryWithName<UInt32>(StoreNameType.Quest, "Quest ID", i);
packet.ReadUInt32("Icon", i);
packet.ReadInt32("Level", i);
packet.ReadEnum<QuestFlags>("Flags", TypeCode.UInt32, i);
packet.ReadBoolean("Unk Bool", i);
packet.ReadCString("Title", i);
}
}
示例11: HandleLfgBootProposalUpdate
public static void HandleLfgBootProposalUpdate(Packet packet)
{
packet.ReadBoolean("In Progress");
packet.ReadBoolean("Did Vote");
packet.ReadBoolean("Vote");
if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_2_2_14545))
packet.ReadByte("Unk");
packet.ReadGuid("Victim GUID");
packet.ReadInt32("Total Votes");
packet.ReadInt32("Agree Count");
packet.ReadInt32("Time Left");
packet.ReadInt32("Needed Votes");
packet.ReadCString("Comment");
}
示例12: HandleGetGMTicket
public static void HandleGetGMTicket(Packet packet)
{
var unk = packet.ReadInt32("Unk UInt32");
if (unk != 6)
return;
packet.ReadInt32("TicketID");
packet.ReadCString("Description");
packet.ReadByte("Category");
packet.ReadSingle("Ticket Age");
packet.ReadSingle("Oldest Ticket Time");
packet.ReadSingle("Update Time");
packet.ReadBoolean("Assigned to GM");
packet.ReadBoolean("Opened by GM");
}
示例13: HandleAddCalendarEvent
public static void HandleAddCalendarEvent(Packet packet)
{
packet.ReadCString("Title");
packet.ReadCString("Description");
packet.ReadEnum<CalendarEventType>("Event Type", TypeCode.Byte);
packet.ReadBoolean("Repeatable");
packet.ReadInt32("Max Invites");
packet.ReadEntryWithName<Int32>(StoreNameType.LFGDungeon, "Dungeon ID");
packet.ReadPackedTime("Event Time");
packet.ReadPackedTime("Unk PackedTime");
var flags = packet.ReadEnum<CalendarFlag>("Event Flags", TypeCode.Int32);
if ((flags & CalendarFlag.WithoutInvites) != 0)
return;
var count = packet.ReadInt32("Invite Count");
if (count <= 0)
return;
packet.ReadPackedGuid("Creator GUID");
packet.ReadEnum<CalendarEventStatus>("Status", TypeCode.Byte);
packet.ReadEnum<CalendarModerationRank>("Moderation Rank", TypeCode.Byte);
}
示例14: HandleArenaTeamRoster
public static void HandleArenaTeamRoster(Packet packet)
{
packet.ReadUInt32("Team Id");
var unk = packet.ReadByte("Unk Byte");
var count = packet.ReadUInt32("Member count");
packet.ReadUInt32("Type");
for (var i = 0; i < count; i++)
{
packet.ReadGuid(" GUID", i);
packet.ReadBoolean("Online", i);
packet.ReadCString("Name", i);
packet.ReadUInt32("Captain", i);
packet.ReadByte("Level", i);
packet.ReadByte("Class", i);
packet.ReadUInt32("Week Games", i);
packet.ReadUInt32("Week Win", i);
packet.ReadUInt32("Seasonal Games", i);
packet.ReadUInt32("Seasonal Wins", i);
packet.ReadUInt32("Personal Rating", i);
if (unk > 0)
{
packet.ReadSingle("Unk float 1", i);
packet.ReadSingle("Unk float 2", i);
}
}
}
示例15: HandleArenaTeamRoster
public static void HandleArenaTeamRoster(Packet packet)
{
packet.ReadUInt32("Team Id");
var unk = packet.ReadByte("Unk Byte");
var count = packet.ReadUInt32("Member count");
packet.ReadUInt32("Type");
for (var i = 0; i < count; i++)
{
packet.ReadGuid("[" + i + "] GUID");
packet.ReadBoolean("[" + i + "] Online");
packet.ReadCString("[" + i + "] Name");
packet.ReadUInt32("[" + i + "] Captain");
packet.ReadByte("[" + i + "] Level");
packet.ReadByte("[" + i + "] Class");
packet.ReadUInt32("[" + i + "] Week Games");
packet.ReadUInt32("[" + i + "] Week Win");
packet.ReadUInt32("[" + i + "] Seasonal Games");
packet.ReadUInt32("[" + i + "] Seasonal Wins");
packet.ReadUInt32("[" + i + "] Personal Rating");
if (unk > 0)
{
packet.ReadSingle("[" + i + "] Unk float 1");
packet.ReadSingle("[" + i + "] Unk float 2");
}
}
}