コード例 #1
0
 private void ReloadHooks(object _ = null, System.EventArgs __ = null)
 {
     if (previouslyEnabled && !ModIsEnabled.Value)
     {
         GeneralHooks.UnHook();
         MoneySharingHooks.UnHook();
         ItemSharingHooks.UnHook();
         EquipmentSharingHooks.UnHook();
         previouslyEnabled = false;
     }
     if (!previouslyEnabled && ModIsEnabled.Value)
     {
         previouslyEnabled = true;
         GeneralHooks.Hook();
         MoneySharingHooks.Hook();
         ItemSharingHooks.Hook();
         EquipmentSharingHooks.Hook();
     }
 }
コード例 #2
0
        private void ReloadHooks(object _ = null, EventArgs __ = null)
        {
            if (_previouslyEnabled && !ModIsEnabled.Value)
            {
                GeneralHooks.UnHook();
                MoneySharingHooks.UnHook();
                ItemSharingHooks.UnHook();
                EquipmentSharingHooks.UnHook();
                ChatHandler.UnHook();
                _previouslyEnabled = false;
            }

            if (!_previouslyEnabled && ModIsEnabled.Value)
            {
                _previouslyEnabled = true;
                GeneralHooks.Hook();
                MoneySharingHooks.Hook();
                ItemSharingHooks.Hook();
                EquipmentSharingHooks.Hook();
                ChatHandler.Hook();
            }
        }