private void Core_Login_Passed() { try { VSC = new VersionControl(); VSC.InitVersCheck(); SND = new Sounds(); SND.SoundsInit(); SCT = new SettingsControl(); SCT.SettingsInit(); VCT = new ViewControl(); VCT.ViewInit(); SCN = new Scanner(); SCN.ScannerInit(); MCL = new MacroLogic(); MCL.MacroInit(); LGM = new LogMethod(); LGM.LogInit(); DTH = new DeathParse(); DTH.ParseInit(); HUD = new HUDControl(); HUD.HUDInit(); if (lib.Autorelog == true) { if (RlgTmr.Enabled == true) { RlgTmr.Stop(); lib.Autorelog = false; MainView.Mode.Current = 0; lib.Mode = 0; Utility.AddWindowText(lib.MyServer + " : " + lib.MyName + " : " + lib.authtype + " : Current mode: SLAVE - Forced Login detected at " + DateTime.Now.ToString("h: mm:ss tt")); Utility.AddChatText("FORCED LOGIN DETECTED! Mode switched: SLAVE.", 6); } else if (RlgTmr.Enabled == false) { MainView.Mode.Current = 3; lib.Mode = 3; Utility.AddWindowText(lib.MyServer + " : " + lib.MyName + " : " + lib.authtype + " : Current mode: MACRO - Relogger is set to " + lib.Timer + " seconds."); if (lib.UseMacroLogic == true) { Utility.ActivateWindow(); } } } else if (lib.Autorelog == false) { MainView.Mode.Current = 0; lib.Mode = 0; Utility.AddWindowText(lib.MyServer + " : " + lib.MyName + " : " + lib.authtype + " : Current mode: SLAVE"); } REP = new Report(); REP.ReportInit(); Report.InitialLog("Login"); } catch (Exception ex) { Repo.RecordException(ex); } }
protected override void Shutdown() { try { lib.gameStatus = 0; if (lib.status == 0) { Utility.WindowText("Asheron's Call"); } else if (lib.Autorelog == false) { Utility.AddWindowText(lib.MyServer + " : " + lib.MyName + " logged off by " + lib.reason + " at " + DateTime.Now.ToString("h:mm:ss tt")); if (lib.UseMacroLogic == true && lib.reason != "user") { Utility.ActivateWindow(); } } else if (lib.Autorelog == true && lib.longcycle == false) { Utility.AddWindowText(lib.MyServer + " : " + lib.MyName + " logged off by " + lib.reason + " at " + DateTime.Now.ToString("h:mm:ss tt") + ". Relogger is set to " + lib.Timer + " seconds. Counter: " + lib.relogcounter); if (lib.UseMacroLogic == true) { Utility.ActivateWindow(); } } else if (lib.Autorelog == true && lib.longcycle == true) { Utility.AddWindowText(lib.MyServer + " : " + lib.MyName + " logged off by " + lib.reason + " at " + DateTime.Now.ToString("h:mm:ss tt") + ". Relogger is on Long Cycle (10 minutes)."); lib.longcycle = false; if (lib.UseMacroLogic == true) { Utility.ActivateWindow(); } } lib.MyCore.CharacterFilter.Login -= Core_Login_Init; if (lib.AuthInstance > 0) { ATH.Dispose(); } if (lib.CommandsInstance > 0) { CMD.Dispose(); } if (lib.LoggingInstance > 0) { LGM.Dispose(); } if (lib.ViewControlInstance > 0) { VCT.Dispose(); } if (lib.ScannerInstance > 0) { SCN.Dispose(); } if (lib.DeathParseInstance > 0) { DTH.Dispose(); } if (lib.SoundInstance > 0) { SND.Dispose(); } if (lib.MacroInstance > 0) { MCL.Dispose(); } if (lib.VersInstance > 0) { VSC.Dispose(); } if (lib.HUDInstance > 0) { HUD.Dispose(); } if (lib.ReportInstance > 0) { REP.Dispose(); } if (SCN != null) { SCN = null; } if (SND != null) { SND = null; } if (ATH != null) { ATH = null; } if (VCT != null) { VCT = null; } if (DTH != null) { DTH = null; } if (CMD != null) { CMD = null; } if (VSC != null) { VSC = null; } if (LGM != null) { LGM = null; } if (MCL != null) { MCL = null; } if (HUD != null) { HUD = null; } if (REP != null) { REP = null; } if (ShrtTmr.Enabled == true) { ShrtTmr.Stop(); ShrtTmr.Dispose(); } if (LngTmr.Enabled == true) { LngTmr.Stop(); LngTmr.Dispose(); } if (LogTmr.Enabled == true) { LogTmr.Stop(); LogTmr.Dispose(); } PGCore = null; lib.PluginInstance--; lib.Dispose(); } catch (Exception ex) { Repo.RecordException(ex); } }