Core: Update to 10.2.0
Port From (https://github.com/TrinityCore/TrinityCore/commit/1eea1d11b14d2ae065ab0f1888fba3b1ef03874f)
This commit is contained in:
@@ -310,15 +310,23 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBit(WargameArenas);
|
||||
_worldPacket.WriteBit(RatedArenas);
|
||||
_worldPacket.WriteBit(ArenaSkirmish);
|
||||
_worldPacket.WriteBit(SoloShuffle);
|
||||
_worldPacket.WriteBit(RatedSoloShuffle);
|
||||
_worldPacket.WriteBit(BattlegroundBlitz);
|
||||
_worldPacket.WriteBit(RatedBattlegroundBlitz);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
|
||||
public bool RatedBattlegrounds;
|
||||
public bool PugBattlegrounds;
|
||||
public bool WargameBattlegrounds;
|
||||
public bool WargameArenas;
|
||||
public bool RatedArenas;
|
||||
public bool WargameBattlegrounds;
|
||||
public bool ArenaSkirmish;
|
||||
public bool PugBattlegrounds;
|
||||
public bool RatedBattlegrounds;
|
||||
public bool SoloShuffle;
|
||||
public bool RatedSoloShuffle;
|
||||
public bool BattlegroundBlitz;
|
||||
public bool RatedBattlegroundBlitz; // solo rbg
|
||||
}
|
||||
|
||||
class RequestBattlefieldStatus : ClientPacket
|
||||
@@ -510,7 +518,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
PVPMatchState State;
|
||||
}
|
||||
|
||||
|
||||
class PVPMatchComplete : ServerPacket
|
||||
{
|
||||
public PVPMatchComplete() : base(ServerOpcodes.PvpMatchComplete, ConnectionType.Instance) { }
|
||||
|
||||
@@ -149,12 +149,12 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteInt32(Events.Count);
|
||||
_worldPacket.WriteInt32(RaidLockouts.Count);
|
||||
|
||||
foreach (var invite in Invites)
|
||||
invite.Write(_worldPacket);
|
||||
|
||||
foreach (var lockout in RaidLockouts)
|
||||
lockout.Write(_worldPacket);
|
||||
|
||||
foreach (var invite in Invites)
|
||||
invite.Write(_worldPacket);
|
||||
|
||||
foreach (var Event in Events)
|
||||
Event.Write(_worldPacket);
|
||||
}
|
||||
@@ -822,6 +822,8 @@ namespace Game.Networking.Packets
|
||||
data.WriteUInt8((byte)Moderator);
|
||||
data.WriteUInt8(InviteType);
|
||||
data.WritePackedGuid(InviterGuid);
|
||||
data.WriteBit(IgnoreFriendAndGuildRestriction);
|
||||
data.FlushBits();
|
||||
}
|
||||
|
||||
public ulong EventID;
|
||||
@@ -830,6 +832,7 @@ namespace Game.Networking.Packets
|
||||
public CalendarInviteStatus Status;
|
||||
public CalendarModerationRank Moderator;
|
||||
public byte InviteType;
|
||||
public bool IgnoreFriendAndGuildRestriction;
|
||||
}
|
||||
struct CalendarSendCalendarRaidLockoutInfo
|
||||
{
|
||||
|
||||
@@ -33,7 +33,6 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBit(IsNewPlayer);
|
||||
_worldPacket.WriteBit(IsTrialAccountRestricted);
|
||||
_worldPacket.WriteBit(DisabledClassesMask.HasValue);
|
||||
_worldPacket.WriteBit(IsAlliedRacesCreationAllowed);
|
||||
_worldPacket.WriteInt32(Characters.Count);
|
||||
_worldPacket.WriteInt32(MaxCharacterLevel);
|
||||
_worldPacket.WriteInt32(RaceUnlockData.Count);
|
||||
@@ -62,7 +61,6 @@ namespace Game.Networking.Packets
|
||||
public bool IsNewPlayerRestricted; // forbids using level boost and class trials
|
||||
public bool IsNewPlayer; // forbids hero classes and allied races
|
||||
public bool IsTrialAccountRestricted;
|
||||
public bool IsAlliedRacesCreationAllowed;
|
||||
|
||||
public int MaxCharacterLevel = 1;
|
||||
public uint? DisabledClassesMask = new();
|
||||
@@ -105,7 +103,7 @@ namespace Game.Networking.Packets
|
||||
if (fields.Read<uint>(18) != 0)
|
||||
Flags |= CharacterFlags.LockedByBilling;
|
||||
|
||||
if (WorldConfig.GetBoolValue(WorldCfg.DeclinedNamesUsed) && !string.IsNullOrEmpty(fields.Read<string>(23)))
|
||||
if (WorldConfig.GetBoolValue(WorldCfg.DeclinedNamesUsed) && !string.IsNullOrEmpty(fields.Read<string>(28)))
|
||||
Flags |= CharacterFlags.Declined;
|
||||
|
||||
if (atLoginFlags.HasAnyFlag(AtLoginFlags.Customize))
|
||||
@@ -145,6 +143,12 @@ namespace Game.Networking.Packets
|
||||
|
||||
LastLoginVersion = fields.Read<int>(22);
|
||||
|
||||
PersonalTabard.EmblemStyle = fields.Read<int>(23);
|
||||
PersonalTabard.EmblemColor = fields.Read<int>(24);
|
||||
PersonalTabard.BorderStyle = fields.Read<int>(25);
|
||||
PersonalTabard.BorderColor = fields.Read<int>(26);
|
||||
PersonalTabard.BackgroundColor = fields.Read<int>(27);
|
||||
|
||||
int equipmentFieldsPerSlot = 5;
|
||||
|
||||
for (var slot = 0; slot < VisualItems.Length && (slot + 1) * equipmentFieldsPerSlot <= equipment.Length; ++slot)
|
||||
@@ -194,6 +198,7 @@ namespace Game.Networking.Packets
|
||||
data.WriteInt32(MailSenders.Count);
|
||||
data.WriteInt32(MailSenderTypes.Count);
|
||||
data.WriteUInt32(OverrideSelectScreenFileDataID);
|
||||
PersonalTabard.Write(data);
|
||||
|
||||
foreach (ChrCustomizationChoice customization in Customizations)
|
||||
{
|
||||
@@ -208,6 +213,8 @@ namespace Game.Networking.Packets
|
||||
data.WriteBit(FirstLogin);
|
||||
data.WriteBit(BoostInProgress);
|
||||
data.WriteBits(unkWod61x, 5);
|
||||
data.WriteBit(RpeResetAvailable);
|
||||
data.WriteBit(RpeResetQuestClearAvailable);
|
||||
|
||||
foreach (string str in MailSenders)
|
||||
data.WriteBits(str.GetByteCount() + 1, 6);
|
||||
@@ -228,7 +235,7 @@ namespace Game.Networking.Packets
|
||||
public byte RaceId;
|
||||
public Class ClassId;
|
||||
public byte SexId;
|
||||
public Array<ChrCustomizationChoice> Customizations = new(125);
|
||||
public Array<ChrCustomizationChoice> Customizations = new(250);
|
||||
public byte ExperienceLevel;
|
||||
public uint ZoneId;
|
||||
public uint MapId;
|
||||
@@ -253,6 +260,9 @@ namespace Game.Networking.Packets
|
||||
public VisualItemInfo[] VisualItems = new VisualItemInfo[InventorySlots.ReagentBagEnd];
|
||||
public List<string> MailSenders = new();
|
||||
public List<uint> MailSenderTypes = new();
|
||||
public bool RpeResetAvailable = false;
|
||||
public bool RpeResetQuestClearAvailable = false;
|
||||
public CustomTabardInfo PersonalTabard = new();
|
||||
|
||||
public struct VisualItemInfo
|
||||
{
|
||||
@@ -288,6 +298,7 @@ namespace Game.Networking.Packets
|
||||
data.WriteBit(HasExpansion);
|
||||
data.WriteBit(HasAchievement);
|
||||
data.WriteBit(HasHeritageArmor);
|
||||
data.WriteBit(IsLocked);
|
||||
data.FlushBits();
|
||||
}
|
||||
|
||||
@@ -295,6 +306,7 @@ namespace Game.Networking.Packets
|
||||
public bool HasExpansion;
|
||||
public bool HasAchievement;
|
||||
public bool HasHeritageArmor;
|
||||
public bool IsLocked;
|
||||
}
|
||||
|
||||
public struct UnlockedConditionalAppearance
|
||||
@@ -329,7 +341,7 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
|
||||
class CheckCharacterNameAvailability : ClientPacket
|
||||
{
|
||||
{
|
||||
public uint SequenceIndex;
|
||||
public string Name;
|
||||
|
||||
@@ -359,7 +371,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteUInt32((uint)Result);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class CreateCharacter : ClientPacket
|
||||
{
|
||||
public CreateCharacter(WorldPacket packet) : base(packet) { }
|
||||
@@ -570,7 +582,7 @@ namespace Game.Networking.Packets
|
||||
public string Name;
|
||||
public byte SexID;
|
||||
public byte RaceID;
|
||||
public Array<ChrCustomizationChoice> Customizations = new(125);
|
||||
public Array<ChrCustomizationChoice> Customizations = new(250);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -883,7 +895,7 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
|
||||
public byte NewSex;
|
||||
public Array<ChrCustomizationChoice> Customizations = new(125);
|
||||
public Array<ChrCustomizationChoice> Customizations = new(250);
|
||||
public int CustomizedRace;
|
||||
public int CustomizedChrModelID;
|
||||
}
|
||||
@@ -952,7 +964,7 @@ namespace Game.Networking.Packets
|
||||
FactionIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public byte FactionIndex;
|
||||
public ushort FactionIndex;
|
||||
}
|
||||
|
||||
class SetFactionNotAtWar : ClientPacket
|
||||
@@ -964,7 +976,7 @@ namespace Game.Networking.Packets
|
||||
FactionIndex = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public byte FactionIndex;
|
||||
public ushort FactionIndex;
|
||||
}
|
||||
|
||||
class SetFactionInactive : ClientPacket
|
||||
@@ -1089,6 +1101,35 @@ namespace Game.Networking.Packets
|
||||
public DeclinedNameResult ResultCode;
|
||||
}
|
||||
|
||||
class SavePersonalEmblem : ClientPacket
|
||||
{
|
||||
public ObjectGuid Vendor;
|
||||
public CustomTabardInfo PersonalTabard = new();
|
||||
|
||||
public SavePersonalEmblem(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
Vendor = _worldPacket.ReadPackedGuid();
|
||||
PersonalTabard.Read(_worldPacket);
|
||||
}
|
||||
}
|
||||
|
||||
class PlayerSavePersonalEmblem : ServerPacket
|
||||
{
|
||||
public GuildEmblemError Error;
|
||||
|
||||
public PlayerSavePersonalEmblem(GuildEmblemError error) : base(ServerOpcodes.PlayerSavePersonalEmblem)
|
||||
{
|
||||
Error = error;
|
||||
}
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32((int)Error);
|
||||
}
|
||||
}
|
||||
|
||||
//Structs
|
||||
public class CharacterCreateInfo
|
||||
{
|
||||
@@ -1096,7 +1137,7 @@ namespace Game.Networking.Packets
|
||||
public Race RaceId = Race.None;
|
||||
public Class ClassId = Class.None;
|
||||
public Gender Sex = Gender.None;
|
||||
public Array<ChrCustomizationChoice> Customizations = new(125);
|
||||
public Array<ChrCustomizationChoice> Customizations = new(250);
|
||||
public uint? TemplateSet;
|
||||
public bool IsTrialBoost;
|
||||
public bool UseNPE;
|
||||
@@ -1117,7 +1158,7 @@ namespace Game.Networking.Packets
|
||||
public ObjectGuid CharGUID;
|
||||
public Gender SexID = Gender.None;
|
||||
public string CharName;
|
||||
public Array<ChrCustomizationChoice> Customizations = new(125);
|
||||
public Array<ChrCustomizationChoice> Customizations = new(250);
|
||||
}
|
||||
|
||||
public class CharRaceOrFactionChangeInfo
|
||||
@@ -1128,15 +1169,42 @@ namespace Game.Networking.Packets
|
||||
public ObjectGuid Guid;
|
||||
public bool FactionChange;
|
||||
public string Name;
|
||||
public Array<ChrCustomizationChoice> Customizations = new(125);
|
||||
public Array<ChrCustomizationChoice> Customizations = new(250);
|
||||
}
|
||||
|
||||
public class CharacterUndeleteInfo
|
||||
{ // User specified variables
|
||||
public ObjectGuid CharacterGuid; // Guid of the character to restore
|
||||
public int ClientToken = 0; // @todo: research
|
||||
public int ClientToken; // @todo: research
|
||||
|
||||
// Server side data
|
||||
public string Name;
|
||||
}
|
||||
|
||||
public class CustomTabardInfo
|
||||
{
|
||||
public int EmblemStyle = -1;
|
||||
public int EmblemColor = -1;
|
||||
public int BorderStyle = -1;
|
||||
public int BorderColor = -1;
|
||||
public int BackgroundColor = -1;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(EmblemStyle);
|
||||
data.WriteInt32(EmblemColor);
|
||||
data.WriteInt32(BorderStyle);
|
||||
data.WriteInt32(BorderColor);
|
||||
data.WriteInt32(BackgroundColor);
|
||||
}
|
||||
|
||||
public void Read(WorldPacket data)
|
||||
{
|
||||
EmblemStyle = data.ReadInt32();
|
||||
EmblemColor = data.ReadInt32();
|
||||
BorderStyle = data.ReadInt32();
|
||||
BorderColor = data.ReadInt32();
|
||||
BackgroundColor = data.ReadInt32();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,6 +108,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBit(FirstCraftOperationID.HasValue);
|
||||
_worldPacket.WriteBit(NextRechargeTime.HasValue);
|
||||
_worldPacket.WriteBit(RechargeCycleStartTime.HasValue);
|
||||
_worldPacket.WriteBit(OverflownCurrencyID.HasValue);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
if (WeeklyQuantity.HasValue)
|
||||
@@ -139,6 +140,9 @@ namespace Game.Networking.Packets
|
||||
|
||||
if (RechargeCycleStartTime.HasValue)
|
||||
_worldPacket.WriteInt64(RechargeCycleStartTime.Value);
|
||||
|
||||
if (OverflownCurrencyID.HasValue)
|
||||
_worldPacket.WriteInt32(OverflownCurrencyID.Value);
|
||||
}
|
||||
|
||||
public uint Type;
|
||||
@@ -155,6 +159,7 @@ namespace Game.Networking.Packets
|
||||
public uint? FirstCraftOperationID;
|
||||
public long? NextRechargeTime;
|
||||
public long? RechargeCycleStartTime;
|
||||
public int? OverflownCurrencyID; // what currency was originally changed but couldn't be incremented because of a cap
|
||||
public bool SuppressChatLog;
|
||||
}
|
||||
|
||||
@@ -1442,17 +1447,17 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
public PhaseShiftDataPhase(uint phaseFlags, uint id)
|
||||
{
|
||||
PhaseFlags = (ushort)phaseFlags;
|
||||
PhaseFlags = phaseFlags;
|
||||
Id = (ushort)id;
|
||||
}
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt16(PhaseFlags);
|
||||
data.WriteUInt32(PhaseFlags);
|
||||
data.WriteUInt16(Id);
|
||||
}
|
||||
|
||||
public ushort PhaseFlags;
|
||||
public uint PhaseFlags;
|
||||
public ushort Id;
|
||||
}
|
||||
|
||||
|
||||
@@ -1497,7 +1497,6 @@ namespace Game.Networking.Packets
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(Id);
|
||||
data.WriteVector3(Destination);
|
||||
data.WriteBit(CrzTeleport);
|
||||
data.WriteBits(StopDistanceTolerance, 3);
|
||||
|
||||
@@ -1505,7 +1504,6 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
|
||||
public uint Id;
|
||||
public Vector3 Destination;
|
||||
public bool CrzTeleport;
|
||||
public byte StopDistanceTolerance; // Determines how far from spline destination the mover is allowed to stop in place 0, 0, 3.0, 2.76, numeric_limits<float>::max, 1.1, float(INT_MAX); default before this field existed was distance 3.0 (index 2)
|
||||
public MovementSpline Move;
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Game.Networking.Packets
|
||||
public PlayerInteractionType InteractionType;
|
||||
public bool Success = true;
|
||||
}
|
||||
|
||||
|
||||
public class GossipMessagePkt : ServerPacket
|
||||
{
|
||||
public GossipMessagePkt() : base(ServerOpcodes.GossipMessage) { }
|
||||
@@ -122,7 +122,7 @@ namespace Game.Networking.Packets
|
||||
public int GossipNpcOptionID;
|
||||
public int? FriendshipFactionID;
|
||||
}
|
||||
|
||||
|
||||
public class GossipComplete : ServerPacket
|
||||
{
|
||||
public bool SuppressSound;
|
||||
@@ -230,6 +230,20 @@ namespace Game.Networking.Packets
|
||||
public ObjectGuid Healer;
|
||||
}
|
||||
|
||||
class TabardVendorActivate : ClientPacket
|
||||
{
|
||||
public ObjectGuid Vendor;
|
||||
public int Type;
|
||||
|
||||
public TabardVendorActivate(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
Vendor = _worldPacket.ReadPackedGuid();
|
||||
Type = _worldPacket.ReadInt32();
|
||||
}
|
||||
}
|
||||
|
||||
class TrainerBuySpell : ClientPacket
|
||||
{
|
||||
public TrainerBuySpell(WorldPacket packet) : base(packet) { }
|
||||
@@ -238,7 +252,7 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
TrainerGUID = _worldPacket.ReadPackedGuid();
|
||||
TrainerID = _worldPacket.ReadUInt32();
|
||||
SpellID= _worldPacket.ReadUInt32();
|
||||
SpellID = _worldPacket.ReadUInt32();
|
||||
}
|
||||
|
||||
public ObjectGuid TrainerGUID;
|
||||
@@ -289,7 +303,7 @@ namespace Game.Networking.Packets
|
||||
public uint PetNumber;
|
||||
public byte DestSlot;
|
||||
}
|
||||
|
||||
|
||||
//Structs
|
||||
public struct TreasureItem
|
||||
{
|
||||
@@ -406,7 +420,7 @@ namespace Game.Networking.Packets
|
||||
data.WriteBit(DoNotFilterOnVendor);
|
||||
data.WriteBit(Refundable);
|
||||
data.FlushBits();
|
||||
|
||||
|
||||
Item.Write(data);
|
||||
}
|
||||
|
||||
|
||||
@@ -1042,17 +1042,17 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
public PartyMemberPhase(uint flags, uint id)
|
||||
{
|
||||
Flags = (ushort)flags;
|
||||
Flags = flags;
|
||||
Id = (ushort)id;
|
||||
}
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt16(Flags);
|
||||
data.WriteUInt32(Flags);
|
||||
data.WriteUInt16(Id);
|
||||
}
|
||||
|
||||
public ushort Flags;
|
||||
public uint Flags;
|
||||
public ushort Id;
|
||||
}
|
||||
|
||||
|
||||
@@ -601,9 +601,9 @@ namespace Game.Networking.Packets
|
||||
ClassID = player.GetClass();
|
||||
Level = (byte)player.GetLevel();
|
||||
|
||||
DeclinedName names = player.GetDeclinedNames();
|
||||
DeclinedNames names = player.GetDeclinedNames();
|
||||
if (names != null)
|
||||
DeclinedNames = names;
|
||||
DeclinedNames = new(names);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
public class InitializeFactions : ServerPacket
|
||||
{
|
||||
const ushort FactionCount = 443;
|
||||
const ushort FactionCount = 1000;
|
||||
|
||||
public InitializeFactions() : base(ServerOpcodes.InitializeFactions, ConnectionType.Instance) { }
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace Game.Networking.Packets
|
||||
public override void Read()
|
||||
{
|
||||
uint nameLength = _worldPacket.ReadBits<uint>(9);
|
||||
uint noteslength = _worldPacket.ReadBits<uint>(10);
|
||||
uint noteslength = _worldPacket.ReadBits<uint>(9);
|
||||
Name = _worldPacket.ReadString(nameLength);
|
||||
Notes = _worldPacket.ReadString(noteslength);
|
||||
}
|
||||
|
||||
@@ -83,9 +83,13 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBit(ChatDisabledByPlayer);
|
||||
_worldPacket.WriteBit(LFGListCustomRequiresAuthenticator);
|
||||
_worldPacket.WriteBit(AddonsDisabled);
|
||||
_worldPacket.WriteBit(Unused1000);
|
||||
_worldPacket.WriteBit(WarGamesEnabled);
|
||||
_worldPacket.WriteBit(ContentTrackingEnabled);
|
||||
_worldPacket.WriteBit(IsSellAllJunkEnabled);
|
||||
_worldPacket.WriteBit(IsGroupFinderEnabled);
|
||||
_worldPacket.WriteBit(IsLFDEnabled);
|
||||
_worldPacket.WriteBit(IsLFREnabled);
|
||||
_worldPacket.WriteBit(IsPremadeGroupEnabled);
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
@@ -177,9 +181,13 @@ namespace Game.Networking.Packets
|
||||
public bool ChatDisabledByPlayer;
|
||||
public bool LFGListCustomRequiresAuthenticator;
|
||||
public bool AddonsDisabled;
|
||||
public bool Unused1000;
|
||||
public bool WarGamesEnabled; // classic only
|
||||
public bool ContentTrackingEnabled;
|
||||
public bool IsSellAllJunkEnabled;
|
||||
public bool IsGroupFinderEnabled = true; // classic only
|
||||
public bool IsLFDEnabled = true; // classic only
|
||||
public bool IsLFREnabled = true; // classic only
|
||||
public bool IsPremadeGroupEnabled = true; // classic only
|
||||
|
||||
public SocialQueueConfig QuickJoinConfig;
|
||||
public SquelchInfo Squelch;
|
||||
@@ -361,26 +369,6 @@ namespace Game.Networking.Packets
|
||||
public string RealmHiddenAlert;
|
||||
}
|
||||
|
||||
public class MOTD : ServerPacket
|
||||
{
|
||||
public MOTD() : base(ServerOpcodes.Motd) { }
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteBits(Text.Count, 4);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
foreach (var line in Text)
|
||||
{
|
||||
_worldPacket.WriteBits(line.GetByteCount(), 7);
|
||||
_worldPacket.FlushBits();
|
||||
_worldPacket.WriteString(line);
|
||||
}
|
||||
}
|
||||
|
||||
public List<string> Text;
|
||||
}
|
||||
|
||||
public class SetTimeZoneInformation : ServerPacket
|
||||
{
|
||||
public SetTimeZoneInformation() : base(ServerOpcodes.SetTimeZoneInformation) { }
|
||||
|
||||
@@ -42,9 +42,11 @@ namespace Game.Networking.Packets
|
||||
public override void Read()
|
||||
{
|
||||
uint areasCount = _worldPacket.ReadBits<uint>(4);
|
||||
IsFromAddOn = _worldPacket.HasBit();
|
||||
|
||||
Request.Read(_worldPacket);
|
||||
RequestID = _worldPacket.ReadUInt32();
|
||||
Origin = _worldPacket.ReadUInt8();
|
||||
|
||||
for (int i = 0; i < areasCount; ++i)
|
||||
Areas.Add(_worldPacket.ReadInt32());
|
||||
@@ -52,6 +54,8 @@ namespace Game.Networking.Packets
|
||||
|
||||
public WhoRequest Request = new();
|
||||
public uint RequestID;
|
||||
public byte Origin; // 1 = Social, 2 = Chat, 3 = Item
|
||||
public bool IsFromAddOn;
|
||||
public List<int> Areas= new();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user