This reverts commit 179cb50557.
This commit is contained in:
parent
179cb50557
commit
c2ecc76457
588 changed files with 16260 additions and 10926 deletions
|
|
@ -484,7 +484,8 @@ namespace Server.Engines.Craft
|
|||
if (m_TypesTable[j][0] == baseType)
|
||||
types[i] = m_TypesTable[j];
|
||||
|
||||
types[i] ??= new[] { baseType };
|
||||
if (types[i] == null)
|
||||
types[i] = new[] { baseType };
|
||||
|
||||
amounts[i] = craftRes.Amount;
|
||||
|
||||
|
|
@ -909,7 +910,8 @@ namespace Server.Engines.Craft
|
|||
hammer.Delete();
|
||||
}
|
||||
|
||||
toolBroken |= tool.UsesRemaining < 1 && tool.BreakOnDepletion;
|
||||
if (tool.UsesRemaining < 1 && tool.BreakOnDepletion)
|
||||
toolBroken = true;
|
||||
|
||||
if (toolBroken)
|
||||
tool.Delete();
|
||||
|
|
@ -1031,7 +1033,8 @@ namespace Server.Engines.Craft
|
|||
|
||||
tool.UsesRemaining--;
|
||||
|
||||
toolBroken |= tool.UsesRemaining < 1 && tool.BreakOnDepletion;
|
||||
if (tool.UsesRemaining < 1 && tool.BreakOnDepletion)
|
||||
toolBroken = true;
|
||||
|
||||
if (toolBroken)
|
||||
tool.Delete();
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace Server.Engines.Craft
|
|||
|
||||
public int ID{ get; }
|
||||
|
||||
public TextDefinition TextDefinition => m_TD ??= new TextDefinition(CraftItem.NameNumber, CraftItem.NameString);
|
||||
public TextDefinition TextDefinition => m_TD ?? (m_TD = new TextDefinition(CraftItem.NameNumber, CraftItem.NameString));
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
|
|
@ -52,13 +52,15 @@ namespace Server.Engines.Craft
|
|||
{
|
||||
if (targeted is PlayerMobile mobile)
|
||||
{
|
||||
foreach (var (key, _) in Recipes)
|
||||
mobile.AcquireRecipe(key);
|
||||
foreach (KeyValuePair<int, Recipe> kvp in Recipes)
|
||||
mobile.AcquireRecipe(kvp.Key);
|
||||
|
||||
m.SendMessage("You teach them all of the recipes.");
|
||||
}
|
||||
else
|
||||
{
|
||||
m.SendMessage("That is not a player!");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -84,4 +86,4 @@ namespace Server.Engines.Craft
|
|||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -491,7 +491,7 @@ namespace Server.Engines.Craft
|
|||
|
||||
if (!usingDeed)
|
||||
{
|
||||
m_CraftSystem.GetContext(from);
|
||||
CraftContext context = m_CraftSystem.GetContext(from);
|
||||
from.SendGump(new CraftGump(from, m_CraftSystem, m_Tool, number));
|
||||
}
|
||||
else
|
||||
|
|
@ -504,4 +504,4 @@ namespace Server.Engines.Craft
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue