当前位置: 首页>>代码示例>>C#>>正文


C# Mobile.RemoveResistanceMod方法代码示例

本文整理汇总了C#中Mobile.RemoveResistanceMod方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.RemoveResistanceMod方法的具体用法?C# Mobile.RemoveResistanceMod怎么用?C# Mobile.RemoveResistanceMod使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mobile的用法示例。


在下文中一共展示了Mobile.RemoveResistanceMod方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RemoveWard

        public static void RemoveWard( Mobile targ )
        {
            ResistanceMod[] mods = (ResistanceMod[]) m_Table[targ];

            if ( mods != null )
            {
                m_Table.Remove( targ );

                for ( int i = 0; i < mods.Length; ++i )
                    targ.RemoveResistanceMod( mods[i] );

                BuffInfo.RemoveBuff( targ, BuffIcon.ReactiveArmor );
            }
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:14,代码来源:ReactiveArmor.cs

示例2: RemoveEffects

        public static void RemoveEffects( Mobile m )
        {
            ArrayList mods = (ArrayList) m_Table[m];

            for ( int i = 0; i < mods.Count; ++i )
                m.RemoveResistanceMod( (ResistanceMod) mods[i] );

            m.BodyMod = 0;
            m.HueMod = -1;

            m_Table.Remove( m );

            BuffInfo.RemoveBuff( m, BuffIcon.StoneForm );
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:14,代码来源:StoneFormSpell.cs

示例3: RemoveEffects

        public static void RemoveEffects( Mobile m )
        {
            if ( m_Table.ContainsKey( m ) )
            {
                ArrayList mods = (ArrayList) m_Table[m];

                for ( int i = 0; i < mods.Count; ++i )
                    m.RemoveResistanceMod( (ResistanceMod) mods[i] );

                m.BodyMod = 0;
                m.HueMod = -1;

                m_Table.Remove( m );
            }
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:15,代码来源:ReaperForm.cs

示例4: EndProtection

        public static void EndProtection(Mobile m)
        {
            if (m_Table.Contains(m))
            {
                object[] mods = (object[])m_Table[m];

                m_Table.Remove(m);
                Registry.Remove(m);

                m.RemoveResistanceMod((ResistanceMod)mods[0]);
                m.RemoveSkillMod((SkillMod)mods[1]);

                BuffInfo.RemoveBuff(m, BuffIcon.Protection);
            }
        }
开发者ID:greeduomacro,项目名称:DimensionsNewAge,代码行数:15,代码来源:Protection.cs

示例5: Toggle

        public static void Toggle(Mobile caster, Mobile target)
        {
            /* Players under the protection spell effect can no longer have their spells "disrupted" when hit.
            * Players under the protection spell have decreased physical resistance stat value (-15 + (Inscription/20),
            * a decreased "resisting spells" skill value by -35 + (Inscription/20),
            * and a slower casting speed modifier (technically, a negative "faster cast speed") of 2 points.
            * The protection spell has an indefinite duration, becoming active when cast, and deactivated when re-cast.
            * Reactive Armor, Protection, and Magic Reflection will stay on—even after logging out,
            * even after dying—until you “turn them off” by casting them again.
            */
            object[] mods = (object[])m_Table[target];

            if (mods == null)
            {
                target.PlaySound(0x1E9);
                target.FixedParticles(0x375A, 9, 20, 5016, EffectLayer.Waist);

                mods = new object[2]
                {
                    new ResistanceMod(ResistanceType.Physical, -15 + Math.Min((int)(caster.Skills[SkillName.Inscribe].Value / 20), 15)),
                    new DefaultSkillMod(SkillName.MagicResist, true, -35 + Math.Min((int)(caster.Skills[SkillName.Inscribe].Value / 20), 35))
                };

                m_Table[target] = mods;
                Registry[target] = 100.0;

                target.AddResistanceMod((ResistanceMod)mods[0]);
                target.AddSkillMod((SkillMod)mods[1]);

                int physloss = -15 + (int)(caster.Skills[SkillName.Inscribe].Value / 20);
                int resistloss = -35 + (int)(caster.Skills[SkillName.Inscribe].Value / 20);
                string args = String.Format("{0}\t{1}", physloss, resistloss);
                BuffInfo.AddBuff(target, new BuffInfo(BuffIcon.Protection, 1075814, 1075815, args.ToString()));
            }
            else
            {
                target.PlaySound(0x1ED);
                target.FixedParticles(0x375A, 9, 20, 5016, EffectLayer.Waist);

                m_Table.Remove(target);
                Registry.Remove(target);

                target.RemoveResistanceMod((ResistanceMod)mods[0]);
                target.RemoveSkillMod((SkillMod)mods[1]);

                BuffInfo.RemoveBuff(target, BuffIcon.Protection);
            }
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:48,代码来源:Protection.cs

示例6: EndArmor

        public static void EndArmor(Mobile m)
        {
            if (m_Table.Contains(m))
            {
                ResistanceMod[] mods = (ResistanceMod[])m_Table[m];

                if (mods != null)
                {
                    for (int i = 0; i < mods.Length; ++i)
                        m.RemoveResistanceMod(mods[i]);
                }

                m_Table.Remove(m);
                BuffInfo.RemoveBuff(m, BuffIcon.ReactiveArmor);
            }
        }
开发者ID:jasegiffin,项目名称:JustUO,代码行数:16,代码来源:ReactiveArmor.cs

示例7: RemoveWard

        public static void RemoveWard( Mobile target )
        {
            object[] mods = (object[]) m_Table[target];

            if ( mods != null )
            {
                m_Table.Remove( target );
                Registry.Remove( target );

                target.RemoveResistanceMod( (ResistanceMod) mods[0] );
                target.RemoveSkillMod( (SkillMod) mods[1] );

                BuffInfo.RemoveBuff( target, BuffIcon.Protection );
                BuffInfo.RemoveBuff( target, BuffIcon.ArchProtection );
            }
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:16,代码来源:Protection.cs

示例8: RemoveEffect

        public static void RemoveEffect(Mobile m)
        {
            if (!m_Table.ContainsKey(m))
                return;

            List<ResistanceMod> mods = m_Table[m];

            for (int i = 0; i < m_Table[m].Count; i++)
            {
                m.RemoveResistanceMod(mods[i]);
            }

            m_Table.Remove(m);
            m.EndAction(typeof(StoneFormSpell));
            m.PlaySound(0x201);  
            m.FixedParticles(0x3728, 1, 13, 9918, 92, 3, EffectLayer.Head);
            m.BodyMod = 0;
        }
开发者ID:m309,项目名称:ForkUO,代码行数:18,代码来源:StoneForm.cs

示例9: RemoveEffect

        public override void RemoveEffect(Mobile m)
        {
            ResistanceMod[] mods = (ResistanceMod[])m_Table[m];

            if (mods != null)
            {             
                m_Table.Remove(m);

                m_Table[m] = mods;

                for (int i = 0; i < mods.Length; ++i)
                    m.RemoveResistanceMod(mods[i]);

                m.PlaySound(0x65B);
                m.FixedParticles(0x3728, 1, 13, 9918, 92, 3, EffectLayer.Head);
                m.Delta(MobileDelta.WeaponDamage);
                m.EndAction(typeof(StoneFormSpell));
            }
        }
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:19,代码来源:StoneForm.cs

示例10: Toggle

        public static void Toggle( Mobile caster, Mobile target )
        {
            /* Players under the protection spell effect can no longer have their spells "disrupted" when hit.
             * Players under the protection spell have decreased physical resistance stat value,
             * a decreased "resisting spells" skill value by -35,
             * and a slower casting speed modifier (technically, a negative "faster cast speed") of 2 points.
             * The protection spell has an indefinite duration, becoming active when cast, and deactivated when re-cast.
             * Reactive Armor, Protection, and Magic Reflection will stay on�even after logging out,
             * even after dying�until you �turn them off� by casting them again.
             */

            object[] mods = (object[])m_Table[target];

            if ( mods == null )
            {
                target.PlaySound( 0x1E9 );
                target.FixedParticles( 0x375A, 9, 20, 5016, EffectLayer.Waist );

                mods = new object[2]
                    {
                        new ResistanceMod( ResistanceType.Physical, -15 + (int)(caster.Skills[SkillName.Inscribe].Value / 20) ),
                        new DefaultSkillMod( SkillName.MagicResist, true, -35 + (int)(caster.Skills[SkillName.Inscribe].Value / 20) )
                    };

                m_Table[target] = mods;
                Registry[target] = 100.0;

                target.AddResistanceMod( (ResistanceMod)mods[0] );
                target.AddSkillMod( (SkillMod)mods[1] );
            }
            else
            {
                target.PlaySound( 0x1ED );
                target.FixedParticles( 0x375A, 9, 20, 5016, EffectLayer.Waist );

                m_Table.Remove( target );
                Registry.Remove( target );

                target.RemoveResistanceMod( (ResistanceMod)mods[0] );
                target.RemoveSkillMod( (SkillMod)mods[1] );
            }
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:42,代码来源:Protection.cs

示例11: RemoveEffect

        public static void RemoveEffect(Mobile m)
        {
            if (!m_Table.ContainsKey(m))
                return;

            var mods = m_Table[m];

            for (var i = 0; i < m_Table[m].Count; i++)
            {
                m.RemoveResistanceMod(mods[i]);
            }

            Enhancement.SetValue(m, AosAttribute.CastSpeed, 2, "Stone Form");
            Enhancement.SetValue(m, AosAttribute.WeaponSpeed, 10, "Stone Form");

            m_Table.Remove(m);
            m.EndAction(typeof (StoneFormSpell));
            m.PlaySound(0x201);
            m.FixedParticles(0x3728, 1, 13, 9918, 92, 3, EffectLayer.Head);
            m.BodyMod = 0;
        }
开发者ID:rokann,项目名称:JustUO,代码行数:21,代码来源:StoneForm.cs

示例12: RemoveContext

        public static void RemoveContext(Mobile m, TransformContext context, bool resetGraphics)
        {
            if (m_Table.ContainsKey(m))
            {
                m_Table.Remove(m);

                List<ResistanceMod> mods = context.Mods;

                for (int i = 0; i < mods.Count; ++i)
                    m.RemoveResistanceMod(mods[i]);

                if (resetGraphics)
                {
                    m.HueMod = -1;
                    m.BodyMod = 0;
                }

                context.Timer.Stop();
                context.Spell.RemoveEffect(m);
            }
        }
开发者ID:jasegiffin,项目名称:JustUO,代码行数:21,代码来源:SpellHelper.cs

示例13: RemoveMods

        private static void RemoveMods( Mobile m, List<object> mods )
        {
            for ( int i = 0; i < mods.Count; i++ )
            {
                object mod = mods[i];

                if ( mod is AttributeMod )
                    m.RemoveAttributeMod( (AttributeMod) mod );
                else if ( mod is ResistanceMod )
                    m.RemoveResistanceMod( (ResistanceMod) mod );
            }
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:12,代码来源:KnightsSet.cs

示例14: RemoveMods

        private static void RemoveMods( Mobile m, List<object> mods )
        {
            for ( int i = 0; i < mods.Count; i++ )
            {
                object mod = mods[i];

                m.RemoveResistanceMod( (ResistanceMod) mod );
            }
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:9,代码来源:SwampDragon.cs


注:本文中的Mobile.RemoveResistanceMod方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。