Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
@@ -0,0 +1,150 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using Server;
|
||||
using Server.Misc;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public interface IEpiphanyArmor
|
||||
{
|
||||
Alignment Alignment { get; }
|
||||
SurgeType Type { get; }
|
||||
int Frequency { get; }
|
||||
int Bonus { get; }
|
||||
}
|
||||
|
||||
public static class EpiphanyHelper
|
||||
{
|
||||
public static Dictionary<Mobile, Dictionary<SurgeType, int>> Table { get; set; }
|
||||
|
||||
public static readonly int MinTriggerDamage = 15; // TODO: Amount?
|
||||
|
||||
public static int GetFrequency(Mobile m, IEpiphanyArmor armor)
|
||||
{
|
||||
if(m == null)
|
||||
return 1;
|
||||
|
||||
return Math.Max(1, Math.Min(5, m.Items.Where(i => i is IEpiphanyArmor &&
|
||||
((IEpiphanyArmor)i).Alignment == armor.Alignment &&
|
||||
((IEpiphanyArmor)i).Type == armor.Type).Count()));
|
||||
}
|
||||
|
||||
public static int GetBonus(Mobile m, IEpiphanyArmor armor)
|
||||
{
|
||||
if(m == null)
|
||||
return 0;
|
||||
|
||||
switch(armor.Alignment)
|
||||
{
|
||||
default: return 0;
|
||||
case Alignment.Good:
|
||||
if(m.Karma <= 0)
|
||||
return 0;
|
||||
|
||||
return Math.Min(20, m.Karma / (Titles.MaxKarma / 20));
|
||||
case Alignment.Evil:
|
||||
if(m.Karma >= 0)
|
||||
return 0;
|
||||
|
||||
return Math.Min(20, -m.Karma / (Titles.MaxKarma / 20));
|
||||
}
|
||||
}
|
||||
|
||||
public static void OnHit(Mobile m, int damage)
|
||||
{
|
||||
if(damage > MinTriggerDamage)
|
||||
{
|
||||
CheckHit(m, damage, SurgeType.Hits);
|
||||
CheckHit(m, damage, SurgeType.Stam);
|
||||
CheckHit(m, damage, SurgeType.Mana);
|
||||
}
|
||||
}
|
||||
|
||||
public static void CheckHit(Mobile m, int damage, SurgeType type)
|
||||
{
|
||||
var item = m.Items.OfType<IEpiphanyArmor>().FirstOrDefault(i => ((IEpiphanyArmor)i).Type == type);
|
||||
|
||||
if(item == null)
|
||||
return;
|
||||
|
||||
if(Table == null)
|
||||
{
|
||||
Table = new Dictionary<Mobile, Dictionary<SurgeType, int>>();
|
||||
}
|
||||
|
||||
if(!Table.ContainsKey(m))
|
||||
{
|
||||
Table[m] = new Dictionary<SurgeType, int>();
|
||||
}
|
||||
|
||||
if (!Table[m].ContainsKey(type))
|
||||
{
|
||||
Table[m][type] = damage;
|
||||
}
|
||||
else
|
||||
{
|
||||
damage += Table[m][type];
|
||||
}
|
||||
|
||||
int freq = GetFrequency(m, item);
|
||||
int bonus = GetBonus(m, item);
|
||||
|
||||
if(freq > 0 && bonus > 0 && damage > Utility.Random(10000 / freq))
|
||||
{
|
||||
Table[m].Remove(type);
|
||||
|
||||
if(Table[m].Count == 0)
|
||||
Table.Remove(m);
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case SurgeType.Hits: m.Hits = Math.Min(m.HitsMax, m.Hits + bonus); break;
|
||||
case SurgeType.Stam: m.Hits = Math.Min(m.HitsMax, m.Hits + bonus); break;
|
||||
default:
|
||||
case SurgeType.Mana: m.Hits = Math.Min(m.HitsMax, m.Hits + bonus); break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Table[m][type] = damage;
|
||||
}
|
||||
}
|
||||
|
||||
public static void OnKarmaChange(Mobile m)
|
||||
{
|
||||
foreach (var item in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
item.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
public static void AddProperties(IEpiphanyArmor item, ObjectPropertyList list)
|
||||
{
|
||||
if(item == null)
|
||||
return;
|
||||
|
||||
switch(item.Type)
|
||||
{
|
||||
case SurgeType.Hits:
|
||||
list.Add(1150830 + (int)item.Alignment + 1); // Set Ability: good healing burst
|
||||
break;
|
||||
case SurgeType.Stam: // NOTE: This doesn't exist on EA, but put it in here anyways!
|
||||
list.Add(1149953, String.Format("{0}\t{1}", "Set Ability", item.Alignment == Alignment.Evil ? "evil stamina burst" : "good stamina burst"));
|
||||
break;
|
||||
default:
|
||||
case SurgeType.Mana:
|
||||
list.Add(1150240 + (int)item.Alignment); // Set Ability: evil mana burst
|
||||
break;
|
||||
}
|
||||
|
||||
if (item is Item)
|
||||
{
|
||||
list.Add(1150240, GetFrequency(((Item)item).Parent as Mobile, item).ToString()); // Set Bonus: Frequency ~1_val~
|
||||
list.Add(1150243, GetBonus(((Item)item).Parent as Mobile, item).ToString()); // Karma Bonus: Burst level ~1_val~
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,858 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HelmOfVillainousEpiphany : DragonHelm, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Evil; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150253; } } // Helm of Villainous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public HelmOfVillainousEpiphany()
|
||||
{
|
||||
Resource = CraftResource.None;
|
||||
|
||||
Hue = 1778;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public HelmOfVillainousEpiphany(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class GorgetOfVillainousEpiphany : PlateGorget, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Evil; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150254; } } // Gorget of Villainous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public GorgetOfVillainousEpiphany()
|
||||
{
|
||||
Hue = 1778;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public GorgetOfVillainousEpiphany(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class BreastplateOfVillainousEpiphany : DragonChest, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Evil; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150255; } } // Breastplate of Villainous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public BreastplateOfVillainousEpiphany()
|
||||
{
|
||||
Resource = CraftResource.None;
|
||||
|
||||
Hue = 1778;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public BreastplateOfVillainousEpiphany(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class ArmsOfVillainousEpiphany : DragonArms, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Evil; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150256; } } // Arms of Villainous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public ArmsOfVillainousEpiphany()
|
||||
{
|
||||
Resource = CraftResource.None;
|
||||
|
||||
Hue = 1778;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ArmsOfVillainousEpiphany(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class GauntletsOfVillainousEpiphany : DragonGloves, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Evil; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150257; } } // Gauntlets of Villainous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public GauntletsOfVillainousEpiphany()
|
||||
{
|
||||
Resource = CraftResource.None;
|
||||
|
||||
Hue = 1778;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public GauntletsOfVillainousEpiphany(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class LegsOfVillainousEpiphany : DragonLegs, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Evil; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150258; } } // Leggings of Villainous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public LegsOfVillainousEpiphany()
|
||||
{
|
||||
Resource = CraftResource.None;
|
||||
|
||||
Hue = 1778;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public LegsOfVillainousEpiphany(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class KiltOfVillainousEpiphany : GargishPlateKilt, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Evil; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150263; } } // Kilt of Villainous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public KiltOfVillainousEpiphany()
|
||||
{
|
||||
Hue = 1778;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public KiltOfVillainousEpiphany(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class EarringsOfVillainousEpiphany : GargishEarrings, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Evil; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150260; } } // Earrings of Villainous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public EarringsOfVillainousEpiphany()
|
||||
{
|
||||
Hue = 1778;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public EarringsOfVillainousEpiphany(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class GargishBreastplateOfVillainousEpiphany : GargishPlateChest, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Evil; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150255; } } // Breastplate of Villainous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public GargishBreastplateOfVillainousEpiphany()
|
||||
{
|
||||
Hue = 1778;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public GargishBreastplateOfVillainousEpiphany(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class GargishArmsOfVillainousEpiphany : GargishPlateArms, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Evil; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150256; } } // Arms of Villainous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public GargishArmsOfVillainousEpiphany()
|
||||
{
|
||||
Hue = 1778;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public GargishArmsOfVillainousEpiphany(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class NecklaceOfVillainousEpiphany : GargishNecklace, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Evil; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150264; } } // Necklace of Villainous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public NecklaceOfVillainousEpiphany()
|
||||
{
|
||||
Hue = 1778;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public NecklaceOfVillainousEpiphany(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class GargishLegsOfVillainousEpiphany : GargishPlateLegs, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Evil; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150258; } } // Legs of Villainous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public GargishLegsOfVillainousEpiphany()
|
||||
{
|
||||
Hue = 1778;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public GargishLegsOfVillainousEpiphany(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,844 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HelmOfVirtuousEpiphany : PlateHelm, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Good; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150233; } } // Helm of Virtuous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public HelmOfVirtuousEpiphany()
|
||||
{
|
||||
Hue = 2076;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public HelmOfVirtuousEpiphany(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class GorgetOfVirtuousEpiphany : PlateGorget, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Good; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150234; } } // Gorget of Virtuous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public GorgetOfVirtuousEpiphany()
|
||||
{
|
||||
Hue = 2076;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public GorgetOfVirtuousEpiphany(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class BreastplateOfVirtuousEpiphany : PlateChest, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Good; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150235; } } // Breastplate of Virtuous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public BreastplateOfVirtuousEpiphany()
|
||||
{
|
||||
Hue = 2076;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public BreastplateOfVirtuousEpiphany(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class ArmsOfVirtuousEpiphany : PlateArms, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Good; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150236; } } // Arms of Virtuous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public ArmsOfVirtuousEpiphany()
|
||||
{
|
||||
Hue = 2076;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ArmsOfVirtuousEpiphany(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class GauntletsOfVirtuousEpiphany : PlateGloves, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Good; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150237; } } // Gauntlets of Virtuous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public GauntletsOfVirtuousEpiphany()
|
||||
{
|
||||
Hue = 2076;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public GauntletsOfVirtuousEpiphany(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class LegsOfVirtuousEpiphany : PlateLegs, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Good; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150238; } } // Leggings of Virtuous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public LegsOfVirtuousEpiphany()
|
||||
{
|
||||
Hue = 2076;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public LegsOfVirtuousEpiphany(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class KiltOfVirtuousEpiphany : GargishPlateKilt, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Good; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150262; } } // Kilt of Virtuous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public KiltOfVirtuousEpiphany()
|
||||
{
|
||||
Hue = 2076;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public KiltOfVirtuousEpiphany(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class EarringsOfVirtuousEpiphany : GargishEarrings, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Good; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150262; } } // Earrings of Virtuous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public EarringsOfVirtuousEpiphany()
|
||||
{
|
||||
Hue = 2076;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public EarringsOfVirtuousEpiphany(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class GargishBreastplateOfVirtuousEpiphany : GargishPlateChest, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Good; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150235; } } // Breastplate of Virtuous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public GargishBreastplateOfVirtuousEpiphany()
|
||||
{
|
||||
Hue = 2076;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public GargishBreastplateOfVirtuousEpiphany(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class GargishArmsOfVirtuousEpiphany : GargishPlateArms, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Good; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150236; } } // Arms of Virtuous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public GargishArmsOfVirtuousEpiphany()
|
||||
{
|
||||
Hue = 2076;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public GargishArmsOfVirtuousEpiphany(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class NecklaceOfVirtuousEpiphany : GargishNecklace, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Good; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150261; } } // Necklace of Virtuous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public NecklaceOfVirtuousEpiphany()
|
||||
{
|
||||
Hue = 2076;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public NecklaceOfVirtuousEpiphany(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class GargishLegsOfVirtuousEpiphany : GargishPlateLegs, IEpiphanyArmor
|
||||
{
|
||||
public Alignment Alignment { get { return Alignment.Good; } }
|
||||
public SurgeType Type { get { return SurgeType.Mana; } }
|
||||
public int Frequency { get { return EpiphanyHelper.GetFrequency(Parent as Mobile, this); } }
|
||||
public int Bonus { get { return EpiphanyHelper.GetBonus(Parent as Mobile, this); } }
|
||||
|
||||
public override int LabelNumber { get { return 1150238; } } // Legs of Virtuous Epiphany
|
||||
|
||||
[Constructable]
|
||||
public GargishLegsOfVirtuousEpiphany()
|
||||
{
|
||||
Hue = 2076;
|
||||
}
|
||||
|
||||
public override void AddWeightProperty(ObjectPropertyList list)
|
||||
{
|
||||
base.AddWeightProperty(list);
|
||||
|
||||
EpiphanyHelper.AddProperties(this, list);
|
||||
}
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
bool canEquip = base.OnEquip(from);
|
||||
|
||||
if (canEquip)
|
||||
{
|
||||
foreach (var armor in from.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
return canEquip;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)parent;
|
||||
|
||||
foreach (var armor in m.Items.Where(i => i is IEpiphanyArmor))
|
||||
{
|
||||
armor.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public GargishLegsOfVirtuousEpiphany(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user