public BaseJewel(int itemID, Layer layer, JewelEffect effect, int minCharges, int maxCharges) : base(itemID) { m_AosAttributes = new AosAttributes(this); m_AosResistances = new AosElementAttributes(this); m_AosSkillBonuses = new AosSkillBonuses(this); m_Resource = CraftResource.Iron; m_GemType = GemType.None; m_IDList = new List <Mobile>(); Layer = layer; Weight = 1.0; Effect = effect; Charges = Utility.RandomMinMax(minCharges, maxCharges); m_Identified = false; }
public BaseJewel(int itemID, Layer layer, JewelEffect effect, int minCharges, int maxCharges) : base(itemID) { m_AosAttributes = new AosAttributes( this ); m_AosResistances = new AosElementAttributes( this ); m_AosSkillBonuses = new AosSkillBonuses( this ); m_Resource = CraftResource.Iron; m_GemType = GemType.None; m_IDList = new List<Mobile>(); Layer = layer; Weight = 1.0; Effect = effect; Charges = Utility.RandomMinMax( minCharges, maxCharges ); m_Identified = false; }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 3: { m_IDList = reader.ReadStrongMobileList(); goto case 2; } case 2: { m_Resource = (CraftResource)reader.ReadEncodedInt(); m_GemType = (GemType)reader.ReadEncodedInt(); m_Identified = reader.ReadBool(); m_Charges = reader.ReadInt(); m_JewelEffect = (JewelEffect)reader.ReadEncodedInt(); goto case 1; } case 1: { m_AosAttributes = new AosAttributes(this, reader); m_AosResistances = new AosElementAttributes(this, reader); m_AosSkillBonuses = new AosSkillBonuses(this, reader); if (Core.AOS && Parent is Mobile) { m_AosSkillBonuses.AddTo((Mobile)Parent); } int strBonus = m_AosAttributes.BonusStr; int dexBonus = m_AosAttributes.BonusDex; int intBonus = m_AosAttributes.BonusInt; if (Parent is Mobile && (strBonus != 0 || dexBonus != 0 || intBonus != 0)) { Mobile m = (Mobile)Parent; string modName = Serial.ToString(); if (strBonus != 0) { m.AddStatMod(new StatMod(StatType.Str, modName + "Str", strBonus, TimeSpan.Zero)); } if (dexBonus != 0) { m.AddStatMod(new StatMod(StatType.Dex, modName + "Dex", dexBonus, TimeSpan.Zero)); } if (intBonus != 0) { m.AddStatMod(new StatMod(StatType.Int, modName + "Int", intBonus, TimeSpan.Zero)); } } if (Parent is Mobile) { ((Mobile)Parent).CheckStatTimers(); } break; } case 0: { m_AosAttributes = new AosAttributes(this); m_AosResistances = new AosElementAttributes(this); m_AosSkillBonuses = new AosSkillBonuses(this); break; } } if (version < 2) { m_Resource = CraftResource.Iron; m_GemType = GemType.None; } }
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); switch ( version ) { case 3: { m_IDList = reader.ReadStrongMobileList(); goto case 2; } case 2: { m_Resource = (CraftResource)reader.ReadEncodedInt(); m_GemType = (GemType)reader.ReadEncodedInt(); m_Identified = reader.ReadBool(); m_Charges = reader.ReadInt(); m_JewelEffect = (JewelEffect)reader.ReadEncodedInt(); goto case 1; } case 1: { m_AosAttributes = new AosAttributes( this, reader ); m_AosResistances = new AosElementAttributes( this, reader ); m_AosSkillBonuses = new AosSkillBonuses( this, reader ); if ( Core.AOS && Parent is Mobile ) m_AosSkillBonuses.AddTo( (Mobile)Parent ); int strBonus = m_AosAttributes.BonusStr; int dexBonus = m_AosAttributes.BonusDex; int intBonus = m_AosAttributes.BonusInt; if ( Parent is Mobile && (strBonus != 0 || dexBonus != 0 || intBonus != 0) ) { Mobile m = (Mobile)Parent; string modName = Serial.ToString(); if ( strBonus != 0 ) m.AddStatMod( new StatMod( StatType.Str, modName + "Str", strBonus, TimeSpan.Zero ) ); if ( dexBonus != 0 ) m.AddStatMod( new StatMod( StatType.Dex, modName + "Dex", dexBonus, TimeSpan.Zero ) ); if ( intBonus != 0 ) m.AddStatMod( new StatMod( StatType.Int, modName + "Int", intBonus, TimeSpan.Zero ) ); } if ( Parent is Mobile ) ((Mobile)Parent).CheckStatTimers(); break; } case 0: { m_AosAttributes = new AosAttributes( this ); m_AosResistances = new AosElementAttributes( this ); m_AosSkillBonuses = new AosSkillBonuses( this ); break; } } if ( version < 2 ) { m_Resource = CraftResource.Iron; m_GemType = GemType.None; } }