From baaa0cb7d45e6a812acb6efe1cfe0aa0d4883783 Mon Sep 17 00:00:00 2001 From: Robbie Lodico Date: Thu, 16 Jan 2025 12:01:18 +0100 Subject: [PATCH] fix: load guild for rank information --- Intersect.Server.Core/Entities/Player.Database.cs | 10 ++++++---- .../Web/Pages/Shared/Players/_PlayerCard.cshtml | 2 +- Intersect.Server/Web/WebResources.Designer.cs | 6 ++++++ Intersect.Server/Web/WebResources.es.resx | 3 +++ Intersect.Server/Web/WebResources.fr.resx | 3 +++ Intersect.Server/Web/WebResources.it.resx | 3 +++ Intersect.Server/Web/WebResources.pt-br.resx | 3 +++ Intersect.Server/Web/WebResources.resx | 3 +++ 8 files changed, 28 insertions(+), 5 deletions(-) diff --git a/Intersect.Server.Core/Entities/Player.Database.cs b/Intersect.Server.Core/Entities/Player.Database.cs index d89a7b717d..68dd68ed99 100644 --- a/Intersect.Server.Core/Entities/Player.Database.cs +++ b/Intersect.Server.Core/Entities/Player.Database.cs @@ -495,11 +495,12 @@ SortDirection sortDirection .Skip(offset) .Take(count) .Include(p => p.Bank) + .Include(p => p.Guild) .Include(p => p.Hotbar) - .Include(p => p.Quests) - .Include(p => p.Variables) .Include(p => p.Items) + .Include(p => p.Quests) .Include(p => p.Spells) + .Include(p => p.Variables) .AsSplitQuery() ) ?? throw new InvalidOperationException(); @@ -512,11 +513,12 @@ SortDirection sortDirection .Skip(offset) .Take(count) .Include(p => p.Bank) + .Include(p => p.Guild) .Include(p => p.Hotbar) - .Include(p => p.Quests) - .Include(p => p.Variables) .Include(p => p.Items) + .Include(p => p.Quests) .Include(p => p.Spells) + .Include(p => p.Variables) .AsSplitQuery() ) ?? throw new InvalidOperationException(); diff --git a/Intersect.Server/Web/Pages/Shared/Players/_PlayerCard.cshtml b/Intersect.Server/Web/Pages/Shared/Players/_PlayerCard.cshtml index f7beea4270..5df37371af 100644 --- a/Intersect.Server/Web/Pages/Shared/Players/_PlayerCard.cshtml +++ b/Intersect.Server/Web/Pages/Shared/Players/_PlayerCard.cshtml @@ -49,7 +49,7 @@ @WebResources.XofYExp.Format(player.Exp, player.ExperienceToNextLevel) - @(player.Guild?.Name ?? WebResources.NoGuild) + @(string.IsNullOrWhiteSpace(player.Guild?.Name) ? WebResources.NoGuild : WebResources.GuildX.Format(player.Guild.Name)) diff --git a/Intersect.Server/Web/WebResources.Designer.cs b/Intersect.Server/Web/WebResources.Designer.cs index 47bf4b4cc3..b7ea4176ad 100644 --- a/Intersect.Server/Web/WebResources.Designer.cs +++ b/Intersect.Server/Web/WebResources.Designer.cs @@ -140,5 +140,11 @@ internal static string XsPlayers { return ResourceManager.GetString("XsPlayers", resourceCulture); } } + + internal static string GuildX { + get { + return ResourceManager.GetString("GuildX", resourceCulture); + } + } } } diff --git a/Intersect.Server/Web/WebResources.es.resx b/Intersect.Server/Web/WebResources.es.resx index 2dd64d0844..fa7d4b80a2 100644 --- a/Intersect.Server/Web/WebResources.es.resx +++ b/Intersect.Server/Web/WebResources.es.resx @@ -50,4 +50,7 @@ No encontrado + + Clan: {0} + \ No newline at end of file diff --git a/Intersect.Server/Web/WebResources.fr.resx b/Intersect.Server/Web/WebResources.fr.resx index 81aad3eaa7..515f234c54 100644 --- a/Intersect.Server/Web/WebResources.fr.resx +++ b/Intersect.Server/Web/WebResources.fr.resx @@ -44,4 +44,7 @@ Pas en guilde + + Guilde: {0} + \ No newline at end of file diff --git a/Intersect.Server/Web/WebResources.it.resx b/Intersect.Server/Web/WebResources.it.resx index acd61e88fa..b37472e549 100644 --- a/Intersect.Server/Web/WebResources.it.resx +++ b/Intersect.Server/Web/WebResources.it.resx @@ -56,4 +56,7 @@ Inizio + + Gilda: {0} + \ No newline at end of file diff --git a/Intersect.Server/Web/WebResources.pt-br.resx b/Intersect.Server/Web/WebResources.pt-br.resx index b1a2577c3d..3c90d2067b 100644 --- a/Intersect.Server/Web/WebResources.pt-br.resx +++ b/Intersect.Server/Web/WebResources.pt-br.resx @@ -59,4 +59,7 @@ InĂ­cio + + Guilda: {0} + \ No newline at end of file diff --git a/Intersect.Server/Web/WebResources.resx b/Intersect.Server/Web/WebResources.resx index 38e994af0a..992c9aae2e 100644 --- a/Intersect.Server/Web/WebResources.resx +++ b/Intersect.Server/Web/WebResources.resx @@ -71,4 +71,7 @@ {0}'s Characters + + Guild: {0} + \ No newline at end of file