diff --git a/src/ClassicUO.Client/Game/Data/StaticFilters.cs b/src/ClassicUO.Client/Game/Data/StaticFilters.cs index f8b7782c5..ce700d821 100644 --- a/src/ClassicUO.Client/Game/Data/StaticFilters.cs +++ b/src/ClassicUO.Client/Game/Data/StaticFilters.cs @@ -38,6 +38,7 @@ using ClassicUO.Assets; using ClassicUO.Renderer; using ClassicUO.Utility; +using System.Drawing; namespace ClassicUO.Game.Data { @@ -403,12 +404,27 @@ public static bool IsWallOfStone(ushort g) return g == 0x038A; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool IsOutStamina() { - return World.Player.StaminaMax == 0; + return World.Player.StaminaMax != World.Player.StaminaMax; } // ## BEGIN - END ## // MISC2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool isHuman(ushort g) + { + return g >= 0x0190 && g <= 0x0193 || g >= 0x00B7 && g <= 0x00BA || g >= 0x025D && g <= 0x0260 || g == 0x029A || g == 0x029B || g == 0x02B6 || g == 0x02B7 || g == 0x03DB || g == 0x03DF || g == 0x03E2 || g == 0x02E8 || g == 0x02E9 || g == 0x04E5; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool isMonster(ushort g) + { + ANIMATION_GROUPS_TYPE type = AnimationsLoader.Instance.GetAnimType(g); + + return type == ANIMATION_GROUPS_TYPE.MONSTER || type == ANIMATION_GROUPS_TYPE.ANIMAL || type == ANIMATION_GROUPS_TYPE.SEA_MONSTER; + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool IsIgnoreCoT(ushort g) { diff --git a/src/ClassicUO.Client/Game/GameObjects/Views/ItemView.cs b/src/ClassicUO.Client/Game/GameObjects/Views/ItemView.cs index 17ebb1a7c..7f13b8d05 100644 --- a/src/ClassicUO.Client/Game/GameObjects/Views/ItemView.cs +++ b/src/ClassicUO.Client/Game/GameObjects/Views/ItemView.cs @@ -97,13 +97,13 @@ public override bool Draw(UltimaBatcher2D batcher, int posX, int posY, float dep // ## BEGIN - END ## // ART / HUE CHANGES // ## BEGIN - END ## // MISC - if (StaticFilters.IsOutStamina()) + if (StaticFilters.IsOutStamina() && StaticFilters.isHuman(Graphic) || StaticFilters.IsOutStamina() && StaticFilters.isMonster(Graphic)) { - TileDataLoader.Instance.StaticData[Graphic].IsImpassable = false; + TileDataLoader.Instance.StaticData[Graphic].IsImpassable = true; } else { - TileDataLoader.Instance.StaticData[Graphic].IsImpassable = true; + TileDataLoader.Instance.StaticData[Graphic].IsImpassable = false; } if (ProfileManager.CurrentProfile.BlockWoS)