diff --git a/src/Controllers/Common/ContentController.cs b/src/Controllers/Common/ContentController.cs index 2f364e3..40e96df 100644 --- a/src/Controllers/Common/ContentController.cs +++ b/src/Controllers/Common/ContentController.cs @@ -1405,9 +1405,7 @@ public class ContentController : Controller { Viking viking = ctx.Vikings.FirstOrDefault(e => e.Id == party.VikingId); AvatarData avatarData = XmlUtil.DeserializeXml(viking.AvatarSerialized); - - UserParty userParty = new UserParty { DisplayName = $"{avatarData.DisplayName}'s {party.Descriptor} Party", UserName = avatarData.DisplayName, diff --git a/src/Program.cs b/src/Program.cs index 2ec6b86..25462b4 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -30,7 +30,6 @@ builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddSingleton(); -builder.Services.AddSingleton(); builder.Services.AddScoped(); builder.Services.AddScoped(); diff --git a/src/Services/PartyService.cs b/src/Services/PartyService.cs deleted file mode 100644 index 1cd792b..0000000 --- a/src/Services/PartyService.cs +++ /dev/null @@ -1,33 +0,0 @@ -using sodoff.Schema; -using sodoff.Util; - -namespace sodoff.Services; - -public class PartyService { - PartiesInfo parties; - Dictionary> partyData = new Dictionary>(); - - public PartyService() { - parties = XmlUtil.DeserializeXml(XmlUtil.ReadResourceXmlString("parties_info")); - - foreach (PartyInfo party in parties.Parties) { - if (partyData.TryGetValue(party.GameID, out Dictionary? partyDict)) { - partyDict.TryAdd(party.Type, party); - } else { - partyDict = new Dictionary(); - partyData.Add(party.GameID, partyDict); - } - } - } - - public PartyInfo? GetParty(uint gameID, string partyType) { - if (!partyData.TryGetValue(gameID, out Dictionary? partyDict)) return null; - partyDict.TryGetValue(partyType, out PartyInfo? party); - return party; - } - - public string? GetLocation(PartyInfo party) { - parties.LocationIcons.TryGetValue(party.Location, out string? value); - return value; - } -} \ No newline at end of file