本文整理汇总了C#中StreamHandler.ReadBoolean方法的典型用法代码示例。如果您正苦于以下问题:C# StreamHandler.ReadBoolean方法的具体用法?C# StreamHandler.ReadBoolean怎么用?C# StreamHandler.ReadBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StreamHandler
的用法示例。
在下文中一共展示了StreamHandler.ReadBoolean方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Read
public override void Read(StreamHandler reader)
{
Caster = reader.ReadPackedGuid();
SpellId = reader.ReadUInt32();
Duration = reader.ReadInt32();
HaveFlags = reader.ReadBoolean();
if (HaveFlags)
{
TargetFlags1 = reader.ReadUInt32();
TargetFlags2 = reader.ReadUInt32();
}
Unk_HaveData2 = reader.ReadBoolean();
if (Unk_HaveData2)
{
Unk_Guid1 = reader.ReadPackedGuid();
Unk_UInt3 = reader.ReadUInt32();
Unk_Byte = reader.ReadByte();
if (Unk_Byte == 2)
Unk_Guid2 = reader.ReadPackedGuid();
}
}
示例2: Read
public override void Read(StreamHandler reader)
{
Dungeon = new DungeonEntry(reader.ReadUInt32());
State = (LFGState)reader.ReadByte();
ProposalId = reader.ReadUInt32();
BossesKilled = reader.ReadUInt32();
SameDungeon = reader.ReadBoolean();
byte count = reader.ReadByte();
this.Players = new PlayerInfo[count];
for (byte i = 0; i < count; ++i)
{
this.Players[i].Role = (GroupRoles)reader.ReadUInt32();
this.Players[i].SelfPlayer = reader.ReadBoolean();
this.Players[i].InDungeon = reader.ReadBoolean();
this.Players[i].SameGroup = reader.ReadBoolean();
this.Players[i].Answered = reader.ReadBoolean();
this.Players[i].Accepted = reader.ReadBoolean();
}
}
示例3: ReadFromStreamHandler
private void ReadFromStreamHandler(StreamHandler Reader, WowOpcodes opcode)
{
GameMasterMessage = (opcode == WowOpcodes.SMSG_GM_MESSAGECHAT);
m_type = (ChatMessageType)Reader.ReadByte();
if (m_type == ChatMessageType.Addon2)
m_type = ChatMessageType.Addon;
m_language = (Language)Reader.ReadUInt32();
m_senderGUID = Reader.ReadGuid();
m_unknownUInt32 = Reader.ReadUInt32();
switch (m_type)
{
case ChatMessageType.MonsterSay:
case ChatMessageType.MonsterParty:
case ChatMessageType.MonsterYell:
case ChatMessageType.MonsterWhisper:
case ChatMessageType.MonsterEmote:
case ChatMessageType.BattleNet:
case ChatMessageType.RaidBossEmote:
case ChatMessageType.RaidBossWhisper:
Reader.Skip(4);
m_senderName = Reader.ReadCString();
m_targetGUID = Reader.ReadGuid();
if (!m_targetGUID.IsEmpty
&& !m_targetGUID.IsPlayer
&& !m_targetGUID.IsPet)
{
Reader.Skip(4);
m_targetName = Reader.ReadCString();
}
if (m_language == Language.Addon)
m_addonPrefix = Reader.ReadCString();
Reader.Skip(4);
m_text = Reader.ReadCString();
m_flags = (ChatMessageFlags)Reader.ReadByte();
if (m_type == ChatMessageType.RaidBossEmote || m_type == ChatMessageType.RaidBossWhisper)
{
m_displayTime = Reader.ReadSingle();
m_suspendEvent = Reader.ReadBoolean();
}
break;
case ChatMessageType.BGSystemNeutral:
case ChatMessageType.BGSystemAlliance:
case ChatMessageType.BGSystemHorde:
m_targetGUID = Reader.ReadGuid();
if (!m_targetGUID.IsEmpty
&& !m_targetGUID.IsPlayer)
{
Reader.Skip(4);
m_targetName = Reader.ReadCString();
}
if (m_language == Language.Addon)
m_addonPrefix = Reader.ReadCString();
Reader.Skip(4);
m_text = Reader.ReadCString();
m_flags = (ChatMessageFlags)Reader.ReadByte();
break;
case ChatMessageType.Achievement:
case ChatMessageType.GuildAchievement:
m_targetGUID = Reader.ReadGuid();
if (m_language == Language.Addon)
m_addonPrefix = Reader.ReadCString();
Reader.Skip(4);
m_text = Reader.ReadCString();
m_flags = (ChatMessageFlags)Reader.ReadByte();
m_achievementId = Reader.ReadUInt32();
break;
case ChatMessageType.WhisperForeign:
Reader.Skip(4);
m_senderName = Reader.ReadCString();
m_targetGUID = Reader.ReadGuid();
if (m_language == Language.Addon)
m_addonPrefix = Reader.ReadCString();
Reader.Skip(4);
m_text = Reader.ReadCString();
m_flags = (ChatMessageFlags)Reader.ReadByte();
break;
default:
if (GameMasterMessage)
{
Reader.Skip(4);
m_senderName = Reader.ReadCString();
}
if (m_type == ChatMessageType.Channel)
m_channel = Reader.ReadCString();
m_targetGUID = Reader.ReadGuid();
if (m_language == Language.Addon)
m_addonPrefix = Reader.ReadCString();
Reader.Skip(4);
m_text = Reader.ReadCString();
m_flags = (ChatMessageFlags)Reader.ReadByte();
break;
}
}