Modernization Fixes & Updates to Default Values (#3)
This commit is contained in:
parent
445eddff68
commit
dcf64091b1
768 changed files with 10507 additions and 14196 deletions
|
|
@ -10,7 +10,6 @@ namespace Server.Items
|
|||
typeof(Arrow), typeof(Bolt)
|
||||
};
|
||||
|
||||
private AosAttributes m_Attributes;
|
||||
private int m_Capacity;
|
||||
|
||||
private Mobile m_Crafter;
|
||||
|
|
@ -29,7 +28,7 @@ namespace Server.Items
|
|||
Capacity = 500;
|
||||
Layer = Layer.Cloak;
|
||||
|
||||
m_Attributes = new AosAttributes(this);
|
||||
Attributes = new AosAttributes(this);
|
||||
|
||||
DamageIncrease = 10;
|
||||
}
|
||||
|
|
@ -44,11 +43,7 @@ namespace Server.Items
|
|||
public override double DefaultWeight => 2.0;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public AosAttributes Attributes
|
||||
{
|
||||
get => m_Attributes;
|
||||
set { }
|
||||
}
|
||||
public AosAttributes Attributes{ get; private set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int Capacity
|
||||
|
|
@ -138,7 +133,7 @@ namespace Server.Items
|
|||
if (!(newItem is BaseQuiver quiver))
|
||||
return;
|
||||
|
||||
quiver.m_Attributes = new AosAttributes(newItem, m_Attributes);
|
||||
quiver.Attributes = new AosAttributes(newItem, Attributes);
|
||||
}
|
||||
|
||||
public override void UpdateTotal(Item sender, TotalType type, int delta)
|
||||
|
|
@ -226,12 +221,12 @@ namespace Server.Items
|
|||
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
if (parent is Mobile mob) m_Attributes.AddStatBonuses(mob);
|
||||
if (parent is Mobile mob) Attributes.AddStatBonuses(mob);
|
||||
}
|
||||
|
||||
public override void OnRemoved(IEntity parent)
|
||||
{
|
||||
if (parent is Mobile mob) m_Attributes.RemoveStatBonuses(mob);
|
||||
if (parent is Mobile mob) Attributes.RemoveStatBonuses(mob);
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
|
|
@ -291,67 +286,67 @@ namespace Server.Items
|
|||
|
||||
list.Add(1075085); // Requirement: Mondain's Legacy
|
||||
|
||||
if ((prop = m_Attributes.DefendChance) != 0)
|
||||
if ((prop = Attributes.DefendChance) != 0)
|
||||
list.Add(1060408, prop.ToString()); // defense chance increase ~1_val~%
|
||||
|
||||
if ((prop = m_Attributes.BonusDex) != 0)
|
||||
if ((prop = Attributes.BonusDex) != 0)
|
||||
list.Add(1060409, prop.ToString()); // dexterity bonus ~1_val~
|
||||
|
||||
if ((prop = m_Attributes.EnhancePotions) != 0)
|
||||
if ((prop = Attributes.EnhancePotions) != 0)
|
||||
list.Add(1060411, prop.ToString()); // enhance potions ~1_val~%
|
||||
|
||||
if ((prop = m_Attributes.CastRecovery) != 0)
|
||||
if ((prop = Attributes.CastRecovery) != 0)
|
||||
list.Add(1060412, prop.ToString()); // faster cast recovery ~1_val~
|
||||
|
||||
if ((prop = m_Attributes.CastSpeed) != 0)
|
||||
if ((prop = Attributes.CastSpeed) != 0)
|
||||
list.Add(1060413, prop.ToString()); // faster casting ~1_val~
|
||||
|
||||
if ((prop = m_Attributes.AttackChance) != 0)
|
||||
if ((prop = Attributes.AttackChance) != 0)
|
||||
list.Add(1060415, prop.ToString()); // hit chance increase ~1_val~%
|
||||
|
||||
if ((prop = m_Attributes.BonusHits) != 0)
|
||||
if ((prop = Attributes.BonusHits) != 0)
|
||||
list.Add(1060431, prop.ToString()); // hit point increase ~1_val~
|
||||
|
||||
if ((prop = m_Attributes.BonusInt) != 0)
|
||||
if ((prop = Attributes.BonusInt) != 0)
|
||||
list.Add(1060432, prop.ToString()); // intelligence bonus ~1_val~
|
||||
|
||||
if ((prop = m_Attributes.LowerManaCost) != 0)
|
||||
if ((prop = Attributes.LowerManaCost) != 0)
|
||||
list.Add(1060433, prop.ToString()); // lower mana cost ~1_val~%
|
||||
|
||||
if ((prop = m_Attributes.LowerRegCost) != 0)
|
||||
if ((prop = Attributes.LowerRegCost) != 0)
|
||||
list.Add(1060434, prop.ToString()); // lower reagent cost ~1_val~%
|
||||
|
||||
if ((prop = m_Attributes.Luck) != 0)
|
||||
if ((prop = Attributes.Luck) != 0)
|
||||
list.Add(1060436, prop.ToString()); // luck ~1_val~
|
||||
|
||||
if ((prop = m_Attributes.BonusMana) != 0)
|
||||
if ((prop = Attributes.BonusMana) != 0)
|
||||
list.Add(1060439, prop.ToString()); // mana increase ~1_val~
|
||||
|
||||
if ((prop = m_Attributes.RegenMana) != 0)
|
||||
if ((prop = Attributes.RegenMana) != 0)
|
||||
list.Add(1060440, prop.ToString()); // mana regeneration ~1_val~
|
||||
|
||||
if ((prop = m_Attributes.NightSight) != 0)
|
||||
if ((prop = Attributes.NightSight) != 0)
|
||||
list.Add(1060441); // night sight
|
||||
|
||||
if ((prop = m_Attributes.ReflectPhysical) != 0)
|
||||
if ((prop = Attributes.ReflectPhysical) != 0)
|
||||
list.Add(1060442, prop.ToString()); // reflect physical damage ~1_val~%
|
||||
|
||||
if ((prop = m_Attributes.RegenStam) != 0)
|
||||
if ((prop = Attributes.RegenStam) != 0)
|
||||
list.Add(1060443, prop.ToString()); // stamina regeneration ~1_val~
|
||||
|
||||
if ((prop = m_Attributes.RegenHits) != 0)
|
||||
if ((prop = Attributes.RegenHits) != 0)
|
||||
list.Add(1060444, prop.ToString()); // hit point regeneration ~1_val~
|
||||
|
||||
if ((prop = m_Attributes.SpellDamage) != 0)
|
||||
if ((prop = Attributes.SpellDamage) != 0)
|
||||
list.Add(1060483, prop.ToString()); // spell damage increase ~1_val~%
|
||||
|
||||
if ((prop = m_Attributes.BonusStam) != 0)
|
||||
if ((prop = Attributes.BonusStam) != 0)
|
||||
list.Add(1060484, prop.ToString()); // stamina increase ~1_val~
|
||||
|
||||
if ((prop = m_Attributes.BonusStr) != 0)
|
||||
if ((prop = Attributes.BonusStr) != 0)
|
||||
list.Add(1060485, prop.ToString()); // strength bonus ~1_val~
|
||||
|
||||
if ((prop = m_Attributes.WeaponSpeed) != 0)
|
||||
if ((prop = Attributes.WeaponSpeed) != 0)
|
||||
list.Add(1060486, prop.ToString()); // swing speed increase ~1_val~%
|
||||
|
||||
if ((prop = m_LowerAmmoCost) > 0)
|
||||
|
|
@ -388,7 +383,7 @@ namespace Server.Items
|
|||
|
||||
SaveFlag flags = SaveFlag.None;
|
||||
|
||||
SetSaveFlag(ref flags, SaveFlag.Attributes, !m_Attributes.IsEmpty);
|
||||
SetSaveFlag(ref flags, SaveFlag.Attributes, !Attributes.IsEmpty);
|
||||
SetSaveFlag(ref flags, SaveFlag.LowerAmmoCost, m_LowerAmmoCost != 0);
|
||||
SetSaveFlag(ref flags, SaveFlag.WeightReduction, m_WeightReduction != 0);
|
||||
SetSaveFlag(ref flags, SaveFlag.DamageIncrease, m_DamageIncrease != 0);
|
||||
|
|
@ -399,7 +394,7 @@ namespace Server.Items
|
|||
writer.WriteEncodedInt((int)flags);
|
||||
|
||||
if (GetSaveFlag(flags, SaveFlag.Attributes))
|
||||
m_Attributes.Serialize(writer);
|
||||
Attributes.Serialize(writer);
|
||||
|
||||
if (GetSaveFlag(flags, SaveFlag.LowerAmmoCost))
|
||||
writer.Write(m_LowerAmmoCost);
|
||||
|
|
@ -429,9 +424,9 @@ namespace Server.Items
|
|||
SaveFlag flags = (SaveFlag)reader.ReadEncodedInt();
|
||||
|
||||
if (GetSaveFlag(flags, SaveFlag.Attributes))
|
||||
m_Attributes = new AosAttributes(this, reader);
|
||||
Attributes = new AosAttributes(this, reader);
|
||||
else
|
||||
m_Attributes = new AosAttributes(this);
|
||||
Attributes = new AosAttributes(this);
|
||||
|
||||
if (GetSaveFlag(flags, SaveFlag.LowerAmmoCost))
|
||||
m_LowerAmmoCost = reader.ReadInt();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue