From 6963a22f6f06bc5e511de8289406a6d93312ffe0 Mon Sep 17 00:00:00 2001 From: Hipposgrumm Date: Sun, 26 Oct 2025 22:14:38 -0600 Subject: [PATCH] Removed EMD code because Spirtix yelled at me. --- src/Controllers/Common/GroupController.cs | 40 ----------------------- 1 file changed, 40 deletions(-) diff --git a/src/Controllers/Common/GroupController.cs b/src/Controllers/Common/GroupController.cs index 8e40d78..a426855 100644 --- a/src/Controllers/Common/GroupController.cs +++ b/src/Controllers/Common/GroupController.cs @@ -1,5 +1,4 @@ using Microsoft.AspNetCore.Mvc; -using Microsoft.EntityFrameworkCore; using sodoff.Attributes; using sodoff.Model; using sodoff.Schema; @@ -99,8 +98,6 @@ public class GroupController : Controller { private readonly DBContext ctx; - private bool AddedEMD = false; - public GroupController(DBContext ctx) { this.ctx = ctx; } @@ -511,11 +508,6 @@ public class GroupController : Controller { [Route("GroupWebService.asmx/GetGroupsByGroupType")] public Schema.Group[] GetGroupsByGroupType([FromForm] string apiKey, [FromForm] string groupType) { uint gameId = ClientVersion.GetGameID(apiKey); - - if (!AddedEMD) { - AddEMDGroups(); - AddedEMD = true; - } List groups = new List(); foreach (Model.Group group in ctx.Groups) { @@ -554,36 +546,4 @@ public class GroupController : Controller { Points = group.Points }).ToArray(); } - - private void AddEMDGroups() { - bool changed = false; - Guid DragonString = new Guid(EMD_Dragons.GroupID); - Guid ScorpionString = new Guid(EMD_Scorpions.GroupID); - if (!ctx.Groups.Any(g => g.GroupID == DragonString)) { - ctx.Groups.Add(new Model.Group { - GroupID = DragonString, - Name = EMD_Dragons.Name, - Color = EMD_Dragons.Color, - Logo = EMD_Dragons.Logo, - Type = GroupType.System, - GameID = ClientVersion.EMD, - MaxMemberLimit = int.MaxValue - }); - changed = true; - } - if (!ctx.Groups.Any(g => g.GroupID == ScorpionString)) { - ctx.Groups.Add(new Model.Group { - GroupID = ScorpionString, - Name = EMD_Scorpions.Name, - Color = EMD_Scorpions.Color, - Logo = EMD_Scorpions.Logo, - Type = GroupType.System, - GameID = ClientVersion.EMD, - MaxMemberLimit = int.MaxValue - }); - changed = true; - } - if (changed) ctx.SaveChanges(); - - } }