public override void OnAdded(object parent) { base.OnAdded(parent); if (parent is Mobile) { Mobile from = parent as Mobile; if (m_SkillMod1 != null) { m_SkillMod1.Remove(); } if (m_SkillMod2 != null) { m_SkillMod2.Remove(); } int amount = 10; if (from.SkillsCap < from.SkillsTotal + (amount * 10)) { amount = (from.SkillsCap - from.SkillsTotal) / 10; } m_SkillMod1 = new DefaultSkillMod(m_Skill1, true, amount); m_SkillMod1.ObeyCap = true; from.AddSkillMod(m_SkillMod1); amount = 10; if (from.SkillsCap < from.SkillsTotal + (amount * 10)) { amount = (from.SkillsCap - from.SkillsTotal) / 10; } m_SkillMod2 = new DefaultSkillMod(m_Skill2, true, amount); m_SkillMod2.ObeyCap = true; from.AddSkillMod(m_SkillMod2); } }
public override void OnAdded( IEntity parent ) { base.OnAdded( parent ); if ( m_Bonus != 0 && parent is Mobile ) { if ( m_SkillMod != null ) m_SkillMod.Remove(); m_SkillMod = new DefaultSkillMod( SkillName.Blacksmith, true, m_Bonus ); ((Mobile)parent).AddSkillMod( m_SkillMod ); } }
public override void OnAdded( object parent ) { base.OnAdded( parent ); if ( m_Bonus != 0 && parent is Mobile ) { if ( m_SkillMod != null ) m_SkillMod.Remove(); m_SkillMod = new DefaultSkillMod( SkillName.Lumberjacking, true, m_Bonus ); ((Mobile)parent).AddSkillMod( m_SkillMod ); } }
public override bool OnEquip(Mobile from) { if (UseSkillMod) { if (m_BSMod != null) { m_BSMod.Remove(); } m_BSMod = new DefaultSkillMod(SkillName.Blacksmith, true, 20); from.AddSkillMod(m_BSMod); } return(base.OnEquip(from)); }
public override void OnAdded(object parent) { base.OnAdded(parent); if (i_SkillBonus != 0 && parent is Mobile) { if (sm_SkillMod != null) { sm_SkillMod.Remove(); } sm_SkillMod = new DefaultSkillMod(sn_SkillName, true, i_SkillBonus); ((Mobile)parent).AddSkillMod(sm_SkillMod); } }
public override void OnAdded(object player) { if (player is TeiravonMobile) { TeiravonMobile m_player = (TeiravonMobile)player; if (m_Skilmod != null) { m_Skilmod.Remove(); } m_Skilmod = new DefaultSkillMod(SkillName.Stealth, true, 25.0); m_player.AddSkillMod(m_Skilmod); } }
public override void OnAdded(object parent) { base.OnAdded(parent); if (m_Bonus != 0 && parent is Mobile mobile) { if (m_SkillMod != null) { m_SkillMod.Remove(); } m_SkillMod = new DefaultSkillMod(SkillName.Mining, true, m_Bonus); mobile.AddSkillMod(m_SkillMod); } }
public override void OnItemUsed(Mobile from, Item item) { if (Charges < 1) { if (m_SkillMod != null) { m_SkillMod.Remove(); m_SkillMod = null; } from.SendAsciiMessage("The fish have chewed off all your bait!"); } base.OnItemUsed(from, item); }
public override void OnRemoved(IEntity parent) { if (parent is Mobile) { //Mobile m = (Mobile)parent; //m.RemoveStatMod( "StevesShirt" ); //if ( m.Hits > m.HitsMax ) //m.Hits = m.HitsMax; if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } if (m_SkillMod1 != null) { m_SkillMod1.Remove(); } if (m_SkillMod2 != null) { m_SkillMod2.Remove(); } if (m_SkillMod3 != null) { m_SkillMod3.Remove(); } } }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; //m.RemoveStatMod( "MagiCloak" ); //if ( m.Hits > m.HitsMax ) //m.Hits = m.HitsMax; if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } if (m_SkillMod1 != null) { m_SkillMod1.Remove(); } if (m_SkillMod2 != null) { m_SkillMod2.Remove(); } } }
public override void OnRemoved(object parent) { if (m_SkillMod != null) { if (_Table.ContainsKey(m_SkillMod.Owner)) { _Table.Remove(m_SkillMod.Owner); } m_SkillMod.Remove(); } m_SkillMod = null; base.OnRemoved(parent); }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; m.RemoveStatMod("RedTunic"); if (m.Hits > m.HitsMax) { m.Hits = m.HitsMax; } if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } if (m_SkillMod1 != null) { m_SkillMod1.Remove(); } if (m_SkillMod2 != null) { m_SkillMod2.Remove(); } } }
public void RemoveSkillMod() { m_SkillMod.Owner.SendLocalizedMessage(1075541); //The scent of herbs gradually fades away... m_SkillMod.Remove(); m_SkillMod = null; m_Active = false; }
public override void OnRemoved(object parent) { if (parent is Mobile) { if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } } }
public override void OnRemoved(object parent) { base.OnRemoved(parent); if (m_SkillMod != null) { m_SkillMod.Remove(); } m_SkillMod = null; }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; m.RemoveStatMod("Cloak Of The Godly Smith"); if (m.Hits > m.HitsMax) { m.Hits = m.HitsMax; } if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } if (m_SkillMod1 != null) { m_SkillMod1.Remove(); } if (m_SkillMod2 != null) { m_SkillMod2.Remove(); } if (m_SkillMod3 != null) { m_SkillMod3.Remove(); } if (m_SkillMod4 != null) { m_SkillMod4.Remove(); } if (m_SkillMod5 != null) { m_SkillMod5.Remove(); } if (m_SkillMod6 != null) { m_SkillMod6.Remove(); } if (m_SkillMod7 != null) { m_SkillMod7.Remove(); } } }
public override void OnAdded(object parent) { base.OnAdded(parent); if (parent is Mobile) { Mobile from = parent as Mobile; if (m_SkillMod != null) { m_SkillMod.Remove(); } int amount = 50; if (from.SkillsCap < from.SkillsTotal + (amount * 10)) { amount = (from.SkillsCap - from.SkillsTotal) / 10; } m_SkillMod = new DefaultSkillMod(((SkillName)((int)m_Skill)), true, amount); m_SkillMod.ObeyCap = true; from.AddSkillMod(m_SkillMod); } }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; m.RemoveStatMod("Lilarcor"); if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } } }
public override void OnAdded(object parent) { if (parent is TeiravonMobile) { TeiravonMobile m_parent = (TeiravonMobile)parent; if ((m_parent.IsElf()) && (this is Bow || this is Longbow || this is CompositeBow || this is Recurve || this is Elvenbow)) { if (m_Skilmod != null) { m_Skilmod.Remove(); } m_Skilmod = new DefaultSkillMod(SkillName.Archery, true, 10.0); ((Mobile)parent).AddSkillMod(m_Skilmod); m_parent.SendMessage(0x9F2, "The bow hums in your hand..."); } } base.OnAdded(parent); }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; m.RemoveStatMod("GargishTigerFurSash"); if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } } }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; m.RemoveStatMod("GlovesofExpertBlacksmithing"); if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } } }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; m.RemoveStatMod("GorgetofExpertTinkering"); if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } } }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; m.RemoveStatMod("TunicofExpertFletching"); if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } } }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; // m.RemoveStatMod( "ChefsApron" ); if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } } }
public static bool CheckEffect(Mobile m) { SkillMod mod = (SkillMod)m_Table[m]; if (mod == null) { return(false); } m_Table.Remove(m); mod.Remove(); return(true); }
public override void OnRemoved(Object o) { if (o is Mobile) { Mobile m = o as Mobile; if (ItemID == 0x2683 || ItemID == 0x2684) { PlayerMobile pm = m as PlayerMobile; m.SendMessage("You lower the hood and remove the robe"); m.PlaySound(0x57); ItemID = 0x1F03; m.BodyMod = 0; m.HueMod = -1; m.NameMod = null; if (pm != null) { pm.Title = m_PlayerTitle; m_PlayerTitle = ""; } if (m is Mobile && m.Kills >= 5) { ((Mobile)m).Criminal = true; } if (m is Mobile && m.GuildTitle != null) { ((Mobile)m).DisplayGuildTitle = true; } } m.RemoveStatMod("ArcheryPvPDex"); m.RemoveStatMod("ArcheryPvPStr"); if (m.Hits > m.HitsMax) { m.Hits = m.HitsMax; } if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } if (m_SkillMod1 != null) { m_SkillMod1.Remove(); } if (m_SkillMod2 != null) { m_SkillMod2.Remove(); } } base.OnRemoved(o); }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; m.RemoveStatMod("OdinBoots"); if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } if (m_SkillMod1 != null) { m_SkillMod1.Remove(); } } }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; m.RemoveStatMod("WickedClownshirt"); if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } if (m_SkillMod1 != null) { m_SkillMod1.Remove(); } } }
public override void OnRemoved(object parent) { if (parent is Mobile) { Mobile m = (Mobile)parent; m.RemoveStatMod("SandalsoftheTamer"); if (m_SkillMod0 != null) { m_SkillMod0.Remove(); } if (m_SkillMod1 != null) { m_SkillMod1.Remove(); } } }
public override void OnRemoved(object parent) { Mobile pl = null; if (parent is Mobile) { pl = (Mobile)parent; } if (UseSkillMod && m_ARCHERYMod != null && m_TACTICSMod != null && pl != null) { if (pl.FindItemOnLayer(Layer.TwoHanded) != this) { m_ARCHERYMod.Remove(); m_ARCHERYMod = null; m_TACTICSMod.Remove(); m_TACTICSMod = null; } } }