From ee5e9661e7e771ce6947630093a4eb4a4c16c876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Boh=C3=A1=C4=8Dek?= Date: Tue, 4 Jan 2022 21:48:06 +0100 Subject: [PATCH] feat: add effects to living entities --- Core/NosSmooth.Game/Data/Characters/Character.cs | 8 +++++--- Core/NosSmooth.Game/Data/Entities/LivingEntity.cs | 5 +++++ Core/NosSmooth.Game/Data/Entities/Monster.cs | 3 ++- Core/NosSmooth.Game/Data/Entities/Player.cs | 4 +++- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Core/NosSmooth.Game/Data/Characters/Character.cs b/Core/NosSmooth.Game/Data/Characters/Character.cs index fbd01aa..005295a 100644 --- a/Core/NosSmooth.Game/Data/Characters/Character.cs +++ b/Core/NosSmooth.Game/Data/Characters/Character.cs @@ -35,7 +35,7 @@ namespace NosSmooth.Game.Data.Characters; /// /// /// -/// +/// /// /// /// @@ -75,7 +75,8 @@ public record Character Morph? Morph = default, bool? ArenaWinner = default, bool? Invisible = default, - long? Reputation = default + long? Reputation = default, + IReadOnlyList? EffectsVNums = default ) : Player( Id, Name, @@ -98,5 +99,6 @@ public record Character Morph, ArenaWinner, Invisible, - Reputation + Reputation, + EffectsVNums ); \ No newline at end of file diff --git a/Core/NosSmooth.Game/Data/Entities/LivingEntity.cs b/Core/NosSmooth.Game/Data/Entities/LivingEntity.cs index a59eff0..6428a32 100644 --- a/Core/NosSmooth.Game/Data/Entities/LivingEntity.cs +++ b/Core/NosSmooth.Game/Data/Entities/LivingEntity.cs @@ -48,4 +48,9 @@ public interface ILivingEntity : IEntity /// Gets the size of the entity. /// public short Size { get; } + + /// + /// Gets the VNums of the effects the entity has. + /// + public IReadOnlyList? EffectsVNums { 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 index b4517a2..91a8d79 100644 --- a/Core/NosSmooth.Game/Data/Entities/Monster.cs +++ b/Core/NosSmooth.Game/Data/Entities/Monster.cs @@ -35,7 +35,8 @@ public record Monster Health? Mp, FactionType? Faction, short Size, - long MonsterVNum + long MonsterVNum, + IReadOnlyList? EffectsVNums = default ) : ILivingEntity { /// diff --git a/Core/NosSmooth.Game/Data/Entities/Player.cs b/Core/NosSmooth.Game/Data/Entities/Player.cs index 274dded..48ad1f2 100644 --- a/Core/NosSmooth.Game/Data/Entities/Player.cs +++ b/Core/NosSmooth.Game/Data/Entities/Player.cs @@ -4,6 +4,7 @@ // 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 System.Collections.ObjectModel; using NosSmooth.Game.Data.Info; using NosSmooth.Packets.Enums; using NosSmooth.Packets.Enums.Players; @@ -56,7 +57,8 @@ public record Player Morph? Morph = default, bool? ArenaWinner = default, bool? Invisible = default, - long? Reputation = default + long? Reputation = default, + IReadOnlyList? EffectsVNums = default ) : ILivingEntity { /// -- 2.49.0