improvement shutdown/item gen

This commit is contained in:
Lucca Faria Ferri 2023-02-02 05:18:59 -08:00
parent 2bfaa5c9c1
commit 396fc3e0f3
2 changed files with 16 additions and 10 deletions

View File

@ -50,12 +50,18 @@ public class AnsiTarget : LogTarget
await Task.Delay(100); await Task.Delay(100);
} }
_shutdown = true;
}); });
} }
public static void StopIfRunning() public static void StopIfRunning()
{ {
CancellationTokenSource.Cancel(); CancellationTokenSource.Cancel();
while(!_shutdown)
Thread.Sleep(100);
Thread.Sleep(1000);
AnsiConsole.Clear();
AnsiConsole.Cursor.SetPosition(0,0);
} }
/// <summary> /// <summary>

View File

@ -56,30 +56,30 @@ namespace DiIiS_NA.GameServer.GSSystem.ItemsSystem
static ItemGenerator() static ItemGenerator()
{ {
Player.GeneratePLB(); Player.GeneratePLB();
Logger.Info("Loading Recipes..."); Logger.Info("Loading $[underline]$Recipes$[/]$...");
Logger.Info("Loading Items..."); Logger.Info("Loading $[underline]$Items$[/]$...");
LoadRecipes(); LoadRecipes();
LoadItems(); LoadItems();
Logger.Info("Loading Paragons..."); Logger.Info("Loading $[underline]$Paragons$[/]$...");
LoadParagonBonuses(); LoadParagonBonuses();
//LoadAffixes(); //just for checking values //LoadAffixes(); //just for checking values
//LoadPowers(); //LoadPowers();
//LoadQuests(); //LoadQuests();
Logger.Info("Loading Tutorials..."); Logger.Info("Loading $[underline]$Tutorials$[/]$...");
Tutorials = MPQStorage.Data.Assets[SNOGroup.Tutorial].Keys.OrderBy(i => i).ToList(); Tutorials = MPQStorage.Data.Assets[SNOGroup.Tutorial].Keys.OrderBy(i => i).ToList();
Logger.Info("Loading Bonuses..."); Logger.Info("Loading $[underline]$Bonuses$[/]$...");
LoadItemSetBonuses(); LoadItemSetBonuses();
LoadGemBonuses(); LoadGemBonuses();
Logger.Info("Loading Handlers..."); Logger.Info("Loading $[underline]$Handlers$[/]$...");
LoadHandlers(); LoadHandlers();
Logger.Info("Loading Lore..."); Logger.Info("Loading $[underline]$Lore$[/]$...");
LoadLore(); LoadLore();
Logger.Info("Loading Bounties..."); Logger.Info("Loading $[underline]$Bounties$[/]$...");
LoadBounties(); LoadBounties();
//LoadConversations(); //LoadConversations();
//if (Net.GS.Config.Instance.Enabled) //if (Net.GS.Config.Instance.Enabled)
Logger.Info("Loading Worlds..."); Logger.Info("Loading $[underline]$Worlds$[/]$...");
Scene.PreCacheMarkers(); Scene.PreCacheMarkers();
SetAllowedTypes(); SetAllowedTypes();