public AuctionBucketKey(WorldPacket data) { data.ResetBitPos(); ItemID = data.ReadBits <uint>(20); if (data.HasBit()) { BattlePetSpeciesID.HasValue = true; } ItemLevel = data.ReadBits <ushort>(11); if (data.HasBit()) { SuffixItemNameDescriptionID.HasValue = true; } if (BattlePetSpeciesID.HasValue) { BattlePetSpeciesID.Set(data.ReadUInt16()); } if (SuffixItemNameDescriptionID.HasValue) { SuffixItemNameDescriptionID.Set(data.ReadUInt16()); } }
public static MovementInfo ReadMovementInfo(WorldPacket data) { var movementInfo = new MovementInfo(); movementInfo.Guid = data.ReadPackedGuid(); movementInfo.Time = data.ReadUInt32(); float x = data.ReadFloat(); float y = data.ReadFloat(); float z = data.ReadFloat(); float o = data.ReadFloat(); movementInfo.Pos.Relocate(x, y, z, o); movementInfo.Pitch = data.ReadFloat(); movementInfo.SplineElevation = data.ReadFloat(); uint removeMovementForcesCount = data.ReadUInt32(); uint moveIndex = data.ReadUInt32(); for (uint i = 0; i < removeMovementForcesCount; ++i) { data.ReadPackedGuid(); } // ResetBitReader movementInfo.SetMovementFlags((MovementFlag)data.ReadBits <uint>(30)); movementInfo.SetMovementFlags2((MovementFlag2)data.ReadBits <uint>(18)); bool hasTransport = data.HasBit(); bool hasFall = data.HasBit(); bool hasSpline = data.HasBit(); // todo 6.x read this infos data.ReadBit(); // HeightChangeFailed data.ReadBit(); // RemoteTimeValid if (hasTransport) { ReadTransportInfo(data, ref movementInfo.transport); } if (hasFall) { movementInfo.jump.fallTime = data.ReadUInt32(); movementInfo.jump.zspeed = data.ReadFloat(); // ResetBitReader bool hasFallDirection = data.HasBit(); if (hasFallDirection) { movementInfo.jump.sinAngle = data.ReadFloat(); movementInfo.jump.cosAngle = data.ReadFloat(); movementInfo.jump.xyspeed = data.ReadFloat(); } } return(movementInfo); }
public void Read(WorldPacket data) { MailID = data.ReadInt32(); uint bodyLength = data.ReadBits <uint>(13); uint subjectLength = data.ReadBits <uint>(9); MailBody = data.ReadString(bodyLength); MailSubject = data.ReadString(subjectLength); }
public void Read(WorldPacket data) { uint prefixLen = data.ReadBits <uint>(5); uint textLen = data.ReadBits <uint>(8); IsLogged = data.HasBit(); Type = (ChatMsg)data.ReadInt32(); Prefix = data.ReadString(prefixLen); Text = data.ReadString(textLen); }
public void Read(WorldPacket data) { EventID = data.ReadUInt64(); InviteID = data.ReadUInt64(); EventTitle = data.ReadString(data.ReadBits <byte>(8)); }
public void Read(WorldPacket data) { uint field_0Length = data.ReadBits <uint>(7); field_104 = data.ReadPackedGuid(); field_0 = data.ReadString(field_0Length); }
public void Read(WorldPacket data) { RideTicket = new RideTicket(); RideTicket.Read(data); Comment = data.ReadString(data.ReadBits <uint>(9)); }
public void Read(WorldPacket data) { ClubFinderPostingID = data.ReadUInt64(); ClubID = data.ReadUInt64(); ClubFinderGUID = data.ReadPackedGuid(); ClubName = data.ReadString(data.ReadBits <uint>(12)); }
public void Read(WorldPacket data) { ClubID = data.ReadUInt64(); EventID = data.ReadUInt64(); ModeratorID = data.ReadUInt64(); EventType = data.ReadUInt8(); TextureID = data.ReadUInt32(); Time = data.ReadPackedTime(); Flags = data.ReadUInt32(); byte titleLen = data.ReadBits <byte>(8); ushort descLen = data.ReadBits <ushort>(11); Title = data.ReadString(titleLen); Description = data.ReadString(descLen); }
public void Read(WorldPacket data) { RideTicket.Read(data); GroupFinderActivityID = data.ReadUInt32(); LastTitleAuthorGuid = data.ReadPackedGuid(); LastDescriptionAuthorGuid = data.ReadPackedGuid(); LastVoiceChatAuthorGuid = data.ReadPackedGuid(); byte titleLength = data.ReadBits <byte>(8); byte descriptionLength = data.ReadBits <byte>(11); byte voiceChatLength = data.ReadBits <byte>(8); Title = data.ReadString(titleLength); Description = data.ReadString(descriptionLength); VoiceChat = data.ReadString(voiceChatLength); }
public void Read(WorldPacket data) { byte nameLength = data.ReadBits <byte>(8); GuildID = data.ReadPackedGuid(); GuildName = data.ReadString(nameLength); }
public void Read(WorldPacket data) { data.ResetBitPos(); LootItemType = (LootItemType)data.ReadBits <byte>(2); Item = new ItemInstance(); Item.Read(data); Quantity = data.ReadUInt32(); }
public AuctionListFilterClass(WorldPacket data) { ItemClass = data.ReadInt32(); uint subClassFilterCount = data.ReadBits <uint>(5); for (var i = 0; i < subClassFilterCount; ++i) { SubClassFilters[i] = new AuctionListFilterSubClass(data); } }
public void Read(WorldPacket data) { data.ResetBitPos(); uint nameLength = data.ReadBits <uint>(10); uint versionLength = data.ReadBits <uint>(10); Loaded = data.HasBit(); Disabled = data.HasBit(); if (nameLength > 1) { Name = data.ReadString(nameLength - 1); data.ReadUInt8(); // null terminator } if (versionLength > 1) { Version = data.ReadString(versionLength - 1); data.ReadUInt8(); // null terminator } }
public void Read(WorldPacket data) { byte titleLength = data.ReadBits <byte>(8); ushort descriptionLength = data.ReadBits <ushort>(11); EventType = data.ReadUInt8(); TextureID = data.ReadInt32(); Time = data.ReadPackedTime(); Flags = data.ReadUInt32(); var InviteCount = data.ReadUInt32(); Title = data.ReadString(titleLength); Description = data.ReadString(descriptionLength); for (var i = 0; i < InviteCount; ++i) { CalendarAddEventInviteInfo invite = new CalendarAddEventInviteInfo(); invite.Read(data); Invites[i] = invite; } }
public void Read(WorldPacket data) { MinLevel = data.ReadInt32(); MaxLevel = data.ReadInt32(); RaceFilter = data.ReadInt64(); ClassFilter = data.ReadInt32(); uint nameLength = data.ReadBits <uint>(6); uint virtualRealmNameLength = data.ReadBits <uint>(9); uint guildNameLength = data.ReadBits <uint>(7); uint guildVirtualRealmNameLength = data.ReadBits <uint>(9); uint wordsCount = data.ReadBits <uint>(3); ShowEnemies = data.HasBit(); ShowArenaPlayers = data.HasBit(); ExactName = data.HasBit(); ServerInfo.HasValue = data.HasBit(); data.ResetBitPos(); for (int i = 0; i < wordsCount; ++i) { Words.Add(data.ReadString(data.ReadBits <uint>(7))); data.ResetBitPos(); } Name = data.ReadString(nameLength); VirtualRealmName = data.ReadString(virtualRealmNameLength); Guild = data.ReadString(guildNameLength); GuildVirtualRealmName = data.ReadString(guildVirtualRealmNameLength); if (ServerInfo.HasValue) { ServerInfo.Value.Read(data); } }
public void Read(WorldPacket data) { var itemModListCount = data.ReadBits <uint>(6); data.ResetBitPos(); for (var i = 0; i < itemModListCount; ++i) { var itemMod = new ItemMod(); itemMod.Read(data); Values[i] = itemMod; } }
public InvUpdate(WorldPacket data) { Items = new List <InvItem>(); int size = data.ReadBits <int>(2); for (int i = 0; i < size; ++i) { var item = new InvItem { ContainerSlot = data.ReadUInt8(), Slot = data.ReadUInt8() }; Items.Add(item); } }
public void Read(WorldPacket data) { Timestamp = data.ReadInt32(); AuthorGUID = data.ReadPackedGuid(); bool hasClubID = data.HasBit(); bool hasChannelGUID = data.HasBit(); bool hasRealmAddress = data.HasBit(); bool hasSlashCmd = data.HasBit(); uint textLength = data.ReadBits <uint>(12); if (hasClubID) { ClubID.HasValue = true; ClubID.Value = data.ReadUInt64(); } if (hasChannelGUID) { ChannelGUID.HasValue = true; ChannelGUID.Value = data.ReadPackedGuid(); } if (hasRealmAddress) { RealmAddress.HasValue = true; RealmAddress.Value.VirtualRealmAddress = data.ReadUInt32(); RealmAddress.Value.field_4 = data.ReadUInt16(); RealmAddress.Value.field_6 = data.ReadUInt8(); } if (hasSlashCmd) { SlashCmd.HasValue = true; SlashCmd.Value = data.ReadInt32(); } Text = data.ReadString(textLength); }
public void Read(WorldPacket data) { Command = data.ReadUInt32(); ChannelID = data.ReadUInt32(); MessageLog = data.ReadString(data.ReadBits <uint>(12)); }
public AuctionSortDef(WorldPacket data) { data.ResetBitPos(); SortOrder = (AuctionHouseSortOrder)data.ReadBits <uint>(4); ReverseSort = data.HasBit(); }
public void Read(WorldPacket data) { PetID = data.ReadPackedGuid(); PetName = data.ReadString(data.ReadBits <byte>(8)); }
public SupportTicketChatLine(WorldPacket data) { Timestamp = data.ReadUInt32(); Text = data.ReadString(data.ReadBits <uint>(12)); }
public void Read(WorldPacket data) { Timestamp = data.ReadUInt32(); Text = data.ReadString(data.ReadBits <uint>(12)); }