From 2f007fadb75ef139004bc10c583a9a84f1561e0c Mon Sep 17 00:00:00 2001 From: Xian55 <367101+Xian55@users.noreply.github.com> Date: Tue, 5 Dec 2023 09:55:18 +0100 Subject: [PATCH] SharedLib: Data are readonly record structs. In case have to modify them use the 'with' keyword --- SharedLib/Data/Creature.cs | 2 +- SharedLib/Data/Item.cs | 2 +- SharedLib/Data/Spell.cs | 2 +- SharedLib/Data/TalentTab.cs | 2 +- SharedLib/Data/TalentTreeElement.cs | 2 +- SharedLib/Data/WorldMapArea.cs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SharedLib/Data/Creature.cs b/SharedLib/Data/Creature.cs index 989acf942..ada5355e4 100644 --- a/SharedLib/Data/Creature.cs +++ b/SharedLib/Data/Creature.cs @@ -1,6 +1,6 @@ namespace SharedLib; -public readonly struct Creature +public readonly record struct Creature { public int Entry { get; init; } public string Name { get; init; } diff --git a/SharedLib/Data/Item.cs b/SharedLib/Data/Item.cs index 70c6d2929..5987be25e 100644 --- a/SharedLib/Data/Item.cs +++ b/SharedLib/Data/Item.cs @@ -1,6 +1,6 @@ namespace SharedLib; -public readonly struct Item +public readonly record struct Item { public int Entry { get; init; } public string Name { get; init; } diff --git a/SharedLib/Data/Spell.cs b/SharedLib/Data/Spell.cs index ea3cf8282..d222bcaad 100644 --- a/SharedLib/Data/Spell.cs +++ b/SharedLib/Data/Spell.cs @@ -1,6 +1,6 @@ namespace SharedLib; -public readonly struct Spell +public readonly record struct Spell { public int Id { get; init; } public string Name { get; init; } diff --git a/SharedLib/Data/TalentTab.cs b/SharedLib/Data/TalentTab.cs index 6153e875a..79046bc48 100644 --- a/SharedLib/Data/TalentTab.cs +++ b/SharedLib/Data/TalentTab.cs @@ -1,6 +1,6 @@ namespace SharedLib; -public readonly struct TalentTab +public readonly record struct TalentTab { public int Id { get; init; } public int OrderIndex { get; init; } diff --git a/SharedLib/Data/TalentTreeElement.cs b/SharedLib/Data/TalentTreeElement.cs index 5d74e18c5..9c64de3c5 100644 --- a/SharedLib/Data/TalentTreeElement.cs +++ b/SharedLib/Data/TalentTreeElement.cs @@ -1,6 +1,6 @@ namespace SharedLib; -public readonly struct TalentTreeElement +public readonly record struct TalentTreeElement { public int TierID { get; init; } public int ColumnIndex { get; init; } diff --git a/SharedLib/Data/WorldMapArea.cs b/SharedLib/Data/WorldMapArea.cs index 010aba380..0323c5f4d 100644 --- a/SharedLib/Data/WorldMapArea.cs +++ b/SharedLib/Data/WorldMapArea.cs @@ -1,6 +1,6 @@ namespace SharedLib; -public readonly struct WorldMapArea +public readonly record struct WorldMapArea { public int MapID { get; init; } public int AreaID { get; init; }