Updates some messages to text definitions (#144)
This commit is contained in:
parent
f957a1dd5b
commit
eb0f960be6
3 changed files with 18 additions and 18 deletions
|
|
@ -192,12 +192,12 @@ namespace Server.Engines.BulkOrders
|
|||
else
|
||||
AddHtmlLocalized(235, y, 80, 20, 1011542, LabelColor); // normal
|
||||
|
||||
object name = GetMaterialName(entry.Material, entry.DeedType, sub.ItemType);
|
||||
TextDefinition name = GetMaterialName(entry.Material, entry.DeedType, sub.ItemType);
|
||||
|
||||
if (name is int intName)
|
||||
AddHtmlLocalized(316, y, 100, 20, intName, LabelColor);
|
||||
if (name.Number > 0)
|
||||
AddHtmlLocalized(316, y, 100, 20, name, LabelColor);
|
||||
else
|
||||
AddLabel(316, y, 1152, name.ToString());
|
||||
AddLabel(316, y, 1152, name);
|
||||
|
||||
AddLabel(421, y, 1152, $"{sub.AmountCur} / {entry.AmountMax}");
|
||||
|
||||
|
|
@ -229,12 +229,12 @@ namespace Server.Engines.BulkOrders
|
|||
else
|
||||
AddHtmlLocalized(235, y, 80, 20, 1011542, LabelColor); // normal
|
||||
|
||||
object name = GetMaterialName(smallEntry.Material, smallEntry.DeedType, smallEntry.ItemType);
|
||||
TextDefinition name = GetMaterialName(smallEntry.Material, smallEntry.DeedType, smallEntry.ItemType);
|
||||
|
||||
if (name is int intName)
|
||||
AddHtmlLocalized(316, y, 100, 20, intName, LabelColor);
|
||||
if (name.Number > 0)
|
||||
AddHtmlLocalized(316, y, 100, 20, name, LabelColor);
|
||||
else
|
||||
AddLabel(316, y, 1152, name.ToString());
|
||||
AddLabel(316, y, 1152, name);
|
||||
|
||||
AddLabel(421, y, 1152, $"{smallEntry.AmountCur} / {smallEntry.AmountMax}");
|
||||
}
|
||||
|
|
@ -391,7 +391,7 @@ namespace Server.Engines.BulkOrders
|
|||
return page;
|
||||
}
|
||||
|
||||
public object GetMaterialName(BulkMaterialType mat, BODType type, Type itemType)
|
||||
public TextDefinition GetMaterialName(BulkMaterialType mat, BODType type, Type itemType)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -81,12 +81,12 @@ namespace Server.Engines.Harvest
|
|||
public Dictionary<Map, Dictionary<Point2D, HarvestBank>> Banks { get; }
|
||||
= new Dictionary<Map, Dictionary<Point2D, HarvestBank>>();
|
||||
|
||||
public void SendMessageTo(Mobile from, object message)
|
||||
public void SendMessageTo(Mobile from, TextDefinition message)
|
||||
{
|
||||
if (message is int messageInt)
|
||||
from.SendLocalizedMessage(messageInt);
|
||||
if (message.Number > 0)
|
||||
from.SendLocalizedMessage(message.Number);
|
||||
else
|
||||
from.SendMessage(message.ToString());
|
||||
from.SendMessage(message);
|
||||
}
|
||||
|
||||
public HarvestBank GetBank(Map map, int x, int y)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue