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(); } } }
public override void Read(StreamHandler reader) { this.UpdateType = (LFGUpdateType)reader.ReadByte(); this.ExtraData = reader.ReadBoolean(); if (ExtraData) { this.Queued = reader.ReadBoolean(); reader.Skip(2); // 2 bools uint count = reader.ReadByte(); Dungeons = new DungeonEntry[count]; for (uint i = 0; i < count; ++i) { Dungeons[i] = new DungeonEntry(reader.ReadUInt32()); } this.Comment = reader.ReadCString(); } }
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(); } }
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(); } }
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; } }
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(); } }
public override void Read(StreamHandler reader) { this.UpdateType = (LFGUpdateType)reader.ReadByte(); this.ExtraData = reader.ReadBoolean(); if (ExtraData) { this.Queued = reader.ReadBoolean(); reader.Skip(2); // 2 bools uint count = reader.ReadByte(); Dungeons = new DungeonEntry[count]; for (uint i = 0; i < count; ++i) Dungeons[i] = new DungeonEntry(reader.ReadUInt32()); this.Comment = reader.ReadCString(); } }
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; } }