~ruther/NosSmooth

917d85abd3bd244fd4f11bd9d84ca339a53dcf4e — František Boháček 2 years ago b0d76bd
fix(packets): correctly parse family
M Core/NosSmooth.Game/Data/Social/Family.cs => Core/NosSmooth.Game/Data/Social/Family.cs +1 -1
@@ 16,7 16,7 @@ namespace NosSmooth.Game.Data.Social;
/// <param name="Icons">What icons the family has activated.</param>
public record Family
(
    string? Id,
    long? Id,
    short? Title,
    string? Name,
    byte? Level,

M Core/NosSmooth.Game/PacketHandlers/Characters/CharacterInitResponder.cs => Core/NosSmooth.Game/PacketHandlers/Characters/CharacterInitResponder.cs +4 -3
@@ 93,15 93,16 @@ public class CharacterInitResponder : IPacketResponder<CInfoPacket>, IPacketResp
        (
            () => new Family
            (
                packet.FamilyId,
                null,
                packet.FamilySubPacket.Value?.FamilyId,
                packet.FamilySubPacket.Value?.Title,
                packet.FamilyName,
                packet.FamilyLevel,
                null
            ),
            f => f with
            {
                Id = packet.FamilyId,
                Id = packet.FamilySubPacket.Value?.FamilyId,
                Title = packet.FamilySubPacket.Value?.Title,
                Name = packet.FamilyName,
                Level = packet.FamilyLevel
            },

M Packets/NosSmooth.Packets/Server/Character/CInfoPacket.cs => Packets/NosSmooth.Packets/Server/Character/CInfoPacket.cs +5 -3
@@ 5,7 5,9 @@
//  Licensed under the MIT license. See LICENSE file in the project root for full license information.

using NosSmooth.Packets.Enums.Players;
using NosSmooth.PacketSerializer.Abstractions;
using NosSmooth.PacketSerializer.Abstractions.Attributes;
using NosSmooth.PacketSerializer.Abstractions.Common;

namespace NosSmooth.Packets.Server.Character;



@@ 43,10 45,10 @@ public record CInfoPacket
    string? Unknown,
    [PacketIndex(2)]
    short? GroupId,
    [PacketIndex(3)]
    string? FamilyId,
    [PacketIndex(3, InnerSeparator = '.')]
    NullableWrapper<FamilySubPacket> FamilySubPacket,
    [PacketIndex(4)]
    string? FamilyName,
    NameString FamilyName,
    [PacketIndex(5)]
    long CharacterId,
    [PacketIndex(6)]

M Packets/NosSmooth.Packets/Server/Character/FamilySubPacket.cs => Packets/NosSmooth.Packets/Server/Character/FamilySubPacket.cs +1 -1
@@ 18,7 18,7 @@ namespace NosSmooth.Packets.Server.Character;
public record FamilySubPacket
(
    [PacketIndex(0)]
    string FamilyId,
    long FamilyId,
    [PacketIndex(1)]
    short Title
) : IPacket;
\ No newline at end of file

Do not follow this link