本文整理汇总了C#中Parser.ReadBoolean方法的典型用法代码示例。如果您正苦于以下问题:C# Parser.ReadBoolean方法的具体用法?C# Parser.ReadBoolean怎么用?C# Parser.ReadBoolean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Parser
的用法示例。
在下文中一共展示了Parser.ReadBoolean方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleVoiceParentalControls
public void HandleVoiceParentalControls(Parser packet)
{
var disableAll = packet.ReadBoolean();
WriteLine("Disable All: " + disableAll);
var disableMic = packet.ReadBoolean();
WriteLine("Disable Microphone: " + disableMic);
}
示例2: HandleVoiceSessionEnable
public void HandleVoiceSessionEnable(Parser packet)
{
var voiceEnabled = packet.ReadBoolean();
WriteLine("Voice Enabled: " + voiceEnabled);
var micEnabled = packet.ReadBoolean();
WriteLine("Microphone Enabled: " + micEnabled);
}
示例3: 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);
}
}
示例4: 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);
}
示例5: 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);
}
示例6: HandleCreatureQueryResponse
public void HandleCreatureQueryResponse(Parser packet)
{
var entry = packet.ReadEntry();
WriteLine("Entry: " + entry.Key);
if (entry.Value)
return;
var name = new string[8];
for (var i = 0; i < 8; i++)
{
name[i] = packet.ReadCString();
WriteLine("Name " + i + ": " + name[i]);
}
var subName = packet.ReadCString();
WriteLine("Sub Name: " + subName);
var iconName = packet.ReadCString();
WriteLine("Icon Name: " + iconName);
var typeFlags = (CreatureTypeFlag)packet.ReadInt32();
WriteLine("Type Flags: " + typeFlags);
//Allways 0?
packet.ReadInt32("Unknown");
var type = (CreatureType)packet.ReadInt32();
WriteLine("Type: " + type);
var family = (CreatureFamily)packet.ReadInt32();
WriteLine("Family: " + family);
var rank = (CreatureRank)packet.ReadInt32();
WriteLine("Rank: " + rank);
var killCredit = new int[2];
for (var i = 0; i < 2; i++)
{
killCredit[i] = packet.ReadInt32();
WriteLine("Kill Credit " + i + ": " + killCredit[i]);
}
var dispId = new int[4];
for (var i = 0; i < 4; i++)
{
dispId[i] = packet.ReadInt32();
WriteLine("Display ID " + i + ": " + dispId[i]);
}
var mod1 = packet.ReadSingle();
WriteLine("Modifier 1: " + mod1);
var mod2 = packet.ReadSingle();
WriteLine("Modifier 2: " + mod2);
var racialLeader = packet.ReadBoolean();
WriteLine("Racial Leader: " + racialLeader);
var qItem = new int[6];
for (var i = 0; i < 6; i++)
{
qItem[i] = packet.ReadInt32();
WriteLine("Quest Item " + i + ": " + qItem[i]);
}
var moveId = packet.ReadInt32();
WriteLine("Movement ID: " + moveId);
packet.ReadInt32("Unknown"); // 0 ?
//SQLStore.WriteData(SQLStore.Creatures.GetCommand(entry.Key, name[0], subName, iconName, typeFlags,
// type, family, rank, killCredit, dispId, mod1, mod2, racialLeader, qItem, moveId));
}
示例7: HandleNameQueryResponse
public void HandleNameQueryResponse(Parser packet)
{
var pguid = packet.ReadPackedGuid();
WriteLine("GUID: " + pguid);
var end = packet.ReadBoolean();
WriteLine("Name Found: " + !end);
if (end)
return;
var name = packet.ReadCString();
WriteLine("Name: " + name);
var realmName = packet.ReadCString();
WriteLine("Realm Name: " + realmName);
var race = (Race)packet.ReadByte();
WriteLine("Race: " + race);
var gender = (Gender)packet.ReadByte();
WriteLine("Gender: " + gender);
var cClass = (Class)packet.ReadByte();
WriteLine("Class: " + cClass);
var decline = packet.ReadBoolean();
WriteLine("Name Declined: " + decline);
if (!decline)
return;
for (var i = 0; i < 5; i++)
{
var declinedName = packet.ReadCString();
WriteLine("Declined Name " + i + ": " + declinedName);
}
}