diff --git a/Chaos/Collections/MapInstance.cs b/Chaos/Collections/MapInstance.cs index ae80f8445..6902d86a6 100644 --- a/Chaos/Collections/MapInstance.cs +++ b/Chaos/Collections/MapInstance.cs @@ -720,12 +720,21 @@ public bool IsWalkable(IPoint point, CreatureType creatureType, bool? ignoreBloc public bool IsWall(IPoint point) { - if (Template.IsWall(point)) - return true; - var door = GetEntitiesAtPoints(point) .FirstOrDefault(); + //if there's an open door (even if that door is considered a wall) + //allow them to walk on the spot + if (door is { Closed: false }) + return false; + + //if the spot is a wall (or a closed door) + //prevent them from walking + if (Template.IsWall(point)) + return true; + + //if there's a closed door return false + //otherwise return true return door?.Closed ?? false; } diff --git a/Chaos/Definitions/CHAOS_CONSTANTS.cs b/Chaos/Definitions/CHAOS_CONSTANTS.cs index f2541b426..7dac2c36e 100644 --- a/Chaos/Definitions/CHAOS_CONSTANTS.cs +++ b/Chaos/Definitions/CHAOS_CONSTANTS.cs @@ -1,5 +1,7 @@ +#region using System.Collections.Frozen; using Chaos.DarkAges.Definitions; +#endregion namespace Chaos.Definitions; @@ -28,12 +30,13 @@ public static class CHAOS_CONSTANTS // @formatter:max_array_initializer_elements_on_line 10000 public static readonly FrozenSet DOOR_TILE_IDS = new ushort[] { - 1994, 1997, 2000, 2003, 2163, 2164, 2165, 2196, 2197, 2198, 2227, 2228, 2229, 2260, 2261, 2262, 2291, 2292, 2293, 2328, 2329, 2330, - 2432, 2436, 2461, 2465, 2673, 2674, 2675, 2680, 2681, 2682, 2687, 2688, 2689, 2694, 2695, 2696, 2714, 2715, 2721, 2722, 2727, 2728, - 2734, 2735, 2761, 2762, 2768, 2769, 2776, 2777, 2783, 2784, 2850, 2851, 2852, 2857, 2858, 2859, 2874, 2875, 2876, 2881, 2882, 2883, - 2897, 2898, 2903, 2904, 2923, 2924, 2929, 2930, 2945, 2946, 2951, 2952, 2971, 2972, 2977, 2978, 2993, 2994, 2999, 3000, 3019, 3020, - 3025, 3026, 3058, 3059, 3066, 3067, 3090, 3091, 3098, 3099, 3118, 3119, 3126, 3127, 3150, 3151, 3158, 3159, 3178, 3179, 3186, 3187, - 3210, 3211, 3218, 3219, 4519, 4520, 4521, 4523, 4524, 4525, 4527, 4528, 4529, 4532, 4533, 4534, 4536, 4537, 4538, 4540, 4541, 4542 + 1994, 1996, 1997, 2000, 2001, 2003, 2004, 2163, 2164, 2165, 2196, 2197, 2198, 2227, 2228, 2229, 2260, 2261, 2262, 2291, 2292, 2293, + 2328, 2329, 2330, 2432, 2436, 2461, 2465, 2673, 2674, 2675, 2680, 2681, 2682, 2687, 2688, 2689, 2694, 2695, 2696, 2714, 2715, 2721, + 2722, 2727, 2728, 2734, 2735, 2761, 2762, 2768, 2769, 2776, 2777, 2783, 2784, 2850, 2851, 2852, 2857, 2858, 2859, 2874, 2875, 2876, + 2881, 2882, 2883, 2897, 2898, 2903, 2904, 2923, 2924, 2929, 2930, 2945, 2946, 2951, 2952, 2971, 2972, 2977, 2978, 2993, 2994, 2999, + 3000, 3019, 3020, 3025, 3026, 3058, 3059, 3066, 3067, 3090, 3091, 3098, 3099, 3118, 3119, 3126, 3127, 3150, 3151, 3158, 3159, 3178, + 3179, 3186, 3187, 3210, 3211, 3218, 3219, 4519, 4520, 4521, 4523, 4524, 4525, 4527, 4528, 4529, 4532, 4533, 4534, 4536, 4537, 4538, + 4540, 4541, 4542 }.ToFrozenSet(); // @formatter:max_array_initializer_elements_on_line restore