From d45c0f088bb74f87198ea0ea38a063a3468ddf37 Mon Sep 17 00:00:00 2001 From: NotKappa Date: Wed, 15 Feb 2023 21:40:30 +0300 Subject: [PATCH] Move VNum property to ILivingEntity All Living entities have a VNum so it should be inside the interface --- Core/NosSmooth.Game/Data/Entities/LivingEntity.cs | 5 +++++ Core/NosSmooth.Game/Data/Entities/Monster.cs | 4 +--- Core/NosSmooth.Game/Data/Entities/Npc.cs | 6 ++---- Core/NosSmooth.Game/Data/Entities/Player.cs | 4 +--- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Core/NosSmooth.Game/Data/Entities/LivingEntity.cs b/Core/NosSmooth.Game/Data/Entities/LivingEntity.cs index 40be692..0fe29b7 100644 --- a/Core/NosSmooth.Game/Data/Entities/LivingEntity.cs +++ b/Core/NosSmooth.Game/Data/Entities/LivingEntity.cs @@ -14,6 +14,11 @@ namespace NosSmooth.Game.Data.Entities; /// public interface ILivingEntity : IEntity { + /// + /// Gets the VNum of the entity. + /// + public int VNum { get; internal set; } + /// /// Gets the speed of the entity. May be null if unknown. /// diff --git a/Core/NosSmooth.Game/Data/Entities/Monster.cs b/Core/NosSmooth.Game/Data/Entities/Monster.cs index 393979a..9f66480 100644 --- a/Core/NosSmooth.Game/Data/Entities/Monster.cs +++ b/Core/NosSmooth.Game/Data/Entities/Monster.cs @@ -21,9 +21,7 @@ public class Monster : ILivingEntity /// public IMonsterInfo? MonsterInfo { get; set; } - /// - /// Gets the VNum of the monster. - /// + /// public int VNum { get; set; } /// diff --git a/Core/NosSmooth.Game/Data/Entities/Npc.cs b/Core/NosSmooth.Game/Data/Entities/Npc.cs index 553789b..b2b894a 100644 --- a/Core/NosSmooth.Game/Data/Entities/Npc.cs +++ b/Core/NosSmooth.Game/Data/Entities/Npc.cs @@ -21,10 +21,8 @@ public class Npc : ILivingEntity /// public IMonsterInfo? NpcInfo { get; set; } - /// - /// Gets the VNum of the npc. - /// - public int VNum { get; internal set; } + /// + public int VNum { get; set; } /// public long Id { get; set; } diff --git a/Core/NosSmooth.Game/Data/Entities/Player.cs b/Core/NosSmooth.Game/Data/Entities/Player.cs index 0abd7ee..1d034a7 100644 --- a/Core/NosSmooth.Game/Data/Entities/Player.cs +++ b/Core/NosSmooth.Game/Data/Entities/Player.cs @@ -77,9 +77,7 @@ public class Player : ILivingEntity /// public Family? Family { get; set; } - /// - /// Gets the VNum of the npc. - /// + /// public int VNum { get; set; } /// -- 2.48.1