fix: Optimizes OPL using string interpolation (#1041)
## Breaking Changes (New API)
ObjectPropertyList supports the following API:
```cs
list.Add(500000);
list.Add(500001, stringArgument);
list.Add("Some text");
list.Add($"Some text with {argument}");
list.Add(500002, $"{arg1}\t{arg2}");
```
## Notes
1. All API uses that require a formatter like this:
```cs
list.Add(500002, "{0}\t{1}", arg1, arg2);
```
Should be changed to use string interpolation, for example:
```cs
list.Add(500002, $"{arg1}\t{arg2}");
```
2. The following paradigm should no longer be used:
```cs
list.Add(1061170, prop.ToString()); // strength requirement ~1_val~
```
The new string interpolation API will avoid having to convert the argument to a string before writing it to the packet. Instead use the following:
```cs
list.Add(1061170, $"{prop}"); // strength requirement ~1_val~
```
### Benchmarks
```cs
| Method | Mean | Error | StdDev | Gen 0 | Allocated |
|------------------------------- |---------:|--------:|--------:|-------:|----------:|
| BenchmarkOldOPL | 241.0 ns | 0.56 ns | 0.47 ns | 0.0105 | 88 B |
| BenchmarkStringInterpolatedOPL | 199.9 ns | 2.44 ns | 2.39 ns | - | - |
```
### Changes
- [X] Removes crash in STArray.Return when array is null.
- [X] Fixes NPE in OPL when entity is null. Serial in packet will be 0 when entity is null.
- [X] Fixes NPE in AosAttributes when Parent is null.
- [X] Changes OPL to use string interpolation.
- [X] Introduces `IPropertyList` to allow extending PropertyList for other uses.
This commit is contained in:
parent
fe31470f05
commit
ecbee17690
227 changed files with 1426 additions and 1008 deletions
|
|
@ -258,11 +258,11 @@ namespace Server.Engines.BulkOrders
|
|||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
list.Add(1062344, Entries.Count.ToString()); // Deeds in book: ~1_val~
|
||||
list.Add(1062344, $"{Entries.Count}"); // Deeds in book: ~1_val~
|
||||
|
||||
if (!string.IsNullOrEmpty(m_BookName))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace Server.Engines.BulkOrders
|
|||
|
||||
public override int LabelNumber => 1045151; // a bulk order deed
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
@ -54,11 +54,12 @@ namespace Server.Engines.BulkOrders
|
|||
list.Add(LargeBODGump.GetMaterialNumberFor(Material)); // All items must be made with x material.
|
||||
}
|
||||
|
||||
list.Add(1060656, AmountMax.ToString()); // amount to make: ~1_val~
|
||||
list.Add(1060656, $"{AmountMax}"); // amount to make: ~1_val~
|
||||
|
||||
for (var i = 0; i < _entries.Length; ++i)
|
||||
{
|
||||
list.Add(1060658 + i, "#{0}\t{1}", _entries[i].Details.Number, _entries[i].Amount); // ~1_val~: ~2_val~
|
||||
var entry = _entries[i];
|
||||
list.Add(1060658 + i, $"#{entry.Details.Number}\t{entry.Amount}"); // ~1_val~: ~2_val~
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ namespace Server.Engines.BulkOrders
|
|||
|
||||
public override int LabelNumber => 1045151; // a bulk order deed
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
@ -77,8 +77,8 @@ namespace Server.Engines.BulkOrders
|
|||
list.Add(SmallBODGump.GetMaterialNumberFor(Material)); // All items must be made with x material.
|
||||
}
|
||||
|
||||
list.Add(1060656, AmountMax.ToString()); // amount to make: ~1_val~
|
||||
list.Add(1060658, "#{0}\t{1}", m_Number, m_AmountCur); // ~1_val~: ~2_val~
|
||||
list.Add(1060656, $"{AmountMax}"); // amount to make: ~1_val~
|
||||
list.Add(1060658, $"#{m_Number}\t{m_AmountCur}"); // ~1_val~: ~2_val~
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
|
|
|
|||
|
|
@ -934,21 +934,22 @@ namespace Server.Engines.CannedEvil
|
|||
return new Point3D(X + x, Y + y, Z - 15);
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
list.Add("champion spawn");
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
if (m_Active)
|
||||
{
|
||||
list.Add(1060742); // active
|
||||
list.Add(1060658, "Type\t{0}", m_Type); // ~1_val~: ~2_val~
|
||||
list.Add(1060659, "Level\t{0}", Level); // ~1_val~: ~2_val~
|
||||
list.Add(1060660, "Kills\t{0} of {1} ({2:F1}%)", m_Kills, MaxKills, 100.0 * ((double)m_Kills / MaxKills)); // ~1_val~: ~2_val~
|
||||
list.Add(1060658, $"Type\t{m_Type}"); // ~1_val~: ~2_val~
|
||||
list.Add(1060659, $"Level\t{Level}"); // ~1_val~: ~2_val~
|
||||
var killRatio = 100.0 * ((double)m_Kills / MaxKills);
|
||||
list.Add(1060660, $"Kills\t{m_Kills} of {MaxKills} ({killRatio:F1}%)"); // ~1_val~: ~2_val~
|
||||
//list.Add(1060661, "Spawn Range\t{0}", m_SpawnRange); // ~1_val~: ~2_val~
|
||||
}
|
||||
else
|
||||
|
|
@ -961,11 +962,11 @@ namespace Server.Engines.CannedEvil
|
|||
{
|
||||
if (m_Active)
|
||||
{
|
||||
LabelTo(from, "{0} (Active; Level: {1}; Kills: {2}/{3})", m_Type, Level, m_Kills, MaxKills);
|
||||
LabelTo(from, $"{m_Type} (Active; Level: {Level}; Kills: {m_Kills}/{MaxKills})");
|
||||
}
|
||||
else
|
||||
{
|
||||
LabelTo(from, "{0} (Inactive)", m_Type);
|
||||
LabelTo(from, $"{m_Type} (Inactive)");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -163,23 +163,20 @@ namespace Server.Engines.ConPVP
|
|||
AddBorderedText(35, y, 190, 20, $"Tiebreaker: {tieText}", LabelColor32, BlackColor32);
|
||||
y += 20;
|
||||
|
||||
var sdText = "Off";
|
||||
string sdText;
|
||||
|
||||
if (tourney.SuddenDeath > TimeSpan.Zero)
|
||||
{
|
||||
sdText = $"{(int)tourney.SuddenDeath.TotalMinutes}:{tourney.SuddenDeath.Seconds:D2}";
|
||||
|
||||
if (tourney.SuddenDeathRounds > 0)
|
||||
{
|
||||
sdText = $"{sdText} (first {tourney.SuddenDeathRounds} rounds)";
|
||||
}
|
||||
else
|
||||
{
|
||||
sdText = $"{sdText} (all rounds)";
|
||||
}
|
||||
sdText = tourney.SuddenDeathRounds > 0 ?
|
||||
$"Sudden Death: {(int)tourney.SuddenDeath.TotalMinutes}:{tourney.SuddenDeath.Seconds:D2} (first {tourney.SuddenDeathRounds} rounds)" :
|
||||
$"Sudden Death: {(int)tourney.SuddenDeath.TotalMinutes}:{tourney.SuddenDeath.Seconds:D2} (all rounds)";
|
||||
}
|
||||
else
|
||||
{
|
||||
sdText = "Sudden Death: Off";
|
||||
}
|
||||
|
||||
AddBorderedText(35, y, 240, 20, $"Sudden Death: {sdText}", LabelColor32, BlackColor32);
|
||||
AddBorderedText(35, y, 240, 20, sdText, LabelColor32, BlackColor32);
|
||||
y += 20;
|
||||
|
||||
y += 6;
|
||||
|
|
|
|||
|
|
@ -169,23 +169,20 @@ namespace Server.Engines.ConPVP
|
|||
AddBorderedText(35, y, 190, 20, $"Tiebreaker: {tieText}", LabelColor32, BlackColor32);
|
||||
y += 20;
|
||||
|
||||
var sdText = "Off";
|
||||
string sdText;
|
||||
|
||||
if (tourney.SuddenDeath > TimeSpan.Zero)
|
||||
{
|
||||
sdText = $"{(int)tourney.SuddenDeath.TotalMinutes}:{tourney.SuddenDeath.Seconds:D2}";
|
||||
|
||||
if (tourney.SuddenDeathRounds > 0)
|
||||
{
|
||||
sdText = $"{sdText} (first {tourney.SuddenDeathRounds} rounds)";
|
||||
}
|
||||
else
|
||||
{
|
||||
sdText = $"{sdText} (all rounds)";
|
||||
}
|
||||
sdText = tourney.SuddenDeathRounds > 0 ?
|
||||
$"Sudden Death: {(int)tourney.SuddenDeath.TotalMinutes}:{tourney.SuddenDeath.Seconds:D2} (first {tourney.SuddenDeathRounds} rounds)" :
|
||||
$"Sudden Death: {(int)tourney.SuddenDeath.TotalMinutes}:{tourney.SuddenDeath.Seconds:D2} (all rounds)";
|
||||
}
|
||||
else
|
||||
{
|
||||
sdText = "Sudden Death: Off";
|
||||
}
|
||||
|
||||
AddBorderedText(35, y, 240, 20, $"Sudden Death: {sdText}", LabelColor32, BlackColor32);
|
||||
AddBorderedText(35, y, 240, 20, sdText, LabelColor32, BlackColor32);
|
||||
y += 20;
|
||||
|
||||
y += 6;
|
||||
|
|
|
|||
|
|
@ -214,23 +214,20 @@ namespace Server.Engines.ConPVP
|
|||
AddHtml(35, y, 190, 20, $"Tiebreaker: {tieText}");
|
||||
y += 20;
|
||||
|
||||
var sdText = "Off";
|
||||
string sdText;
|
||||
|
||||
if (tourney.SuddenDeath > TimeSpan.Zero)
|
||||
{
|
||||
sdText = $"{(int)tourney.SuddenDeath.TotalMinutes}:{tourney.SuddenDeath.Seconds:D2}";
|
||||
|
||||
if (tourney.SuddenDeathRounds > 0)
|
||||
{
|
||||
sdText = $"{sdText} (first {tourney.SuddenDeathRounds} rounds)";
|
||||
}
|
||||
else
|
||||
{
|
||||
sdText = $"{sdText} (all rounds)";
|
||||
}
|
||||
sdText = tourney.SuddenDeathRounds > 0 ?
|
||||
$"Sudden Death: {(int)tourney.SuddenDeath.TotalMinutes}:{tourney.SuddenDeath.Seconds:D2} (first {tourney.SuddenDeathRounds} rounds)" :
|
||||
$"Sudden Death: {(int)tourney.SuddenDeath.TotalMinutes}:{tourney.SuddenDeath.Seconds:D2} (all rounds)";
|
||||
}
|
||||
else
|
||||
{
|
||||
sdText = "Sudden Death: Off";
|
||||
}
|
||||
|
||||
AddHtml(35, y, 240, 20, $"Sudden Death: {sdText}");
|
||||
AddHtml(35, y, 240, 20, sdText);
|
||||
y += 20;
|
||||
|
||||
y += 8;
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ namespace Server.Factions
|
|||
InvalidateProperties();
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -30,12 +30,12 @@ namespace Server.Factions
|
|||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
// NOTE: OSI does not list uses remaining; intentional difference
|
||||
list.Add(1060584, Charges.ToString()); // uses remaining: ~1_val~
|
||||
list.Add(1060584, $"{Charges}"); // uses remaining: ~1_val~
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ namespace Server.Factions
|
|||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace Server.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
AddQuestItemProperty(list);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace Server.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
AddQuestItemProperty(list);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Server.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
AddQuestItemProperty(list);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Server.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
AddQuestItemProperty(list);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Server.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
AddQuestItemProperty(list);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace Server.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
AddQuestItemProperty(list);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace Server.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
AddQuestItemProperty(list);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Server.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
AddQuestItemProperty(list);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Server.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
AddQuestItemProperty(list);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Server.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
AddQuestItemProperty(list);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Server.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
AddQuestItemProperty(list);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace Server.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
AddQuestItemProperty(list);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Server.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
AddQuestItemProperty(list);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Server.Items
|
|||
|
||||
public override int LabelNumber => 1075299; // Prismatic Amber
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ namespace Server.Engines.MLQuests.Items
|
|||
public List<MLQuest> MLQuests => m_MLQuests ??
|
||||
(m_MLQuests = MLQuestSystem.FindQuestList(GetType()) ?? MLQuestSystem.EmptyList);
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
|
|
@ -105,7 +105,7 @@ namespace Server.Engines.MLQuests.Items
|
|||
{
|
||||
}
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Server.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
AddQuestItemProperty(list);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Server.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
AddQuestItemProperty(list);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Server.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
AddQuestItemProperty(list);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Server.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
AddQuestItemProperty(list);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Server.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
AddQuestItemProperty(list);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Server.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
AddQuestItemProperty(list);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace Server.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
AddQuestItemProperty(list);
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ namespace Server.Engines.MLQuests.Items
|
|||
return false;
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
@ -179,7 +179,7 @@ namespace Server.Engines.MLQuests.Items
|
|||
return true;
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Server.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
AddQuestItemProperty(list);
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ namespace Server.Engines.Plants
|
|||
InvalidateProperties();
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
if (m_PlantStatus >= PlantStatus.DeadTwigs)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ namespace Server.Engines.Plants
|
|||
return hueInfo.IsBright() ? 1113491 : 1113490; // ~1_amount~ [bright] ~2_val~ seeds
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
list.Add(GetLabel(out var args), args);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ namespace Server.Engines.Quests.Collector
|
|||
|
||||
public static string RandomName(Mobile from) => m_Names.RandomElement() ?? from.Name;
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
if (m_Quantity < m_Partial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ namespace Server.Engines.Quests.Collector
|
|||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
var info = ImageTypeInfo.Get(m_Image);
|
||||
list.Add(1060847, $"#1055126\t#{info.Name}"); // a painted image of:
|
||||
|
|
|
|||
|
|
@ -43,11 +43,11 @@ namespace Server.Engines.Quests
|
|||
|
||||
public virtual bool ValidateUse(Mobile from) => true;
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
list.Add(1060741, m_Charges.ToString()); // charges: ~1_val~
|
||||
list.Add(1060741, $"{m_Charges}"); // charges: ~1_val~
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ namespace Server.Engines.Quests.Haven
|
|||
return new FacialHairInfo(Race.Human.RandomFacialHair(false), m_HairHue);
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
if (ItemID == 0x2006) // Corpse form
|
||||
{
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ namespace Server.Engines.Quests.Haven
|
|||
{
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
if (ItemID == 0x2006) // Corpse form
|
||||
{
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ namespace Server.Engines.Quests.Hag
|
|||
|
||||
private static List<Item> GetEquipment() => new();
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
list.Add("a charred corpse");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -353,11 +353,11 @@ namespace Server.Engines.Spawners
|
|||
from.SendGump(new SpawnerGump(this));
|
||||
}
|
||||
|
||||
public virtual void GetSpawnerProperties(ObjectPropertyList list)
|
||||
public virtual void GetSpawnerProperties(IPropertyList list)
|
||||
{
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
@ -365,18 +365,19 @@ namespace Server.Engines.Spawners
|
|||
{
|
||||
list.Add(1060742); // active
|
||||
|
||||
list.Add(1060656, m_Count.ToString()); // amount to make: ~1_val~
|
||||
list.Add(1061169, m_HomeRange.ToString()); // range ~1_val~
|
||||
list.Add(1050039, "walking range:\t{0}", m_WalkingRange); // ~1_NUMBER~ ~2_ITEMNAME~
|
||||
list.Add(1053099, "group:\t{0}", m_Group); // ~1_oretype~: ~2_armortype~
|
||||
list.Add(1060847, "team:\t{0}", m_Team); // ~1_val~ ~2_val~
|
||||
list.Add(1063483, "delay:\t{0} to {1}", m_MinDelay, m_MaxDelay); // ~1_MATERIAL~: ~2_ITEMNAME~
|
||||
list.Add(1060656, $"{m_Count}"); // amount to make: ~1_val~
|
||||
list.Add(1061169, $"{m_HomeRange}"); // range ~1_val~
|
||||
list.Add(1050039, $"walking range:\t{m_WalkingRange}"); // ~1_NUMBER~ ~2_ITEMNAME~
|
||||
list.Add(1053099, $"group:\t{m_Group}"); // ~1_oretype~: ~2_armortype~
|
||||
list.Add(1060847, $"team:\t{m_Team}"); // ~1_val~ ~2_val~
|
||||
list.Add(1063483, $"delay:\t{m_MinDelay} to {m_MaxDelay}"); // ~1_MATERIAL~: ~2_ITEMNAME~
|
||||
|
||||
GetSpawnerProperties(list);
|
||||
|
||||
for (var i = 0; i < 6 && i < Entries.Count; ++i)
|
||||
{
|
||||
list.Add(1060658 + i, "\t{0}\t{1}", Entries[i].SpawnedName, CountSpawns(Entries[i]));
|
||||
var entry = Entries[i];
|
||||
list.Add(1060658 + i, $"\t{entry.SpawnedName}\t{CountSpawns(entry)}");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -794,7 +795,7 @@ namespace Server.Engines.Spawners
|
|||
}
|
||||
else
|
||||
{
|
||||
m_Timer?.Stop();
|
||||
m_Timer.Stop();
|
||||
m_Timer.Delay = delay;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,13 +88,13 @@ namespace Server.Engines.Spawners
|
|||
json.SetProperty("region", options, SpawnRegion.Name);
|
||||
}
|
||||
|
||||
public override void GetSpawnerProperties(ObjectPropertyList list)
|
||||
public override void GetSpawnerProperties(IPropertyList list)
|
||||
{
|
||||
base.GetSpawnerProperties(list);
|
||||
|
||||
if (Running && m_SpawnRegion != null)
|
||||
{
|
||||
list.Add(1076228, "region:\t{0}", m_SpawnRegion.Name); // ~1_DUMMY~ ~2_DUMMY~
|
||||
list.Add(1076228, $"region:\t{m_SpawnRegion.Name}"); // ~1_DUMMY~ ~2_DUMMY~
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ namespace Server.Items
|
|||
set { }
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
@ -122,7 +122,7 @@ namespace Server.Items
|
|||
TextDefinition.AddTo(list, m_Label);
|
||||
}
|
||||
|
||||
list.Add(1060584, m_UsesRemaining.ToString()); // uses remaining: ~1_val~
|
||||
list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
|
|
|
|||
|
|
@ -713,7 +713,7 @@ namespace Server.Items
|
|||
Utility.Intern(ref m_UrnName);
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
list.Add(1070935, m_UrnName); // Ancient Urn of ~1_name~
|
||||
}
|
||||
|
|
@ -772,7 +772,7 @@ namespace Server.Items
|
|||
Utility.Intern(ref m_SwordsName);
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
list.Add(1070936, m_SwordsName); // Honorable Swords of ~1_name~
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ namespace Server.Mobiles
|
|||
DisplayPaperdollTo(from);
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
@ -496,7 +496,7 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace Server.Items
|
|||
|
||||
public override bool AllowEquippedCast(Mobile from) => true;
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ namespace Server.Items
|
|||
|
||||
public bool CanSign => !IsSigned || Core.Now <= EditLimit;
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
if (_owner != null)
|
||||
{
|
||||
|
|
@ -63,7 +63,7 @@ namespace Server.Items
|
|||
AddLine(list, 1150303, _line3); // [ ~1_LINE2~ ]
|
||||
}
|
||||
|
||||
private static void AddLine(ObjectPropertyList list, int cliloc, string line)
|
||||
private static void AddLine(IPropertyList list, int cliloc, string line)
|
||||
{
|
||||
if (line != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ namespace Server.Items
|
|||
|
||||
public bool IsSigned => _from != null && _to != null;
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperty(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
/*
|
||||
public override void GetProperties(ObjectPropertyList list) => _addon?.GetProperties(list);
|
||||
public override void GetProperties(IPropertyList list) => _addon?.GetProperties(list);
|
||||
|
||||
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list) =>
|
||||
_addon?.GetContextMenuEntries(from, list);
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list) => _addon?.GetProperties(list);
|
||||
public override void GetProperties(IPropertyList list) => _addon?.GetProperties(list);
|
||||
|
||||
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list) =>
|
||||
_addon?.GetContextMenuEntries(from, list);
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ namespace Server.Items
|
|||
base.OnDelete();
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -364,18 +364,18 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
if (_vacationLeft > 0)
|
||||
{
|
||||
list.Add(1074430, _vacationLeft.ToString()); // Vacation days left: ~1_DAYS
|
||||
list.Add(1074430, $"{_vacationLeft}"); // Vacation days left: ~1_DAYS
|
||||
}
|
||||
|
||||
if (_events.Count > 0)
|
||||
{
|
||||
list.Add(1074426, _events.Count.ToString()); // ~1_NUM~ event(s) to view!
|
||||
list.Add(1074426, $"{_events.Count}"); // ~1_NUM~ event(s) to view!
|
||||
}
|
||||
|
||||
if (_rewardAvailable)
|
||||
|
|
@ -383,60 +383,54 @@ namespace Server.Items
|
|||
list.Add(1074362); // A reward is available!
|
||||
}
|
||||
|
||||
list.Add(1074247, "{0}\t{1}", LiveCreatures, MaxLiveCreatures); // Live Creatures: ~1_NUM~ / ~2_MAX~
|
||||
list.Add(1074247, $"{LiveCreatures}\t{MaxLiveCreatures}"); // Live Creatures: ~1_NUM~ / ~2_MAX~
|
||||
|
||||
var dead = DeadCreatures;
|
||||
|
||||
if (dead > 0)
|
||||
{
|
||||
list.Add(1074248, dead.ToString()); // Dead Creatures: ~1_NUM~
|
||||
list.Add(1074248, $"{dead}"); // Dead Creatures: ~1_NUM~
|
||||
}
|
||||
|
||||
var decorations = Items.Count - LiveCreatures - dead;
|
||||
|
||||
if (decorations > 0)
|
||||
{
|
||||
list.Add(1074249, decorations.ToString()); // Decorations: ~1_NUM~
|
||||
list.Add(1074249, $"{decorations}"); // Decorations: ~1_NUM~
|
||||
}
|
||||
|
||||
list.Add(1074250, "#{0}", FoodNumber()); // Food state: ~1_STATE~
|
||||
list.Add(1074251, "#{0}", WaterNumber()); // Water state: ~1_STATE~
|
||||
list.Add(1074250, $"#{FoodNumber()}"); // Food state: ~1_STATE~
|
||||
list.Add(1074251, $"#{WaterNumber()}"); // Water state: ~1_STATE~
|
||||
|
||||
if (_food.State == (int)FoodState.Dead)
|
||||
{
|
||||
list.Add(1074577, "{0}\t{1}", _food.Added, _food.Improve); // Food Added: ~1_CUR~ Needed: ~2_NEED~
|
||||
list.Add(1074577, $"{_food.Added}\t{_food.Improve}"); // Food Added: ~1_CUR~ Needed: ~2_NEED~
|
||||
}
|
||||
else if (_food.State == (int)FoodState.Overfed)
|
||||
{
|
||||
list.Add(1074577, "{0}\t{1}", _food.Added, _food.Maintain); // Food Added: ~1_CUR~ Needed: ~2_NEED~
|
||||
list.Add(1074577, $"{_food.Added}\t{_food.Maintain}"); // Food Added: ~1_CUR~ Needed: ~2_NEED~
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add(
|
||||
1074253, // Food Added: ~1_CUR~ Feed: ~2_NEED~ Improve: ~3_GROW~
|
||||
"{0}\t{1}\t{2}",
|
||||
_food.Added,
|
||||
_food.Maintain,
|
||||
_food.Improve
|
||||
$"{_food.Added}\t{_food.Maintain}\t{_food.Improve}"
|
||||
);
|
||||
}
|
||||
|
||||
if (_water.State == (int)WaterState.Dead)
|
||||
{
|
||||
list.Add(1074578, "{0}\t{1}", _water.Added, _water.Improve); // Water Added: ~1_CUR~ Needed: ~2_NEED~
|
||||
list.Add(1074578, $"{_water.Added}\t{_water.Improve}"); // Water Added: ~1_CUR~ Needed: ~2_NEED~
|
||||
}
|
||||
else if (_water.State == (int)WaterState.Strong)
|
||||
{
|
||||
list.Add(1074578, "{0}\t{1}", _water.Added, _water.Maintain); // Water Added: ~1_CUR~ Needed: ~2_NEED~
|
||||
list.Add(1074578, $"{_water.Added}\t{_water.Maintain}"); // Water Added: ~1_CUR~ Needed: ~2_NEED~
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add(
|
||||
1074254, // Water Added: ~1_CUR~ Maintain: ~2_NEED~ Improve: ~3_GROW~
|
||||
"{0}\t{1}\t{2}",
|
||||
_water.Added,
|
||||
_water.Maintain,
|
||||
_water.Improve
|
||||
$"{_water.Added}\t{_water.Maintain}\t{_water.Improve}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace Server.Items
|
|||
|
||||
public override bool RequireDeepWater => false;
|
||||
|
||||
protected override void AddNetProperties(ObjectPropertyList list)
|
||||
protected override void AddNetProperties(IPropertyList list)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ namespace Server.Items
|
|||
return Dead ? 1073623 : 1073622; // A [dead/live] aquarium creature
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ namespace Server.Items
|
|||
return base.CheckLift(from, item, ref reject);
|
||||
}
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ namespace Server.Items
|
|||
|
||||
if (fish != null)
|
||||
{
|
||||
list.Add(1074494, "#{0}", fish.LabelNumber); // Contains: ~1_CREATURE~
|
||||
list.Add(1074494, $"#{fish.LabelNumber}"); // Contains: ~1_CREATURE~
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace Server.Items
|
|||
|
||||
public override int LabelNumber => 1073894; // Message in a Bottle
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace Server.Items
|
|||
|
||||
public override int LabelNumber => 1074571; // Captain Blackheart's Fishing Pole
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace Server.Items
|
|||
public override int InitMinHits => 20;
|
||||
public override int InitMaxHits => 30;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Server.Items
|
|||
public override int LabelNumber => 1074601; // Fish bones
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Server.Items
|
|||
public override int LabelNumber => 1074600; // An island statue
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Server.Items
|
|||
public override int LabelNumber => 1074598; // A shell
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Server.Items
|
|||
public override int LabelNumber => 1074363; // A toy boat
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace Server.Items
|
|||
|
||||
public override int LabelNumber => 1074364; // Waterlogged boots
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@ namespace Server.Items
|
|||
|
||||
public override int LabelNumber => 1074431; // An aquarium flake sphere
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
list.Add(1074432, VacationDays.ToString()); // Vacation days: ~1_DAYS~
|
||||
list.Add(1074432, $"{VacationDays}"); // Vacation days: ~1_DAYS~
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1223,9 +1223,7 @@ namespace Server.Items
|
|||
base.OnRemoved(parent);
|
||||
}
|
||||
|
||||
private string GetNameString() => Name ?? $"#{LabelNumber}";
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
var oreType = _rawResource switch
|
||||
{
|
||||
|
|
@ -1249,31 +1247,26 @@ namespace Server.Items
|
|||
_ => 0
|
||||
};
|
||||
|
||||
if (_quality == ArmorQuality.Exceptional)
|
||||
var name = Name;
|
||||
|
||||
if (oreType != 0)
|
||||
{
|
||||
if (oreType != 0)
|
||||
{
|
||||
list.Add(1053100, "#{0}\t{1}", oreType, GetNameString()); // exceptional ~1_oretype~ ~2_armortype~
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add(1050040, GetNameString()); // exceptional ~1_ITEMNAME~
|
||||
}
|
||||
list.Add(
|
||||
_quality == ArmorQuality.Exceptional ? 1053100 : 1053099,
|
||||
name != null ? $"#{oreType}\t{Name}" : $"#{oreType}\t#{LabelNumber}"
|
||||
);
|
||||
}
|
||||
else if (_quality == ArmorQuality.Exceptional)
|
||||
{
|
||||
list.Add(1050040, name ?? $"#{LabelNumber}"); // exceptional ~1_ITEMNAME~
|
||||
}
|
||||
else if (name == null)
|
||||
{
|
||||
list.Add(LabelNumber);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (oreType != 0)
|
||||
{
|
||||
list.Add(1053099, "#{0}\t{1}", oreType, GetNameString()); // ~1_oretype~ ~2_armortype~
|
||||
}
|
||||
else if (Name == null)
|
||||
{
|
||||
list.Add(LabelNumber);
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add(Name);
|
||||
}
|
||||
list.Add(Name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1289,7 +1282,7 @@ namespace Server.Items
|
|||
|
||||
public virtual int GetLuckBonus() => CraftResources.GetInfo(_rawResource)?.AttributeInfo?.ArmorLuck ?? 0;
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
@ -1319,72 +1312,72 @@ namespace Server.Items
|
|||
|
||||
if ((prop = ArtifactRarity) > 0)
|
||||
{
|
||||
list.Add(1061078, prop.ToString()); // artifact rarity ~1_val~
|
||||
list.Add(1061078, $"{prop}"); // artifact rarity ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.WeaponDamage) != 0)
|
||||
{
|
||||
list.Add(1060401, prop.ToString()); // damage increase ~1_val~%
|
||||
list.Add(1060401, $"{prop}"); // damage increase ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.DefendChance) != 0)
|
||||
{
|
||||
list.Add(1060408, prop.ToString()); // defense chance increase ~1_val~%
|
||||
list.Add(1060408, $"{prop}"); // defense chance increase ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.BonusDex) != 0)
|
||||
{
|
||||
list.Add(1060409, prop.ToString()); // dexterity bonus ~1_val~
|
||||
list.Add(1060409, $"{prop}"); // dexterity bonus ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.EnhancePotions) != 0)
|
||||
{
|
||||
list.Add(1060411, prop.ToString()); // enhance potions ~1_val~%
|
||||
list.Add(1060411, $"{prop}"); // enhance potions ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.CastRecovery) != 0)
|
||||
{
|
||||
list.Add(1060412, prop.ToString()); // faster cast recovery ~1_val~
|
||||
list.Add(1060412, $"{prop}"); // faster cast recovery ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.CastSpeed) != 0)
|
||||
{
|
||||
list.Add(1060413, prop.ToString()); // faster casting ~1_val~
|
||||
list.Add(1060413, $"{prop}"); // faster casting ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.AttackChance) != 0)
|
||||
{
|
||||
list.Add(1060415, prop.ToString()); // hit chance increase ~1_val~%
|
||||
list.Add(1060415, $"{prop}"); // hit chance increase ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.BonusHits) != 0)
|
||||
{
|
||||
list.Add(1060431, prop.ToString()); // hit point increase ~1_val~
|
||||
list.Add(1060431, $"{prop}"); // hit point increase ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.BonusInt) != 0)
|
||||
{
|
||||
list.Add(1060432, prop.ToString()); // intelligence bonus ~1_val~
|
||||
list.Add(1060432, $"{prop}"); // intelligence bonus ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.LowerManaCost) != 0)
|
||||
{
|
||||
list.Add(1060433, prop.ToString()); // lower mana cost ~1_val~%
|
||||
list.Add(1060433, $"{prop}"); // lower mana cost ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.LowerRegCost) != 0)
|
||||
{
|
||||
list.Add(1060434, prop.ToString()); // lower reagent cost ~1_val~%
|
||||
list.Add(1060434, $"{prop}"); // lower reagent cost ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = GetLowerStatReq()) != 0)
|
||||
{
|
||||
list.Add(1060435, prop.ToString()); // lower requirements ~1_val~%
|
||||
list.Add(1060435, $"{prop}"); // lower requirements ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = GetLuckBonus() + Attributes.Luck) != 0)
|
||||
{
|
||||
list.Add(1060436, prop.ToString()); // luck ~1_val~
|
||||
list.Add(1060436, $"{prop}"); // luck ~1_val~
|
||||
}
|
||||
|
||||
if (ArmorAttributes.MageArmor != 0)
|
||||
|
|
@ -1394,12 +1387,12 @@ namespace Server.Items
|
|||
|
||||
if ((prop = Attributes.BonusMana) != 0)
|
||||
{
|
||||
list.Add(1060439, prop.ToString()); // mana increase ~1_val~
|
||||
list.Add(1060439, $"{prop}"); // mana increase ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.RegenMana) != 0)
|
||||
{
|
||||
list.Add(1060440, prop.ToString()); // mana regeneration ~1_val~
|
||||
list.Add(1060440, $"{prop}"); // mana regeneration ~1_val~
|
||||
}
|
||||
|
||||
if (Attributes.NightSight != 0)
|
||||
|
|
@ -1409,22 +1402,22 @@ namespace Server.Items
|
|||
|
||||
if ((prop = Attributes.ReflectPhysical) != 0)
|
||||
{
|
||||
list.Add(1060442, prop.ToString()); // reflect physical damage ~1_val~%
|
||||
list.Add(1060442, $"{prop}"); // reflect physical damage ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.RegenStam) != 0)
|
||||
{
|
||||
list.Add(1060443, prop.ToString()); // stamina regeneration ~1_val~
|
||||
list.Add(1060443, $"{prop}"); // stamina regeneration ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.RegenHits) != 0)
|
||||
{
|
||||
list.Add(1060444, prop.ToString()); // hit point regeneration ~1_val~
|
||||
list.Add(1060444, $"{prop}"); // hit point regeneration ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = ArmorAttributes.SelfRepair) != 0)
|
||||
{
|
||||
list.Add(1060450, prop.ToString()); // self repair ~1_val~
|
||||
list.Add(1060450, $"{prop}"); // self repair ~1_val~
|
||||
}
|
||||
|
||||
if (Attributes.SpellChanneling != 0)
|
||||
|
|
@ -1434,44 +1427,44 @@ namespace Server.Items
|
|||
|
||||
if ((prop = Attributes.SpellDamage) != 0)
|
||||
{
|
||||
list.Add(1060483, prop.ToString()); // spell damage increase ~1_val~%
|
||||
list.Add(1060483, $"{prop}"); // spell damage increase ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.BonusStam) != 0)
|
||||
{
|
||||
list.Add(1060484, prop.ToString()); // stamina increase ~1_val~
|
||||
list.Add(1060484, $"{prop}"); // stamina increase ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.BonusStr) != 0)
|
||||
{
|
||||
list.Add(1060485, prop.ToString()); // strength bonus ~1_val~
|
||||
list.Add(1060485, $"{prop}"); // strength bonus ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.WeaponSpeed) != 0)
|
||||
{
|
||||
list.Add(1060486, prop.ToString()); // swing speed increase ~1_val~%
|
||||
list.Add(1060486, $"{prop}"); // swing speed increase ~1_val~%
|
||||
}
|
||||
|
||||
if (Core.ML && (prop = Attributes.IncreasedKarmaLoss) != 0)
|
||||
{
|
||||
list.Add(1075210, prop.ToString()); // Increased Karma Loss ~1val~%
|
||||
list.Add(1075210, $"{prop}"); // Increased Karma Loss ~1val~%
|
||||
}
|
||||
|
||||
AddResistanceProperties(list);
|
||||
|
||||
if ((prop = GetDurabilityBonus()) > 0)
|
||||
{
|
||||
list.Add(1060410, prop.ToString()); // durability ~1_val~%
|
||||
list.Add(1060410, $"{prop}"); // durability ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = ComputeStatReq(StatType.Str)) > 0)
|
||||
{
|
||||
list.Add(1061170, prop.ToString()); // strength requirement ~1_val~
|
||||
list.Add(1061170, $"{prop}"); // strength requirement ~1_val~
|
||||
}
|
||||
|
||||
if (_hitPoints >= 0 && _maxHitPoints > 0)
|
||||
{
|
||||
list.Add(1060639, "{0}\t{1}", _hitPoints, _maxHitPoints); // durability ~1_val~ / ~2_val~
|
||||
list.Add(1060639, $"{_hitPoints}\t{_maxHitPoints}"); // durability ~1_val~ / ~2_val~
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace Server.Items
|
|||
[SerializableFieldDefault(0)]
|
||||
private AosWeaponAttributes WeaponAttributesDefaultValue() => new(this);
|
||||
|
||||
public override void AppendChildNameProperties(ObjectPropertyList list)
|
||||
public override void AppendChildNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AppendChildNameProperties(list);
|
||||
|
||||
|
|
@ -50,77 +50,77 @@ namespace Server.Items
|
|||
|
||||
if ((prop = _weaponAttributes.HitColdArea) != 0)
|
||||
{
|
||||
list.Add(1060416, prop.ToString()); // hit cold area ~1_val~%
|
||||
list.Add(1060416, $"{prop}"); // hit cold area ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = _weaponAttributes.HitDispel) != 0)
|
||||
{
|
||||
list.Add(1060417, prop.ToString()); // hit dispel ~1_val~%
|
||||
list.Add(1060417, $"{prop}"); // hit dispel ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = _weaponAttributes.HitEnergyArea) != 0)
|
||||
{
|
||||
list.Add(1060418, prop.ToString()); // hit energy area ~1_val~%
|
||||
list.Add(1060418, $"{prop}"); // hit energy area ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = _weaponAttributes.HitFireArea) != 0)
|
||||
{
|
||||
list.Add(1060419, prop.ToString()); // hit fire area ~1_val~%
|
||||
list.Add(1060419, $"{prop}"); // hit fire area ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = _weaponAttributes.HitFireball) != 0)
|
||||
{
|
||||
list.Add(1060420, prop.ToString()); // hit fireball ~1_val~%
|
||||
list.Add(1060420, $"{prop}"); // hit fireball ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = _weaponAttributes.HitHarm) != 0)
|
||||
{
|
||||
list.Add(1060421, prop.ToString()); // hit harm ~1_val~%
|
||||
list.Add(1060421, $"{prop}"); // hit harm ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = _weaponAttributes.HitLeechHits) != 0)
|
||||
{
|
||||
list.Add(1060422, prop.ToString()); // hit life leech ~1_val~%
|
||||
list.Add(1060422, $"{prop}"); // hit life leech ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = _weaponAttributes.HitLightning) != 0)
|
||||
{
|
||||
list.Add(1060423, prop.ToString()); // hit lightning ~1_val~%
|
||||
list.Add(1060423, $"{prop}"); // hit lightning ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = _weaponAttributes.HitLowerAttack) != 0)
|
||||
{
|
||||
list.Add(1060424, prop.ToString()); // hit lower attack ~1_val~%
|
||||
list.Add(1060424, $"{prop}"); // hit lower attack ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = _weaponAttributes.HitLowerDefend) != 0)
|
||||
{
|
||||
list.Add(1060425, prop.ToString()); // hit lower defense ~1_val~%
|
||||
list.Add(1060425, $"{prop}"); // hit lower defense ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = _weaponAttributes.HitMagicArrow) != 0)
|
||||
{
|
||||
list.Add(1060426, prop.ToString()); // hit magic arrow ~1_val~%
|
||||
list.Add(1060426, $"{prop}"); // hit magic arrow ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = _weaponAttributes.HitLeechMana) != 0)
|
||||
{
|
||||
list.Add(1060427, prop.ToString()); // hit mana leech ~1_val~%
|
||||
list.Add(1060427, $"{prop}"); // hit mana leech ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = _weaponAttributes.HitPhysicalArea) != 0)
|
||||
{
|
||||
list.Add(1060428, prop.ToString()); // hit physical area ~1_val~%
|
||||
list.Add(1060428, $"{prop}"); // hit physical area ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = _weaponAttributes.HitPoisonArea) != 0)
|
||||
{
|
||||
list.Add(1060429, prop.ToString()); // hit poison area ~1_val~%
|
||||
list.Add(1060429, $"{prop}"); // hit poison area ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = _weaponAttributes.HitLeechStam) != 0)
|
||||
{
|
||||
list.Add(1060430, prop.ToString()); // hit stamina leech ~1_val~%
|
||||
list.Add(1060430, $"{prop}"); // hit stamina leech ~1_val~%
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,13 +89,13 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
if (IsArcane)
|
||||
{
|
||||
list.Add(1061837, "{0}\t{1}", _curArcaneCharges, _maxArcaneCharges); // arcane charges: ~1_val~ / ~2_val~
|
||||
list.Add(1061837, $"{_curArcaneCharges}\t{_maxArcaneCharges}"); // arcane charges: ~1_val~ / ~2_val~
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,13 +88,13 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
if (IsArcane)
|
||||
{
|
||||
list.Add(1061837, "{0}\t{1}", _curArcaneCharges, _maxArcaneCharges); // arcane charges: ~1_val~ / ~2_val~
|
||||
list.Add(1061837, $"{_curArcaneCharges}\t{_maxArcaneCharges}"); // arcane charges: ~1_val~ / ~2_val~
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(_title))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ namespace Server.Items
|
|||
|
||||
public override BookContent DefaultContent => Content;
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
list.Add("Fropoz's Journal");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ namespace Server.Items
|
|||
|
||||
public override BookContent DefaultContent => Content;
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
list.Add("Khabur's Journal");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ namespace Server.Items
|
|||
|
||||
public override BookContent DefaultContent => Content;
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
list.Add("Translated Gargoyle Journal");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -662,9 +662,7 @@ namespace Server.Items
|
|||
};
|
||||
}
|
||||
|
||||
private string GetNameString() => Name ?? $"#{LabelNumber}";
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
var oreType = _rawResource switch
|
||||
{
|
||||
|
|
@ -688,21 +686,23 @@ namespace Server.Items
|
|||
_ => 0
|
||||
};
|
||||
|
||||
var name = Name;
|
||||
|
||||
if (oreType != 0)
|
||||
{
|
||||
list.Add(1053099, "#{0}\t{1}", oreType, GetNameString()); // ~1_oretype~ ~2_armortype~
|
||||
list.Add(1053099, name != null ? $"#{oreType}\t{name}" : $"#{oreType}\t#{LabelNumber}"); // ~1_oretype~ ~2_armortype~
|
||||
}
|
||||
else if (Name == null)
|
||||
else if (name == null)
|
||||
{
|
||||
list.Add(LabelNumber);
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add(Name);
|
||||
list.Add(name);
|
||||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
@ -737,72 +737,72 @@ namespace Server.Items
|
|||
|
||||
if ((prop = ArtifactRarity) > 0)
|
||||
{
|
||||
list.Add(1061078, prop.ToString()); // artifact rarity ~1_val~
|
||||
list.Add(1061078, $"{prop}"); // artifact rarity ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.WeaponDamage) != 0)
|
||||
{
|
||||
list.Add(1060401, prop.ToString()); // damage increase ~1_val~%
|
||||
list.Add(1060401, $"{prop}"); // damage increase ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.DefendChance) != 0)
|
||||
{
|
||||
list.Add(1060408, prop.ToString()); // defense chance increase ~1_val~%
|
||||
list.Add(1060408, $"{prop}"); // defense chance increase ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.BonusDex) != 0)
|
||||
{
|
||||
list.Add(1060409, prop.ToString()); // dexterity bonus ~1_val~
|
||||
list.Add(1060409, $"{prop}"); // dexterity bonus ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.EnhancePotions) != 0)
|
||||
{
|
||||
list.Add(1060411, prop.ToString()); // enhance potions ~1_val~%
|
||||
list.Add(1060411, $"{prop}"); // enhance potions ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.CastRecovery) != 0)
|
||||
{
|
||||
list.Add(1060412, prop.ToString()); // faster cast recovery ~1_val~
|
||||
list.Add(1060412, $"{prop}"); // faster cast recovery ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.CastSpeed) != 0)
|
||||
{
|
||||
list.Add(1060413, prop.ToString()); // faster casting ~1_val~
|
||||
list.Add(1060413, $"{prop}"); // faster casting ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.AttackChance) != 0)
|
||||
{
|
||||
list.Add(1060415, prop.ToString()); // hit chance increase ~1_val~%
|
||||
list.Add(1060415, $"{prop}"); // hit chance increase ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.BonusHits) != 0)
|
||||
{
|
||||
list.Add(1060431, prop.ToString()); // hit point increase ~1_val~
|
||||
list.Add(1060431, $"{prop}"); // hit point increase ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.BonusInt) != 0)
|
||||
{
|
||||
list.Add(1060432, prop.ToString()); // intelligence bonus ~1_val~
|
||||
list.Add(1060432, $"{prop}"); // intelligence bonus ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.LowerManaCost) != 0)
|
||||
{
|
||||
list.Add(1060433, prop.ToString()); // lower mana cost ~1_val~%
|
||||
list.Add(1060433, $"{prop}"); // lower mana cost ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.LowerRegCost) != 0)
|
||||
{
|
||||
list.Add(1060434, prop.ToString()); // lower reagent cost ~1_val~%
|
||||
list.Add(1060434, $"{prop}"); // lower reagent cost ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = ClothingAttributes.LowerStatReq) != 0)
|
||||
{
|
||||
list.Add(1060435, prop.ToString()); // lower requirements ~1_val~%
|
||||
list.Add(1060435, $"{prop}"); // lower requirements ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.Luck) != 0)
|
||||
{
|
||||
list.Add(1060436, prop.ToString()); // luck ~1_val~
|
||||
list.Add(1060436, $"{prop}"); // luck ~1_val~
|
||||
}
|
||||
|
||||
if (ClothingAttributes.MageArmor != 0)
|
||||
|
|
@ -812,12 +812,12 @@ namespace Server.Items
|
|||
|
||||
if ((prop = Attributes.BonusMana) != 0)
|
||||
{
|
||||
list.Add(1060439, prop.ToString()); // mana increase ~1_val~
|
||||
list.Add(1060439, $"{prop}"); // mana increase ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.RegenMana) != 0)
|
||||
{
|
||||
list.Add(1060440, prop.ToString()); // mana regeneration ~1_val~
|
||||
list.Add(1060440, $"{prop}"); // mana regeneration ~1_val~
|
||||
}
|
||||
|
||||
if (Attributes.NightSight != 0)
|
||||
|
|
@ -827,22 +827,22 @@ namespace Server.Items
|
|||
|
||||
if ((prop = Attributes.ReflectPhysical) != 0)
|
||||
{
|
||||
list.Add(1060442, prop.ToString()); // reflect physical damage ~1_val~%
|
||||
list.Add(1060442, $"{prop}"); // reflect physical damage ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.RegenStam) != 0)
|
||||
{
|
||||
list.Add(1060443, prop.ToString()); // stamina regeneration ~1_val~
|
||||
list.Add(1060443, $"{prop}"); // stamina regeneration ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.RegenHits) != 0)
|
||||
{
|
||||
list.Add(1060444, prop.ToString()); // hit point regeneration ~1_val~
|
||||
list.Add(1060444, $"{prop}"); // hit point regeneration ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = ClothingAttributes.SelfRepair) != 0)
|
||||
{
|
||||
list.Add(1060450, prop.ToString()); // self repair ~1_val~
|
||||
list.Add(1060450, $"{prop}"); // self repair ~1_val~
|
||||
}
|
||||
|
||||
if (Attributes.SpellChanneling != 0)
|
||||
|
|
@ -852,44 +852,44 @@ namespace Server.Items
|
|||
|
||||
if ((prop = Attributes.SpellDamage) != 0)
|
||||
{
|
||||
list.Add(1060483, prop.ToString()); // spell damage increase ~1_val~%
|
||||
list.Add(1060483, $"{prop}"); // spell damage increase ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.BonusStam) != 0)
|
||||
{
|
||||
list.Add(1060484, prop.ToString()); // stamina increase ~1_val~
|
||||
list.Add(1060484, $"{prop}"); // stamina increase ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.BonusStr) != 0)
|
||||
{
|
||||
list.Add(1060485, prop.ToString()); // strength bonus ~1_val~
|
||||
list.Add(1060485, $"{prop}"); // strength bonus ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.WeaponSpeed) != 0)
|
||||
{
|
||||
list.Add(1060486, prop.ToString()); // swing speed increase ~1_val~%
|
||||
list.Add(1060486, $"{prop}"); // swing speed increase ~1_val~%
|
||||
}
|
||||
|
||||
if (Core.ML && (prop = Attributes.IncreasedKarmaLoss) != 0)
|
||||
{
|
||||
list.Add(1075210, prop.ToString()); // Increased Karma Loss ~1val~%
|
||||
list.Add(1075210, $"{prop}"); // Increased Karma Loss ~1val~%
|
||||
}
|
||||
|
||||
AddResistanceProperties(list);
|
||||
|
||||
if ((prop = ClothingAttributes.DurabilityBonus) > 0)
|
||||
{
|
||||
list.Add(1060410, prop.ToString()); // durability ~1_val~%
|
||||
list.Add(1060410, $"{prop}"); // durability ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = ComputeStatReq(StatType.Str)) > 0)
|
||||
{
|
||||
list.Add(1061170, prop.ToString()); // strength requirement ~1_val~
|
||||
list.Add(1061170, $"{prop}"); // strength requirement ~1_val~
|
||||
}
|
||||
|
||||
if (_hitPoints >= 0 && _maxHitPoints > 0)
|
||||
{
|
||||
list.Add(1060639, "{0}\t{1}", _hitPoints, _maxHitPoints); // durability ~1_val~ / ~2_val~
|
||||
list.Add(1060639, $"{_hitPoints}\t{_maxHitPoints}"); // durability ~1_val~ / ~2_val~
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,13 +80,13 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
if (IsArcane)
|
||||
{
|
||||
list.Add(1061837, "{0}\t{1}", _curArcaneCharges, _maxArcaneCharges); // arcane charges: ~1_val~ / ~2_val~
|
||||
list.Add(1061837, $"{_curArcaneCharges}\t{_maxArcaneCharges}"); // arcane charges: ~1_val~ / ~2_val~
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -163,7 +163,7 @@ namespace Server.Items
|
|||
return false;
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ namespace Server.Items
|
|||
return false;
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
@ -275,7 +275,7 @@ namespace Server.Items
|
|||
return false;
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
@ -374,13 +374,13 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
if (IsArcane)
|
||||
{
|
||||
list.Add(1061837, "{0}\t{1}", _curArcaneCharges, _maxArcaneCharges); // arcane charges: ~1_val~ / ~2_val~
|
||||
list.Add(1061837, $"{_curArcaneCharges}\t{_maxArcaneCharges}"); // arcane charges: ~1_val~ / ~2_val~
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -120,13 +120,13 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
if (IsArcane)
|
||||
{
|
||||
list.Add(1061837, "{0}\t{1}", _curArcaneCharges, _maxArcaneCharges); // arcane charges: ~1_val~ / ~2_val~
|
||||
list.Add(1061837, $"{_curArcaneCharges}\t{_maxArcaneCharges}"); // arcane charges: ~1_val~ / ~2_val~
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ public partial class CreatureBackpack : Backpack // Used on BaseCreature
|
|||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
if (Name != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ public abstract partial class LockableContainer : TrappableContainer, ILockable,
|
|||
base.OnSnoop(from);
|
||||
}
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public partial class ParagonChest : LockableContainer
|
|||
LabelTo(from, 1063449, _name);
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public partial class StrongBox : BaseContainer, IChoppable
|
|||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
if (_owner != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@ public abstract partial class BaseDecorationArtifact : Item
|
|||
|
||||
public override bool ForceShowProperties => true;
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
list.Add(1061078, ArtifactRarity.ToString()); // artifact rarity ~1_val~
|
||||
list.Add(1061078, $"{ArtifactRarity}"); // artifact rarity ~1_val~
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -28,10 +28,10 @@ public abstract partial class BaseDecorationContainerArtifact : BaseContainer
|
|||
|
||||
public override bool ForceShowProperties => true;
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
list.Add(1061078, ArtifactRarity.ToString()); // artifact rarity ~1_val~
|
||||
list.Add(1061078, $"{ArtifactRarity}"); // artifact rarity ~1_val~
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public partial class CommodityDeed : Item
|
|||
base.OnDelete();
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public partial class DragonBardingDeed : Item, ICraftable
|
|||
return quality;
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public partial class NewPlayerTicket : Item
|
|||
|
||||
public override bool DisplayLootType => false;
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ public partial class VendorRentalContract : Item
|
|||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -322,7 +322,7 @@ public abstract partial class BaseBeverage : Item, IHasQuantity
|
|||
};
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ namespace Server.Engines.Mahjong
|
|||
BuildVerticalWall(ref i, 115, 165, 1, MahjongPieceDirection.Right, typeGenerator);
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
@ -379,7 +379,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
@ -265,77 +265,77 @@ namespace Server.Items
|
|||
|
||||
if ((prop = ArtifactRarity) > 0)
|
||||
{
|
||||
list.Add(1061078, prop.ToString()); // artifact rarity ~1_val~
|
||||
list.Add(1061078, $"{prop}"); // artifact rarity ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.WeaponDamage) != 0)
|
||||
{
|
||||
list.Add(1060401, prop.ToString()); // damage increase ~1_val~%
|
||||
list.Add(1060401, $"{prop}"); // damage increase ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.DefendChance) != 0)
|
||||
{
|
||||
list.Add(1060408, prop.ToString()); // defense chance increase ~1_val~%
|
||||
list.Add(1060408, $"{prop}"); // defense chance increase ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.BonusDex) != 0)
|
||||
{
|
||||
list.Add(1060409, prop.ToString()); // dexterity bonus ~1_val~
|
||||
list.Add(1060409, $"{prop}"); // dexterity bonus ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.EnhancePotions) != 0)
|
||||
{
|
||||
list.Add(1060411, prop.ToString()); // enhance potions ~1_val~%
|
||||
list.Add(1060411, $"{prop}"); // enhance potions ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.CastRecovery) != 0)
|
||||
{
|
||||
list.Add(1060412, prop.ToString()); // faster cast recovery ~1_val~
|
||||
list.Add(1060412, $"{prop}"); // faster cast recovery ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.CastSpeed) != 0)
|
||||
{
|
||||
list.Add(1060413, prop.ToString()); // faster casting ~1_val~
|
||||
list.Add(1060413, $"{prop}"); // faster casting ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.AttackChance) != 0)
|
||||
{
|
||||
list.Add(1060415, prop.ToString()); // hit chance increase ~1_val~%
|
||||
list.Add(1060415, $"{prop}"); // hit chance increase ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.BonusHits) != 0)
|
||||
{
|
||||
list.Add(1060431, prop.ToString()); // hit point increase ~1_val~
|
||||
list.Add(1060431, $"{prop}"); // hit point increase ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.BonusInt) != 0)
|
||||
{
|
||||
list.Add(1060432, prop.ToString()); // intelligence bonus ~1_val~
|
||||
list.Add(1060432, $"{prop}"); // intelligence bonus ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.LowerManaCost) != 0)
|
||||
{
|
||||
list.Add(1060433, prop.ToString()); // lower mana cost ~1_val~%
|
||||
list.Add(1060433, $"{prop}"); // lower mana cost ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.LowerRegCost) != 0)
|
||||
{
|
||||
list.Add(1060434, prop.ToString()); // lower reagent cost ~1_val~%
|
||||
list.Add(1060434, $"{prop}"); // lower reagent cost ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.Luck) != 0)
|
||||
{
|
||||
list.Add(1060436, prop.ToString()); // luck ~1_val~
|
||||
list.Add(1060436, $"{prop}"); // luck ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.BonusMana) != 0)
|
||||
{
|
||||
list.Add(1060439, prop.ToString()); // mana increase ~1_val~
|
||||
list.Add(1060439, $"{prop}"); // mana increase ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.RegenMana) != 0)
|
||||
{
|
||||
list.Add(1060440, prop.ToString()); // mana regeneration ~1_val~
|
||||
list.Add(1060440, $"{prop}"); // mana regeneration ~1_val~
|
||||
}
|
||||
|
||||
if (Attributes.NightSight != 0)
|
||||
|
|
@ -345,17 +345,17 @@ namespace Server.Items
|
|||
|
||||
if ((prop = Attributes.ReflectPhysical) != 0)
|
||||
{
|
||||
list.Add(1060442, prop.ToString()); // reflect physical damage ~1_val~%
|
||||
list.Add(1060442, $"{prop}"); // reflect physical damage ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.RegenStam) != 0)
|
||||
{
|
||||
list.Add(1060443, prop.ToString()); // stamina regeneration ~1_val~
|
||||
list.Add(1060443, $"{prop}"); // stamina regeneration ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.RegenHits) != 0)
|
||||
{
|
||||
list.Add(1060444, prop.ToString()); // hit point regeneration ~1_val~
|
||||
list.Add(1060444, $"{prop}"); // hit point regeneration ~1_val~
|
||||
}
|
||||
|
||||
if (Attributes.SpellChanneling != 0)
|
||||
|
|
@ -365,34 +365,34 @@ namespace Server.Items
|
|||
|
||||
if ((prop = Attributes.SpellDamage) != 0)
|
||||
{
|
||||
list.Add(1060483, prop.ToString()); // spell damage increase ~1_val~%
|
||||
list.Add(1060483, $"{prop}"); // spell damage increase ~1_val~%
|
||||
}
|
||||
|
||||
if ((prop = Attributes.BonusStam) != 0)
|
||||
{
|
||||
list.Add(1060484, prop.ToString()); // stamina increase ~1_val~
|
||||
list.Add(1060484, $"{prop}"); // stamina increase ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.BonusStr) != 0)
|
||||
{
|
||||
list.Add(1060485, prop.ToString()); // strength bonus ~1_val~
|
||||
list.Add(1060485, $"{prop}"); // strength bonus ~1_val~
|
||||
}
|
||||
|
||||
if ((prop = Attributes.WeaponSpeed) != 0)
|
||||
{
|
||||
list.Add(1060486, prop.ToString()); // swing speed increase ~1_val~%
|
||||
list.Add(1060486, $"{prop}"); // swing speed increase ~1_val~%
|
||||
}
|
||||
|
||||
if (Core.ML && (prop = Attributes.IncreasedKarmaLoss) != 0)
|
||||
{
|
||||
list.Add(1075210, prop.ToString()); // Increased Karma Loss ~1val~%
|
||||
list.Add(1075210, $"{prop}"); // Increased Karma Loss ~1val~%
|
||||
}
|
||||
|
||||
AddResistanceProperties(list);
|
||||
|
||||
if (m_HitPoints >= 0 && m_MaxHitPoints > 0)
|
||||
{
|
||||
list.Add(1060639, "{0}\t{1}", m_HitPoints, m_MaxHitPoints); // durability ~1_val~ / ~2_val~
|
||||
list.Add(1060639, $"{m_HitPoints}\t{m_MaxHitPoints}"); // durability ~1_val~ / ~2_val~
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -523,7 +523,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
list.Add(1060738, Core.ML ? $"{m_Worth:N0}" : m_Worth.ToString()); // value: ~1_val~)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue