cleanup: Fixes bugs and cleans up code (#660)

This commit is contained in:
Kamron Batman 2021-07-19 20:49:59 -07:00 • committed by GitHub
parent 1de0b656a9
commit 679e8100f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
99 changed files with 160 additions and 346 deletions

View file

@ -143,9 +143,9 @@ namespace Server.Engines.Craft
{
return expansion switch
{
Expansion.SE => (TextDefinition)1063363, // * Requires the "Samurai Empire" expansion
Expansion.ML => (TextDefinition)1072651, // * Requires the "Mondain's Legacy" expansion
_ => (TextDefinition)$"* Requires the \"{ExpansionInfo.GetInfo(expansion).Name}\" expansion"
Expansion.SE => 1063363, // * Requires the "Samurai Empire" expansion
Expansion.ML => 1072651, // * Requires the "Mondain's Legacy" expansion
_ => $"* Requires the \"{ExpansionInfo.GetInfo(expansion).Name}\" expansion"
};
}

View file

@ -876,7 +876,7 @@ namespace Server.Engines.Craft
}
public bool CheckSkills(
Mobile from, Type typeRes, CraftSystem craftSystem, ref int quality, ref bool allRequiredSkills
Mobile from, Type typeRes, CraftSystem craftSystem, ref int quality, out bool allRequiredSkills
) =>
CheckSkills(from, typeRes, craftSystem, ref quality, out allRequiredSkills, true);
@ -1132,9 +1132,7 @@ namespace Server.Engines.Craft
var ignored = 1;
var endquality = 1;
var allRequiredSkills = true;
if (CheckSkills(from, typeRes, craftSystem, ref ignored, ref allRequiredSkills))
if (CheckSkills(from, typeRes, craftSystem, ref ignored, out var allRequiredSkills))
{
// Resource
var resHue = 0;

View file

@ -84,7 +84,7 @@ namespace Server.Engines.Craft
public override void InitCraftList()
{
var index = -1;
int index;
// Other Items
if (Core.Expansion == Expansion.AOS || Core.Expansion == Expansion.SE)