protected override void OnTarget(Mobile from, object o) { if (m_Item == null || m_Item.Deleted) { return; } if (o is BaseTalisman) { BaseTalisman talisman = (BaseTalisman)o; if (talisman.Charges == 0) { talisman.Charges = talisman.MaxCharges; m_Item.Delete(); from.SendLocalizedMessage(1075100); // The item has been recharged. } else { from.SendLocalizedMessage(1075099); // You cannot recharge that item until all of its current charges have been used. } } else { from.SendLocalizedMessage(1046439); // That is not a valid target. } }
protected override void OnTarget(Mobile from, object o) { if (m_Item == null || m_Item.Deleted) { return; } if (o is BaseTalisman) { BaseTalisman talisman = (BaseTalisman)o; if (talisman.Charges == 0) { int toCharge = talisman is MasterCraftsmanTalisman?Utility.RandomMinMax(1, ((MasterCraftsmanTalisman)talisman).Type) : talisman.MaxCharges; talisman.Charges = toCharge; m_Item.Delete(); from.SendLocalizedMessage(1075100); // The item has been recharged. } else { from.SendLocalizedMessage(1075099); // You cannot recharge that item until all of its current charges have been used. } } else if (o is HarvestersAxe) { ((HarvestersAxe)o).Charges = 1000; from.SendLocalizedMessage(1075100); // The item has been recharged. m_Item.Delete(); } else { from.SendLocalizedMessage(1046439); // That is not a valid target. } }
protected override void OnTarget(Mobile from, object o) { BaseTalisman talisman = o as BaseTalisman; if (talisman == null) { from.SendLocalizedMessage(1046439); // That is not a valid target. } else if (!talisman.IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } else if (talisman.Charges == -1 || talisman.TalismanType == TalismanType.None) { from.SendLocalizedMessage(1046439); // That is not a valid target. } else if (talisman.Charges > 0) { from.SendLocalizedMessage(1075099); // You cannot recharge that item until all of its current charges have been used. } else { from.SendLocalizedMessage(1075100); // The item has been recharged. talisman.Charges = 49; if (m_Item != null && !m_Item.Deleted) { m_Item.Delete(); } } }
public GuaranteedSpellbookImprovementTalisman(int charges) : base(0x9E28) { Charges = charges; Skill = TalismanSkill.Inscription; SuccessBonus = BaseTalisman.GetRandomSuccessful(); ExceptionalBonus = BaseTalisman.GetRandomExceptional(); }
public MasterChefsApron() { Hue = 1990; while (_Bonus == 0) { _Bonus = BaseTalisman.GetRandomExceptional(); } }
public MasterCraftsmanTalisman(int charges, int itemID) : base(itemID) { this.Skill = BaseTalisman.GetRandomSkill(); this.SuccessBonus = GetRandomSuccessful(); this.Blessed = GetRandomBlessed(); Charges = charges; }
public static BaseTalisman GetTalisman(Mobile from) { BaseTalisman talisman = from.FindItemOnLayer(Layer.Talisman) as BaseTalisman; if (talisman != null) { return(talisman); } return(null); }
public static bool IsTalismanEquiped(Mobile from) { BaseTalisman talisman = from.FindItemOnLayer(Layer.Talisman) as BaseTalisman; if (talisman != null) { return(true); } return(false); }
public MasterCraftsmanTalisman(int charges, int itemID, SkillName skill) : base(itemID) { Skill = skill; SuccessBonus = GetRandomSuccessful(); ExceptionalBonus = BaseTalisman.GetRandomExceptional(); Blessed = GetRandomBlessed(); Charges = charges; }
public override void OnAfterDuped(Item newItem) { BaseTalisman talisman = newItem as BaseTalisman; if (talisman == null) { return; } talisman.m_Summoner = new TalismanAttribute(m_Summoner); talisman.m_Protection = new TalismanAttribute(m_Protection); talisman.m_Killer = new TalismanAttribute(m_Killer); talisman.m_AosAttributes = new AosAttributes(newItem, m_AosAttributes); talisman.m_AosSkillBonuses = new AosSkillBonuses(newItem, m_AosSkillBonuses); }
public static void OnUse( Mobile m, BaseTalisman talisman ) { if ( m_Cooldown.Contains( m ) ) { // You must wait a few seconds before attempting to phase mana again. m.SendLocalizedMessage( 1116163 ); } else if ( m_UnderEffect.ContainsKey( m ) ) { // You will no longer attempt to draw magical energy from the void. m.SendLocalizedMessage( 1116165 ); m_UnderEffect.Remove( m ); } else { // Your next use of magical energy will draw its power from the void. m.SendLocalizedMessage( 1116164 ); m_UnderEffect.Add( m, talisman ); } }
protected override void OnTarget(Mobile from, object o) { if (m_Item == null || m_Item.Deleted) { return; } if (o is BaseTalisman) { BaseTalisman talisman = (BaseTalisman)o; if (talisman.Charges == 0) { // Scriptiz : les talismans ne sont pas éternels if (talisman.MaxCharges > 0) // si c'est un talisman avec des charges (pas infini) { talisman.MaxCharges /= 2; // on perd la moitié des charges max if (talisman.MaxCharges == 0) // s'il n'en reste plus il faut delete le talisman { from.SendMessage("Cet objet était trop vieux pour être rechargé, il s'est cassé."); talisman.Delete(); return; } } talisman.Charges = talisman.MaxCharges; m_Item.Delete(); from.SendLocalizedMessage(1075100); // The item has been recharged. } else { from.SendLocalizedMessage(1075099); // You cannot recharge that item until all of its current charges have been used. } } else { from.SendLocalizedMessage(1046439); // That is not a valid target. } }
public RandomTalisman() : base(GetRandomItemID()) { Summoner = BaseTalisman.GetRandomSummoner(); if (Summoner.IsEmpty) { Removal = BaseTalisman.GetRandomRemoval(); if (Removal != TalismanRemoval.None) { MaxCharges = BaseTalisman.GetRandomCharges(); MaxChargeTime = 1200; } } else { MaxCharges = Utility.RandomMinMax(10, 50); if (Summoner.IsItem) { MaxChargeTime = 60; } else { MaxChargeTime = 1800; } } Blessed = BaseTalisman.GetRandomBlessed(); Slayer = BaseTalisman.GetRandomSlayer(); Protection = BaseTalisman.GetRandomProtection(); Killer = BaseTalisman.GetRandomKiller(); Skill = BaseTalisman.GetRandomSkill(); ExceptionalBonus = BaseTalisman.GetRandomExceptional(); SuccessBonus = BaseTalisman.GetRandomSuccessful(); Charges = MaxCharges; }
public RandomTalisman() : base(GetRandomItemID()) { this.Summoner = BaseTalisman.GetRandomSummoner(); if (this.Summoner.IsEmpty) { this.Removal = BaseTalisman.GetRandomRemoval(); if (this.Removal != TalismanRemoval.None) { this.MaxCharges = BaseTalisman.GetRandomCharges(); this.MaxChargeTime = 1200; } } else { this.MaxCharges = Utility.RandomMinMax(10, 50); if (this.Summoner.IsItem) { this.MaxChargeTime = 60; } else { this.MaxChargeTime = 1800; } } this.Blessed = BaseTalisman.GetRandomBlessed(); this.Slayer = BaseTalisman.GetRandomSlayer(); this.Protection = BaseTalisman.GetRandomProtection(); this.Killer = BaseTalisman.GetRandomKiller(); this.Skill = BaseTalisman.GetRandomSkill(); this.ExceptionalBonus = BaseTalisman.GetRandomExceptional(); this.SuccessBonus = BaseTalisman.GetRandomSuccessful(); this.Charges = this.MaxCharges; }
public static BaseTalisman RandomTalisman() { BaseTalisman talisman = new BaseTalisman( BaseTalisman.GetRandomItemID() ); talisman.Summoner = BaseTalisman.GetRandomSummoner(); if ( talisman.Summoner.IsEmpty ) { talisman.Removal = BaseTalisman.GetRandomRemoval(); if ( talisman.Removal != TalismanRemoval.None ) { talisman.MaxCharges = BaseTalisman.GetRandomCharges(); talisman.MaxChargeTime = 1200; } } else { talisman.MaxCharges = Utility.RandomMinMax( 10, 50 ); if ( talisman.Summoner.IsItem ) talisman.MaxChargeTime = 60; else talisman.MaxChargeTime = 1800; } talisman.Blessed = BaseTalisman.GetRandomBlessed(); talisman.Slayer = BaseTalisman.GetRandomSlayer(); talisman.Protection = BaseTalisman.GetRandomProtection(); talisman.Killer = BaseTalisman.GetRandomKiller(); talisman.Skill = BaseTalisman.GetRandomSkill(); talisman.ExceptionalBonus = BaseTalisman.GetRandomExceptional(); talisman.SuccessBonus = BaseTalisman.GetRandomSuccessful(); talisman.Charges = talisman.MaxCharges; return talisman; }
public TalismanTarget(BaseTalisman talisman) : base(12, false, TargetFlags.Beneficial) { m_Talisman = talisman; }
protected override void OnTarget(Mobile from, object target) { Item item = target as Item; Type type = item.GetType(); if (item is BaseArmor || item is BaseWeapon || item is BaseHat || item is BaseJewel || item is BaseTalisman || item is BaseQuiver || item is Spellbook) { if (Runescribing.GetProps(item) >= 7) { from.SendMessage("This item cannot be enhanced any further"); } else if (item.ChantSlots >= 3) { from.SendMessage("This item cannot handle any more enhancments."); } else if (Runescribing.CheckBlacklist(type) == true) { from.SendMessage("This item cannot be enhanced."); } else { int value = m_Rune.BaseAmount; int max = m_Rune.MaxAmount; if (item is BaseArmor) { BaseArmor i = item as BaseArmor; if (i.Attributes.CastRecovery + value <= max) { i.Attributes.CastRecovery += value; } else { i.Attributes.CastRecovery = max; } } if (item is BaseWeapon) { BaseWeapon i = item as BaseWeapon; if (i.Attributes.CastRecovery + value <= max) { i.Attributes.CastRecovery += value; } else { i.Attributes.CastRecovery = max; } } if (item is BaseHat) { BaseHat i = item as BaseHat; if (i.Attributes.CastRecovery + value <= max) { i.Attributes.CastRecovery += value; } else { i.Attributes.CastRecovery = max; } } if (item is BaseJewel) { BaseJewel i = item as BaseJewel; if (i.Attributes.CastRecovery + value <= max) { i.Attributes.CastRecovery += value; } else { i.Attributes.CastRecovery = max; } } if (item is BaseTalisman) { BaseTalisman i = item as BaseTalisman; if (i.Attributes.CastRecovery + value <= max) { i.Attributes.CastRecovery += value; } else { i.Attributes.CastRecovery = max; } } if (item is BaseQuiver) { BaseQuiver i = item as BaseQuiver; if (i.Attributes.CastRecovery + value <= max) { i.Attributes.CastRecovery += value; } else { i.Attributes.CastRecovery = max; } } if (item is Spellbook) { Spellbook i = item as Spellbook; if (i.Attributes.CastRecovery + value <= max) { i.Attributes.CastRecovery += value; } else { i.Attributes.CastRecovery = max; } } item.ChantSlots += 1; m_Rune.Delete(); } } else { from.SendMessage("You cannot use this enhancement on that."); } }
private bool IsSpecialTalisman( BaseTalisman talisman ) { // Talismans with durability if ( m_CraftSystem is DefTinkering ) { return ( talisman is ManaPhasingOrb ); } return false; }
public InternalTarget(BaseTalisman talisman) : base(50, false, TargetFlags.Beneficial) { m_talisman = talisman; }
public InternalTarget( BaseTalisman talisman ) : base(50, false, TargetFlags.Beneficial) { m_talisman = talisman; }
public ChargeTimeLeftTimer( BaseTalisman talism ) : base(TimeSpan.FromSeconds( 10.0 ), TimeSpan.FromSeconds( 10.0 ), 200) { m_talism = talism; }
public void Target( BaseTalisman talis, Mobile owner, Mobile m ) { if ( this.Parent == owner ) { //Curse Removal if ( talis.m_TalismanType == TalismanType.CurseRemoval ) { m.PlaySound( 0xF6 ); m.PlaySound( 0x1F7 ); m.FixedParticles( 0x3709, 1, 30, 9963, 13, 3, EffectLayer.Head ); StatMod mod; mod = m.GetStatMod( "[Magic] Str Malus" ); if ( mod != null && mod.Offset < 0 ) m.RemoveStatMod( "[Magic] Str Malus" ); mod = m.GetStatMod( "[Magic] Dex Malus" ); if ( mod != null && mod.Offset < 0 ) m.RemoveStatMod( "[Magic] Dex Malus" ); mod = m.GetStatMod( "[Magic] Int Malus" ); if ( mod != null && mod.Offset < 0 ) m.RemoveStatMod( "[Magic] Int Malus" ); m.Paralyzed = false; EvilOmenSpell.CheckEffect( m ); StrangleSpell.RemoveCurse( m ); CorpseSkinSpell.RemoveCurse( m ); CurseSpell.RemoveEffect( m ); BuffInfo.RemoveBuff( m, BuffIcon.Clumsy ); BuffInfo.RemoveBuff( m, BuffIcon.FeebleMind ); BuffInfo.RemoveBuff( m, BuffIcon.Weaken ); BuffInfo.RemoveBuff( m, BuffIcon.MassCurse ); BuffInfo.RemoveBuff( m, BuffIcon.Curse ); BuffInfo.RemoveBuff( m, BuffIcon.EvilOmen ); StrangleSpell.RemoveCurse( m ); CorpseSkinSpell.RemoveCurse( m ); if ( owner != m ) owner.SendLocalizedMessage( 1072409 ); // Your targets curses have been lifted m.SendLocalizedMessage( 1072408 ); // Any curses on you have been lifted } //Damage Removal if ( talis.m_TalismanType == TalismanType.DamageRemoval ) { Effects.SendLocationEffect( m.Location, m.Map, 0x3728, 8 ); Effects.PlaySound( m, m.Map, 0x201 ); BleedAttack.EndBleed( m, false ); MortalStrike.EndWound( m ); m.CurePoison( m ); BuffInfo.RemoveBuff( m, BuffIcon.Bleed ); BuffInfo.RemoveBuff( m, BuffIcon.MortalStrike ); if ( owner != m ) owner.SendLocalizedMessage( 1072406 ); // Your Targets lasting damage effects have been removed! m.SendLocalizedMessage( 1072405 ); // Your lasting damage effects have been removed! } //Ward Removal if ( talis.m_TalismanType == TalismanType.WardRemoval ) { Effects.SendLocationEffect( m.Location, m.Map, 0x3728, 8 ); Effects.PlaySound( m, m.Map, 0x201 ); ProtectionSpell.RemoveWard( m ); ReactiveArmorSpell.RemoveWard( m ); MagicReflectSpell.RemoveWard( m ); TransformationSpell.RemoveContext( m, true ); ReaperFormSpell.RemoveEffects( m ); if ( StoneFormSpell.UnderEffect( m ) ) StoneFormSpell.RemoveEffects( m ); if ( owner != m ) owner.SendLocalizedMessage( 1072403 ); // Your target's wards have been removed! m.SendLocalizedMessage( 1072402 ); // Your wards have been removed! } //Wildfire Removal if ( talis.m_TalismanType == TalismanType.WildfireRemoval ) owner.SendLocalizedMessage( 1042753, "Wildfire Removal" ); // ~1_SOMETHING~ has been temporarily disabled. //CARGE TIMER ChargeTimeLeft = 1200; m_ChargeTimer = new ChargeTimeLeftTimer( this ); m_ChargeTimer.Start(); m_ChargeTimeLeft3 = DateTime.Now; } else if ( m_TalismanType != 0 ) m.SendLocalizedMessage( 502641 ); // You must equip this item to use it. }
public ChargeTimeLeftTimer(BaseTalisman talism) : base(TimeSpan.FromSeconds(10.0), TimeSpan.FromSeconds(10.0), 200) { m_talism = talism; }
public void Target(BaseTalisman talis, Mobile owner, Mobile m) { if (this.Parent == owner) { //Curse Removal if (talis.m_TalismanType == TalismanType.CurseRemoval) { m.PlaySound(0xF6); m.PlaySound(0x1F7); m.FixedParticles(0x3709, 1, 30, 9963, 13, 3, EffectLayer.Head); StatMod mod; mod = m.GetStatMod("[Magic] Str Malus"); if (mod != null && mod.Offset < 0) { m.RemoveStatMod("[Magic] Str Malus"); } mod = m.GetStatMod("[Magic] Dex Malus"); if (mod != null && mod.Offset < 0) { m.RemoveStatMod("[Magic] Dex Malus"); } mod = m.GetStatMod("[Magic] Int Malus"); if (mod != null && mod.Offset < 0) { m.RemoveStatMod("[Magic] Int Malus"); } m.Paralyzed = false; EvilOmenSpell.CheckEffect(m); StrangleSpell.RemoveCurse(m); CorpseSkinSpell.RemoveCurse(m); CurseSpell.RemoveEffect(m); BuffInfo.RemoveBuff(m, BuffIcon.Clumsy); BuffInfo.RemoveBuff(m, BuffIcon.FeebleMind); BuffInfo.RemoveBuff(m, BuffIcon.Weaken); BuffInfo.RemoveBuff(m, BuffIcon.MassCurse); BuffInfo.RemoveBuff(m, BuffIcon.Curse); BuffInfo.RemoveBuff(m, BuffIcon.EvilOmen); StrangleSpell.RemoveCurse(m); CorpseSkinSpell.RemoveCurse(m); if (owner != m) { owner.SendLocalizedMessage(1072409); // Your targets curses have been lifted } m.SendLocalizedMessage(1072408); // Any curses on you have been lifted } //Damage Removal if (talis.m_TalismanType == TalismanType.DamageRemoval) { Effects.SendLocationEffect(m.Location, m.Map, 0x3728, 8); Effects.PlaySound(m, m.Map, 0x201); BleedAttack.EndBleed(m, false); MortalStrike.EndWound(m); m.CurePoison(m); BuffInfo.RemoveBuff(m, BuffIcon.Bleed); BuffInfo.RemoveBuff(m, BuffIcon.MortalStrike); if (owner != m) { owner.SendLocalizedMessage(1072406); // Your Targets lasting damage effects have been removed! } m.SendLocalizedMessage(1072405); // Your lasting damage effects have been removed! } //Ward Removal if (talis.m_TalismanType == TalismanType.WardRemoval) { Effects.SendLocationEffect(m.Location, m.Map, 0x3728, 8); Effects.PlaySound(m, m.Map, 0x201); ProtectionSpell.RemoveWard(m); ReactiveArmorSpell.RemoveWard(m); MagicReflectSpell.RemoveWard(m); TransformationSpell.RemoveContext(m, true); ReaperFormSpell.RemoveEffects(m); if (StoneFormSpell.UnderEffect(m)) { StoneFormSpell.RemoveEffects(m); } if (owner != m) { owner.SendLocalizedMessage(1072403); // Your target's wards have been removed! } m.SendLocalizedMessage(1072402); // Your wards have been removed! } //Wildfire Removal if (talis.m_TalismanType == TalismanType.WildfireRemoval) { owner.SendLocalizedMessage(1042753, "Wildfire Removal"); // ~1_SOMETHING~ has been temporarily disabled. } //CARGE TIMER ChargeTimeLeft = 1200; m_ChargeTimer = new ChargeTimeLeftTimer(this); m_ChargeTimer.Start(); m_ChargeTimeLeft3 = DateTime.Now; } else if (m_TalismanType != 0) { m.SendLocalizedMessage(502641); // You must equip this item to use it. } }
public static ItemValue CheckTalisman( BaseTalisman item ) { int value = 0; foreach( int i in Enum.GetValues(typeof( AosAttribute ) ) ) { if ( item != null && item.Attributes[ (AosAttribute)i ] > 0 ) value += 2; } //Start skill bonus if ( item.SkillBonuses.Skill_1_Value > 0 ) { value += (int)item.SkillBonuses.Skill_1_Value * 4; value += 2; } if ( item.SkillBonuses.Skill_2_Value > 0 ) { value += (int)item.SkillBonuses.Skill_2_Value * 4; value += 2; } if ( item.SkillBonuses.Skill_3_Value > 0 ) { value += (int)item.SkillBonuses.Skill_3_Value * 4; value += 2; } if ( item.SkillBonuses.Skill_4_Value > 0 ) { value += (int)item.SkillBonuses.Skill_4_Value * 4; value += 2; } if ( item.SkillBonuses.Skill_5_Value > 0 ) { value += (int)item.SkillBonuses.Skill_5_Value * 4; value += 2; } //Start standard attributes if ( item.Attributes.AttackChance > 0 ) value += item.Attributes.AttackChance * 2; if ( item.Attributes.BonusDex > 0 ) value += item.Attributes.BonusDex * 4; if ( item.Attributes.BonusHits > 0 ) value += item.Attributes.BonusHits * 2; if ( item.Attributes.BonusInt > 0 ) value += item.Attributes.BonusInt * 4; if ( item.Attributes.BonusMana > 0 ) value += item.Attributes.BonusMana * 2; if ( item.Attributes.BonusStam > 0 ) value += item.Attributes.BonusStam * 2; if ( item.Attributes.BonusStr > 0 ) value += item.Attributes.BonusStr * 4; if ( item.Attributes.CastRecovery > 0 ) value += item.Attributes.CastRecovery * 10; if ( item.Attributes.CastSpeed > 0 ) value += item.Attributes.CastSpeed * 10; if ( item.Attributes.DefendChance > 0 ) value += item.Attributes.DefendChance * 2; if ( item.Attributes.EnhancePotions > 0 ) value += item.Attributes.EnhancePotions; if ( item.Attributes.LowerManaCost > 0 ) value += item.Attributes.LowerManaCost * 2; if ( item.Attributes.LowerRegCost > 0 ) value += item.Attributes.LowerRegCost; if ( item.Attributes.Luck > 0 ) value += item.Attributes.Luck / 2; if ( item.Attributes.NightSight > 0 ) value += 10; if ( item.Attributes.ReflectPhysical > 0 ) value += item.Attributes.ReflectPhysical * 2; if ( item.Attributes.RegenHits > 0 ) value += item.Attributes.RegenHits * 10; if ( item.Attributes.RegenMana > 0 ) value += item.Attributes.RegenMana * 10; if ( item.Attributes.RegenStam > 0 ) value += item.Attributes.RegenStam * 10; if ( item.Attributes.SpellChanneling > 0 ) value += 10; if ( item.Attributes.SpellDamage > 0 ) value += item.Attributes.SpellDamage * 2; if ( item.Attributes.WeaponDamage > 0 ) value += item.Attributes.WeaponDamage * 2; if ( item.Attributes.WeaponSpeed > 0 ) value += item.Attributes.WeaponSpeed * 2; // Start Talisman Bonuses if ( item.ExceptionalBonus > 0 ) value += item.ExceptionalBonus; if ( item.KarmaLoss > 0 ) value += item.KarmaLoss; // Add Killer, Protection, Removal, and Summon to list of check //Start Calculate if ( value <= 50 ) return ItemValue.Common; if ( value <= 100 ) return ItemValue.Uncommon; if ( value <= 200 ) return ItemValue.Rare; if ( value <= 300 ) return ItemValue.Epic; return ItemValue.Legendary; }
public static int GetProps(Item sent) { int value = 0; if (sent is BaseArmor) { BaseArmor item = sent as BaseArmor; foreach (int i in Enum.GetValues(typeof(AosAttribute))) { if (item != null && item.Attributes[(AosAttribute)i] > 0) { value += 1; } } foreach (int i in Enum.GetValues(typeof(AosArmorAttribute))) { if (item.ArmorAttributes[(AosArmorAttribute)i] > 0) { value += 1; } } if (item.SkillBonuses.Skill_1_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_2_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_3_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_4_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_5_Value > 0) { value += 1; } if (item.ColdBonus > 0) { value += 1; } if (item.EnergyBonus > 0) { value += 1; } if (item.FireBonus > 0) { value += 1; } if (item.PhysicalBonus > 0) { value += 1; } if (item.PoisonBonus > 0) { value += 1; } } if (sent is BaseWeapon) { BaseWeapon item = sent as BaseWeapon; foreach (int i in Enum.GetValues(typeof(AosAttribute))) { if (item != null && item.Attributes[(AosAttribute)i] > 0) { value += 1; } } foreach (int i in Enum.GetValues(typeof(AosWeaponAttribute))) { if (item.WeaponAttributes[(AosWeaponAttribute)i] > 0) { value += 1; } } if (item.SkillBonuses.Skill_1_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_2_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_3_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_4_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_5_Value > 0) { value += 1; } if (item.Slayer != SlayerName.None) { value += 1; } if (item.Slayer2 != SlayerName.None) { value += 1; } } if (sent is BaseClothing) { BaseClothing item = sent as BaseClothing; foreach (int i in Enum.GetValues(typeof(AosAttribute))) { if (item != null && item.Attributes[(AosAttribute)i] > 0) { value += 1; } } foreach (int i in Enum.GetValues(typeof(AosArmorAttribute))) { if (item.ClothingAttributes[(AosArmorAttribute)i] > 0) { value += 1; } } if (item.SkillBonuses.Skill_1_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_2_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_3_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_4_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_5_Value > 0) { value += 1; } if (item.Resistances.Chaos > 0) { value += 1; } if (item.Resistances.Cold > 0) { value += 1; } if (item.Resistances.Direct > 0) { value += 1; } if (item.Resistances.Energy > 0) { value += 1; } if (item.Resistances.Fire > 0) { value += 1; } if (item.Resistances.Physical > 0) { value += 1; } if (item.Resistances.Poison > 0) { value += 1; } } if (sent is BaseJewel) { BaseJewel item = sent as BaseJewel; foreach (int i in Enum.GetValues(typeof(AosAttribute))) { if (item != null && item.Attributes[(AosAttribute)i] > 0) { value += 1; } } if (item.SkillBonuses.Skill_1_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_2_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_3_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_4_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_5_Value > 0) { value += 1; } if (item.Resistances.Chaos > 0) { value += 1; } if (item.Resistances.Cold > 0) { value += 1; } if (item.Resistances.Direct > 0) { value += 1; } if (item.Resistances.Energy > 0) { value += 1; } if (item.Resistances.Fire > 0) { value += 1; } if (item.Resistances.Physical > 0) { value += 1; } if (item.Resistances.Poison > 0) { value += 1; } } if (sent is BaseQuiver) { BaseQuiver item = sent as BaseQuiver; foreach (int i in Enum.GetValues(typeof(AosAttribute))) { if (item != null && item.Attributes[(AosAttribute)i] > 0) { value += 1; } } if (item.DamageIncrease > 0) { value += 1; } if (item.LowerAmmoCost > 0) { value += 1; } } if (sent is BaseTalisman) { BaseTalisman item = sent as BaseTalisman; foreach (int i in Enum.GetValues(typeof(AosAttribute))) { if (item != null && item.Attributes[(AosAttribute)i] > 0) { value += 1; } } if (item.SkillBonuses.Skill_1_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_2_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_3_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_4_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_5_Value > 0) { value += 1; } } if (sent is Spellbook) { Spellbook item = sent as Spellbook; foreach (int i in Enum.GetValues(typeof(AosAttribute))) { if (item != null && item.Attributes[(AosAttribute)i] > 0) { value += 1; } } if (item.SkillBonuses.Skill_1_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_2_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_3_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_4_Value > 0) { value += 1; } if (item.SkillBonuses.Skill_5_Value > 0) { value += 1; } if (item.Slayer != SlayerName.None) { value += 1; } if (item.Slayer2 != SlayerName.None) { value += 1; } } return(value); }