From 2205630e46d1d9a60eb1caf03be114dc0959e828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Boh=C3=A1=C4=8Dek?= Date: Sun, 26 Dec 2021 23:03:55 +0100 Subject: [PATCH] feat: update data --- Core/NosSmooth.Game/Data/Chat/ChatMessage.cs | 2 +- Core/NosSmooth.Game/Data/Dialogs/Dialog.cs | 7 ++- .../Data/Entities/GroundItem.cs | 29 +++++++---- Core/NosSmooth.Game/Data/Entities/Monster.cs | 48 +++++++++++++++---- Core/NosSmooth.Game/Data/Entities/Npc.cs | 20 ++++---- Core/NosSmooth.Game/Data/Entities/Partner.cs | 20 ++++---- Core/NosSmooth.Game/Data/Entities/Pet.cs | 20 ++++---- Core/NosSmooth.Game/Data/Inventory/Bag.cs | 18 +++---- .../Data/Inventory/Inventory.cs | 18 +++---- Core/NosSmooth.Game/Data/Login/Channel.cs | 18 +++---- Core/NosSmooth.Game/Data/Login/WorldServer.cs | 13 +++-- Core/NosSmooth.Game/Data/Maps/Map.cs | 20 ++++---- Core/NosSmooth.Game/Data/Maps/Miniland.cs | 21 ++++---- Core/NosSmooth.Game/Data/Maps/Portal.cs | 24 ++++++---- Core/NosSmooth.Game/Data/Maps/Timespace.cs | 12 ++--- Core/NosSmooth.Game/Data/Raids/Raid.cs | 18 +++---- 16 files changed, 183 insertions(+), 125 deletions(-) diff --git a/Core/NosSmooth.Game/Data/Chat/ChatMessage.cs b/Core/NosSmooth.Game/Data/Chat/ChatMessage.cs index e1a3b66..35f517a 100644 --- a/Core/NosSmooth.Game/Data/Chat/ChatMessage.cs +++ b/Core/NosSmooth.Game/Data/Chat/ChatMessage.cs @@ -4,7 +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 NosSmooth.Game.Entities; +using NosSmooth.Game.Data.Entities; namespace NosSmooth.Game.Data.Chat; diff --git a/Core/NosSmooth.Game/Data/Dialogs/Dialog.cs b/Core/NosSmooth.Game/Data/Dialogs/Dialog.cs index 2657ff7..f63a0de 100644 --- a/Core/NosSmooth.Game/Data/Dialogs/Dialog.cs +++ b/Core/NosSmooth.Game/Data/Dialogs/Dialog.cs @@ -15,4 +15,9 @@ namespace NosSmooth.Game.Data.Dialogs; /// /// /// -public record Dialog(string AcceptCommand, OneOf Message, IReadOnlyList Parameters); \ No newline at end of file +public record Dialog +( + string AcceptCommand, + OneOf Message, + IReadOnlyList Parameters +); \ No newline at end of file diff --git a/Core/NosSmooth.Game/Data/Entities/GroundItem.cs b/Core/NosSmooth.Game/Data/Entities/GroundItem.cs index 32be33d..1cabd0f 100644 --- a/Core/NosSmooth.Game/Data/Entities/GroundItem.cs +++ b/Core/NosSmooth.Game/Data/Entities/GroundItem.cs @@ -1,12 +1,25 @@ -// -// 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. +// +// GroundItem.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.Entities; +using NosCore.Shared.Enumerations; +using NosSmooth.Game.Data.Info; -public class GroundItem +namespace NosSmooth.Game.Data.Entities; + +/// +/// The item on the ground. +/// +/// The id of the item entity. +/// The vnum of the dropped item. +/// The position of the ground item. +public record GroundItem(long Id, long ItemVNum, Position? Position) : IEntity { - + /// + public string? Name => null; + + /// + public VisualType Type => VisualType.Object; } \ 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 ed6e6c4..7112530 100644 --- a/Core/NosSmooth.Game/Data/Entities/Monster.cs +++ b/Core/NosSmooth.Game/Data/Entities/Monster.cs @@ -1,12 +1,44 @@ -// -// 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. +// +// Monster.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.Entities; +using NosCore.Packets.Enumerations; +using NosCore.Shared.Enumerations; +using NosSmooth.Game.Data.Info; -public class Monster +namespace NosSmooth.Game.Data.Entities; + +/// +/// Represents nostale monster entity. +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +public record Monster +( + long Id, + string? Name, + Position? Position, + byte? Speed, + ushort? Level, + byte? Direction, + Health? Hp, + Health? Mp, + FactionType? Faction, + short Size, + long MonsterVNum +) : ILivingEntity { - + /// + public VisualType Type => VisualType.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 index acd6c8e..da75fbe 100644 --- a/Core/NosSmooth.Game/Data/Entities/Npc.cs +++ b/Core/NosSmooth.Game/Data/Entities/Npc.cs @@ -1,12 +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. +// +// Npc.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.Entities; +namespace NosSmooth.Game.Data.Entities; -public class Npc -{ - -} \ No newline at end of file +/// +/// Represents nostale npc entity. +/// +public record 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 index 8d226c9..d9a8202 100644 --- a/Core/NosSmooth.Game/Data/Entities/Partner.cs +++ b/Core/NosSmooth.Game/Data/Entities/Partner.cs @@ -1,12 +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. +// +// Partner.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.Entities; +namespace NosSmooth.Game.Data.Entities; -public class Partner -{ - -} \ No newline at end of file +/// +/// Represents Partner of the Character. +/// +public record Partner() : IPet; \ No newline at end of file diff --git a/Core/NosSmooth.Game/Data/Entities/Pet.cs b/Core/NosSmooth.Game/Data/Entities/Pet.cs index ed3ecce..2f9c157 100644 --- a/Core/NosSmooth.Game/Data/Entities/Pet.cs +++ b/Core/NosSmooth.Game/Data/Entities/Pet.cs @@ -1,12 +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. +// +// Pet.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.Entities; +namespace NosSmooth.Game.Data.Entities; -public class Pet -{ - -} \ No newline at end of file +/// +/// Represents pet of the character. +/// +public record Pet() : IPet; \ No newline at end of file diff --git a/Core/NosSmooth.Game/Data/Inventory/Bag.cs b/Core/NosSmooth.Game/Data/Inventory/Bag.cs index 9c8ebac..5ea5754 100644 --- a/Core/NosSmooth.Game/Data/Inventory/Bag.cs +++ b/Core/NosSmooth.Game/Data/Inventory/Bag.cs @@ -1,12 +1,12 @@ -// -// Bag.cs -// -// Copyright (c) Christofel authors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// +// Bag.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.Inventory; -public class Bag -{ - -} \ No newline at end of file +/// +/// Represents one bag in the inventory of the player. +/// +public record Bag(); \ No newline at end of file diff --git a/Core/NosSmooth.Game/Data/Inventory/Inventory.cs b/Core/NosSmooth.Game/Data/Inventory/Inventory.cs index 6c441fc..3829465 100644 --- a/Core/NosSmooth.Game/Data/Inventory/Inventory.cs +++ b/Core/NosSmooth.Game/Data/Inventory/Inventory.cs @@ -1,12 +1,12 @@ -// -// Inventory.cs -// -// Copyright (c) Christofel authors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// +// Inventory.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.Inventory; -public class Inventory -{ - -} \ No newline at end of file +/// +/// Represents the whole inventory of the character. +/// +public record Inventory(); \ No newline at end of file diff --git a/Core/NosSmooth.Game/Data/Login/Channel.cs b/Core/NosSmooth.Game/Data/Login/Channel.cs index f72223b..f0e63f1 100644 --- a/Core/NosSmooth.Game/Data/Login/Channel.cs +++ b/Core/NosSmooth.Game/Data/Login/Channel.cs @@ -1,12 +1,12 @@ -// -// Channel.cs -// -// Copyright (c) Christofel authors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// +// Channel.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.Login; -public class Channel -{ - -} \ No newline at end of file +/// +/// Channel of a nostale server. +/// +public record Channel(); \ No newline at end of file diff --git a/Core/NosSmooth.Game/Data/Login/WorldServer.cs b/Core/NosSmooth.Game/Data/Login/WorldServer.cs index 1ce385a..1fb2835 100644 --- a/Core/NosSmooth.Game/Data/Login/WorldServer.cs +++ b/Core/NosSmooth.Game/Data/Login/WorldServer.cs @@ -1,9 +1,12 @@ -// -// WorldServer.cs -// -// Copyright (c) Christofel authors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// +// WorldServer.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.Login; +/// +/// Represents nostale world server. +/// public record WorldServer(); \ No newline at end of file diff --git a/Core/NosSmooth.Game/Data/Maps/Map.cs b/Core/NosSmooth.Game/Data/Maps/Map.cs index 93a9234..80d7d80 100644 --- a/Core/NosSmooth.Game/Data/Maps/Map.cs +++ b/Core/NosSmooth.Game/Data/Maps/Map.cs @@ -1,12 +1,12 @@ -// -// Map.cs -// -// Copyright (c) Christofel authors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// +// Map.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.Maps; +namespace NosSmooth.Game.Data.Maps; -public class Map -{ - -} \ No newline at end of file +/// +/// Represents nostale map. +/// +public record Map(); \ No newline at end of file diff --git a/Core/NosSmooth.Game/Data/Maps/Miniland.cs b/Core/NosSmooth.Game/Data/Maps/Miniland.cs index c8dbce7..73a4730 100644 --- a/Core/NosSmooth.Game/Data/Maps/Miniland.cs +++ b/Core/NosSmooth.Game/Data/Maps/Miniland.cs @@ -1,12 +1,13 @@ -// -// Miniland.cs -// -// Copyright (c) Christofel authors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// +// Miniland.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.Maps; +namespace NosSmooth.Game.Data.Maps; -public class Miniland -{ - -} \ No newline at end of file +/// +/// Represents Miniland map that can contain miniland objects. +/// +/// The objects in the miniland. +public record Miniland(IReadOnlyList? Objects) : Map; \ No newline at end of file diff --git a/Core/NosSmooth.Game/Data/Maps/Portal.cs b/Core/NosSmooth.Game/Data/Maps/Portal.cs index 3217306..b1f7a78 100644 --- a/Core/NosSmooth.Game/Data/Maps/Portal.cs +++ b/Core/NosSmooth.Game/Data/Maps/Portal.cs @@ -1,12 +1,16 @@ -// -// Portal.cs -// -// Copyright (c) Christofel authors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// +// Portal.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.Maps; +using NosSmooth.Game.Data.Info; -public class Portal -{ - -} \ No newline at end of file +namespace NosSmooth.Game.Data.Maps; + +/// +/// Represents map portal leading to another map. +/// +/// The position of the portal. +/// The id of the target map. +public record Portal(Position Position, long TargetMapId); \ No newline at end of file diff --git a/Core/NosSmooth.Game/Data/Maps/Timespace.cs b/Core/NosSmooth.Game/Data/Maps/Timespace.cs index 4e8457a..41ab68e 100644 --- a/Core/NosSmooth.Game/Data/Maps/Timespace.cs +++ b/Core/NosSmooth.Game/Data/Maps/Timespace.cs @@ -1,9 +1,9 @@ -// -// Timespace.cs -// -// Copyright (c) Christofel authors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// +// Timespace.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.Maps; +namespace NosSmooth.Game.Data.Maps; public record Timespace(); \ No newline at end of file diff --git a/Core/NosSmooth.Game/Data/Raids/Raid.cs b/Core/NosSmooth.Game/Data/Raids/Raid.cs index 01a5d2b..ba8fb9b 100644 --- a/Core/NosSmooth.Game/Data/Raids/Raid.cs +++ b/Core/NosSmooth.Game/Data/Raids/Raid.cs @@ -1,12 +1,12 @@ -// -// Raid.cs -// -// Copyright (c) Christofel authors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// +// Raid.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.Raids; -public class Raid -{ - -} \ No newline at end of file +/// +/// Represents nostale raid. +/// +public record Raid(); \ No newline at end of file -- 2.48.1