fix: Creates an override for disabling cast paralyze (#1398)

This commit is contained in:
Kamron Batman 2023-04-28 20:44:30 -07:00 committed by GitHub
parent 55dc4a7da5
commit 4242c446c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -230,6 +230,13 @@ public class Mobile : IHued, IComparable<Mobile>, ISpawnable, IObjectPropertyLis
" (Order)"
};
private static bool _disableCastParalyze = true;
public static void Configure()
{
_disableCastParalyze = ServerConfiguration.GetSetting("spellCasting.disableCastParalyze", true);
}
private List<object> _actions;
private AccessLevel m_AccessLevel;
@ -6959,7 +6966,7 @@ public class Mobile : IHued, IComparable<Mobile>, ISpawnable, IObjectPropertyLis
{
var flags = 0x0;
if (m_Paralyzed || m_Frozen || m_Spell?.BlocksMovement == true)
if (m_Paralyzed || m_Frozen || _disableCastParalyze && m_Spell?.BlocksMovement == true)
{
flags |= 0x01;
}