示例#1
0
        public override void OnDisabled()
        {
            foreach (Npc npc in Npc.List)
            {
                npc.Kill(false);
            }

            Harmony.UnpatchAll();

            NavigationNode.Clear();
            NodeCondition.Clear();
            NodeAction.Clear();
            AITarget.Clear();
            TargetFilter.Clear();

            Handlers.Server.RoundStarted      -= EventHandlers.OnRoundStart;
            Handlers.Server.RoundEnded        -= EventHandlers.OnRoundEnd;
            Handlers.Server.WaitingForPlayers -= EventHandlers.OnWaitingForPlayers;
            Handlers.Server.RespawningTeam    -= EventHandlers.OnTeamRespawning;

            Handlers.Player.Dying -= EventHandlers.OnDying;
            Handlers.Player.EnteringPocketDimension -= EventHandlers.OnEnteringPocketDim;
            Handlers.Player.Hurting -= EventHandlers.OnHurt;

            Handlers.Map.ExplodingGrenade -= EventHandlers.OnGrenadeExplosion;
            Handlers.Map.Decontaminating  -= EventHandlers.OnDecontamination;

            Handlers.Warhead.Starting -= EventHandlers.OnWarheadStart;

            EventHandlers = null;
            Random        = null;
            Harmony       = null;
            Instance      = null;
        }
示例#2
0
 public override void OnReloaded()
 {
     NavigationNode.Clear();
     NodeCondition.Clear();
     NodeAction.Clear();
     AITarget.Clear();
     TargetFilter.Clear();
 }