Fixes loading, *Command system is broke* Will fix in the coming days.
This commit is contained in:
@@ -48,7 +48,7 @@ namespace Game.Networking.Packets
|
||||
uint knownPetSize = _worldPacket.ReadUInt32();
|
||||
MaxPetLevel = _worldPacket.ReadInt8();
|
||||
|
||||
int sizeLimit = CliDB.BattlePetSpeciesStorage.Count / 8 +1;
|
||||
uint sizeLimit = CliDB.BattlePetSpeciesStorage.GetNumRows() / 8 + 1;
|
||||
if (knownPetSize >= sizeLimit)
|
||||
throw new System.Exception($"Attempted to read more array elements from packet {knownPetSize} than allowed {sizeLimit}");
|
||||
|
||||
|
||||
@@ -776,7 +776,7 @@ namespace Game.Networking.Packets
|
||||
public sbyte ArenaSlot;
|
||||
}
|
||||
|
||||
struct BattlegroundCapturePointInfo
|
||||
class BattlegroundCapturePointInfo
|
||||
{
|
||||
public ObjectGuid Guid;
|
||||
public Vector2 Pos;
|
||||
|
||||
@@ -680,7 +680,7 @@ namespace Game.Networking.Packets
|
||||
public DeclinedName DeclinedNames = new();
|
||||
}
|
||||
|
||||
public struct NameCacheUnused920
|
||||
public class NameCacheUnused920
|
||||
{
|
||||
public uint Unused1;
|
||||
public ObjectGuid Unused2;
|
||||
@@ -700,23 +700,23 @@ namespace Game.Networking.Packets
|
||||
public struct NameCacheLookupResult
|
||||
{
|
||||
public ObjectGuid Player;
|
||||
public byte Result = 0; // 0 - full packet, != 0 - only guid
|
||||
public byte Result; // 0 - full packet, != 0 - only guid
|
||||
public PlayerGuidLookupData Data;
|
||||
public NameCacheUnused920? Unused920;
|
||||
public NameCacheUnused920 Unused920;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt8(Result);
|
||||
data.WritePackedGuid(Player);
|
||||
data.WriteBit(Data != null);
|
||||
data.WriteBit(Unused920.HasValue);
|
||||
data.WriteBit(Unused920 != null);
|
||||
data.FlushBits();
|
||||
|
||||
if (Data != null)
|
||||
Data.Write(data);
|
||||
|
||||
if (Unused920.HasValue)
|
||||
Unused920.Value.Write(data);
|
||||
if (Unused920 != null)
|
||||
Unused920.Write(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user