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


C# PlayerMobile.HasGump方法代码示例

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


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

示例1: SendGumpThreaded

        public static void SendGumpThreaded(PlayerMobile to)
        {
            if (to.AntiMacroGump && m_GumpDictionary.ContainsKey(to))
            {
                AntiMacroGump oldGump = m_GumpDictionary[to];
                m_GumpDictionary.Remove(to);

                //Close existing gump if it exists
                if (to.HasGump(typeof(AntiMacroGump)))
                    to.CloseGump(typeof(AntiMacroGump));

                to.SendGump(new AntiMacroGump(oldGump) );

                return;
            }

            if ( !MySQLManager.SQLEnabled)
            {
                to.SendGump(new OldAntiMacroGump(to));
                return;
            }

            AntiMacroGump gump = new AntiMacroGump(to);
            new Thread(gump.ThreadedGump).Start();
        }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:25,代码来源:AntiMacroGump.cs

示例2: OnLevelChanged

        public override void OnLevelChanged( PlayerMobile owner )
        {
            base.OnLevelChanged( owner );

            owner.ComputeResistances();

            if( owner.HasGump( typeof( Gumps.CharInfoGump ) ) && owner.m_CharInfoTimer == null )
            {
                owner.m_CharInfoTimer = new Gumps.CharInfoGump.CharInfoTimer( owner );
                owner.m_CharInfoTimer.Start();
            }
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:12,代码来源:PureDodge.cs

示例3: AttemptRemoval

        public virtual void AttemptRemoval( PlayerMobile m, int level, bool freeRemoval )
        {
            if( level != Level )
                m.SendMessage( "Please remove the higher levels of this skill first." );

            else if( CanRemoveThisFeat(m, freeRemoval) )
            {
                m.CP += Level * BaseCost;
                m.CPSpent -= Level * BaseCost;
                m.FeatSlots -= Level * BaseCost;

                if( m.HasGump( typeof(CharInfoGump) ) )
                    m.SendGump( new CharInfoGump(m) );

                Level--;
                OnLevelChanged( m );
                OnLevelLowered( m );

                for( int i = 0; i < AssociatedFeats.Length; i++ )
                    m.Feats.SetFeatLevel( AssociatedFeats[i], Level, m );

                for( int i = 0; i < AssociatedSkills.Length; i++ )
                    m.Skills[AssociatedSkills[i]].Base = SkillLevel;
            }
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:25,代码来源:BaseFeat.cs

示例4: AttemptPurchase

        public virtual void AttemptPurchase( PlayerMobile m, int level, bool freeRemoval )
        {
            if( CostLevel == FeatCost.None )
                m.SendMessage( "This skill cannot be directly purchased." );

            if( !MeetsOurRequirements(m) )
                m.SendMessage( "You do not meet the requirements for this skill." );

            else if( Level >= level )
                AttemptRemoval( m, level, freeRemoval );

            else if( (level - Level) != 1 )
                m.SendMessage( "You cannot acquire a skill level before purchasing all previous levels." );

            else if( m.CP < CostToRaise )
                m.SendMessage( "You do not have enough CPs to acquire this skill level." );

            else if( LevelSystem.CanSpendCP(m, CostToRaise) )
            {
                m.CP -= CostToRaise;
                m.CPSpent += CostToRaise;
                m.FeatSlots += CostToRaise;
                Level++;
                OnLevelChanged( m );
                OnLevelRaised( m );
                m.SendMessage( "You have purchased " + Name + " Level " + Level.ToString() + "." );

                for( int i = 0; i < AssociatedFeats.Length; i++ )
                    m.Feats.SetFeatLevel( AssociatedFeats[i], Level, m );

                for( int i = 0; i < AssociatedSkills.Length; i++ )
                    m.Skills[AssociatedSkills[i]].Base = SkillLevel;

                if( m.HasGump( typeof(CharInfoGump) ) )
                    m.SendGump( new CharInfoGump(m) );
            }
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:37,代码来源:BaseFeat.cs


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