Fix loading into world.
This commit is contained in:
@@ -75,7 +75,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteUInt32(Flags);
|
||||
_worldPacket.WritePackedTime(CurrentTime);
|
||||
_worldPacket.WriteUInt32(ElapsedTime);
|
||||
_worldPacket.WriteUInt32(CreationTime);
|
||||
_worldPacket.WriteInt64(CreationTime);
|
||||
_worldPacket.WriteBit(RafAcceptanceID.HasValue);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace Game.Networking.Packets
|
||||
public uint Flags;
|
||||
public long CurrentTime;
|
||||
public uint ElapsedTime;
|
||||
public uint CreationTime;
|
||||
public long CreationTime;
|
||||
public Optional<ulong> RafAcceptanceID;
|
||||
}
|
||||
|
||||
@@ -186,8 +186,8 @@ namespace Game.Networking.Packets
|
||||
foreach (GuildCriteriaProgress progress in Progress)
|
||||
{
|
||||
_worldPacket.WriteUInt32(progress.CriteriaID);
|
||||
_worldPacket.WriteUInt32(progress.DateCreated);
|
||||
_worldPacket.WriteUInt32(progress.DateStarted);
|
||||
_worldPacket.WriteInt64(progress.DateCreated);
|
||||
_worldPacket.WriteInt64(progress.DateStarted);
|
||||
_worldPacket.WritePackedTime(progress.DateUpdated);
|
||||
_worldPacket.WriteUInt32(0); // this is a hack. this is a packed time written as int64 (progress.DateUpdated)
|
||||
_worldPacket.WriteUInt64(progress.Quantity);
|
||||
@@ -356,8 +356,8 @@ namespace Game.Networking.Packets
|
||||
public struct GuildCriteriaProgress
|
||||
{
|
||||
public uint CriteriaID;
|
||||
public uint DateCreated;
|
||||
public uint DateStarted;
|
||||
public long DateCreated;
|
||||
public long DateStarted;
|
||||
public long DateUpdated;
|
||||
public ulong Quantity;
|
||||
public ObjectGuid PlayerGUID;
|
||||
|
||||
@@ -130,7 +130,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteInt32(SuccessInfo.Value.AvailableClasses.Count);
|
||||
_worldPacket.WriteInt32(SuccessInfo.Value.Templates.Count);
|
||||
_worldPacket.WriteUInt32(SuccessInfo.Value.CurrencyID);
|
||||
_worldPacket.WriteUInt32(SuccessInfo.Value.Time);
|
||||
_worldPacket.WriteInt64(SuccessInfo.Value.Time);
|
||||
|
||||
foreach (var raceClassAvailability in SuccessInfo.Value.AvailableClasses)
|
||||
{
|
||||
@@ -211,7 +211,7 @@ namespace Game.Networking.Packets
|
||||
public uint VirtualRealmAddress; // a special identifier made from the Index, BattleGroup and Region. @todo implement
|
||||
public uint TimeSecondsUntilPCKick; // @todo research
|
||||
public uint CurrencyID; // this is probably used for the ingame shop. @todo implement
|
||||
public uint Time;
|
||||
public long Time;
|
||||
|
||||
public GameTime GameTimeInfo;
|
||||
|
||||
|
||||
@@ -468,7 +468,7 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
_worldPacket.WriteUInt32(MapID);
|
||||
_worldPacket.WriteUInt8((byte)State);
|
||||
_worldPacket.WriteInt32((int)StartTime);
|
||||
_worldPacket.WriteInt64(StartTime);
|
||||
_worldPacket.WriteInt32(Duration);
|
||||
_worldPacket.WriteUInt8(ArenaFaction);
|
||||
_worldPacket.WriteUInt32(BattlemasterListID);
|
||||
|
||||
@@ -55,11 +55,11 @@ namespace Game.Networking.Packets
|
||||
public override void Read()
|
||||
{
|
||||
Guid = _worldPacket.ReadPackedGuid();
|
||||
LastUpdateID = _worldPacket.ReadUInt32();
|
||||
LastUpdateID = _worldPacket.ReadInt64();
|
||||
}
|
||||
|
||||
public ObjectGuid Guid;
|
||||
public uint LastUpdateID;
|
||||
public long LastUpdateID;
|
||||
}
|
||||
|
||||
public class BlackMarketRequestItemsResult : ServerPacket
|
||||
@@ -68,14 +68,14 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(LastUpdateID);
|
||||
_worldPacket.WriteInt64(LastUpdateID);
|
||||
_worldPacket.WriteInt32(Items.Count);
|
||||
|
||||
foreach (BlackMarketItem item in Items)
|
||||
item.Write(_worldPacket);
|
||||
}
|
||||
|
||||
public int LastUpdateID;
|
||||
public long LastUpdateID;
|
||||
public List<BlackMarketItem> Items = new();
|
||||
}
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ namespace Game.Networking.Packets
|
||||
foreach (var visualItem in VisualItems)
|
||||
visualItem.Write(data);
|
||||
|
||||
data.WriteUInt32((uint)LastPlayedTime);
|
||||
data.WriteInt64(LastPlayedTime);
|
||||
data.WriteUInt16(SpecID);
|
||||
data.WriteUInt32(Unknown703);
|
||||
data.WriteUInt32(LastLoginVersion);
|
||||
|
||||
@@ -29,14 +29,14 @@ namespace Game.Networking.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(PlayerGuid);
|
||||
_worldPacket.WriteUInt32(ServerTime);
|
||||
_worldPacket.WriteInt64(ServerTime);
|
||||
foreach (var accounttime in AccountTimes)
|
||||
_worldPacket.WriteUInt32(accounttime);
|
||||
_worldPacket.WriteInt64(accounttime);
|
||||
}
|
||||
|
||||
public ObjectGuid PlayerGuid;
|
||||
public uint ServerTime = 0;
|
||||
public Array<uint> AccountTimes = new((int)AccountDataTypes.Max);
|
||||
public long ServerTime;
|
||||
public Array<long> AccountTimes = new((int)AccountDataTypes.Max);
|
||||
}
|
||||
|
||||
public class ClientCacheVersion : ServerPacket
|
||||
@@ -72,7 +72,7 @@ namespace Game.Networking.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(Player);
|
||||
_worldPacket.WriteUInt32(Time);
|
||||
_worldPacket.WriteInt64(Time);
|
||||
_worldPacket.WriteUInt32(Size);
|
||||
_worldPacket.WriteBits(DataType, 3);
|
||||
|
||||
@@ -87,8 +87,8 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
|
||||
public ObjectGuid Player;
|
||||
public uint Time = 0; // UnixTime
|
||||
public uint Size = 0; // decompressed size
|
||||
public long Time; // UnixTime
|
||||
public uint Size; // decompressed size
|
||||
public AccountDataTypes DataType = 0;
|
||||
public ByteBuffer CompressedData;
|
||||
}
|
||||
@@ -100,7 +100,7 @@ namespace Game.Networking.Packets
|
||||
public override void Read()
|
||||
{
|
||||
PlayerGuid = _worldPacket.ReadPackedGuid();
|
||||
Time = _worldPacket.ReadUInt32();
|
||||
Time = _worldPacket.ReadInt64();
|
||||
Size = _worldPacket.ReadUInt32();
|
||||
DataType = (AccountDataTypes)_worldPacket.ReadBits<uint>(3);
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
|
||||
public ObjectGuid PlayerGuid;
|
||||
public uint Time; // UnixTime
|
||||
public long Time; // UnixTime
|
||||
public uint Size; // decompressed size
|
||||
public AccountDataTypes DataType = 0;
|
||||
public ByteBuffer CompressedData;
|
||||
|
||||
@@ -338,9 +338,9 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
data.WriteUInt32(GarrPlotInstanceID);
|
||||
data.WriteUInt32(GarrBuildingID);
|
||||
data.WriteUInt32((uint)TimeBuilt);
|
||||
data.WriteInt64(TimeBuilt);
|
||||
data.WriteUInt32(CurrentGarSpecID);
|
||||
data.WriteUInt32((uint)TimeSpecCooldown);
|
||||
data.WriteInt64(TimeSpecCooldown);
|
||||
data.WriteBit(Active);
|
||||
data.FlushBits();
|
||||
}
|
||||
@@ -371,8 +371,8 @@ namespace Game.Networking.Packets
|
||||
data.WriteUInt32(ZoneSupportSpellID);
|
||||
data.WriteUInt32(FollowerStatus);
|
||||
data.WriteInt32(Health);
|
||||
data .WriteInt8(BoardIndex);
|
||||
data .WriteInt32(HealingTimestamp);
|
||||
data.WriteInt8(BoardIndex);
|
||||
data.WriteInt64(HealingTimestamp);
|
||||
|
||||
AbilityID.ForEach(ability => data.WriteUInt32(ability.Id));
|
||||
|
||||
@@ -395,7 +395,7 @@ namespace Game.Networking.Packets
|
||||
public uint ZoneSupportSpellID;
|
||||
public uint FollowerStatus;
|
||||
public int Health;
|
||||
public int HealingTimestamp;
|
||||
public long HealingTimestamp;
|
||||
public sbyte BoardIndex;
|
||||
public string CustomName = "";
|
||||
}
|
||||
@@ -405,9 +405,9 @@ namespace Game.Networking.Packets
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt64(DbID);
|
||||
data.WriteUInt32((uint)OfferTime);
|
||||
data.WriteInt64(OfferTime);
|
||||
data.WriteUInt32(OfferDuration);
|
||||
data.WriteUInt32((uint)StartTime);
|
||||
data.WriteInt64(StartTime);
|
||||
data.WriteUInt32(TravelDuration);
|
||||
data.WriteUInt32(MissionDuration);
|
||||
data.WriteUInt32(MissionRecID);
|
||||
@@ -462,7 +462,7 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32((uint)StartTime);
|
||||
data.WriteInt64(StartTime);
|
||||
data.WriteUInt32(GarrMssnBonusAbilityID);
|
||||
}
|
||||
|
||||
@@ -488,7 +488,7 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
data.WriteInt32(GarrTalentID);
|
||||
data.WriteInt32(Rank);
|
||||
data.WriteUInt32((uint)ResearchStartTime);
|
||||
data.WriteInt64(ResearchStartTime);
|
||||
data.WriteInt32(Flags);
|
||||
data.WriteBit(Socket.HasValue);
|
||||
data.FlushBits();
|
||||
|
||||
@@ -152,10 +152,10 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
LastUpdate = _worldPacket.ReadUInt32();
|
||||
LastUpdate = _worldPacket.ReadInt64();
|
||||
}
|
||||
|
||||
public uint LastUpdate;
|
||||
public long LastUpdate;
|
||||
}
|
||||
|
||||
class LFGuildRecruits : ServerPacket
|
||||
@@ -165,7 +165,7 @@ namespace Game.Networking.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(Recruits.Count);
|
||||
_worldPacket.WriteUInt32((uint)UpdateTime);
|
||||
_worldPacket.WriteInt64(UpdateTime);
|
||||
foreach (LFGuildRecruitData recruit in Recruits)
|
||||
recruit.Write(_worldPacket);
|
||||
}
|
||||
|
||||
@@ -879,10 +879,10 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
CurrentVersion = _worldPacket.ReadUInt32();
|
||||
CurrentVersion = _worldPacket.ReadInt64();
|
||||
}
|
||||
|
||||
public uint CurrentVersion;
|
||||
public long CurrentVersion;
|
||||
}
|
||||
|
||||
public class GuildRewardList : ServerPacket
|
||||
@@ -894,7 +894,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Version);
|
||||
_worldPacket.WriteInt64(Version);
|
||||
_worldPacket.WriteInt32(RewardItems.Count);
|
||||
|
||||
foreach (var item in RewardItems)
|
||||
@@ -902,7 +902,7 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
|
||||
public List<GuildRewardItem> RewardItems;
|
||||
public uint Version;
|
||||
public long Version;
|
||||
}
|
||||
|
||||
public class GuildBankActivate : ClientPacket
|
||||
|
||||
@@ -87,10 +87,10 @@ namespace Game.Networking.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(VirtualRealmAddress);
|
||||
_worldPacket.WriteInt32(Hotfixes.Count);
|
||||
_worldPacket.WriteInt32(Hotfixes.Keys.Count);
|
||||
|
||||
foreach (var pair in Hotfixes)
|
||||
_worldPacket.WriteInt32(pair.Key);
|
||||
foreach (var key in Hotfixes.Keys)
|
||||
_worldPacket.WriteInt32(key);
|
||||
}
|
||||
|
||||
public uint VirtualRealmAddress;
|
||||
|
||||
@@ -758,7 +758,7 @@ namespace Game.Networking.Packets
|
||||
RequesterGuid = data.ReadPackedGuid();
|
||||
Id = data.ReadUInt32();
|
||||
Type = (RideType)data.ReadUInt32();
|
||||
Time = data.ReadInt32();
|
||||
Time = data.ReadInt64();
|
||||
}
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
@@ -766,13 +766,13 @@ namespace Game.Networking.Packets
|
||||
data.WritePackedGuid(RequesterGuid);
|
||||
data.WriteUInt32(Id);
|
||||
data.WriteUInt32((uint)Type);
|
||||
data.WriteInt32(Time);
|
||||
data.WriteInt64(Time);
|
||||
}
|
||||
|
||||
public ObjectGuid RequesterGuid;
|
||||
public uint Id;
|
||||
public RideType Type;
|
||||
public int Time;
|
||||
public long Time;
|
||||
}
|
||||
|
||||
public enum RideType
|
||||
|
||||
@@ -316,10 +316,10 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Time);
|
||||
_worldPacket.WriteInt64(Time);
|
||||
}
|
||||
|
||||
public uint Time;
|
||||
public long Time;
|
||||
}
|
||||
|
||||
public class TutorialFlags : ServerPacket
|
||||
|
||||
@@ -390,7 +390,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32((uint)CurrentTime);
|
||||
_worldPacket.WriteInt64(CurrentTime);
|
||||
}
|
||||
|
||||
public long CurrentTime;
|
||||
@@ -503,7 +503,7 @@ namespace Game.Networking.Packets
|
||||
for (byte i = 0; i < SharedConst.MaxDeclinedNameCases; ++i)
|
||||
_worldPacket.WriteString(DeclinedNames.name[i]);
|
||||
|
||||
_worldPacket.WriteUInt32(Timestamp);
|
||||
_worldPacket.WriteInt64(Timestamp);
|
||||
_worldPacket.WriteString(Name);
|
||||
}
|
||||
|
||||
@@ -515,7 +515,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
public bool HasDeclined;
|
||||
public DeclinedName DeclinedNames = new();
|
||||
public uint Timestamp;
|
||||
public long Timestamp;
|
||||
public string Name = "";
|
||||
}
|
||||
|
||||
|
||||
@@ -817,7 +817,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
foreach (WorldQuestUpdateInfo worldQuestUpdate in WorldQuestUpdates)
|
||||
{
|
||||
_worldPacket.WriteInt32(worldQuestUpdate.LastUpdate);
|
||||
_worldPacket.WriteInt64(worldQuestUpdate.LastUpdate);
|
||||
_worldPacket.WriteUInt32(worldQuestUpdate.QuestID);
|
||||
_worldPacket.WriteUInt32(worldQuestUpdate.Timer);
|
||||
_worldPacket.WriteInt32(worldQuestUpdate.VariableID);
|
||||
@@ -1183,7 +1183,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
struct WorldQuestUpdateInfo
|
||||
{
|
||||
public WorldQuestUpdateInfo(int lastUpdate, uint questID, uint timer, int variableID, int value)
|
||||
public WorldQuestUpdateInfo(long lastUpdate, uint questID, uint timer, int variableID, int value)
|
||||
{
|
||||
LastUpdate = lastUpdate;
|
||||
QuestID = questID;
|
||||
@@ -1192,7 +1192,7 @@ namespace Game.Networking.Packets
|
||||
Value = value;
|
||||
}
|
||||
|
||||
public int LastUpdate;
|
||||
public long LastUpdate;
|
||||
public uint QuestID;
|
||||
public uint Timer;
|
||||
// WorldState
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace Game.Networking.Packets
|
||||
foreach (var c in Cases)
|
||||
{
|
||||
_worldPacket.WriteInt32(c.CaseID);
|
||||
_worldPacket.WriteUInt32(c.CaseOpened);
|
||||
_worldPacket.WriteInt64(c.CaseOpened);
|
||||
_worldPacket.WriteInt32(c.CaseStatus);
|
||||
_worldPacket.WriteUInt16(c.CfgRealmID);
|
||||
_worldPacket.WriteUInt64(c.CharacterID);
|
||||
@@ -80,7 +80,7 @@ namespace Game.Networking.Packets
|
||||
public struct GMTicketCase
|
||||
{
|
||||
public int CaseID;
|
||||
public uint CaseOpened;
|
||||
public long CaseOpened;
|
||||
public int CaseStatus;
|
||||
public ushort CfgRealmID;
|
||||
public ulong CharacterID;
|
||||
@@ -215,18 +215,18 @@ namespace Game.Networking.Packets
|
||||
|
||||
public struct SupportTicketChatLine
|
||||
{
|
||||
public uint Timestamp;
|
||||
public long Timestamp;
|
||||
public string Text;
|
||||
|
||||
public SupportTicketChatLine(WorldPacket data)
|
||||
{
|
||||
Timestamp = data.ReadUInt32();
|
||||
Timestamp = data.ReadInt64();
|
||||
Text = data.ReadString(data.ReadBits<uint>(12));
|
||||
}
|
||||
|
||||
public SupportTicketChatLine(long timestamp, string text)
|
||||
{
|
||||
Timestamp = (uint)timestamp;
|
||||
Timestamp = timestamp;
|
||||
Text = text;
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
public void Read(WorldPacket data)
|
||||
{
|
||||
Timestamp = data.ReadInt32();
|
||||
Timestamp = data.ReadInt64();
|
||||
AuthorGUID = data.ReadPackedGuid();
|
||||
|
||||
bool hasClubID = data.HasBit();
|
||||
@@ -305,7 +305,7 @@ namespace Game.Networking.Packets
|
||||
public byte field_6;
|
||||
}
|
||||
|
||||
public int Timestamp;
|
||||
public long Timestamp;
|
||||
public ObjectGuid AuthorGUID;
|
||||
public Optional<ulong> ClubID;
|
||||
public Optional<ObjectGuid> ChannelGUID;
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Game.Networking.Packets
|
||||
foreach (AuctionableTokenInfo auctionableTokenAuctionable in AuctionableTokenAuctionableList)
|
||||
{
|
||||
_worldPacket.WriteUInt64(auctionableTokenAuctionable.UnkInt1);
|
||||
_worldPacket.WriteUInt32(auctionableTokenAuctionable.UnkInt2);
|
||||
_worldPacket.WriteInt64(auctionableTokenAuctionable.UnkInt2);
|
||||
_worldPacket.WriteUInt64(auctionableTokenAuctionable.BuyoutPrice);
|
||||
_worldPacket.WriteUInt32(auctionableTokenAuctionable.Owner);
|
||||
_worldPacket.WriteUInt32(auctionableTokenAuctionable.DurationLeft);
|
||||
@@ -59,7 +59,7 @@ namespace Game.Networking.Packets
|
||||
struct AuctionableTokenInfo
|
||||
{
|
||||
public ulong UnkInt1;
|
||||
public uint UnkInt2;
|
||||
public long UnkInt2;
|
||||
public uint Owner;
|
||||
public ulong BuyoutPrice;
|
||||
public uint DurationLeft;
|
||||
|
||||
Reference in New Issue
Block a user