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 e1a3b668d59d39c8d1c10089dc8a767f0af7297d..35f517a3a14a62ec8717e5aee970f3c7d784a3ad 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 2657ff71106dfcb7ac96b6f4fc81ededa9d53861..f63a0de5a57f32fa538de84a7bda54c0631bb54e 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 32be33ddc876a3d02845e60c1615ed116484e88b..1cabd0f052d27aba5f34f282866a2c6eaaf0f8ca 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 ed6e6c43790229dba6645bef39feba76e015302a..7112530ad3f83b9022e697a440578555fc6a735b 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 acd6c8ed3f2d93511950511e76e9ec78f5685182..da75fbe400b237dbafabd0caa436850e53f31a20 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 8d226c98cedce2507909823259cd15a4deab7bc6..d9a82022fa16b64e39352939bbccc878aa219250 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 ed3ecced55b8a8428f01893ea31eb839ce695602..2f9c15722aecb09cd9397cdb3e38a56428d87d4e 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 9c8ebac975bee1f786eed9924107e5f730006ba8..5ea5754c84dbc1f5e0a664a1a348d100bd756199 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 6c441fcdc0fbecfb3c769a076c228b36fb6de607..38294655489fb8c47b615755f0b476c909858e4d 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 f72223b4ae9ea2cdda0246a39ca72005c491eed6..f0e63f1029320fd5d4ec1db6d3ae7bd75532c7a9 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 1ce385a9d8ab1732cd487717109cec5dc6e17587..1fb2835c3f0432f4b04b47496343073ba456c98e 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 93a9234f73a75253e8e31888b7c90f318c2c08e4..80d7d80b7d2588758bf62e29364f85fb89ec1a93 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 c8dbce7a78bffbbc597545648f465b74576f69f1..73a47300c92afc207f37f59e14d07b5b26a5dd09 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 32173066081aa6ca7b96f5753dc1ff2f272778b0..b1f7a78677fb25a109a3921f438dc5afada46438 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 4e8457a544100422cf6d90cda58dff22d1fb94b1..41ab68eacf9335800378aca7ad93dc968e87c262 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 01a5d2b91b8c05c9903b54dc7ea3974868bdd3c2..ba8fb9bfbebf3a7ea8cc76bfe5265d77461fcf3b 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