public void Write(WorldPacket data) { data.WriteInt32(ResponseID); data.WriteInt32(ChoiceArtFileID); data.WriteInt32(Flags); data.WriteUInt32(WidgetSetID); data.WriteUInt8(GroupID); data.WriteBits(Answer.GetByteCount(), 9); data.WriteBits(Header.GetByteCount(), 9); data.WriteBits(Description.GetByteCount(), 11); data.WriteBits(Confirmation.GetByteCount(), 7); data.WriteBit(Reward.HasValue); data.FlushBits(); if (Reward.HasValue) { Reward.Value.Write(data); } data.WriteString(Answer); data.WriteString(Header); data.WriteString(Description); data.WriteString(Confirmation); }
public void Write(WorldPacket data) { data.WriteInt32(MailID); data.WriteUInt8(SenderType); data.WriteUInt64(Cod); data.WriteInt32(StationeryID); data.WriteUInt64(SentMoney); data.WriteInt32(Flags); data.WriteFloat(DaysLeft); data.WriteInt32(MailTemplateID); data.WriteUInt32(Attachments.Count); data.WriteBit(SenderCharacter.HasValue); data.WriteBit(AltSenderID.HasValue); data.WriteBits(Subject.GetByteCount(), 8); data.WriteBits(Body.GetByteCount(), 13); data.FlushBits(); Attachments.ForEach(p => p.Write(data)); if (SenderCharacter.HasValue) { data.WritePackedGuid(SenderCharacter.Value); } if (AltSenderID.HasValue) { data.WriteInt32(AltSenderID.Value); } data.WriteString(Subject); data.WriteString(Body); }
public void Write(WorldPacket data) { data.WritePackedGuid(CreatorGUID); data.WriteUInt8(Index); data.WriteUInt32(AzeritePowers.Count); foreach (var id in AzeritePowers) { data.WriteInt32(id); } Item.Write(data); data.WriteBit(Usable); data.WriteBits(Enchants.Count, 4); data.WriteBits(Gems.Count, 2); data.FlushBits(); foreach (var gem in Gems) { gem.Write(data); } for (int i = 0; i < Enchants.Count; ++i) { Enchants[i].Write(data); } }
public void Write(WorldPacket data) { data.WriteBit(IsDeleted); data.WriteBits(Name.Length, 6); for (byte i = 0; i < SharedConst.MaxDeclinedNameCases; ++i) { data.WriteBits(DeclinedNames.name[i].Length, 7); } data.FlushBits(); for (byte i = 0; i < SharedConst.MaxDeclinedNameCases; ++i) { data.WriteString(DeclinedNames.name[i]); } data.WritePackedGuid(AccountID); data.WritePackedGuid(BnetAccountID); data.WritePackedGuid(GuidActual); data.WriteUInt32(VirtualRealmAddress); data.WriteUInt8(RaceID); data.WriteUInt8(Sex); data.WriteUInt8(ClassID); data.WriteUInt8(Level); data.WriteString(Name); }
public void Write(WorldPacket data) { data.WritePackedGuid(CreatorGUID); data.WriteUInt8(Index); data.WriteInt32(AzeritePowers.Count); data.WriteInt32(AzeriteEssences.Count); foreach (var id in AzeritePowers) { data.WriteInt32(id); } Item.Write(data); data.WriteBit(Usable); data.WriteBits(Enchants.Count, 4); data.WriteBits(Gems.Count, 2); data.FlushBits(); foreach (var azeriteEssenceData in AzeriteEssences) { azeriteEssenceData.Write(data); } foreach (var enchantData in Enchants) { enchantData.Write(data); } foreach (var gem in Gems) { gem.Write(data); } }
public void Write(WorldPacket data) { data.WritePackedGuid(Guid); data.WriteInt32(RankID); data.WriteInt32(AreaID); data.WriteInt32(PersonalAchievementPoints); data.WriteInt32(GuildReputation); data.WriteFloat(LastSave); for (byte i = 0; i < 2; i++) { Profession[i].Write(data); } data.WriteUInt32(VirtualRealmAddress); data.WriteUInt8(Status); data.WriteUInt8(Level); data.WriteUInt8(ClassID); data.WriteUInt8(Gender); data.WriteBits(Name.GetByteCount(), 6); data.WriteBits(Note.GetByteCount(), 8); data.WriteBits(OfficerNote.GetByteCount(), 8); data.WriteBit(Authenticated); data.WriteBit(SorEligible); data.WriteString(Name); data.WriteString(Note); data.WriteString(OfficerNote); }
public void Write(WorldPacket data) { data.WriteBit(IsDeleted); data.WriteBits(Name.GetByteCount(), 6); for (byte i = 0; i < SharedConst.MaxDeclinedNameCases; ++i) { data.WriteBits(DeclinedNames.name[i].GetByteCount(), 7); } data.FlushBits(); for (byte i = 0; i < SharedConst.MaxDeclinedNameCases; ++i) { data.WriteString(DeclinedNames.name[i]); } data.WritePackedGuid(AccountID); data.WritePackedGuid(BnetAccountID); data.WritePackedGuid(GuidActual); data.WriteUInt64(GuildClubMemberID); data.WriteUInt32(VirtualRealmAddress); data.WriteUInt8((byte)RaceID); data.WriteUInt8((byte)Sex); data.WriteUInt8((byte)ClassID); data.WriteUInt8(Level); data.WriteString(Name); }
public void WriteCompleteDynamicFieldUpdateMask(int size, WorldPacket data) { data.WriteBits(size, 32); if (size > 32) { if (data.HasUnfinishedBitPack()) { for (int block = 0; block < size / 32; ++block) { data.WriteBits(0xFFFFFFFFu, 32); } } else { for (int block = 0; block < size / 32; ++block) { data.WriteUInt32(0xFFFFFFFFu); } } } else if (size == 32) { data.WriteBits(0xFFFFFFFFu, 32); return; } if ((size % 32) != 0) { data.WriteBits(0xFFFFFFFFu, size % 32); } }
public void WriteUpdateMask(WorldPacket data) { data.WriteBits(_values.Count, 32); if (_values.Count > 32) { if (data.HasUnfinishedBitPack()) { for (int block = 0; block < _values.Count / 32; ++block) { data.WriteBits(_updateMask[block], 32); } } else { for (int block = 0; block < _values.Count / 32; ++block) { data.WriteUInt32(_updateMask[block]); } } } else if (_values.Count == 32) { data.WriteBits(_updateMask.Last(), 32); return; } if ((_values.Count % 32) != 0) { data.WriteBits(_updateMask.Last(), _values.Count % 32); } }
public static void WriteMovementInfo(WorldPacket data, MovementInfo movementInfo) { bool hasTransportData = !movementInfo.transport.guid.IsEmpty(); bool hasFallDirection = movementInfo.HasMovementFlag(MovementFlag.Falling | MovementFlag.FallingFar); bool hasFallData = hasFallDirection || movementInfo.jump.fallTime != 0; bool hasSpline = false; // todo 6.x send this infos data.WritePackedGuid(movementInfo.Guid); data.WriteUInt32(movementInfo.Time); data.WriteFloat(movementInfo.Pos.GetPositionX()); data.WriteFloat(movementInfo.Pos.GetPositionY()); data.WriteFloat(movementInfo.Pos.GetPositionZ()); data.WriteFloat(movementInfo.Pos.GetOrientation()); data.WriteFloat(movementInfo.Pitch); data.WriteFloat(movementInfo.SplineElevation); uint removeMovementForcesCount = 0; data.WriteUInt32(removeMovementForcesCount); uint int168 = 0; data.WriteUInt32(int168); /*for (public uint i = 0; i < removeMovementForcesCount; ++i) * { * _worldPacket << ObjectGuid; * }*/ data.WriteBits((uint)movementInfo.GetMovementFlags(), 30); data.WriteBits((uint)movementInfo.GetMovementFlags2(), 18); data.WriteBit(hasTransportData); data.WriteBit(hasFallData); data.WriteBit(hasSpline); data.WriteBit(0); // HeightChangeFailed data.WriteBit(0); // RemoteTimeValid data.FlushBits(); if (hasTransportData) { WriteTransportInfo(data, movementInfo.transport); } if (hasFallData) { data.WriteUInt32(movementInfo.jump.fallTime); data.WriteFloat(movementInfo.jump.zspeed); data.WriteBit(hasFallDirection); data.FlushBits(); if (hasFallDirection) { data.WriteFloat(movementInfo.jump.sinAngle); data.WriteFloat(movementInfo.jump.cosAngle); data.WriteFloat(movementInfo.jump.xyspeed); } } }
public void Write(WorldPacket data) { data.WriteUInt32(Flags); data.WriteUInt8(AnimTier); data.WriteUInt32(TierTransStartTime); data.WriteInt32(Elapsed); data.WriteUInt32(MoveTime); data.WriteFloat(JumpGravity); data.WriteUInt32(SpecialTime); data.WriteUInt8(Mode); data.WriteUInt8(VehicleExitVoluntary); data.WritePackedGuid(TransportGUID); data.WriteInt8(VehicleSeat); data.WriteBits((byte)Face, 2); data.WriteBits(Points.Count, 16); data.WriteBits(PackedDeltas.Count, 16); data.WriteBit(SplineFilter.HasValue); data.WriteBit(SpellEffectExtraData.HasValue); data.FlushBits(); if (SplineFilter.HasValue) { SplineFilter.Value.Write(data); } switch (Face) { case MonsterMoveType.FacingSpot: data.WriteVector3(FaceSpot); break; case MonsterMoveType.FacingTarget: data.WriteFloat(FaceDirection); data.WritePackedGuid(FaceGUID); break; case MonsterMoveType.FacingAngle: data.WriteFloat(FaceDirection); break; } foreach (Vector3 pos in Points) { data.WriteVector3(pos); } foreach (Vector3 pos in PackedDeltas) { data.WritePackXYZ(pos); } if (SpellEffectExtraData.HasValue) { SpellEffectExtraData.Value.Write(data); } }
public void Write(WorldPacket data) { data.WriteBits(Type, 2); data.WriteBits(UIType, 3); data.WriteBit(CanTradeToTapList); data.FlushBits(); Loot.Write(data); // WorldPackets::Item::ItemInstance data.WriteUInt32(Quantity); data.WriteUInt8(LootItemType); data.WriteUInt8(LootListID); }
public void Write(WorldPacket data) { data.WriteBit(IsLocal); data.WriteBit(IsInternalRealm); data.WriteBits(RealmNameActual.GetByteCount(), 8); data.WriteBits(RealmNameNormalized.GetByteCount(), 8); data.FlushBits(); data.WriteString(RealmNameActual); data.WriteString(RealmNameNormalized); }
public void Write(WorldPacket data) { data.WritePackedGuid(Guid); data.WriteUInt64(GuildClubMemberID); data.WriteUInt8(ListPosition); data.WriteUInt8(RaceId); data.WriteUInt8((byte)ClassId); data.WriteUInt8(SexId); data.WriteUInt8(SkinId); data.WriteUInt8(FaceId); data.WriteUInt8(HairStyle); data.WriteUInt8(HairColor); data.WriteUInt8(FacialHair); foreach (var display in CustomDisplay) { data.WriteUInt8(display); } data.WriteUInt8(ExperienceLevel); data.WriteUInt32(ZoneId); data.WriteUInt32(MapId); data.WriteVector3(PreloadPos); data.WritePackedGuid(GuildGuid); data.WriteUInt32((uint)Flags); data.WriteUInt32((uint)Flags2); data.WriteUInt32(Flags3); data.WriteUInt32(PetCreatureDisplayId); data.WriteUInt32(PetExperienceLevel); data.WriteUInt32(PetCreatureFamilyId); data.WriteUInt32(ProfessionIds[0]); data.WriteUInt32(ProfessionIds[1]); foreach (var visualItem in VisualItems) { visualItem.Write(data); } data.WriteUInt32(LastPlayedTime); data.WriteUInt16(SpecID); data.WriteUInt32(Unknown703); data.WriteUInt32(LastLoginVersion); data.WriteUInt32(Flags4); data.WriteBits(Name.GetByteCount(), 6); data.WriteBit(FirstLogin); data.WriteBit(BoostInProgress); data.WriteBits(unkWod61x, 5); data.FlushBits(); data.WriteString(Name); }
public void Write(WorldPacket data) { data.WritePackedGuid(GuildGUID); data.WriteUInt32(GuildVirtualRealm); data.WriteInt32(ClassRoles); data.WriteInt32(PlayStyle); data.WriteInt32(Availability); data.WriteUInt32(SecondsSinceCreated); data.WriteUInt32(SecondsUntilExpiration); data.WriteBits(GuildName.GetByteCount(), 7); data.WriteBits(Comment.GetByteCount(), 10); data.FlushBits(); data.WriteString(GuildName); data.WriteString(Comment); }
public void Write(WorldPacket data) { Record.Write(data); if (Size.HasValue) { data.WriteUInt32(Size.Value); data.WriteBits(1, 2); } else { data.WriteUInt32(0); data.WriteBits(3, 2); } data.FlushBits(); }
public void Write(WorldPacket data) { data.WriteBits(Name.GetByteCount(), 6); data.WriteBits(VoiceStateID.GetByteCount(), 6); data.WriteBit(FromSocialQueue); data.WriteBit(VoiceChatSilenced); data.WritePackedGuid(GUID); data.WriteUInt8(Status); data.WriteUInt8(Subgroup); data.WriteUInt8(Flags); data.WriteUInt8(RolesAssigned); data.WriteUInt8(Class); data.WriteString(Name); data.WriteString(VoiceStateID); }
public void Write(WorldPacket data) { data.WriteUInt64(DbID); data.WriteUInt32(GarrFollowerID); data.WriteUInt32(Quality); data.WriteUInt32(FollowerLevel); data.WriteUInt32(ItemLevelWeapon); data.WriteUInt32(ItemLevelArmor); data.WriteUInt32(Xp); data.WriteUInt32(Durability); data.WriteUInt32(CurrentBuildingID); data.WriteUInt32(CurrentMissionID); data.WriteInt32(AbilityID.Count); data.WriteUInt32(ZoneSupportSpellID); data.WriteUInt32(FollowerStatus); data.WriteInt32(Health); data.WriteInt8(BoardIndex); data.WriteInt32(HealingTimestamp); AbilityID.ForEach(ability => data.WriteUInt32(ability.Id)); data.WriteBits(CustomName.GetByteCount(), 7); data.FlushBits(); data.WriteString(CustomName); }
public void Write(WorldPacket data) { Record.Write(data); data.WriteUInt32(Size); data.WriteBits((byte)Record.HotfixStatus, 2); data.FlushBits(); }
public void Write(WorldPacket data) { data.WritePackedGuid(Guid); data.WriteUInt32(Species); data.WriteUInt32(CreatureID); data.WriteUInt32(CollarID); data.WriteUInt16(Breed); data.WriteUInt16(Level); data.WriteUInt16(Exp); data.WriteUInt16(Flags); data.WriteUInt32(Power); data.WriteUInt32(Health); data.WriteUInt32(MaxHealth); data.WriteUInt32(Speed); data.WriteUInt8(Quality); data.WriteBits(Name.GetByteCount(), 7); data.WriteBit(OwnerInfo.HasValue); // HasOwnerInfo data.WriteBit(Name.IsEmpty()); // NoRename data.FlushBits(); data.WriteString(Name); if (OwnerInfo.HasValue) { data.WritePackedGuid(OwnerInfo.Value.Guid); data.WriteUInt32(OwnerInfo.Value.PlayerVirtualRealm); // Virtual data.WriteUInt32(OwnerInfo.Value.PlayerNativeRealm); // Native } }
public static void WriteCreateObjectAreaTriggerSpline(Spline spline, WorldPacket data) { data.WriteBits(spline.getPoints().Length, 16); foreach (var point in spline.getPoints()) { data.WriteVector3(point); } }
public void Write(WorldPacket data) { data.WriteBits(ItemID, 20); data.WriteBit(BattlePetSpeciesID.HasValue); data.WriteBits(ItemLevel, 11); data.WriteBit(SuffixItemNameDescriptionID.HasValue); data.FlushBits(); if (BattlePetSpeciesID.HasValue) { data.WriteUInt16(BattlePetSpeciesID.Value); } if (SuffixItemNameDescriptionID.HasValue) { data.WriteUInt16(SuffixItemNameDescriptionID.Value); } }
public void Write(WorldPacket data) { data.WriteUInt32(ID); data.WriteVector3(Destination); data.WriteBit(CrzTeleport); data.WriteBits(StopDistanceTolerance, 3); Move.Write(data); }
public void Write(WorldPacket data) { data.WritePackedGuid(RecruitGUID); data.WriteUInt32(RecruitVirtualRealm); data.WriteInt32(CharacterClass); data.WriteInt32(CharacterGender); data.WriteInt32(CharacterLevel); data.WriteInt32(ClassRoles); data.WriteInt32(PlayStyle); data.WriteInt32(Availability); data.WriteUInt32(SecondsSinceCreated); data.WriteUInt32(SecondsUntilExpiration); data.WriteBits(Name.GetByteCount(), 6); data.WriteBits(Comment.GetByteCount(), 10); data.FlushBits(); data.WriteString(Name); data.WriteString(Comment); }
public void Write(WorldPacket data) { data.WriteBits(Values.Count, 6); data.FlushBits(); foreach (ItemMod itemMod in Values) { itemMod.Write(data); } }
public void Write(WorldPacket data) { data.WritePackedGuid(ID); data.WriteVector3(Origin); data.WriteVector3(Direction); data.WriteUInt32(TransportID); data.WriteFloat(Magnitude); data.WriteBits(Type, 2); data.FlushBits(); }
public void Write(WorldPacket data) { Item.Write(data); data.WriteInt32(Count); data.WriteInt32(Charges); data.WriteInt32(Flags); data.WriteInt32(AuctionItemID); data.WritePackedGuid(Owner); data.WriteUInt64(MinBid); data.WriteUInt64(MinIncrement); data.WriteUInt64(BuyoutPrice); data.WriteInt32(DurationLeft); data.WriteUInt8(DeleteReason); data.WriteBits(Enchantments.Count, 4); data.WriteBits(Gems.Count, 2); data.WriteBit(CensorServerSideInfo); data.WriteBit(CensorBidInfo); data.FlushBits(); foreach (ItemGemData gem in Gems) { gem.Write(data); } foreach (ItemEnchantData enchant in Enchantments) { enchant.Write(data); } if (!CensorServerSideInfo) { data.WritePackedGuid(ItemGuid); data.WritePackedGuid(OwnerAccountID); data.WriteUInt32(EndTime); } if (!CensorBidInfo) { data.WritePackedGuid(Bidder); data.WriteUInt64(BidAmount); } }
public void Write(WorldPacket data) { data.WriteUInt32(Id); data.WriteUInt64(Quantity); data.WritePackedGuid(Player); data.WritePackedTime(Date); data.WriteUInt32(TimeFromStart); data.WriteUInt32(TimeFromCreate); data.WriteBits(Flags, 4); data.FlushBits(); }
public void Write(WorldPacket data) { data.WriteBit(Active); data.WriteBits(Comment.GetByteCount(), 10); data.WriteInt32(PlayStyle); data.WriteInt32(Availability); data.WriteInt32(ClassRoles); data.WriteInt32(LevelRange); data.WriteInt32(SecondsRemaining); data.WriteString(Comment); }
public void Write(WorldPacket data) { data.WriteUInt32(ID); data.WriteUInt32(NextPageID); data.WriteInt32(PlayerConditionID); data.WriteUInt8(Flags); data.WriteBits(Text.Length, 12); data.FlushBits(); data.WriteString(Text); }