~ruther/NosSmooth

de208b053b62a56fb3766d1082897c661053ecce — František Boháček 3 years ago 9f6bff0
feat: add chat types skeleton
A Core/NosSmooth.Game/Data/Characters/Family.cs => Core/NosSmooth.Game/Data/Characters/Family.cs +9 -0
@@ 0,0 1,9 @@
// 
// Family.cs
// 
// Copyright (c) Christofel authors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace NosSmooth.Game.Data.Character;

public record Family();
\ No newline at end of file

A Core/NosSmooth.Game/Data/Chat/ChatMessage.cs => Core/NosSmooth.Game/Data/Chat/ChatMessage.cs +17 -0
@@ 0,0 1,17 @@
//
//  ChatMessage.cs
//
//  Copyright (c) František Boháček. All rights reserved.
//  Licensed under the MIT license. See LICENSE file in the project root for full license information.

using NosSmooth.Game.Entities;

namespace NosSmooth.Game.Data.Chat;

/// <summary>
/// Message received from user in chat.
/// </summary>
/// <param name="CharacterId">The id of the character.</param>
/// <param name="Player">The player </param>
/// <param name="Message">The message sent from the friend.</param>
public record ChatMessage(long CharacterId, Player? Player, string Message);
\ No newline at end of file

A Core/NosSmooth.Game/Data/Chat/DirectMessage.cs => Core/NosSmooth.Game/Data/Chat/DirectMessage.cs +15 -0
@@ 0,0 1,15 @@
//
//  DirectMessage.cs
//
//  Copyright (c) František Boháček. All rights reserved.
//  Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace NosSmooth.Game.Data.Chat;

/// <summary>
/// Message received from a friend.
/// </summary>
/// <param name="CharacterId">The id of the character.</param>
/// <param name="Friend">The friend from which the message is. May be null if the client did not receive friend packet.</param>
/// <param name="Message">The message sent from the friend.</param>
public record DirectMessage(long CharacterId, Friend? Friend, string? Message);
\ No newline at end of file

A Core/NosSmooth.Game/Data/Chat/Friend.cs => Core/NosSmooth.Game/Data/Chat/Friend.cs +35 -0
@@ 0,0 1,35 @@
//
//  Friend.cs
//
//  Copyright (c) František Boháček. All rights reserved.
//  Licensed under the MIT license. See LICENSE file in the project root for full license information.

using NosCore.Packets.Enumerations;

namespace NosSmooth.Game.Data.Chat;

/// <summary>
/// Represents character's friend.
/// </summary>
public class Friend
{
    /// <summary>
    /// The id of the character.
    /// </summary>
    public long CharacterId { get; internal set; }

    /// <summary>
    /// The type of the relation.
    /// </summary>
    public CharacterRelationType RelationType { get; internal set; }

    /// <summary>
    /// The name of the character.
    /// </summary>
    public string? CharacterName { get; internal set; }

    /// <summary>
    /// Whether the friend is connected to the server.
    /// </summary>
    public bool IsOnline { get; internal set; }
}
\ No newline at end of file

A Core/NosSmooth.Game/Data/Dialogs/Dialog.cs => Core/NosSmooth.Game/Data/Dialogs/Dialog.cs +18 -0
@@ 0,0 1,18 @@
//
//  Dialog.cs
//
//  Copyright (c) František Boháček. All rights reserved.
//  Licensed under the MIT license. See LICENSE file in the project root for full license information.

using NosCore.Packets.Enumerations;
using OneOf;

namespace NosSmooth.Game.Data.Dialogs;

/// <summary>
/// Represents dialog sent by the server
/// </summary>
/// <param name="AcceptCommand"></param>
/// <param name="Message"></param>
/// <param name="Parameters"></param>
public record Dialog(string AcceptCommand, OneOf<Game18NConstString, string> Message, IReadOnlyList<string> Parameters);
\ No newline at end of file

Do not follow this link