Ejemplo n.º 1
0
 public static bool Prefix(ref Location __instance)
 {
     if (null != __instance)
     {
         Traverse   traverse = HarmonyLib.Traverse.Create(__instance);
         CanUseDoor _playerCanEnterDelegate = traverse.Field <CanUseDoor>("_playerCanEnterDelegate").Value;
         String     _playerCanEnter         = traverse.Field <String>("_playerCanEnter").Value;
         if (null == _playerCanEnterDelegate && null == _playerCanEnter)
         {
             return(false);
         }
     }
     return(true);
 }
Ejemplo n.º 2
0
 public static bool Prefix(ref Location __instance, LocationCharacter character)
 {
     if (null == __instance || null == __instance.Name)
     {
         if (null != __instance)
         {
             Traverse   traverse           = HarmonyLib.Traverse.Create(__instance);
             CanUseDoor aiCanEnterDelegate = traverse.Field <CanUseDoor>("_aiCanEnterDelegate").Value;
             String     aiCanEnter         = traverse.Field <String>("_aiCanEnter").Value;
             if (null == aiCanEnterDelegate && null == aiCanEnter)
             {
                 return(false);
             }
         }
     }
     return(true);
 }