fix: Removes from literals (#893)

This commit is contained in:
Kamron Batman 2021-12-24 15:56:07 -08:00 committed by GitHub
parent 63e1b02d93
commit 3cba8c43f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 32 additions and 32 deletions

View file

@ -110,7 +110,7 @@ namespace Server.Misc
{
var from = e.Mobile;
if (@from.Account is not Account acct)
if (from.Account is not Account acct)
{
return;
}

View file

@ -595,7 +595,7 @@ namespace Server.Commands
{
map = Map.AllMaps[i];
if (map.MapIndex is 0x7F or 0xFF || @from.Map == map)
if (map.MapIndex is 0x7F or 0xFF || from.Map == map)
{
continue;
}

View file

@ -73,7 +73,7 @@ namespace Server.Commands
var path = Core.BaseDirectory;
var name = @from.Account is not Account acct ? from.Name : acct.Username;
var name = from.Account is not Account acct ? from.Name : acct.Username;
AppendPath(ref path, "Logs");
AppendPath(ref path, "Commands");

View file

@ -257,7 +257,7 @@ namespace Server.Engines.ConPVP
public static bool AllowSpecialAbility(Mobile from, string name, bool message)
{
if (@from is not PlayerMobile pm)
if (from is not PlayerMobile pm)
{
return true;
}

View file

@ -128,7 +128,7 @@ namespace Server.Engines.Help
public static bool CheckAllowedToPage(Mobile from)
{
if (@from is not PlayerMobile pm)
if (from is not PlayerMobile pm)
{
return true;
}

View file

@ -325,7 +325,7 @@ namespace Server.Engines.MLQuests.Gumps
public override void OnDoubleClick(Mobile from)
{
if (@from is not PlayerMobile pm)
if (from is not PlayerMobile pm)
{
return;
}

View file

@ -22,7 +22,7 @@ namespace Server.Items
public override void OnDoubleClick(Mobile from)
{
if (@from is not PlayerMobile pm || pm.Backpack == null)
if (from is not PlayerMobile pm || pm.Backpack == null)
{
return;
}

View file

@ -83,7 +83,7 @@ namespace Server.Engines.Quests.Necro
public static bool HasLostCallingScroll(Mobile from)
{
if (@from is not PlayerMobile pm)
if (from is not PlayerMobile pm)
{
return false;
}

View file

@ -31,7 +31,7 @@ namespace Server.Engines.Quests.Necro
return;
}
if (@from is not PlayerMobile pm)
if (from is not PlayerMobile pm)
{
return;
}

View file

@ -99,7 +99,7 @@ namespace Server.Engines.Quests.Ninja
public static bool HasLostNoteForZoel(Mobile from)
{
if (@from is not PlayerMobile pm)
if (from is not PlayerMobile pm)
{
return false;
}
@ -119,7 +119,7 @@ namespace Server.Engines.Quests.Ninja
public static bool HasLostEminosKatana(Mobile from)
{
if (@from is not PlayerMobile pm)
if (from is not PlayerMobile pm)
{
return false;
}

View file

@ -102,7 +102,7 @@ namespace Server.Engines.Quests.Samurai
public static bool HasLostHaochisKatana(Mobile from)
{
if (@from is not PlayerMobile pm)
if (from is not PlayerMobile pm)
{
return false;
}

View file

@ -30,7 +30,7 @@ namespace Server.Engines.Quests.Samurai
if (!wasBurning && Burning)
{
if (@from is not PlayerMobile player)
if (from is not PlayerMobile player)
{
return;
}

View file

@ -43,10 +43,10 @@ namespace Server.Engines.Quests.Matriarch
if (redSolen)
{
return @from is BlackSolenInfiltratorWarrior or BlackSolenInfiltratorQueen;
return from is BlackSolenInfiltratorWarrior or BlackSolenInfiltratorQueen;
}
return @from is RedSolenInfiltratorWarrior or RedSolenInfiltratorQueen;
return from is RedSolenInfiltratorWarrior or RedSolenInfiltratorQueen;
}
public override void OnKill(BaseCreature creature, Container corpse)

View file

@ -395,7 +395,7 @@ namespace Server.Engines.Quests.Haven
public override bool IgnoreYoungProtection(Mobile from)
{
// This restriction continues until the end of the quest
if (@from is Zombie or Skeleton && from.Map == Map.Trammel && from.X >= 3391 && from.X <= 3424 &&
if (from is Zombie or Skeleton && from.Map == Map.Trammel && from.X >= 3391 && from.X <= 3424 &&
from.Y >= 2639 && from.Y <= 2664) // Haven graveyard
{
return true;

View file

@ -110,7 +110,7 @@ namespace Server.Engines.Quests.Haven
public static bool HasLostScrollOfPower(Mobile from)
{
if (@from is not PlayerMobile pm)
if (from is not PlayerMobile pm)
{
return false;
}
@ -130,7 +130,7 @@ namespace Server.Engines.Quests.Haven
public static bool HasLostFertileDirt(Mobile from)
{
if (@from is not PlayerMobile pm)
if (from is not PlayerMobile pm)
{
return false;
}
@ -150,7 +150,7 @@ namespace Server.Engines.Quests.Haven
public static bool HasLostDaemonBlood(Mobile from)
{
if (@from is not PlayerMobile pm)
if (from is not PlayerMobile pm)
{
return false;
}
@ -170,7 +170,7 @@ namespace Server.Engines.Quests.Haven
public static bool HasLostDaemonBone(Mobile from)
{
if (@from is not PlayerMobile pm)
if (from is not PlayerMobile pm)
{
return false;
}

View file

@ -244,7 +244,7 @@ namespace Server.Guilds
public void SetTitle_Callback(Mobile from, string text)
{
if (@from is not PlayerMobile pm || m_Member == null)
if (from is not PlayerMobile pm || m_Member == null)
{
return;
}

View file

@ -715,7 +715,7 @@ namespace Server.Guilds
public void CreateAlliance_Callback(Mobile from, string text)
{
if (@from is not PlayerMobile pm)
if (from is not PlayerMobile pm)
{
return;
}

View file

@ -60,7 +60,7 @@ namespace Server.Items
public void Throw(Mobile from)
{
if (@from.Weapon is not BaseKnife knife)
if (from.Weapon is not BaseKnife knife)
{
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 500751); // Try holding a knife...
return;

View file

@ -1054,7 +1054,7 @@ namespace Server.Items
return;
}
if (@from is not PlayerMobile player)
if (from is not PlayerMobile player)
{
return;
}

View file

@ -168,7 +168,7 @@ namespace Server.Items
return;
}
if (@from is not PlayerMobile pm)
if (from is not PlayerMobile pm)
{
return;
}

View file

@ -299,7 +299,7 @@ namespace Server.Items
private bool HasEntered(Mobile from)
{
if (@from.Account is not Account acc)
if (from.Account is not Account acc)
{
return false;
}
@ -509,7 +509,7 @@ namespace Server.Items
return;
}
if (@from.Account is not Account)
if (from.Account is not Account)
{
return;
}

View file

@ -167,7 +167,7 @@ namespace Server.Items
return false;
}
if (Account != null && (@from.Account is not Accounting.Account || from.Account.Username != Account))
if (Account != null && (from.Account is not Accounting.Account || from.Account.Username != Account))
{
from.SendLocalizedMessage(
1070714

View file

@ -244,7 +244,7 @@ namespace Server.Items
public virtual void DoWandTarget(Mobile from, object o)
{
if (Deleted || _charges <= 0 || Parent != @from || o is StaticTarget or LandTarget)
if (Deleted || _charges <= 0 || Parent != from || o is StaticTarget or LandTarget)
{
return;
}

View file

@ -1252,7 +1252,7 @@ namespace Server.Mobiles
{
string notice;
if (@from.Account is not Account acct || !acct.HasAccess(from.NetState))
if (from.Account is not Account acct || !acct.HasAccess(from.NetState))
{
if (from.AccessLevel == AccessLevel.Player)
{

View file

@ -116,7 +116,7 @@ namespace Server.Mobiles
var from = e.Mobile;
if (@from.Guild is not Guild g || g.Type != Type)
if (from.Guild is not Guild g || g.Type != Type)
{
Say(SignupNumber);
}

View file

@ -34,7 +34,7 @@ namespace Server.Spells.Spellweaving
from.Holding as ArcaneFocus ?? from.Backpack?.FindItemByType<ArcaneFocus>();
public static bool CheckExpansion(Mobile from) =>
@from is not PlayerMobile || from.NetState?.SupportsExpansion(Expansion.ML) == true;
from is not PlayerMobile || from.NetState?.SupportsExpansion(Expansion.ML) == true;
public override bool CheckCast()
{