Core/Battlegrounds: Move to scripts And a lot of misc commits i couldn't recover.

Port From (https://github.com/TrinityCore/TrinityCore/commit/d0d5d309bb5877dc2fcb27f6cb123707a31ec1e8)
This commit is contained in:
Hondacrx
2024-08-04 15:18:22 -04:00
parent bca02a24b0
commit e9b21a91be
139 changed files with 8322 additions and 8700 deletions
@@ -19,6 +19,7 @@ namespace Game.Networking.Packets
public AuctionHouseFilterMask Filters;
public byte[] KnownPets;
public sbyte MaxPetLevel;
public uint Unused1026;
public AddOnInfo? TaintedBy;
public string Name;
public Array<AuctionListFilterClass> ItemClassFilters = new(7);
@@ -37,6 +38,7 @@ namespace Game.Networking.Packets
Filters = (AuctionHouseFilterMask)_worldPacket.ReadUInt32();
uint knownPetSize = _worldPacket.ReadUInt32();
MaxPetLevel = _worldPacket.ReadInt8();
Unused1026 = _worldPacket.ReadUInt32();
uint sizeLimit = CliDB.BattlePetSpeciesStorage.GetNumRows() / 8 + 1;
if (knownPetSize >= sizeLimit)
@@ -326,12 +326,6 @@ namespace Game.Networking.Packets
public struct RaceLimitDisableInfo
{
enum blah
{
Server,
Level
}
public int RaceID;
public int BlockReason;
@@ -386,6 +380,7 @@ namespace Game.Networking.Packets
bool hasTemplateSet = _worldPacket.HasBit();
CreateInfo.IsTrialBoost = _worldPacket.HasBit();
CreateInfo.UseNPE = _worldPacket.HasBit();
CreateInfo.Unused1026 = _worldPacket.HasBit();
CreateInfo.RaceId = (Race)_worldPacket.ReadUInt8();
CreateInfo.ClassId = (Class)_worldPacket.ReadUInt8();
@@ -1144,6 +1139,7 @@ namespace Game.Networking.Packets
public uint? TemplateSet;
public bool IsTrialBoost;
public bool UseNPE;
public bool Unused1026;
public string Name;
// Server side data
@@ -43,7 +43,7 @@ namespace Game.Networking.Packets
public override void Read()
{
PlayerGuid = _worldPacket.ReadPackedGuid();
DataType = (AccountDataTypes)_worldPacket.ReadBits<uint>(4);
DataType = (AccountDataTypes)_worldPacket.ReadInt32();
}
public ObjectGuid PlayerGuid;
@@ -56,10 +56,10 @@ namespace Game.Networking.Packets
public override void Write()
{
_worldPacket.WritePackedGuid(Player);
_worldPacket.WriteInt64(Time);
_worldPacket.WriteUInt32(Size);
_worldPacket.WriteBits(DataType, 4);
_worldPacket.WritePackedGuid(Player);
_worldPacket.WriteInt32((int)DataType);
if (CompressedData == null)
_worldPacket.WriteUInt32(0);
@@ -84,10 +84,10 @@ namespace Game.Networking.Packets
public override void Read()
{
PlayerGuid = _worldPacket.ReadPackedGuid();
Time = _worldPacket.ReadInt64();
Size = _worldPacket.ReadUInt32();
DataType = (AccountDataTypes)_worldPacket.ReadBits<uint>(4);
PlayerGuid = _worldPacket.ReadPackedGuid();
DataType = (AccountDataTypes)_worldPacket.ReadInt32();
uint compressedSize = _worldPacket.ReadUInt32();
if (compressedSize != 0)
@@ -93,13 +93,22 @@ namespace Game.Networking.Packets
Standing = standing;
}
public FactionStandingData(int index, int standing, int factionId)
{
Index = index;
Standing = standing;
FactionID = factionId;
}
public void Write(WorldPacket data)
{
data.WriteInt32(Index);
data.WriteInt32(Standing);
data.WriteInt32(FactionID);
}
int Index;
int Standing;
int FactionID;
}
}
@@ -65,9 +65,11 @@ namespace Game.Networking.Packets
public override void Read()
{
SceneInstanceID = _worldPacket.ReadUInt32();
TimePassed = _worldPacket.ReadInt32();
}
public uint SceneInstanceID;
public int TimePassed;
}
class ScenePlaybackCanceled : ClientPacket
@@ -77,8 +79,10 @@ namespace Game.Networking.Packets
public override void Read()
{
SceneInstanceID = _worldPacket.ReadUInt32();
TimePassed = _worldPacket.ReadInt32();
}
public uint SceneInstanceID;
public int TimePassed;
}
}
@@ -264,7 +264,7 @@ namespace Game.Networking.Packets
_worldPacket.WriteBit(KioskModeEnabled);
_worldPacket.WriteBit(CompetitiveModeEnabled);
_worldPacket.WriteBit(false); // unused, 10.0.2
_worldPacket.WriteBit(IsBoostEnabled);
_worldPacket.WriteBit(TrialBoostEnabled);
_worldPacket.WriteBit(TokenBalanceEnabled);
_worldPacket.WriteBit(LiveRegionCharacterListEnabled);
@@ -275,7 +275,7 @@ namespace Game.Networking.Packets
_worldPacket.WriteBit(Unknown901CheckoutRelated);
_worldPacket.WriteBit(false); // unused, 10.0.2
_worldPacket.WriteBit(EuropaTicketSystemStatus.HasValue);
_worldPacket.WriteBit(false); // unused, 10.0.2
_worldPacket.WriteBit(IsNameReservationEnabled);
_worldPacket.WriteBit(LaunchETA.HasValue);
_worldPacket.WriteBit(AddonsDisabled);
_worldPacket.WriteBit(Unused1000);
@@ -309,6 +309,7 @@ namespace Game.Networking.Packets
_worldPacket.WriteUInt32((uint)PlayerNameQueryInterval.TotalSeconds);
_worldPacket.WriteInt32(DebugTimeEvents.Count);
_worldPacket.WriteInt32(Unused1007);
_worldPacket.WriteUInt32(EventRealmQueues);
if (LaunchETA.HasValue)
_worldPacket.WriteInt32(LaunchETA.Value);
@@ -336,6 +337,7 @@ namespace Game.Networking.Packets
public bool IsExpansionPreorderInStore; // NYI
public bool KioskModeEnabled; // NYI
public bool CompetitiveModeEnabled; // NYI
public bool IsBoostEnabled; // classic only
public bool TrialBoostEnabled; // NYI
public bool TokenBalanceEnabled; // NYI
public bool LiveRegionCharacterListEnabled; // NYI
@@ -343,6 +345,7 @@ namespace Game.Networking.Packets
public bool LiveRegionAccountCopyEnabled; // NYI
public bool LiveRegionKeyBindingsCopyEnabled;
public bool Unknown901CheckoutRelated; // NYI
public bool IsNameReservationEnabled; // classic only
public bool AddonsDisabled;
public bool Unused1000;
public bool AccountSaveDataExportEnabled;
@@ -366,6 +369,7 @@ namespace Game.Networking.Packets
public int? LaunchETA;
public List<DebugTimeEventInfo> DebugTimeEvents = new();
public int Unused1007;
public uint EventRealmQueues;
public string RealmHiddenAlert;
}