Exemplo n.º 1
0
 // Clear EVERYthing, mod is unloaded.
 public override void Unload()
 {
     try
     {
         KeybindController.bindings.Clear();
         if (ServiceController != null)
         {
             if (ServiceController.Services != null)
             {
                 foreach (var service in ServiceController.Services)
                 {
                     service.Unload();
                 }
             }
             ServiceController.RemoveAllServices();
         }
         HEROsModNetwork.Network.ResetAllPlayers();
         HEROsModNetwork.Network.ServerUsingHEROsMod = false;
         HEROsModNetwork.Network.Regions.Clear();
         MasterView.ClearMasterView();
     }
     catch (Exception e)
     {
         ModUtils.DebugText("Unload:\n" + e.Message + "\n" + e.StackTrace + "\n");
     }
 }
Exemplo n.º 2
0
 // Clear EVERYthing, mod is unloaded.
 public override void Unload()
 {
     UIKit.UIComponents.ItemBrowser.Filters          = null;
     UIKit.UIComponents.ItemBrowser.DefaultSorts     = null;
     UIKit.UIComponents.ItemBrowser.Categories       = null;
     UIKit.UIComponents.ItemBrowser.CategoriesLoaded = false;
     UIKit.UIButton.buttonBackground       = null;
     UIKit.UIView.closeTexture             = null;
     UIKit.UITextbox.textboxBackground     = null;
     UIKit.UISlider.barTexture             = null;
     UIKit.UIScrollView.ScrollbgTexture    = null;
     UIKit.UIScrollBar.ScrollbarTexture    = null;
     UIKit.UIDropdown.capUp                = null;
     UIKit.UIDropdown.capDown              = null;
     UIKit.UICheckbox.checkboxTexture      = null;
     UIKit.UICheckbox.checkmarkTexture     = null;
     HEROsModServices.Login._loginTexture  = null;
     HEROsModServices.Login._logoutTexture = null;
     try
     {
         KeybindController.bindings.Clear();
         if (ServiceController != null)
         {
             if (ServiceController.Services != null)
             {
                 foreach (var service in ServiceController.Services)
                 {
                     service.Unload();
                 }
             }
             ServiceController.RemoveAllServices();
         }
         HEROsModNetwork.Network.ResetAllPlayers();
         HEROsModNetwork.Network.ServerUsingHEROsMod = false;
         HEROsModNetwork.Network.Regions.Clear();
         MasterView.ClearMasterView();
     }
     catch (Exception e)
     {
         ModUtils.DebugText("Unload:\n" + e.Message + "\n" + e.StackTrace + "\n");
     }
     extensionMenuService = null;
     miscOptions          = null;
     prefixEditor         = null;
     _hotbar           = null;
     ServiceController = null;
     TimeWeatherControlHotbar.Unload();
     ModUtils.previousInventoryItems = null;
     translations = null;
     instance     = null;
 }