public void Write(WorldPacket data) { data.WriteInt32(BonusObjectiveID); data.WriteBit(ObjectiveComplete); data.FlushBits(); }
public void Write(WorldPacket data) { data.WriteUInt32(SpellID); data.WriteBit(Usable); data.FlushBits(); }
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.WriteInt32(Customizations.Count); 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.WriteInt64(LastPlayedTime); data.WriteUInt16(SpecID); data.WriteUInt32(Unknown703); data.WriteUInt32(LastLoginVersion); data.WriteUInt32(Flags4); data.WriteInt32(MailSenders.Count); data.WriteInt32(MailSenderTypes.Count); data.WriteUInt32(OverrideSelectScreenFileDataID); foreach (ChrCustomizationChoice customization in Customizations) { data.WriteUInt32(customization.ChrCustomizationOptionID); data.WriteUInt32(customization.ChrCustomizationChoiceID); } foreach (var mailSenderType in MailSenderTypes) { data.WriteUInt32(mailSenderType); } data.WriteBits(Name.GetByteCount(), 6); data.WriteBit(FirstLogin); data.WriteBit(BoostInProgress); data.WriteBits(unkWod61x, 5); foreach (string str in MailSenders) { data.WriteBits(str.GetByteCount() + 1, 6); } data.FlushBits(); foreach (string str in MailSenders) { if (!str.IsEmpty()) { data.WriteCString(str); } } data.WriteString(Name); }
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.WriteInt32(Unknown830.Count); data.WriteBits(Name.GetByteCount(), 6); data.WriteBit(FirstLogin); data.WriteBit(BoostInProgress); data.WriteBits(unkWod61x, 5); foreach (string str in Unknown830) { data.WriteBits(str.GetByteCount() + 1, 6); } data.FlushBits(); foreach (string str in Unknown830) { if (!str.IsEmpty()) { data.WriteCString(str); } } data.WriteString(Name); }
public void Write(WorldPacket data) { data.WriteInt32(GarrTypeID); data.WriteInt32(GarrSiteID); data.WriteInt32(GarrSiteLevelID); data.WriteUInt32(Buildings.Count); data.WriteUInt32(Plots.Count); data.WriteUInt32(Followers.Count); data.WriteUInt32(Missions.Count); data.WriteUInt32(MissionRewards.Count); data.WriteUInt32(MissionOvermaxRewards.Count); data.WriteUInt32(MissionAreaBonuses.Count); data.WriteUInt32(Talents.Count); data.WriteUInt32(CanStartMission.Count); data.WriteUInt32(ArchivedMissions.Count); data.WriteInt32(NumFollowerActivationsRemaining); data.WriteUInt32(NumMissionsStartedToday); foreach (GarrisonPlotInfo plot in Plots) { plot.Write(data); } foreach (GarrisonMission mission in Missions) { mission.Write(data); } foreach (List <GarrisonMissionReward> missionReward in MissionRewards) { data.WriteUInt32(missionReward.Count); foreach (GarrisonMissionReward missionRewardItem in missionReward) { missionRewardItem.Write(data); } } foreach (List <GarrisonMissionReward> missionReward in MissionOvermaxRewards) { data.WriteUInt32(missionReward.Count); foreach (GarrisonMissionReward missionRewardItem in missionReward) { missionRewardItem.Write(data); } } foreach (GarrisonMissionAreaBonus areaBonus in MissionAreaBonuses) { areaBonus.Write(data); } foreach (GarrisonTalent talent in Talents) { talent.Write(data); } foreach (var id in ArchivedMissions) { data.WriteInt32(id); } foreach (GarrisonBuildingInfo building in Buildings) { building.Write(data); } foreach (bool canStartMission in CanStartMission) { data.WriteBit(canStartMission); } data.FlushBits(); foreach (GarrisonFollower follower in Followers) { follower.Write(data); } }
public void Write(WorldPacket data) { data.WriteBit(Item.HasValue); data.WriteBits(Enchantments.Count, 4); data.WriteBits(Gems.Count, 2); data.WriteBit(MinBid.HasValue); data.WriteBit(MinIncrement.HasValue); data.WriteBit(BuyoutPrice.HasValue); data.WriteBit(UnitPrice.HasValue); data.WriteBit(CensorServerSideInfo); data.WriteBit(CensorBidInfo); data.WriteBit(AuctionBucketKey.HasValue); if (!CensorBidInfo) { data.WriteBit(Bidder.HasValue); data.WriteBit(BidAmount.HasValue); } data.FlushBits(); if (Item.HasValue) { Item.Value.Write(data); } data.WriteInt32(Count); data.WriteInt32(Charges); data.WriteUInt32(Flags); data.WriteUInt32(AuctionID); data.WritePackedGuid(Owner); data.WriteInt32(DurationLeft); data.WriteUInt8(DeleteReason); foreach (ItemEnchantData enchant in Enchantments) { enchant.Write(data); } if (MinBid.HasValue) { data.WriteUInt64(MinBid.Value); } if (MinIncrement.HasValue) { data.WriteUInt64(MinIncrement.Value); } if (BuyoutPrice.HasValue) { data.WriteUInt64(BuyoutPrice.Value); } if (UnitPrice.HasValue) { data.WriteUInt64(UnitPrice.Value); } if (!CensorServerSideInfo) { data.WritePackedGuid(ItemGuid); data.WritePackedGuid(OwnerAccountID); data.WriteUInt32(EndTime); } if (!CensorBidInfo) { if (Bidder.HasValue) { data.WritePackedGuid(Bidder.Value); } if (BidAmount.HasValue) { data.WriteUInt64(BidAmount.Value); } } foreach (ItemGemData gem in Gems) { gem.Write(data); } if (AuctionBucketKey.HasValue) { AuctionBucketKey.Value.Write(data); } }
public static void WriteCreateObjectSplineDataBlock(MoveSpline moveSpline, WorldPacket data) { data.WriteUInt32(moveSpline.GetId()); // ID if (!moveSpline.isCyclic()) // Destination { data.WriteVector3(moveSpline.FinalDestination()); } else { data.WriteVector3(Vector3.Zero); } bool hasSplineMove = data.WriteBit(!moveSpline.Finalized() && !moveSpline.splineIsFacingOnly); data.FlushBits(); if (hasSplineMove) { data.WriteUInt32((uint)moveSpline.splineflags.Flags); // SplineFlags data.WriteInt32(moveSpline.timePassed()); // Elapsed data.WriteUInt32(moveSpline.Duration()); // Duration data.WriteFloat(1.0f); // DurationModifier data.WriteFloat(1.0f); // NextDurationModifier data.WriteBits((byte)moveSpline.facing.type, 2); // Face bool HasJumpGravity = data.WriteBit(moveSpline.splineflags.hasFlag(SplineFlag.Parabolic | SplineFlag.Animation)); // HasJumpGravity bool HasSpecialTime = data.WriteBit(moveSpline.splineflags.hasFlag(SplineFlag.Parabolic) && moveSpline.effect_start_time < moveSpline.Duration()); // HasSpecialTime data.WriteBits(moveSpline.getPath().Length, 16); data.WriteBits((byte)moveSpline.spline.m_mode, 2); // Mode data.WriteBit(0); // HasSplineFilter data.WriteBit(moveSpline.spell_effect_extra.HasValue); // HasSpellEffectExtraData //if (HasSplineFilterKey) //{ // data << uint32(FilterKeysCount); // for (var i = 0; i < FilterKeysCount; ++i) // { // data << float(In); // data << float(Out); // } // data.WriteBits(FilterFlags, 2); // data.FlushBits(); //} switch (moveSpline.facing.type) { case MonsterMoveType.FacingSpot: data.WriteVector3(moveSpline.facing.f); // FaceSpot break; case MonsterMoveType.FacingTarget: data.WritePackedGuid(moveSpline.facing.target); // FaceGUID break; case MonsterMoveType.FacingAngle: data.WriteFloat(moveSpline.facing.angle); // FaceDirection break; } if (HasJumpGravity) { data.WriteFloat(moveSpline.vertical_acceleration); // JumpGravity } if (HasSpecialTime) { data.WriteUInt32(moveSpline.effect_start_time); // SpecialTime } foreach (var vec in moveSpline.getPath()) { data.WriteVector3(vec); } if (moveSpline.spell_effect_extra.HasValue) { data.WritePackedGuid(moveSpline.spell_effect_extra.Value.Target); data.WriteUInt32(moveSpline.spell_effect_extra.Value.SpellVisualId); data.WriteUInt32(moveSpline.spell_effect_extra.Value.ProgressCurveId); data.WriteUInt32(moveSpline.spell_effect_extra.Value.ParabolicCurveId); } } }
public void Write(WorldPacket data) { data.WriteUInt32(Flags); data.WriteUInt8(AnimTier); data.WriteUInt32(TierTransStartTime); data.WriteInt32(Elapsed); data.WriteUInt32(MoveTime); data.WriteUInt32(FadeObjectTime); 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.WriteBit(JumpExtraData.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); } if (JumpExtraData.HasValue) { JumpExtraData.Value.Write(data); } }