chore: Cleans up pattern checks. (#892)
This commit is contained in:
parent
171df32257
commit
63e1b02d93
283 changed files with 587 additions and 702 deletions
|
|
@ -118,9 +118,7 @@ namespace Server.Spells.Spellweaving
|
|||
}
|
||||
|
||||
public static bool IsValidTile(int itemID) =>
|
||||
itemID == 0xFEA || itemID == 0x1216 || itemID == 0x307F || itemID == 0x1D10 || itemID == 0x1D0F ||
|
||||
itemID == 0x1D1F ||
|
||||
itemID == 0x1D12;
|
||||
itemID is 0xFEA or 0x1216 or 0x307F or 0x1D10 or 0x1D0F or 0x1D1F or 0x1D12;
|
||||
|
||||
private List<Mobile> GetArcanists()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace Server.Spells.Spellweaving
|
|||
from.Holding as ArcaneFocus ?? from.Backpack?.FindItemByType<ArcaneFocus>();
|
||||
|
||||
public static bool CheckExpansion(Mobile from) =>
|
||||
!(from is PlayerMobile) || from.NetState?.SupportsExpansion(Expansion.ML) == true;
|
||||
@from is not PlayerMobile || from.NetState?.SupportsExpansion(Expansion.ML) == true;
|
||||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
if (!(Caster.Weapon is BaseWeapon weapon) || weapon is Fists || weapon is BaseRanged)
|
||||
if (Caster.Weapon is not BaseWeapon weapon || weapon is Fists or BaseRanged)
|
||||
{
|
||||
Caster.SendLocalizedMessage(1060179); // You must be wielding a weapon to use this ability!
|
||||
return false;
|
||||
|
|
@ -37,7 +37,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public override void OnCast()
|
||||
{
|
||||
if (!(Caster.Weapon is BaseWeapon weapon) || weapon is Fists || weapon is BaseRanged)
|
||||
if (Caster.Weapon is not BaseWeapon weapon || weapon is Fists or BaseRanged)
|
||||
{
|
||||
Caster.SendLocalizedMessage(1060179); // You must be wielding a weapon to use this ability!
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue