fix: Optimizes TextDefinition to eliminate allocations. Removes TextDefinition ctor. (#1221)
### BREAKING CHANGE ### The constructor for `TextDefinition` has been removed. Instead use `TextDefinition.Of()` or cast the integer/string to TextDefinition.
This commit is contained in:
parent
213b7025af
commit
910e06767b
50 changed files with 790 additions and 722 deletions
|
|
@ -50,7 +50,7 @@ namespace Server.Engines.Craft
|
|||
|
||||
public abstract SkillName MainSkill { get; }
|
||||
|
||||
public virtual TextDefinition GumpTitle => 0;
|
||||
public virtual TextDefinition GumpTitle => TextDefinition.Empty;
|
||||
|
||||
public virtual CraftECA ECA => CraftECA.ChanceMinusSixty;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public class Recipe
|
|||
|
||||
public int ID { get; }
|
||||
|
||||
public TextDefinition TextDefinition => _td ??= new TextDefinition(CraftItem.NameNumber, CraftItem.NameString);
|
||||
public TextDefinition TextDefinition => _td ??= TextDefinition.Of(CraftItem.NameNumber, CraftItem.NameString);
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue