From 92b631c5339735c1f6cc04cb632db9efbd80f0f4 Mon Sep 17 00:00:00 2001 From: Slendy Date: Wed, 31 May 2023 20:43:49 -0500 Subject: [PATCH] Fix GameUserSlot icon and username query --- ProjectLighthouse/Types/Serialization/GameUserSlot.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ProjectLighthouse/Types/Serialization/GameUserSlot.cs b/ProjectLighthouse/Types/Serialization/GameUserSlot.cs index ffa14856..4d707f81 100644 --- a/ProjectLighthouse/Types/Serialization/GameUserSlot.cs +++ b/ProjectLighthouse/Types/Serialization/GameUserSlot.cs @@ -245,16 +245,16 @@ public class GameUserSlot : SlotBase, INeedsPreparationForSerialization PhotoCount = database.Photos.Count(p => p.SlotId == this.SlotId), AuthorPhotoCount = database.Photos.Count(p => p.SlotId == this.SlotId && p.CreatorId == this.CreatorId), HeartCount = database.HeartedLevels.Count(h => h.SlotId == this.SlotId), - AuthorHandle = database.Users.Where(u => u.UserId == this.CreatorId).Select(u => new NpHandle + UsernameAndIcon = database.Users.Where(u => u.UserId == this.CreatorId).Select(u => new { - Username = u.Username, - IconHash = u.IconHash, + u.Username, + u.IconHash, }).First(), }) .OrderBy(_ => 1) .FirstAsync(); ReflectionHelper.CopyAllFields(stats, this); - this.AuthorHandle = stats.AuthorHandle; + this.AuthorHandle = new NpHandle(stats.UsernameAndIcon.Username, stats.UsernameAndIcon.IconHash); if (this.GameVersion == GameVersion.LittleBigPlanet1) {