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:
Kamron Batman 2022-06-02 10:09:53 -07:00 • committed by GitHub
parent fe31470f05
commit ecbee17690
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
227 changed files with 1426 additions and 1008 deletions

View file

@ -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);

View file

@ -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);

View file

@ -168,7 +168,7 @@ namespace Server.Items
base.OnDelete();
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -97,7 +97,7 @@ namespace Server.Items
}
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -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}"
);
}
}

View file

@ -15,7 +15,7 @@ namespace Server.Items
public override bool RequireDeepWater => false;
protected override void AddNetProperties(ObjectPropertyList list)
protected override void AddNetProperties(IPropertyList list)
{
}

View file

@ -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);

View file

@ -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~
}
}
}

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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~
}
}
}

View file

@ -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~
}
}

View file

@ -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~%
}
}
}

View file

@ -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~
}
}

View file

@ -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~
}
}

View file

@ -174,7 +174,7 @@ namespace Server.Items
}
}
public override void AddNameProperty(ObjectPropertyList list)
public override void AddNameProperty(IPropertyList list)
{
if (!string.IsNullOrEmpty(_title))
{

View file

@ -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");
}

View file

@ -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");
}

View file

@ -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");
}

View file

@ -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~
}
}

View file

@ -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);

View file

@ -28,7 +28,7 @@ namespace Server.Items
}
}
public override void AddNameProperties(ObjectPropertyList list)
public override void AddNameProperties(IPropertyList list)
{
base.AddNameProperties(list);

View file

@ -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~
}
}

View file

@ -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~
}
}

View file

@ -40,7 +40,7 @@ namespace Server.Items
}
}
public override void AddNameProperties(ObjectPropertyList list)
public override void AddNameProperties(IPropertyList list)
{
base.AddNameProperties(list);

View file

@ -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)
{

View file

@ -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);

View file

@ -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);

View file

@ -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)
{

View file

@ -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~
}
}

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -76,7 +76,7 @@ public partial class VendorRentalContract : Item
}
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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~
}
}

View file

@ -46,7 +46,7 @@ namespace Server.Items
}
}
public override void AddNameProperties(ObjectPropertyList list)
public override void AddNameProperties(IPropertyList list)
{
base.AddNameProperties(list);

View file

@ -523,7 +523,7 @@ namespace Server.Items
}
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -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~)

View file

@ -24,7 +24,7 @@ namespace Server.Items
}
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -28,7 +28,7 @@ namespace Server.Items
}
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -91,17 +91,17 @@ namespace Server.Items
public override bool HandlesOnSpeech => true;
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
list.Add(Active ? 1060742 : 1060743); // active / inactive
list.Add(1060745); // broadcast
list.Add(1060741, Charges.ToString()); // charges: ~1_val~
list.Add(1060741, $"{Charges}"); // charges: ~1_val~
if (Receivers.Count > 0)
{
list.Add(1060746, Receivers.Count.ToString()); // links: ~1_val~
list.Add(1060746, $"{Receivers.Count}"); // links: ~1_val~
}
}
@ -338,7 +338,7 @@ namespace Server.Items
}
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -1130,7 +1130,7 @@ namespace Server.Items
public override bool CheckContentDisplay(Mobile from) => false;
public override void AddNameProperty(ObjectPropertyList list)
public override void AddNameProperty(IPropertyList list)
{
if (ItemID == 0x2006) // Corpse form
{

View file

@ -43,7 +43,7 @@ namespace Server.Items
// Do not display (x items, y stones)
public override bool CheckContentDisplay(Mobile from) => false;
public override void AddNameProperty(ObjectPropertyList list)
public override void AddNameProperty(IPropertyList list)
{
list.Add(1046414, Name); // the remains of ~1_NAME~
}

View file

@ -41,7 +41,7 @@ namespace Server.Items
public override int LabelNumber => 1041280; // an interior decorator
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -218,7 +218,7 @@ public class Key : Item
from.Target = t;
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -23,11 +23,11 @@ namespace Server.Items
public override int LabelNumber => 1070997; // A promotional token
public abstract Item CreateItemFor(Mobile from);
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
list.Add(1070998, ItemName.ToString()); // Use this to redeem<br>your ~1_PROMO~
list.Add(1070998, $"{ItemName}"); // Use this to redeem<br>your ~1_PROMO~
}
public override void OnDoubleClick(Mobile from)

View file

@ -153,7 +153,7 @@ namespace Server.Items
public override int LabelNumber => 1026095; // teleporter
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
@ -168,15 +168,15 @@ namespace Server.Items
if (m_MapDest != null)
{
list.Add(1060658, "Map\t{0}", m_MapDest);
list.Add(1060658, $"Map\t{m_MapDest}");
}
if (m_PointDest != Point3D.Zero)
{
list.Add(1060659, "Coords\t{0}", m_PointDest);
list.Add(1060659, $"Coords\t{m_PointDest}");
}
list.Add(1060660, "Creatures\t{0}", m_Creatures ? "Yes" : "No");
list.Add(1060660, $"Creatures\t{(m_Creatures ? "Yes" : "No")}");
}
public override void OnSingleClick(Mobile from)
@ -463,7 +463,7 @@ namespace Server.Items
return true;
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
@ -479,15 +479,15 @@ namespace Server.Items
skillName = "(Invalid)";
}
list.Add(1060661, "{0}\t{1:F1}", skillName, m_Required);
list.Add(1060661, $"{skillName}\t{m_Required:F1}");
if (m_MessageString != null)
{
list.Add(1060662, "Message\t{0}", m_MessageString);
list.Add(1060662, $"Message\t{m_MessageString}");
}
else if (m_MessageNumber != 0)
{
list.Add(1060662, "Message\t#{0}", m_MessageNumber);
list.Add(1060662, $"Message\t#{m_MessageNumber}");
}
}
@ -621,20 +621,20 @@ namespace Server.Items
public override bool OnMoveOver(Mobile m) => true;
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
list.Add(1060661, "Range\t{0}", m_Range);
list.Add(1060661, $"Range\t{m_Range}");
if (m_Keyword >= 0)
{
list.Add(1060662, "Keyword\t{0}", m_Keyword);
list.Add(1060662, $"Keyword\t{m_Keyword}");
}
if (m_Substring != null)
{
list.Add(1060663, "Substring\t{0}", m_Substring);
list.Add(1060663, $"Substring\t{m_Substring}");
}
}
@ -1176,7 +1176,7 @@ namespace Server.Items
return true;
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -42,7 +42,7 @@ namespace Server.Items
base.OnMovement(m, oldLocation);
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -236,7 +236,7 @@ namespace Server.Items
}
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
@ -256,23 +256,23 @@ namespace Server.Items
{
if (ammo is Arrow)
{
list.Add(1075265, "{0}\t{1}", ammo.Amount, Capacity); // Ammo: ~1_QUANTITY~/~2_CAPACITY~ arrows
list.Add(1075265, $"{ammo.Amount}\t{Capacity}"); // Ammo: ~1_QUANTITY~/~2_CAPACITY~ arrows
}
else if (ammo is Bolt)
{
list.Add(1075266, "{0}\t{1}", ammo.Amount, Capacity); // Ammo: ~1_QUANTITY~/~2_CAPACITY~ bolts
list.Add(1075266, $"{ammo.Amount}\t{Capacity}"); // Ammo: ~1_QUANTITY~/~2_CAPACITY~ bolts
}
}
else
{
list.Add(1075265, "{0}\t{1}", 0, Capacity); // Ammo: ~1_QUANTITY~/~2_CAPACITY~ arrows
list.Add(1075265, $"0\t{Capacity}"); // Ammo: ~1_QUANTITY~/~2_CAPACITY~ arrows
}
int prop;
if ((prop = m_DamageIncrease) != 0)
{
list.Add(1074762, prop.ToString()); // Damage modifier: ~1_PERCENT~%
list.Add(1074762, $"{prop}"); // Damage modifier: ~1_PERCENT~%
}
int phys = 0, fire = 0, cold = 0, pois = 0, nrgy = 0, chaos = 0, direct = 0;
@ -281,104 +281,104 @@ namespace Server.Items
if (phys != 0)
{
list.Add(1060403, phys.ToString()); // physical damage ~1_val~%
list.Add(1060403, $"{phys}"); // physical damage ~1_val~%
}
if (fire != 0)
{
list.Add(1060405, fire.ToString()); // fire damage ~1_val~%
list.Add(1060405, $"{fire}"); // fire damage ~1_val~%
}
if (cold != 0)
{
list.Add(1060404, cold.ToString()); // cold damage ~1_val~%
list.Add(1060404, $"{cold}"); // cold damage ~1_val~%
}
if (pois != 0)
{
list.Add(1060406, pois.ToString()); // poison damage ~1_val~%
list.Add(1060406, $"{pois}"); // poison damage ~1_val~%
}
if (nrgy != 0)
{
list.Add(1060407, nrgy.ToString()); // energy damage ~1_val
list.Add(1060407, $"{nrgy}"); // energy damage ~1_val
}
if (chaos != 0)
{
list.Add(1072846, chaos.ToString()); // chaos damage ~1_val~%
list.Add(1072846, $"{chaos}"); // chaos damage ~1_val~%
}
if (direct != 0)
{
list.Add(1079978, direct.ToString()); // Direct Damage: ~1_PERCENT~%
list.Add(1079978, $"{direct}"); // Direct Damage: ~1_PERCENT~%
}
list.Add(1075085); // Requirement: Mondain's Legacy
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)
@ -388,58 +388,54 @@ 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 = 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 ((prop = m_LowerAmmoCost) > 0)
{
list.Add(1075208, prop.ToString()); // Lower Ammo Cost ~1_Percentage~%
list.Add(1075208, $"{prop}"); // Lower Ammo Cost ~1_Percentage~%
}
var weight = ammo != null ? ammo.Weight + ammo.Amount : 0;
list.Add(
1072241,
"{0}\t{1}\t{2}\t{3}",
Items.Count,
DefaultMaxItems,
(int)weight,
DefaultMaxWeight
); // Contents: ~1_COUNT~/~2_MAXCOUNT items, ~3_WEIGHT~/~4_MAXWEIGHT~ stones
1072241, // Contents: ~1_COUNT~/~2_MAXCOUNT items, ~3_WEIGHT~/~4_MAXWEIGHT~ stones
$"{Items.Count}\t{DefaultMaxItems}\t{(int)weight}\t{DefaultMaxWeight}"
);
if ((prop = m_WeightReduction) != 0)
{
list.Add(1072210, prop.ToString()); // Weight reduction: ~1_PERCENTAGE~%
list.Add(1072210, $"{prop}"); // Weight reduction: ~1_PERCENTAGE~%
}
}

View file

@ -68,11 +68,11 @@ namespace Server.Items
}
}
public override void AddNameProperty(ObjectPropertyList list)
public override void AddNameProperty(IPropertyList list)
{
if (Amount > 1)
{
list.Add(1050039, "{0}\t#{1}", Amount, 1027154); // ~1_NUMBER~ ~2_ITEMNAME~
list.Add(1050039, $"{Amount}\t#{1027154}"); // ~1_NUMBER~ ~2_ITEMNAME~
}
else
{
@ -80,7 +80,7 @@ namespace Server.Items
}
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -83,11 +83,11 @@ namespace Server.Items
dropped.Stackable && Stackable && dropped.GetType() == GetType() && dropped.Hue == Hue &&
dropped.Name == Name && dropped.Amount + Amount <= 60000 && dropped != this;
public override void AddNameProperty(ObjectPropertyList list)
public override void AddNameProperty(IPropertyList list)
{
if (Amount > 1)
{
list.Add(1050039, "{0}\t#{1}", Amount, 1026583); // ~1_NUMBER~ ~2_ITEMNAME~
list.Add(1050039, $"{Amount}\t#{1026583}"); // ~1_NUMBER~ ~2_ITEMNAME~
}
else
{
@ -95,7 +95,7 @@ namespace Server.Items
}
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -26,7 +26,7 @@ namespace Server.Items
ScissorHelper(from, new RawFishSteak(), Math.Max(16, (int)Weight) / 4, false);
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
@ -37,7 +37,7 @@ namespace Server.Items
list.Add(1070857, _fisher.Name); // Caught by ~1_fisherman~
}
list.Add(1070858, ((int)Weight).ToString()); // ~1_weight~ stones
list.Add(1070858, $"{(int)Weight}"); // ~1_weight~ stones
}
}

View file

@ -62,7 +62,7 @@ namespace Server.Items
}
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -55,11 +55,11 @@ namespace Server.Items
}
}
public override void AddNameProperty(ObjectPropertyList list)
public override void AddNameProperty(IPropertyList list)
{
if (Amount > 1)
{
list.Add(1050039, "{0}\t#{1}", Amount, 1024216); // ~1_NUMBER~ ~2_ITEMNAME~
list.Add(1050039, $"{Amount}\t#1024216"); // ~1_NUMBER~ ~2_ITEMNAME~
}
else
{
@ -67,7 +67,7 @@ namespace Server.Items
}
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -55,11 +55,11 @@ namespace Server.Items
}
}
public override void AddNameProperty(ObjectPropertyList list)
public override void AddNameProperty(IPropertyList list)
{
if (Amount > 1)
{
list.Add(1050039, "{0}\t#{1}", Amount, 1024199); // ~1_NUMBER~ ~2_ITEMNAME~
list.Add(1050039, $"{Amount}\t#1024199"); // ~1_NUMBER~ ~2_ITEMNAME~
}
else
{
@ -67,7 +67,7 @@ namespace Server.Items
}
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -59,7 +59,7 @@ namespace Server.Items
bool ICommodity.IsDeedable => true;
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -253,7 +253,7 @@ namespace Server.Items
public Item Deed => new TrophyDeed(WestID, NorthID, DeedNumber, m_AddonNumber, m_Hunter, m_AnimalWeight);
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
@ -264,7 +264,7 @@ namespace Server.Items
list.Add(1070857, m_Hunter.Name); // Caught by ~1_fisherman~
}
list.Add(1070858, m_AnimalWeight.ToString()); // ~1_weight~ stones
list.Add(1070858, $"{m_AnimalWeight}"); // ~1_weight~ stones
}
}
@ -428,7 +428,7 @@ namespace Server.Items
public override int LabelNumber => m_DeedNumber;
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
@ -439,7 +439,7 @@ namespace Server.Items
list.Add(1070857, m_Hunter.Name); // Caught by ~1_fisherman~
}
list.Add(1070858, m_AnimalWeight.ToString()); // ~1_weight~ stones
list.Add(1070858, $"{m_AnimalWeight}"); // ~1_weight~ stones
}
}

View file

@ -51,7 +51,7 @@ namespace Server.Items
LabelTo(from, 1050039, $"#{LabelNumber}\t#1041645");
}
public override void AddNameProperties(ObjectPropertyList list)
public override void AddNameProperties(IPropertyList list)
{
base.AddNameProperties(list);
list.Add(1041645); // recovered from a shipwreck

View file

@ -63,14 +63,14 @@ namespace Server.Items
public virtual bool RequireDeepWater => true;
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
AddNetProperties(list);
}
protected virtual void AddNetProperties(ObjectPropertyList list)
protected virtual void AddNetProperties(IPropertyList list)
{
// as if the name wasn't enough..
list.Add(1017410); // Special Fishing Net
@ -435,7 +435,7 @@ namespace Server.Items
public override int LabelNumber => 1063451; // a fabled fishing net
protected override void AddNetProperties(ObjectPropertyList list)
protected override void AddNetProperties(IPropertyList list)
{
}

View file

@ -109,7 +109,7 @@ namespace Server.Items
return 100;
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
@ -122,7 +122,7 @@ namespace Server.Items
list.Add(1060636); // exceptional
}
list.Add(1060584, m_UsesRemaining.ToString()); // uses remaining: ~1_val~
list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~
}
public virtual void DisplayDurabilityTo(Mobile m)

View file

@ -40,7 +40,7 @@ namespace Server.Items
bool ICommodity.IsDeedable => true;
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -98,7 +98,7 @@ namespace Server.Items
}
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -217,7 +217,7 @@ namespace Server.Items
InvalidateProperties();
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
@ -232,23 +232,23 @@ namespace Server.Items
if (m_TargetMap == Map.Tokuno)
{
list.Add(House != null ? 1063260 : 1063259, RuneFormat, desc); // ~1_val~ (Tokuno Islands)[(House)]
list.Add(House != null ? 1063260 : 1063259, $"a recall rune for {desc}"); // ~1_val~ (Tokuno Islands)[(House)]
}
else if (m_TargetMap == Map.Malas)
{
list.Add(House != null ? 1062454 : 1060804, RuneFormat, desc); // ~1_val~ (Malas)[(House)]
list.Add(House != null ? 1062454 : 1060804, $"a recall rune for {desc}"); // ~1_val~ (Malas)[(House)]
}
else if (m_TargetMap == Map.Felucca)
{
list.Add(House != null ? 1062452 : 1060805, RuneFormat, desc); // ~1_val~ (Felucca)[(House)]
list.Add(House != null ? 1062452 : 1060805, $"a recall rune for {desc}"); // ~1_val~ (Felucca)[(House)]
}
else if (m_TargetMap == Map.Trammel)
{
list.Add(House != null ? 1062453 : 1060806, RuneFormat, desc); // ~1_val~ (Trammel)[(House)]
list.Add(House != null ? 1062453 : 1060806, $"a recall rune for {desc}"); // ~1_val~ (Trammel)[(House)]
}
else
{
list.Add(House != null ? "{0} ({1})(House)" : "{0} ({1})", string.Format(RuneFormat, desc), m_TargetMap);
list.Add(House != null ? $"a recall rune for {desc} ({m_TargetMap})(House)" : $"a recall rune for {desc} ({m_TargetMap})");
}
}
}
@ -263,33 +263,33 @@ namespace Server.Items
{
LabelTo(
from,
House != null ? 1063260 : 1063259,
House != null ? 1063260 : 1063259, // ~1_val~ (Tokuno Islands)[(House)]
string.Format(RuneFormat, desc)
); // ~1_val~ (Tokuno Islands)[(House)]
);
}
else if (m_TargetMap == Map.Malas)
{
LabelTo(
from,
House != null ? 1062454 : 1060804,
House != null ? 1062454 : 1060804, // ~1_val~ (Malas)[(House)]
string.Format(RuneFormat, desc)
); // ~1_val~ (Malas)[(House)]
);
}
else if (m_TargetMap == Map.Felucca)
{
LabelTo(
from,
House != null ? 1062452 : 1060805,
House != null ? 1062452 : 1060805, // ~1_val~ (Felucca)[(House)]
string.Format(RuneFormat, desc)
); // ~1_val~ (Felucca)[(House)]
);
}
else if (m_TargetMap == Map.Trammel)
{
LabelTo(
from,
House != null ? 1062453 : 1060806,
House != null ? 1062453 : 1060806, // ~1_val~ (Trammel)[(House)]
string.Format(RuneFormat, desc)
); // ~1_val~ (Trammel)[(House)]
);
}
else
{

View file

@ -276,7 +276,7 @@ namespace Server.Items
return false;
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -695,7 +695,7 @@ namespace Server.Items
to.NetState.SendSpellbookContent(Serial, ItemID, BookOffset + 1, m_Content);
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
@ -738,72 +738,72 @@ namespace Server.Items
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)
@ -813,17 +813,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)
@ -833,30 +833,30 @@ 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~%
}
list.Add(1042886, SpellCount.ToString()); // ~1_NUMBERS_OF_SPELLS~ Spells
list.Add(1042886, $"{SpellCount}"); // ~1_NUMBERS_OF_SPELLS~ Spells
}
public override void OnSingleClick(Mobile from)

View file

@ -42,7 +42,7 @@ namespace Server.Items
}
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
@ -50,7 +50,7 @@ namespace Server.Items
if (r != null)
{
list.Add(1049644, r.TextDefinition.ToString()); // [~1_stuff~]
list.Add(1049644, $"{r.TextDefinition}"); // [~1_stuff~]
}
}

View file

@ -92,7 +92,7 @@ namespace Server.Items
}
}
public override void AddNameProperty(ObjectPropertyList list)
public override void AddNameProperty(IPropertyList list)
{
list.Add(
1061133,
@ -100,7 +100,7 @@ namespace Server.Items
); // A repair service contract from ~1_SKILL_TITLE~ ~2_SKILL_NAME~.
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -359,7 +359,7 @@ namespace Server.Items
m_Instruments[from] = item;
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
var oldUses = m_UsesRemaining;
CheckReplenishUses(false);
@ -376,7 +376,7 @@ namespace Server.Items
list.Add(1060636); // exceptional
}
list.Add(1060584, m_UsesRemaining.ToString()); // uses remaining: ~1_val~
list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~
if (m_ReplenishesCharges)
{

View file

@ -87,11 +87,11 @@ namespace Server.Items
from.MovingEffect(to, 0x2804, 5, 0, false, false);
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
list.Add(1060584, m_UsesRemaining.ToString()); // uses remaining: ~1_val~
list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~
if (m_Poison != null && m_PoisonCharges > 0)
{

View file

@ -73,11 +73,11 @@ namespace Server.Items
set { }
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
list.Add(1060584, m_UsesRemaining.ToString()); // uses remaining: ~1_val~
list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~
if (m_Poison != null && m_PoisonCharges > 0)
{

View file

@ -89,11 +89,11 @@ namespace Server.Items
from.MovingEffect(to, 0x27AC, 1, 0, false, false);
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
list.Add(1060584, m_UsesRemaining.ToString()); // uses remaining: ~1_val~
list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~
if (m_Poison != null && m_PoisonCharges > 0)
{

View file

@ -74,11 +74,11 @@ namespace Server.Items
set { }
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
list.Add(1060584, m_UsesRemaining.ToString()); // uses remaining: ~1_val~
list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~
if (m_Poison != null && m_PoisonCharges > 0)
{

View file

@ -29,7 +29,7 @@ namespace Server.Items
base.OnDoubleClick(from);
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -30,7 +30,7 @@ namespace Server.Items
base.OnDoubleClick(from);
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -14,7 +14,7 @@ namespace Server.Items
public override bool MetallicHues => true;
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -30,7 +30,7 @@ namespace Server.Items
base.OnDoubleClick(from);
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -30,7 +30,7 @@ namespace Server.Items
base.OnDoubleClick(from);
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -26,7 +26,7 @@ namespace Server.Items
base.OnDoubleClick(from);
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -30,7 +30,7 @@ namespace Server.Items
base.OnDoubleClick(from);
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);

View file

@ -114,7 +114,7 @@ namespace Server.Items
return 100;
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
@ -127,7 +127,7 @@ namespace Server.Items
list.Add(1060636); // exceptional
}
list.Add(1060584, m_UsesRemaining.ToString()); // uses remaining: ~1_val~
list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~
}
public virtual void DisplayDurabilityTo(Mobile m)

View file

@ -42,7 +42,7 @@ namespace Server.Items
}
}
public override void AddNameProperties(ObjectPropertyList list)
public override void AddNameProperties(IPropertyList list)
{
base.AddNameProperties(list);

View file

@ -24,7 +24,7 @@ namespace Server.Items
public override CraftSystem CraftSystem => DefTailoring.CraftSystem;
public override void AddNameProperty(ObjectPropertyList list)
public override void AddNameProperty(IPropertyList list)
{
var v = " ";

View file

@ -141,7 +141,7 @@ namespace Server.Items
box.Tracks.AddRange(Tracks);
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
@ -169,17 +169,17 @@ namespace Server.Items
if (commonSongs > 0)
{
list.Add(1075234, commonSongs.ToString()); // ~1_NUMBER~ Common Tracks
list.Add(1075234, $"{commonSongs}"); // ~1_NUMBER~ Common Tracks
}
if (uncommonSongs > 0)
{
list.Add(1075235, uncommonSongs.ToString()); // ~1_NUMBER~ Uncommon Tracks
list.Add(1075235, $"{uncommonSongs}"); // ~1_NUMBER~ Uncommon Tracks
}
if (rareSongs > 0)
{
list.Add(1075236, rareSongs.ToString()); // ~1_NUMBER~ Rare Tracks
list.Add(1075236, $"{rareSongs}"); // ~1_NUMBER~ Rare Tracks
}
}

View file

@ -32,7 +32,7 @@ namespace Server.Items
[CommandProperty(AccessLevel.GameMaster)]
public MusicName Music { get; set; }
public override void AddNameProperty(ObjectPropertyList list)
public override void AddNameProperty(IPropertyList list)
{
var info = DawnsMusicBox.GetInfo(Music);

View file

@ -20,7 +20,7 @@ namespace Server.Items
public override bool Dye(Mobile from, DyeTub sender) => false;
public override void AddNameProperties(ObjectPropertyList list)
public override void AddNameProperties(IPropertyList list)
{
base.AddNameProperties(list);
@ -121,11 +121,11 @@ namespace Server.Items
return false;
}
public override void AddNameProperties(ObjectPropertyList list)
public override void AddNameProperties(IPropertyList list)
{
base.AddNameProperties(list);
list.Add(1075217, m_Charges.ToString()); // ~1_val~ charges remaining
list.Add(1075217, $"{m_Charges}"); // ~1_val~ charges remaining
}
public override void OnDelete()

View file

@ -27,7 +27,7 @@ namespace Server.Items
public virtual TalismanForm Form => TalismanForm.Squirrel;
public override void AddNameProperty(ObjectPropertyList list)
public override void AddNameProperty(IPropertyList list)
{
list.Add(1075200, $"#{(int)Form}");
}

View file

@ -73,13 +73,13 @@ namespace Server.Items
m_SkillMod = null;
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
if (m_Bonus != 0)
{
list.Add(1060451, "#1042354\t{0}", m_Bonus.ToString()); // ~1_skillname~ +~2_val~
list.Add(1060451, $"#1042354\t{m_Bonus}"); // ~1_skillname~ +~2_val~
}
}

View file

@ -196,13 +196,13 @@ namespace Server.Items
m_SkillMod = null;
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
if (m_Bonus != 0)
{
list.Add(1062005, m_Bonus.ToString()); // mining bonus +~1_val~
list.Add(1062005, $"{m_Bonus}"); // mining bonus +~1_val~
}
}

View file

@ -62,11 +62,11 @@ namespace Server.Items
}
}
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
list.Add(1060584, m_UsesRemaining.ToString()); // uses remaining: ~1_val~
list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~
}
public virtual void DisplayDurabilityTo(Mobile m)

View file

@ -65,11 +65,11 @@ namespace Server.Items
[CommandProperty(AccessLevel.GameMaster)]
public SecureLevel Level { get; set; }
public override void GetProperties(ObjectPropertyList list)
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
list.Add(1062925, Petals.ToString()); // Petals: ~1_COUNT~
list.Add(1062925, $"{Petals}"); // Petals: ~1_COUNT~
}
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)

View file

@ -30,7 +30,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