Core/PacketIO: Updated packets to 8.3.0

Port From (https://github.com/TrinityCore/TrinityCore/commit/462a10de17003631957b69e578e7e4c55ed1ef61)
This commit is contained in:
hondacrx
2020-02-21 18:21:19 -05:00
parent 96fd9b7a57
commit bcf199dba5
17 changed files with 1276 additions and 936 deletions
+3 -3
View File
@@ -61,7 +61,7 @@ namespace Game
AuctionHelloResponse packet = new AuctionHelloResponse();
packet.Guid = guid;
packet.OpenForBusiness = true; // 3.3.3: 1 - AH enabled, 0 - AH disabled
packet.OpenForBusiness = false; // 3.3.3: 1 - AH enabled, 0 - AH disabled
SendPacket(packet);
}
@@ -590,7 +590,7 @@ namespace Game
SendPacket(result);
}
[WorldPacketHandler(ClientOpcodes.AuctionListItems)]
//[WorldPacketHandler(ClientOpcodes.AuctionListItems)]
void HandleAuctionListItems(AuctionListItems packet)
{
Creature creature = GetPlayer().GetNPCIfCanInteractWith(packet.Auctioneer, NPCFlags.Auctioneer, NPCFlags2.None);
@@ -636,7 +636,7 @@ namespace Game
SendPacket(result);
}
[WorldPacketHandler(ClientOpcodes.AuctionListPendingSales)]
//[WorldPacketHandler(ClientOpcodes.AuctionListPendingSales)]
void HandleAuctionListPendingSales(AuctionListPendingSales packet)
{
AuctionListPendingSalesResult result = new AuctionListPendingSalesResult();
@@ -32,10 +32,10 @@ namespace Game
response.SuccessInfo.HasValue = true;
response.SuccessInfo.Value = new AuthResponse.AuthSuccessInfo();
response.SuccessInfo.Value.AccountExpansionLevel = (byte)GetAccountExpansion();
response.SuccessInfo.Value.ActiveExpansionLevel = (byte)GetExpansion();
response.SuccessInfo.Value.AccountExpansionLevel = (byte)GetAccountExpansion();
response.SuccessInfo.Value.VirtualRealmAddress = Global.WorldMgr.GetVirtualRealmAddress();
response.SuccessInfo.Value.Time = (uint)Time.UnixTime;
response.SuccessInfo.Value.Time = (uint)GameTime.GetGameTime();
var realm = Global.WorldMgr.GetRealm();
+10 -3
View File
@@ -246,10 +246,17 @@ namespace Game
//}
// prevent character creating Expansion class without Expansion account
var classExpansionRequirement = Global.ObjectMgr.GetClassExpansionRequirement(charCreate.CreateInfo.ClassId);
if (classExpansionRequirement > GetAccountExpansion())
ClassAvailability classExpansionRequirement = Global.ObjectMgr.GetClassExpansionRequirement(charCreate.CreateInfo.RaceId, charCreate.CreateInfo.ClassId);
if (classExpansionRequirement == null)
{
Log.outError(LogFilter.Network, $"Expansion {GetAccountExpansion()} account:[{GetAccountId()}] tried to Create character with expansion {classExpansionRequirement} class ({charCreate.CreateInfo.ClassId})");
Log.outError(LogFilter.Player, $"Expansion {GetAccountExpansion()} account:[{GetAccountId()}] tried to Create character for race/class combination that is missing requirements in db ({charCreate.CreateInfo.RaceId}/{charCreate.CreateInfo.ClassId})");
SendCharCreate(ResponseCodes.CharCreateExpansionClass);
return;
}
if (classExpansionRequirement.ActiveExpansionLevel > (int)GetExpansion() || classExpansionRequirement.AccountExpansionLevel > (int)GetAccountExpansion())
{
Log.outError(LogFilter.Player, $"Expansion {GetAccountExpansion()} account:[{GetAccountId()}] tried to Create character with expansion {classExpansionRequirement.AccountExpansionLevel} race/class ({charCreate.CreateInfo.RaceId}/{charCreate.CreateInfo.ClassId})");
SendCharCreate(ResponseCodes.CharCreateExpansionClass);
return;
}
+1
View File
@@ -94,6 +94,7 @@ namespace Game
QueryGameObjectResponse response = new QueryGameObjectResponse();
response.GameObjectID = packet.GameObjectID;
response.Guid = packet.Guid;
SendPacket(response);
}
}