public override void Read(StreamHandler reader) { Entity = reader.ReadGuid(); Model = reader.ReadUInt32(); Race = (Races)reader.ReadByte(); Gender = (Genders)reader.ReadByte(); Class = (Classes)reader.ReadByte(); Skin = reader.ReadByte(); Face = reader.ReadByte(); Hair = reader.ReadByte(); HairColor = reader.ReadByte(); FaceFeatures = reader.ReadByte(); Guild = reader.ReadGuid(); Head = reader.ReadUInt32(); Shoulders = reader.ReadUInt32(); Body = reader.ReadUInt32(); Chest = reader.ReadUInt32(); Waist = reader.ReadUInt32(); Legs = reader.ReadUInt32(); Feet = reader.ReadUInt32(); Wrists = reader.ReadUInt32(); Hands = reader.ReadUInt32(); Back = reader.ReadUInt32(); Tabard = reader.ReadUInt32(); }
public override void Read(StreamHandler reader) { Entity = reader.ReadGuid(); Model = reader.ReadUInt32(); Race = (Races)reader.ReadByte(); Gender = (Genders)reader.ReadByte(); Class = (Classes)reader.ReadByte(); Skin = reader.ReadByte(); Face = reader.ReadByte(); Hair = reader.ReadByte(); HairColor = reader.ReadByte(); FaceFeatures = reader.ReadByte(); Guild = reader.ReadGuid(); Head = reader.ReadUInt32(); Shoulders = reader.ReadUInt32(); Body = reader.ReadUInt32(); Chest = reader.ReadUInt32(); Waist = reader.ReadUInt32(); Legs = reader.ReadUInt32(); Feet = reader.ReadUInt32(); Wrists = reader.ReadUInt32(); Hands = reader.ReadUInt32(); Back = reader.ReadUInt32(); Tabard = reader.ReadUInt32(); }
public void Read(StreamHandler Reader) { TargetGuid = Reader.ReadGuid(); MissCondition = (CastMissReason)Reader.ReadByte(); if (MissCondition == CastMissReason.Reflect) { ReflectResult = Reader.ReadByte(); } }
public override void Read(StreamHandler reader) { ContainerSlot = (InventorySlot)reader.ReadByte(); Slot = (InventorySlot)reader.ReadByte(); CastId = reader.ReadByte(); SpellId = reader.ReadUInt32(); ItemGuid = reader.ReadGuid(); GlyphSlot = reader.ReadUInt32(); UnkFlags = reader.ReadByte(); TargetData.Read(reader); }
public override void Read(StreamHandler reader) { ContainerSlot = (InventorySlot)reader.ReadByte(); Slot = (InventorySlot)reader.ReadByte(); CastId = reader.ReadByte(); SpellId = reader.ReadUInt32(); ItemGuid = reader.ReadGuid(); GlyphSlot = reader.ReadUInt32(); UnkFlags = reader.ReadByte(); TargetData.Read(reader); }
public override void Read(StreamHandler reader) { this.Guid = reader.ReadGuid(); this.Type = (LootType)reader.ReadByte(); this.Gold = new Money(reader.ReadUInt32()); byte itemCount = reader.ReadByte(); byte currencyCount = reader.ReadByte(); for (int i = 0; i < itemCount; ++i) { Item item = reader.ReadStruct<Item>(); Items.Add(item); } for (int i = 0; i < currencyCount; ++i) { Currency currency = reader.ReadStruct<Currency>(); Currencies.Add(currency); } }
public override void Read(StreamHandler reader) { this.Guid = reader.ReadGuid(); this.Type = (LootType)reader.ReadByte(); this.Gold = new Money(reader.ReadUInt32()); byte itemCount = reader.ReadByte(); byte currencyCount = reader.ReadByte(); for (int i = 0; i < itemCount; ++i) { Item item = reader.ReadStruct <Item>(); Items.Add(item); } for (int i = 0; i < currencyCount; ++i) { Currency currency = reader.ReadStruct <Currency>(); Currencies.Add(currency); } }
protected override void PackedRead(StreamHandler reader) { PlayerGuid = reader.ReadGuid(); }
protected sealed override void PackedRead(StreamHandler reader) { this.Guid = reader.ReadGuid(); }
/// <summary> /// Reads the spline info from the current stream, /// advancing the current position by spline info's size. /// </summary> public static SplineInfo ReadSplineInfo(this StreamHandler Reader) { var info = new SplineInfo(); var flags = info.Flags = (SplineFlags)Reader.ReadUInt32(); if ((flags & SplineFlags.FinalPoint) != SplineFlags.None) { info.FinalPoint = Reader.ReadVector3(); } if ((flags & SplineFlags.FinalTarget) != SplineFlags.None) { info.FinalGuid = Reader.ReadGuid(); } if ((flags & SplineFlags.FinalOrient) != SplineFlags.None) { info.FinalRotation = Reader.ReadSingle(); } info.CurrentTime = Reader.ReadUInt32(); info.FullTime = Reader.ReadUInt32(); info.Unknown1 = Reader.ReadUInt32(); info.DurationMultiplier = Reader.ReadSingle(); info.UnknownFloat2 = Reader.ReadSingle(); info.UnknownFloat3 = Reader.ReadSingle(); info.Unknown2 = Reader.ReadUInt32(); int count = Reader.ReadInt32(); var points = info.Points; points.Capacity = count; for (int i = 0; i < count; ++i) { points.Add(Reader.ReadVector3()); } if ((flags & (SplineFlags.Flying | SplineFlags.CatMullRom)) != 0) { if ((flags & SplineFlags.Cyclic) != 0) { points.RemoveAt(0); if ((flags & SplineFlags.EnterCycle) != 0) { points.RemoveAt(0); } points.RemoveAt(points.Count - 1); points.RemoveAt(points.Count - 1); } else { points.RemoveAt(0); points.RemoveAt(points.Count - 1); } } info.SplineMode = (SplineMode)Reader.ReadByte(); info.EndPoint = Reader.ReadVector3(); return(info); }
public override void Read(StreamHandler Reader) { Caster = Reader.ReadPackedGuid(); CastInvoker = Reader.ReadPackedGuid(); CastId = Reader.ReadByte(); SpellId = Reader.ReadUInt32(); Flags = (CastFlags)Reader.ReadUInt32(); Unk43 = Reader.ReadUInt32(); CastTime = Reader.ReadUInt32(); byte hits = Reader.ReadByte(); Hits.Capacity = hits; for (byte i = 0; i < hits; ++i) Hits.Add(Reader.ReadGuid()); byte misses = Reader.ReadByte(); Misses.Capacity = misses; for (byte i = 0; i < misses; ++i) { var miss = new MissData(); miss.Read(Reader); Misses.Add(miss); } TargetData.Read(Reader); if ((Flags & CastFlags.PredictedPower) != 0) PredictedPower = Reader.ReadUInt32(); if ((Flags & CastFlags.RuneStates) != 0) { RunesBefore = (RuneStates)Reader.ReadByte(); RunesAfter = (RuneStates)Reader.ReadByte(); for (int i = 0; i < RuneCooldowns.Length; ++i) RuneCooldowns[i] = Reader.ReadByte(); } if ((Flags & CastFlags.Unk0x00020000) != 0) { Unk0x20000_Float = Reader.ReadSingle(); Unk0x20000_UInt32 = Reader.ReadUInt32(); } if ((Flags & CastFlags.Ammo) != 0) { ProjectileDisplayId = Reader.ReadUInt32(); ProjectileInventoryType = (InventorySlotType)Reader.ReadUInt32(); } if ((Flags & CastFlags.Unk0x00080000) != 0) { Unk0x80000_UInt32_1 = Reader.ReadUInt32(); Unk0x80000_UInt32_2 = Reader.ReadUInt32(); } if ((TargetData.Flags & SpellCastTargetFlags.DestLocation) != 0) DestLocationCounter = Reader.ReadByte(); if ((TargetData.Flags & SpellCastTargetFlags.Unk4) != 0) { uint count = Reader.ReadUInt32(); Unk4_Count = count; Unk4_List.Capacity = (int)count; for (uint i = 0; i < count; ++i) { Vector3 v3 = Reader.ReadVector3(); WowGuid guid = Reader.ReadGuid(); Unk4_List.Add(new KeyValuePair<WowGuid, Vector3>(guid, v3)); if (guid.IsEmpty) break; } } }
public void Read(StreamHandler Reader) { TargetGuid = Reader.ReadGuid(); MissCondition = (CastMissReason)Reader.ReadByte(); if (MissCondition == CastMissReason.Reflect) ReflectResult = Reader.ReadByte(); }
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; } }
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) { Caster = Reader.ReadPackedGuid(); CastInvoker = Reader.ReadPackedGuid(); CastId = Reader.ReadByte(); SpellId = Reader.ReadUInt32(); Flags = (CastFlags)Reader.ReadUInt32(); Unk43 = Reader.ReadUInt32(); CastTime = Reader.ReadUInt32(); byte hits = Reader.ReadByte(); Hits.Capacity = hits; for (byte i = 0; i < hits; ++i) { Hits.Add(Reader.ReadGuid()); } byte misses = Reader.ReadByte(); Misses.Capacity = misses; for (byte i = 0; i < misses; ++i) { var miss = new MissData(); miss.Read(Reader); Misses.Add(miss); } TargetData.Read(Reader); if ((Flags & CastFlags.PredictedPower) != 0) { PredictedPower = Reader.ReadUInt32(); } if ((Flags & CastFlags.RuneStates) != 0) { RunesBefore = (RuneStates)Reader.ReadByte(); RunesAfter = (RuneStates)Reader.ReadByte(); for (int i = 0; i < RuneCooldowns.Length; ++i) { RuneCooldowns[i] = Reader.ReadByte(); } } if ((Flags & CastFlags.Unk0x00020000) != 0) { Unk0x20000_Float = Reader.ReadSingle(); Unk0x20000_UInt32 = Reader.ReadUInt32(); } if ((Flags & CastFlags.Ammo) != 0) { ProjectileDisplayId = Reader.ReadUInt32(); ProjectileInventoryType = (InventorySlotType)Reader.ReadUInt32(); } if ((Flags & CastFlags.Unk0x00080000) != 0) { Unk0x80000_UInt32_1 = Reader.ReadUInt32(); Unk0x80000_UInt32_2 = Reader.ReadUInt32(); } if ((TargetData.Flags & SpellCastTargetFlags.DestLocation) != 0) { DestLocationCounter = Reader.ReadByte(); } if ((TargetData.Flags & SpellCastTargetFlags.Unk4) != 0) { uint count = Reader.ReadUInt32(); Unk4_Count = count; Unk4_List.Capacity = (int)count; for (uint i = 0; i < count; ++i) { Vector3 v3 = Reader.ReadVector3(); WowGuid guid = Reader.ReadGuid(); Unk4_List.Add(new KeyValuePair <WowGuid, Vector3>(guid, v3)); if (guid.IsEmpty) { break; } } } }
protected override void PackedRead(StreamHandler reader) { PlayerGuid = reader.ReadGuid(); GuildGuid = reader.ReadGuid(); }
protected override void PackedRead(StreamHandler reader) { this.Unit = reader.ReadGuid(); }
protected override void PackedRead(StreamHandler reader) { this.Player = reader.ReadGuid(); }