Formatting #2 (#59)

This commit is contained in:
Kamron Batman 2019-10-05 00:37:03 -07:00 • committed by GitHub
parent 096d39609e
commit 8e9221bb5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
400 changed files with 3688 additions and 5969 deletions

View file

@ -755,7 +755,7 @@ namespace Server.Engines.Craft
if (allRequiredSkills && chance >= 0.0)
{
if (Recipe == null || !(from is PlayerMobile) || ((PlayerMobile)from).HasRecipe(Recipe))
if (Recipe == null || (from as PlayerMobile)?.HasRecipe(Recipe) != false)
{
int badCraft = craftSystem.CanCraft(from, tool, ItemType);
@ -827,20 +827,15 @@ namespace Server.Engines.Craft
}
}
private object
RequiredExpansionMessage(
Expansion expansion) //Eventually convert to TextDefinition, but that requires that we convert all the gumps to ues it too. Not that it wouldn't be a bad idea.
//Eventually convert to TextDefinition, but that requires that we convert all the gumps to ues it too. Not that it wouldn't be a bad idea.
private object RequiredExpansionMessage(Expansion expansion)
{
switch (expansion)
return expansion switch
{
case Expansion.SE:
return 1063307; // The "Samurai Empire" expansion is required to attempt this item.
case Expansion.ML:
return 1072650; // The "Mondain's Legacy" expansion is required to attempt this item.
default:
return
$"The \"{ExpansionInfo.GetInfo(expansion).Name}\" expansion is required to attempt this item.";
}
Expansion.SE => (object)1063307, // The "Samurai Empire" expansion is required to attempt this item.
Expansion.ML => 1072650, // The "Mondain's Legacy" expansion is required to attempt this item.
_ => $"The \"{ExpansionInfo.GetInfo(expansion).Name}\" expansion is required to attempt this item."
};
}
public void CompleteCraft(int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes,