From 7ca88f702b6a59e9a5a3629df7b8529e7f47f635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Boh=C3=A1=C4=8Dek?= Date: Tue, 21 Dec 2021 22:45:18 +0100 Subject: [PATCH] feat: add entities types skeleton --- .../Data/Entities/GroundItem.cs | 12 +++++ Core/NosSmooth.Game/Data/Entities/IEntity.cs | 36 ++++++++++++++ .../Data/Entities/LivingEntity.cs | 47 +++++++++++++++++++ Core/NosSmooth.Game/Data/Entities/Monster.cs | 12 +++++ Core/NosSmooth.Game/Data/Entities/Npc.cs | 12 +++++ Core/NosSmooth.Game/Data/Entities/Partner.cs | 12 +++++ Core/NosSmooth.Game/Data/Entities/Pet.cs | 12 +++++ Core/NosSmooth.Game/Data/Entities/Player.cs | 12 +++++ 8 files changed, 155 insertions(+) create mode 100644 Core/NosSmooth.Game/Data/Entities/GroundItem.cs create mode 100644 Core/NosSmooth.Game/Data/Entities/IEntity.cs create mode 100644 Core/NosSmooth.Game/Data/Entities/LivingEntity.cs create mode 100644 Core/NosSmooth.Game/Data/Entities/Monster.cs create mode 100644 Core/NosSmooth.Game/Data/Entities/Npc.cs create mode 100644 Core/NosSmooth.Game/Data/Entities/Partner.cs create mode 100644 Core/NosSmooth.Game/Data/Entities/Pet.cs create mode 100644 Core/NosSmooth.Game/Data/Entities/Player.cs diff --git a/Core/NosSmooth.Game/Data/Entities/GroundItem.cs b/Core/NosSmooth.Game/Data/Entities/GroundItem.cs new file mode 100644 index 0000000000000000000000000000000000000000..32be33ddc876a3d02845e60c1615ed116484e88b --- /dev/null +++ b/Core/NosSmooth.Game/Data/Entities/GroundItem.cs @@ -0,0 +1,12 @@ +// +// DroppedItem.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.Entities; + +public class GroundItem +{ + +} \ No newline at end of file diff --git a/Core/NosSmooth.Game/Data/Entities/IEntity.cs b/Core/NosSmooth.Game/Data/Entities/IEntity.cs new file mode 100644 index 0000000000000000000000000000000000000000..e007c252914aecb5666c46fca13a59bfc998ac31 --- /dev/null +++ b/Core/NosSmooth.Game/Data/Entities/IEntity.cs @@ -0,0 +1,36 @@ +// +// IEntity.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.Shared.Enumerations; +using NosSmooth.Game.Data; + +namespace NosSmooth.Game.Entities; + +/// +/// Base type for entities. +/// +public interface IEntity +{ + /// + /// Gets the id of the entity. + /// + public long Id { get; } + + /// + /// Gets the name of the entity. May be null if unknown. + /// + public string? Name { get; } + + /// + /// Gets the position of the entity. + /// + public Position Position { get; } + + /// + /// Gets the type of the entity. + /// + public VisualType Type { get; } +} \ No newline at end of file diff --git a/Core/NosSmooth.Game/Data/Entities/LivingEntity.cs b/Core/NosSmooth.Game/Data/Entities/LivingEntity.cs new file mode 100644 index 0000000000000000000000000000000000000000..7f23b6d1c676073ebd7c297ed76821550a3ff44c --- /dev/null +++ b/Core/NosSmooth.Game/Data/Entities/LivingEntity.cs @@ -0,0 +1,47 @@ +// +// LivingEntity.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 NosCore.Shared.Enumerations; +using NosSmooth.Game.Data; + +namespace NosSmooth.Game.Entities; + +/// +/// Represents any nostale living entity such as monster, npc, player. +/// +public interface ILivingEntity : IEntity +{ + /// + /// Gets the speed of the entity. May be null if unknown. + /// + public byte? Speed { get; } + + /// + /// Gets the level of the entity. May be null if unknown. + /// + public ushort? Level { get; } + + /// + /// Gets the direction the entity is looking. May be null if unknown. + /// + public byte? Direction { get; } + + /// + /// Gets the percentage of the health points of the entity. May be null if unknown. + /// + public byte? HpPercentage { get; } + + /// + /// Gets the percentage of the mana points of the entity. May be null if unknown. + /// + public byte? MpPercentage { get; } + + /// + /// Gets the faction of the entity. May be null if unknown. + /// + public FactionType? Faction { get; } +} \ No newline at end of file diff --git a/Core/NosSmooth.Game/Data/Entities/Monster.cs b/Core/NosSmooth.Game/Data/Entities/Monster.cs new file mode 100644 index 0000000000000000000000000000000000000000..ed6e6c43790229dba6645bef39feba76e015302a --- /dev/null +++ b/Core/NosSmooth.Game/Data/Entities/Monster.cs @@ -0,0 +1,12 @@ +// +// Monster.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.Entities; + +public class Monster +{ + +} \ No newline at end of file diff --git a/Core/NosSmooth.Game/Data/Entities/Npc.cs b/Core/NosSmooth.Game/Data/Entities/Npc.cs new file mode 100644 index 0000000000000000000000000000000000000000..acd6c8ed3f2d93511950511e76e9ec78f5685182 --- /dev/null +++ b/Core/NosSmooth.Game/Data/Entities/Npc.cs @@ -0,0 +1,12 @@ +// +// Npc.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.Entities; + +public class Npc +{ + +} \ No newline at end of file diff --git a/Core/NosSmooth.Game/Data/Entities/Partner.cs b/Core/NosSmooth.Game/Data/Entities/Partner.cs new file mode 100644 index 0000000000000000000000000000000000000000..8d226c98cedce2507909823259cd15a4deab7bc6 --- /dev/null +++ b/Core/NosSmooth.Game/Data/Entities/Partner.cs @@ -0,0 +1,12 @@ +// +// Partner.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.Entities; + +public class Partner +{ + +} \ No newline at end of file diff --git a/Core/NosSmooth.Game/Data/Entities/Pet.cs b/Core/NosSmooth.Game/Data/Entities/Pet.cs new file mode 100644 index 0000000000000000000000000000000000000000..ed3ecced55b8a8428f01893ea31eb839ce695602 --- /dev/null +++ b/Core/NosSmooth.Game/Data/Entities/Pet.cs @@ -0,0 +1,12 @@ +// +// Pet.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.Entities; + +public class Pet +{ + +} \ No newline at end of file diff --git a/Core/NosSmooth.Game/Data/Entities/Player.cs b/Core/NosSmooth.Game/Data/Entities/Player.cs new file mode 100644 index 0000000000000000000000000000000000000000..50efa784589e90e99ccb22573a25d4ad82aa0369 --- /dev/null +++ b/Core/NosSmooth.Game/Data/Entities/Player.cs @@ -0,0 +1,12 @@ +// +// Player.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.Entities; + +public class Player +{ + +} \ No newline at end of file