public void Write(WorldPacket data) { data.WriteInt32(PetitionID); data.WritePackedGuid(Petitioner); data.WriteInt32(MinSignatures); data.WriteInt32(MaxSignatures); data.WriteInt32(DeadLine); data.WriteInt32(IssueDate); data.WriteInt32(AllowedGuildID); data.WriteInt32(AllowedClasses); data.WriteInt32(AllowedRaces); data.WriteInt16(AllowedGender); data.WriteInt32(AllowedMinLevel); data.WriteInt32(AllowedMaxLevel); data.WriteInt32(NumChoices); data.WriteInt32(StaticType); data.WriteUInt32(Muid); data.WriteBits(Title.GetByteCount(), 7); data.WriteBits(BodyText.GetByteCount(), 12); for (byte i = 0; i < 10; i++) { data.WriteBits(Choicetext[i].GetByteCount(), 6); } data.FlushBits(); for (byte i = 0; i < 10; i++) { data.WriteString(Choicetext[i]); } data.WriteString(Title); data.WriteString(BodyText); }
public void Write(WorldPacket data) { data.WriteInt32(EntryID); data.WriteInt32(EventValue); }
public void Write(WorldPacket data) { data.WriteInt32(GarrFollowerTypeID); data.WriteUInt32(Count); }
public void Write(WorldPacket data) { Item = new ItemInstance(); Item.Write(data); data.WriteInt32(Quantity); }
public void Write(WorldPacket data) { data.WriteInt32(SoulbindConduitID); data.WriteInt32(SoulbindConduitRank); }
public void Write(WorldPacket data) { data.WritePackedGuid(GuildGUID); data.WriteInt32(NumGuildMembers); data.WriteInt32(AchievementPoints); }
public void Write(WorldPacket data) { data.WriteInt32(Index); data.WriteInt32(Standing); }
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.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); } }
public void Write(WorldPacket data) { data.WriteInt32(PersonalRating); data.WriteInt32(Ranking); data.WriteInt32(SeasonPlayed); data.WriteInt32(SeasonWon); data.WriteInt32(Unused1); data.WriteInt32(Unused2); data.WriteInt32(WeeklyPlayed); data.WriteInt32(WeeklyWon); data.WriteInt32(BestWeeklyRating); data.WriteInt32(LastWeeksBestRating); data.WriteInt32(BestSeasonRating); data.WriteInt32(PvpTierID); data.WriteInt32(Unused3); data.WriteBit(Unused4); data.FlushBits(); }
public void Write(WorldPacket data) { data.WriteInt32(PvpStatID); data.WriteUInt32(PvpStatValue); }
public override void Write() { WorldPacket attackRoundInfo = new WorldPacket(); attackRoundInfo.WriteUInt32((uint)hitInfo); attackRoundInfo.WritePackedGuid(AttackerGUID); attackRoundInfo.WritePackedGuid(VictimGUID); attackRoundInfo.WriteInt32(Damage); attackRoundInfo.WriteInt32(OriginalDamage); attackRoundInfo.WriteInt32(OverDamage); attackRoundInfo.WriteUInt8((byte)(SubDmg.HasValue ? 1 : 0)); if (SubDmg.HasValue) { attackRoundInfo.WriteInt32(SubDmg.Value.SchoolMask); attackRoundInfo.WriteFloat(SubDmg.Value.FDamage); attackRoundInfo.WriteInt32(SubDmg.Value.Damage); if (hitInfo.HasAnyFlag(HitInfo.FullAbsorb | HitInfo.PartialAbsorb)) { attackRoundInfo.WriteInt32(SubDmg.Value.Absorbed); } if (hitInfo.HasAnyFlag(HitInfo.FullResist | HitInfo.PartialResist)) { attackRoundInfo.WriteInt32(SubDmg.Value.Resisted); } } attackRoundInfo.WriteUInt8(VictimState); attackRoundInfo.WriteUInt32(AttackerState); attackRoundInfo.WriteUInt32(MeleeSpellID); if (hitInfo.HasAnyFlag(HitInfo.Block)) { attackRoundInfo.WriteInt32(BlockAmount); } if (hitInfo.HasAnyFlag(HitInfo.RageGain)) { attackRoundInfo.WriteInt32(RageGained); } if (hitInfo.HasAnyFlag(HitInfo.Unk1)) { attackRoundInfo.WriteUInt32(UnkState.State1); attackRoundInfo.WriteFloat(UnkState.State2); attackRoundInfo.WriteFloat(UnkState.State3); attackRoundInfo.WriteFloat(UnkState.State4); attackRoundInfo.WriteFloat(UnkState.State5); attackRoundInfo.WriteFloat(UnkState.State6); attackRoundInfo.WriteFloat(UnkState.State7); attackRoundInfo.WriteFloat(UnkState.State8); attackRoundInfo.WriteFloat(UnkState.State9); attackRoundInfo.WriteFloat(UnkState.State10); attackRoundInfo.WriteFloat(UnkState.State11); attackRoundInfo.WriteUInt32(UnkState.State12); } if (hitInfo.HasAnyFlag(HitInfo.Block | HitInfo.Unk12)) { attackRoundInfo.WriteFloat(Unk); } attackRoundInfo.WriteUInt8((byte)ContentTuning.TuningType); attackRoundInfo.WriteUInt8(ContentTuning.TargetLevel); attackRoundInfo.WriteUInt8(ContentTuning.Expansion); attackRoundInfo.WriteUInt8(ContentTuning.TargetMinScalingLevel); attackRoundInfo.WriteUInt8(ContentTuning.TargetMaxScalingLevel); attackRoundInfo.WriteInt16(ContentTuning.PlayerLevelDelta); attackRoundInfo.WriteInt8(ContentTuning.TargetScalingLevelDelta); attackRoundInfo.WriteUInt16(ContentTuning.PlayerItemLevel); attackRoundInfo.WriteUInt16(ContentTuning.TargetItemLevel); attackRoundInfo.WriteUInt16(ContentTuning.ScalingHealthItemLevelCurveID); attackRoundInfo.WriteUInt8((byte)(ContentTuning.ScalesWithItemLevel ? 1 : 0)); WriteLogDataBit(); FlushBits(); WriteLogData(); _worldPacket.WriteUInt32(attackRoundInfo.GetSize()); _worldPacket.WriteBytes(attackRoundInfo); }
public void Write(WorldPacket data) { data.WriteUInt32(TableHash); data.WriteInt32(RecordID); data.WriteInt32(HotfixID); }
void HandleRequestRatedBattlefieldInfo(RequestRatedBattlefieldInfo packet) { // @Todo: perfome research in this case // The unk fields are related to arenas WorldPacket data = new WorldPacket(ServerOpcodes.RatedBattlefieldInfo); data.WriteInt32(0); // BgWeeklyWins20vs20 data.WriteInt32(0); // BgWeeklyPlayed20vs20 data.WriteInt32(0); // BgWeeklyPlayed15vs15 data.WriteInt32(0); data.WriteInt32(0); // BgWeeklyWins10vs10 data.WriteInt32(0); data.WriteInt32(0); data.WriteInt32(0); data.WriteInt32(0); // BgWeeklyWins15vs15 data.WriteInt32(0); data.WriteInt32(0); data.WriteInt32(0); data.WriteInt32(0); data.WriteInt32(0); data.WriteInt32(0); data.WriteInt32(0); // BgWeeklyPlayed10vs10 data.WriteInt32(0); data.WriteInt32(0); //SendPacket(data); }
public void Write(WorldPacket data) { data.WriteBits((byte)Type, 1); data.WriteInt32(ID); data.WriteInt32(Quantity); }
public void Write(WorldPacket data) { data.WriteInt32(AuctionItemID); data.WriteUInt64(BidAmount); Item.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 void Write(WorldPacket data) { data.WriteInt32(AuctionItemID); data.WritePackedGuid(Bidder); Item.Write(data); }
public void Write(WorldPacket data) { data.WriteInt32(Faction); data.WriteInt32(Reaction); }
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.WriteUInt32(Slot); data.WriteInt32(CompletionQuantity); data.WriteInt32(CompletionLimit); data.WriteInt32(CompletionCurrencyID); data.WriteInt32(SpecificQuantity); data.WriteInt32(SpecificLimit); data.WriteInt32(OverallQuantity); data.WriteInt32(OverallLimit); data.WriteInt32(PurseWeeklyQuantity); data.WriteInt32(PurseWeeklyLimit); data.WriteInt32(PurseQuantity); data.WriteInt32(PurseLimit); data.WriteInt32(Quantity); data.WriteUInt32(CompletedMask); data.WriteUInt32(EncounterMask); data.WriteInt32(ShortageReward.Count); data.WriteBit(FirstReward); data.WriteBit(ShortageEligible); data.FlushBits(); Rewards.Write(data); foreach (var shortageReward in ShortageReward) { shortageReward.Write(data); } }
public void Write(WorldPacket data) { data.WriteInt32(AchievementID); data.WriteInt32(Unused); }
public void Write(WorldPacket data) { data.WriteInt32(DbID); data.WriteInt32(Rank); data.WriteInt32(Step); }
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.WriteInt32(EntryID); data.WriteInt32(Rank); }
public void Write(WorldPacket data) { data.WriteInt32(BonusObjectiveID); data.WriteBit(ObjectiveComplete); data.FlushBits(); }
public void Write(WorldPacket data) { data.WriteUInt32((uint)GarrTypeID); data.WriteUInt32(GarrSiteID); data.WriteUInt32(GarrSiteLevelID); data.WriteInt32(Buildings.Count); data.WriteInt32(Plots.Count); data.WriteInt32(Followers.Count); data.WriteInt32(AutoTroops.Count); data.WriteInt32(Missions.Count); data.WriteInt32(MissionRewards.Count); data.WriteInt32(MissionOvermaxRewards.Count); data.WriteInt32(MissionAreaBonuses.Count); data.WriteInt32(Talents.Count); data.WriteInt32(Collections.Count); data.WriteInt32(EventLists.Count); data.WriteInt32(CanStartMission.Count); data.WriteInt32(ArchivedMissions.Count); data.WriteUInt32(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.WriteInt32(missionReward.Count); } foreach (List <GarrisonMissionReward> missionReward in MissionOvermaxRewards) { data.WriteInt32(missionReward.Count); } foreach (GarrisonMissionBonusAbility areaBonus in MissionAreaBonuses) { areaBonus.Write(data); } foreach (GarrisonCollection collection in Collections) { collection.Write(data); } foreach (GarrisonEventList eventList in EventLists) { eventList.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); } foreach (GarrisonFollower follower in AutoTroops) { follower.Write(data); } foreach (GarrisonTalent talent in Talents) { talent.Write(data); } foreach (List <GarrisonMissionReward> missionReward in MissionRewards) { foreach (GarrisonMissionReward missionRewardItem in missionReward) { missionRewardItem.Write(data); } } foreach (List <GarrisonMissionReward> missionReward in MissionOvermaxRewards) { foreach (GarrisonMissionReward missionRewardItem in missionReward) { missionRewardItem.Write(data); } } }
public void Write(WorldPacket data) { data.WriteUInt32(ContentTuningConditionMask); data.WriteInt32(Unused901); data.WriteUInt32(ExpansionLevelMask); }
public void Write(WorldPacket data) { data.WriteInt32(GarrTalentID); data.WriteInt32(ResearchStartTime); data.WriteInt32(Flags); }
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); } if (!ArchivedMissions.Empty()) { ArchivedMissions.ForEach(id => 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); } }