Core/PacketIO: Updated packet structures to 9.2.0

Port From (https://github.com/TrinityCore/TrinityCore/commit/9f30afe3528441571f89cb2e1775c756774fa0cd)
This commit is contained in:
hondacrx
2022-05-09 23:14:38 -04:00
parent 1ca851db26
commit 0bbabbd667
32 changed files with 1309 additions and 1023 deletions
+2 -2
View File
@@ -763,10 +763,10 @@ namespace Game
// Send PVPSeason
{
SeasonInfo seasonInfo = new();
seasonInfo.PreviousSeason = (WorldConfig.GetIntValue(WorldCfg.ArenaSeasonId) - (WorldConfig.GetBoolValue(WorldCfg.ArenaSeasonInProgress) ? 1 : 0));
seasonInfo.MythicPlusMilestoneSeasonID = (WorldConfig.GetIntValue(WorldCfg.ArenaSeasonId) - (WorldConfig.GetBoolValue(WorldCfg.ArenaSeasonInProgress) ? 1 : 0));
if (WorldConfig.GetBoolValue(WorldCfg.ArenaSeasonInProgress))
seasonInfo.CurrentSeason = WorldConfig.GetIntValue(WorldCfg.ArenaSeasonId);
seasonInfo.PreviousArenaSeason = WorldConfig.GetIntValue(WorldCfg.ArenaSeasonId);
SendPacket(seasonInfo);
}
+1 -1
View File
@@ -584,7 +584,7 @@ namespace Game
// Only allow text-emotes for "dead" entities (feign death included)
if (GetPlayer().HasUnitState(UnitState.Died))
break;
GetPlayer().HandleEmoteCommand(emote, null, packet.SpellVisualKitIDs);
GetPlayer().HandleEmoteCommand(emote, null, packet.SpellVisualKitIDs, packet.SequenceVariation);
break;
}
+2 -6
View File
@@ -31,16 +31,12 @@ namespace Game
Guild guild = Global.GuildMgr.GetGuildByGuid(query.GuildGuid);
if (guild)
{
if (guild.IsMember(query.PlayerGuid))
{
guild.SendQueryResponse(this, query.PlayerGuid);
return;
}
guild.SendQueryResponse(this);
return;
}
QueryGuildInfoResponse response = new();
response.GuildGUID = query.GuildGuid;
response.PlayerGuid = query.PlayerGuid;
SendPacket(response);
}
+1
View File
@@ -440,6 +440,7 @@ namespace Game
SpecialMountAnim specialMountAnim = new();
specialMountAnim.UnitGUID = _player.GetGUID();
specialMountAnim.SpellVisualKitIDs.AddRange(mountSpecial.SpellVisualKitIDs);
specialMountAnim.SequenceVariation = mountSpecial.SequenceVariation;
GetPlayer().SendMessageToSet(specialMountAnim, false);
}
+20 -13
View File
@@ -33,24 +33,31 @@ namespace Game
[WorldPacketHandler(ClientOpcodes.QueryPlayerName, Processing = PacketProcessing.Inplace)]
void HandleNameQueryRequest(QueryPlayerName queryPlayerName)
{
SendNameQuery(queryPlayerName.Player);
}
public void SendNameQuery(ObjectGuid guid)
{
Player player = Global.ObjAccessor.FindPlayer(guid);
QueryPlayerNameResponse response = new();
response.Player = guid;
if (response.Data.Initialize(guid, player))
response.Result = ResponseCodes.Success;
else
response.Result = ResponseCodes.Failure; // name unknown
foreach (ObjectGuid guid in queryPlayerName.Players)
{
BuildNameQueryData(guid, out NameCacheLookupResult nameCacheLookupResult);
response.Players.Add(nameCacheLookupResult);
}
SendPacket(response);
}
public void BuildNameQueryData(ObjectGuid guid, out NameCacheLookupResult lookupData)
{
lookupData = new();
Player player = Global.ObjAccessor.FindPlayer(guid);
lookupData.Player = guid;
lookupData.Data = new();
if (lookupData.Data.Initialize(guid, player))
lookupData.Result = (byte)ResponseCodes.Success;
else
lookupData.Result = (byte)ResponseCodes.Failure; // name unknown
}
[WorldPacketHandler(ClientOpcodes.QueryTime, Processing = PacketProcessing.Inplace)]
void HandleQueryTime(QueryTime packet)
{