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
|
|
@ -5,8 +5,7 @@ namespace Server.Engines.MLQuests.Rewards
|
|||
{
|
||||
public class DummyReward : BaseReward
|
||||
{
|
||||
public DummyReward(TextDefinition name)
|
||||
: base(name)
|
||||
public DummyReward(TextDefinition name) : base(name)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,8 +41,7 @@ namespace Server.Engines.MLQuests.Rewards
|
|||
|
||||
private readonly Type m_Type;
|
||||
|
||||
public ItemReward(TextDefinition name = null, Type type = null, int amount = 1)
|
||||
: base(name)
|
||||
public ItemReward(TextDefinition name = null, Type type = null, int amount = 1) : base(name)
|
||||
{
|
||||
m_Type = type;
|
||||
m_Amount = amount;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue