本文整理汇总了C#中Parser.ReadGuid方法的典型用法代码示例。如果您正苦于以下问题:C# Parser.ReadGuid方法的具体用法?C# Parser.ReadGuid怎么用?C# Parser.ReadGuid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Parser
的用法示例。
在下文中一共展示了Parser.ReadGuid方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleFriendStatus
public void HandleFriendStatus(Parser packet)
{
var result = (ContactResult)packet.ReadByte();
WriteLine("Result: " + result);
var guid = packet.ReadGuid();
WriteLine("GUID: " + guid);
switch (result)
{
case ContactResult.FriendAddedOnline:
case ContactResult.FriendAddedOffline:
case ContactResult.Online:
{
if (result != ContactResult.Online)
{
var note = packet.ReadCString();
WriteLine("Note: " + note);
}
ReadSingleContactBlock(packet, false);
break;
}
}
}
示例2: HandleContactList
public void HandleContactList(Parser packet)
{
var flags = (ContactListFlag)packet.ReadInt32();
WriteLine("List Flags: " + flags);
var count = packet.ReadInt32();
WriteLine("Count: " + count);
for (var i = 0; i < count; i++)
{
var guid = packet.ReadGuid();
WriteLine("GUID: " + guid);
var cflags = (ContactEntryFlag)packet.ReadInt32();
WriteLine("Flags: " + cflags);
var note = packet.ReadCString();
WriteLine("Note: " + note);
if (!cflags.HasFlag(ContactEntryFlag.Friend))
continue;
ReadSingleContactBlock(packet, true);
}
}
示例3: HandleSetTalkerMuted
public void HandleSetTalkerMuted(Parser packet)
{
var guid = packet.ReadGuid();
WriteLine("GUID: " + guid);
var unk = packet.ReadByte();
WriteLine("Unk Byte: " + unk);
}
示例4: HandleVoiceRosterUpdate
public void HandleVoiceRosterUpdate(Parser packet)
{
var unk64 = packet.ReadInt64();
WriteLine("Unk Int64: " + unk64);
var chanId = packet.ReadInt16();
WriteLine("Channel ID: " + chanId);
var chanName = packet.ReadCString();
WriteLine("Channel Name: " + chanName);
var key = Encoding.UTF8.GetString(packet.ReadBytes(16));
WriteLine("Encryption Key: " + key);
var ip = packet.ReadInt32();
WriteLine("Voice Server IP: " + ip);
var count = packet.ReadByte();
WriteLine("Player Count: " + count);
var leaderGuid = packet.ReadGuid();
WriteLine("Leader GUID: " + leaderGuid);
var leaderFlags = packet.ReadByte();
WriteLine("Leader Flags: 0x" + leaderFlags.ToString("X2"));
var unk = packet.ReadByte();
WriteLine("Unk Byte 1: " + unk);
for (var i = 0; i < count - 1; i++)
{
var guid = packet.ReadGuid();
WriteLine("Player GUID: " + guid);
var idx = packet.ReadByte();
WriteLine("Index: " + idx);
var flags = packet.ReadByte();
WriteLine("Flags: 0x" + flags.ToString("X2"));
var unk2 = packet.ReadByte();
WriteLine("Unk Byte 2: " + unk2);
}
}
示例5: HandleDelVoiceIgnore
public void HandleDelVoiceIgnore(Parser packet)
{
var guid = packet.ReadGuid();
WriteLine("GUID: " + guid);
}
示例6: HandleNpcGossip
public void HandleNpcGossip(Parser packet)
{
var guid = packet.ReadGuid();
WriteLine("GUID: " + guid);
var entry = packet.ReadUInt32();
WriteLine("Menu id: " + entry);
var textid = packet.ReadUInt32();
WriteLine("Text id: " + textid);
var count = packet.ReadUInt32();
WriteLine("- Amount of Options: " + count);
for (var i = 0; i < count; i++)
{
if (i != 0)
WriteLine("\t--");
var index = packet.ReadUInt32();
WriteLine("\tIndex: " + index);
var icon = packet.ReadByte();
WriteLine("\tIcon: " + icon);
var box = packet.ReadBoolean();
WriteLine("\tBox: " + box);
var boxMoney = packet.ReadUInt32();
if (box) // Only print if there's a box. avaliable.
WriteLine("\tRequired money: " + boxMoney);
var text = packet.ReadCString();
WriteLine("\tText: " + text);
var boxText = packet.ReadCString();
if (box) // Only print if there's a box avaliable.
WriteLine("\tBox text: " + boxText);
}
var questgossips = packet.ReadUInt32();
WriteLine("- Amount of Quest gossips: " + questgossips);
for (var i = 0; i < questgossips; i++)
{
if (i != 0)
WriteLine("\t--");
var questID = packet.ReadUInt32();
WriteLine("\tQuest ID: " + questID);
var questicon = packet.ReadUInt32();
WriteLine("\tIcon: " + questicon);
var questlevel = packet.ReadInt32();
WriteLine("\tLevel: " + questlevel);
var flags = (QuestFlag)(packet.ReadUInt32() | 0xFFFF);
WriteLine("\tFlags: " + flags);
var unk1 = packet.ReadBoolean();
WriteLine("\tUnknown bool: " + unk1);
var title = packet.ReadCString();
WriteLine("\tTitle: " + title);
}
}
示例7: HandleServerTrainerList
public void HandleServerTrainerList(Parser packet)
{
var guid = packet.ReadGuid();
WriteLine("GUID: " + guid);
var type = (TrainerType)packet.ReadInt32();
WriteLine("Type: " + type);
var count = packet.ReadInt32();
WriteLine("Count: " + count);
for (var i = 0; i < count; i++)
{
var spell = packet.ReadInt32();
WriteLine("Spell ID " + i + ": " + spell);
var state = (TrainerSpellState)packet.ReadByte();
WriteLine("State " + i + ": " + state);
var cost = packet.ReadInt32();
WriteLine("Cost " + i + ": " + cost);
var profDialog = packet.ReadBoolean();
WriteLine("Profession Dialog " + i + ": " + profDialog);
var profButton = packet.ReadBoolean();
WriteLine("Profession Button " + i + ": " + profButton);
var reqLevel = packet.ReadInt32();
WriteLine("Required Level " + i + ": " + reqLevel);
var reqSkill = packet.ReadInt32();
WriteLine("Required Skill " + i + ": " + reqSkill);
var reqSkLvl = packet.ReadInt32();
WriteLine("Required Skill Level " + i + ": " + reqSkLvl);
var chainNode1 = packet.ReadInt32();
WriteLine("Chain Node 1 " + i + ": " + chainNode1);
var chainNode2 = packet.ReadInt32();
WriteLine("Chain Node 2 " + i + ": " + chainNode2);
var unk = packet.ReadInt32();
WriteLine("Unk Int32 " + i + ": " + unk);
//SQLStore.WriteData(SQLStore.TrainerSpells.GetCommand(guid.GetEntry(), spell, cost, reqLevel,
// reqSkill, reqSkLvl));
}
var titleStr = packet.ReadCString();
WriteLine("Title: " + titleStr);
}
示例8: HandleVendorInventoryList
public void HandleVendorInventoryList(Parser packet)
{
var guid = packet.ReadGuid();
WriteLine("GUID: " + guid);
var itemCount = packet.ReadByte();
WriteLine("Item Count: " + itemCount);
for (var i = 0; i < itemCount; i++)
{
var position = packet.ReadInt32();
WriteLine("Item Position " + position + ": " + position);
var itemId = packet.ReadInt32();
WriteLine("Item ID " + i + ": " + itemId);
var dispid = packet.ReadInt32();
WriteLine("Display ID " + i + ": " + dispid);
var maxCount = packet.ReadInt32();
WriteLine("Max Count " + i + ": " + maxCount);
var price = packet.ReadInt32();
WriteLine("Price " + i + ": " + price);
var maxDura = packet.ReadInt32();
WriteLine("Max Durability " + i + ": " + maxDura);
var buyCount = packet.ReadInt32();
WriteLine("Buy Count " + i + ": " + buyCount);
var extendedCost = packet.ReadInt32();
WriteLine("Extended Cost " + i + ": " + extendedCost);
//SQLStore.WriteData(SQLStore.VendorItems.GetCommand(guid.GetEntry(), itemId, maxCount,
// extendedCost));
}
}
示例9: HandleServerChatMessage
public void HandleServerChatMessage(Parser packet)
{
var type = (ChatMessageType)packet.ReadByte();
WriteLine("Type: " + type);
var lang = (Language)packet.ReadInt32();
WriteLine("Language: " + lang);
var guid = packet.ReadGuid();
WriteLine("GUID: " + guid);
var unkInt = packet.ReadInt32();
WriteLine("Unk Int32: " + unkInt);
switch (type)
{
case ChatMessageType.Say:
case ChatMessageType.Yell:
case ChatMessageType.Party:
case ChatMessageType.PartyLeader:
case ChatMessageType.Raid:
case ChatMessageType.RaidLeader:
case ChatMessageType.RaidWarning:
case ChatMessageType.Guild:
case ChatMessageType.Officer:
case ChatMessageType.Emote:
case ChatMessageType.TextEmote:
case ChatMessageType.Whisper:
case ChatMessageType.WhisperInform:
case ChatMessageType.System:
case ChatMessageType.Channel:
case ChatMessageType.Battleground:
case ChatMessageType.BattlegroundNeutral:
case ChatMessageType.BattlegroundAlliance:
case ChatMessageType.BattlegroundHorde:
case ChatMessageType.BattlegroundLeader:
case ChatMessageType.Achievement:
case ChatMessageType.GuildAchievement:
{
if (type == ChatMessageType.Channel)
{
var chanName = packet.ReadCString();
WriteLine("Channel Name: " + chanName);
}
var senderGuid = packet.ReadGuid();
WriteLine("Sender GUID: " + senderGuid);
break;
}
case ChatMessageType.MonsterSay:
case ChatMessageType.MonsterYell:
case ChatMessageType.MonsterParty:
case ChatMessageType.MonsterEmote:
case ChatMessageType.MonsterWhisper:
case ChatMessageType.RaidBossEmote:
case ChatMessageType.RaidBossWhisper:
case ChatMessageType.BattleNet:
{
var nameLen = packet.ReadInt32();
WriteLine("Name Length: " + nameLen);
var name = packet.ReadCString();
WriteLine("Name: " + name);
var target = packet.ReadGuid();
WriteLine("Receiver GUID: " + guid);
if (target.Full != 0)
{
var tNameLen = packet.ReadInt32();
WriteLine("Receiver Name Length: " + tNameLen);
var tName = packet.ReadCString();
WriteLine("Receiver Name: " + tName);
}
break;
}
}
var textLen = packet.ReadInt32();
WriteLine("Text Length: " + textLen);
var text = packet.ReadCString();
WriteLine("Text: " + text);
var chatTag = (ChatTag)packet.ReadByte();
WriteLine("Chat Tag: " + chatTag);
if (type != ChatMessageType.Achievement && type != ChatMessageType.GuildAchievement)
return;
var achId = packet.ReadInt32();
WriteLine("Achievement ID: " + achId);
}
示例10: HandleNpcHello
public void HandleNpcHello(Parser packet)
{
var guid = packet.ReadGuid();
WriteLine("GUID: " + guid);
}
示例11: HandleGroupList
public void HandleGroupList(Parser packet)
{
var grouptype = (GroupTypeFlag)packet.ReadByte();
WriteLine("Group Type: " + grouptype);
var subgroup = packet.ReadByte();
WriteLine("Sub Group: " + subgroup);
var flags = (GroupUpdateFlag)packet.ReadByte();
WriteLine("Flags: " + flags);
var isbg = packet.ReadBoolean();
WriteLine("Is Battleground: " + isbg);
if (grouptype.HasFlag(GroupTypeFlag.LookingForDungeon))
{
var dungeonStatus = (InstanceStatus)packet.ReadByte();
WriteLine("Dungeon Status: " + dungeonStatus);
var lfgentry = ReadInt32();//packet.ReadLfgEntry();
WriteLine("LFG Entry: " + lfgentry);
}
var unkint2 = packet.ReadInt64();
WriteLine("Unk Int64: " + unkint2);
var counter = packet.ReadInt32();
WriteLine("Counter: " + counter);
var numFields = packet.ReadInt32();
WriteLine("Member Count: " + numFields);
for (var i = 0; i < numFields; i++)
{
var name = packet.ReadCString();
WriteLine("Name " + i + ": " + name);
var guid = packet.ReadGuid();
WriteLine("GUID " + i + ": " + guid);
var status = (GroupMemberStatusFlag)packet.ReadByte();
WriteLine("Status " + i + ": " + status);
var subgroup1 = packet.ReadByte();
WriteLine("Sub Group" + i + ": " + subgroup1);
var flags1 = (GroupUpdateFlag)packet.ReadByte();
WriteLine("Update Flags " + i + ": " + flags1);
var role = (LfgRoleFlag)packet.ReadByte();
WriteLine("Role " + i + ": " + role);
}
var leaderGuid = packet.ReadGuid();
WriteLine("Leader GUID: " + leaderGuid);
if (numFields <= 0)
return;
var loot = (LootMethod)packet.ReadByte();
WriteLine("Loot Method: " + loot);
var looterGuid = packet.ReadGuid();
WriteLine("Looter GUID: " + looterGuid);
var item = (ItemQuality)packet.ReadByte();
WriteLine("Loot Threshold: " + item);
var dungeonDifficulty = (MapDifficulty)packet.ReadByte();
WriteLine("Dungeon Difficulty: " + dungeonDifficulty);
var raidDifficulty = (MapDifficulty)packet.ReadByte();
WriteLine("Raid Difficulty: " + raidDifficulty);
var unkbyte3 = packet.ReadByte();
WriteLine("Unk Byte: " + unkbyte3);
}
示例12: ReadQueryHeader
public void ReadQueryHeader(Parser packet)
{
var entry = packet.ReadInt32();
WriteLine("Entry: " + entry);
var guid = packet.ReadGuid();
WriteLine("GUID: " + guid);
}
示例13: HandleNameQuery
public void HandleNameQuery(Parser packet)
{
var guid = packet.ReadGuid();
WriteLine("GUID: " + guid);
}
示例14: HandleGOCustomAnim
public void HandleGOCustomAnim(Parser packet)
{
var guid = packet.ReadGuid();
WriteLine("GUID: " + guid);
var anim = packet.ReadInt32();
WriteLine("Anim: " + anim);
}
示例15: HandleGOMisc
public void HandleGOMisc(Parser packet)
{
var guid = packet.ReadGuid();
WriteLine("GUID: " + guid);
}