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
+25 -6
View File
@@ -36,7 +36,7 @@ namespace Game
realmListTicket.Ticket.WriteCString("WorldserverRealmListTicket");
SendPacket(realmListTicket);
}
}
public void SendBattlenetResponse(uint serviceHash, uint methodId, uint token, IMessage response)
{
@@ -52,7 +52,7 @@ namespace Game
SendPacket(bnetResponse);
}
public void SendBattlenetResponse(uint serviceHash, uint methodId, uint token, BattlenetRpcErrorCode status)
public void SendBattlenetResponse(uint serviceHash, uint methodId, uint token, BattlenetRpcErrorCode status)
{
Response bnetResponse = new();
bnetResponse.BnetStatus = status;
@@ -63,16 +63,35 @@ namespace Game
SendPacket(bnetResponse);
}
public void SendBattlenetRequest(uint serviceHash, uint methodId, IMessage request, Action<CodedInputStream> callback)
public void SendBattlenetRequest(OriginalHash serviceHash, uint methodId, IMessage request, bool client, bool server, Action<CodedInputStream> callback)
{
_battlenetResponseCallbacks[_battlenetRequestToken] = callback;
SendBattlenetRequest(serviceHash, methodId, request);
SendBattlenetRequest(serviceHash, methodId, request, client, server);
}
public void SendBattlenetRequest(uint serviceHash, uint methodId, IMessage request)
public void SendBattlenetRequest(NameHash serviceHash, uint methodId, IMessage request, bool client, bool server, Action<CodedInputStream> callback)
{
_battlenetResponseCallbacks[_battlenetRequestToken] = callback;
SendBattlenetRequest(serviceHash, methodId, request, client, server);
}
public void SendBattlenetRequest(OriginalHash serviceHash, uint methodId, IMessage request, bool client = true, bool server = true)
{
Notification notification = new();
notification.Method.Type = MathFunctions.MakePair64(methodId, serviceHash);
notification.Method.Type = MathFunctions.MakePair64(methodId | (client ? 0x40000000 : 0u) | (server ? 0x80000000 : 0u), (uint)serviceHash);
notification.Method.ObjectId = 1;
notification.Method.Token = _battlenetRequestToken++;
if (request.CalculateSize() != 0)
notification.Data.WriteBytes(request.ToByteArray());
SendPacket(notification);
}
public void SendBattlenetRequest(NameHash serviceHash, uint methodId, IMessage request, bool client = true, bool server = true)
{
Notification notification = new();
notification.Method.Type = MathFunctions.MakePair64(methodId | (client ? 0x40000000 : 0u) | (server ? 0x80000000 : 0u), (uint)serviceHash);
notification.Method.ObjectId = 1;
notification.Method.Token = _battlenetRequestToken++;