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


C# Server.BuffInfo类代码示例

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


BuffInfo类属于Server命名空间,在下文中一共展示了BuffInfo类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnEnter

		public override void OnEnter( Mobile m )
		{
			base.OnEnter( m );
			
			if ( m is PlayerMobile )
			{
				PlayerMobile player = (PlayerMobile) m;
				
				for ( int i = 0; i < player.Quests.Count; i ++ )
				{
					BaseQuest quest = player.Quests[ i ];
					
					for ( int j = 0; j < quest.Objectives.Count; j ++ )
					{
						BaseObjective objective = quest.Objectives[ j ];
						
						if ( objective is ApprenticeObjective && !objective.Completed )
						{
							ApprenticeObjective apprentice = (ApprenticeObjective) objective;		
							
							if ( IsPartOf( apprentice.Region ) )
							{
								if ( apprentice.Enter is int )
									player.SendLocalizedMessage( (int) apprentice.Enter );
								else if ( apprentice.Enter is string )
									player.SendMessage( (string) apprentice.Enter );

								BuffInfo info = new BuffInfo(BuffIcon.ArcaneEmpowerment, 1078511, 1078512, apprentice.Skill.ToString()); // Accelerated Skillgain Skill: ~1_val~
								BuffInfo.AddBuff( m, info );
								m_Table[ m ] = info;
							}
						}
					}
				}
			}
		}
开发者ID:nydehi,项目名称:runuomondains,代码行数:36,代码来源:ApprenticeRegion.cs

示例2: RemoveBuff

        public void RemoveBuff(BuffInfo b)
        {
            if (b == null)
                return;

            RemoveBuff(b.ID);
        }
开发者ID:brodock,项目名称:genova-project,代码行数:7,代码来源:PlayerMobile.cs

示例3: AddBuff

        public void AddBuff(BuffInfo b)
        {
            if (!BuffInfo.Enabled || b == null)
                return;

            RemoveBuff(b);	//Check & subsequently remove the old one.

            if (m_BuffTable == null)
                m_BuffTable = new Dictionary<BuffIcon, BuffInfo>();

            m_BuffTable.Add(b.ID, b);

            NetState state = this.NetState;

            if (state != null && state.Version >= BuffInfo.RequiredClient)
            {
                state.Send(new AddBuffPacket(this, b));
            }
        }
开发者ID:brodock,项目名称:genova-project,代码行数:19,代码来源:PlayerMobile.cs

示例4: AddBuffPacket

 public AddBuffPacket( Mobile m, BuffInfo info )
     : this(m, info.ID, info.TitleCliloc, info.SecondaryCliloc, info.Args, (info.TimeStart != DateTime.MinValue) ? ((info.TimeStart + info.TimeLength) - DateTime.Now) : TimeSpan.Zero)
 {
 }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:4,代码来源:BuffIcons.cs

示例5: RemoveBuffPacket

 public RemoveBuffPacket( Mobile mob, BuffInfo info )
     : this(mob, info.ID)
 {
 }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:4,代码来源:BuffIcons.cs

示例6: RemoveBuff

        public static void RemoveBuff( Mobile m, BuffInfo b )
        {
            PlayerMobile pm = m as PlayerMobile;

            if( pm != null )
                pm.RemoveBuff( b );
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:7,代码来源:BuffIcons.cs

示例7: ApplyEffect

        public void ApplyEffect(FoodEffect effect, Boolean silent)
        {
            if (FoodEffectsCore.Core == null || !FoodEffectsCore.Core.Enabled || !Core.AOS)
            {
                EffectExpired(true);
                return;
            }

            if (LinkedMobile != null)
            {
                if (m_Timer != null)
                {
                    m_Timer.Stop();
                    m_Timer = null;
                }

                LinkedMobile.RemoveStatMod("Food-StrBonus");
                LinkedMobile.RemoveStatMod("Food-DexBonus");
                LinkedMobile.RemoveStatMod("Food-IntBonus");

                if (m_BuffInfo != null)
                    BuffInfo.RemoveBuff(LinkedMobile, m_BuffInfo);

                if (m_FoodEffect != null)
                    FoodEffectsCore.InvokeOnEffectCanceled(LinkedMobile, m_FoodEffect);

                m_FoodEffect = new FoodEffect(effect.RegenHits, effect.RegenStam, effect.RegenMana, effect.StrBonus, effect.DexBonus, effect.IntBonus, effect.Duration);

                if (m_FoodEffect.StrBonus != 0)
                    LinkedMobile.AddStatMod(new StatMod(StatType.Str, "Food-StrBonus", m_FoodEffect.StrBonus, m_FoodEffect.EffectTimeSpan));

                if (m_FoodEffect.DexBonus != 0)
                    LinkedMobile.AddStatMod(new StatMod(StatType.Dex, "Food-DexBonus", m_FoodEffect.DexBonus, m_FoodEffect.EffectTimeSpan));

                if (m_FoodEffect.IntBonus != 0)
                    LinkedMobile.AddStatMod(new StatMod(StatType.Int, "Food-IntBonus", m_FoodEffect.IntBonus, m_FoodEffect.EffectTimeSpan));

                if (!silent)
                {
                    LinkedMobile.FixedEffect(0x375A, 10, 15);
                    LinkedMobile.PlaySound(0x1EE);

                    LinkedMobile.SendMessage(12, "The food you ate is now affecting your performance...");
                }

                m_Timer = new EffectTimer(this);

                FoodEffectsCore.InvokeOnEffectActivated(LinkedMobile, m_FoodEffect);

                m_BuffInfo = new BuffInfo(BuffIcon.ActiveMeditation, 1074240, 1114057, m_FoodEffect.EffectTimeSpan, LinkedMobile, m_FoodEffect.GetBuffInfoText());
                BuffInfo.AddBuff(LinkedMobile, m_BuffInfo);
            }
        }
开发者ID:jasegiffin,项目名称:JustUO,代码行数:53,代码来源:FoodEffectModule.cs

示例8: AddBuff

		public static void AddBuff(Mobile m, BuffInfo b)
		{
			var pm = m as PlayerMobile;

			if (pm != null)
			{
				pm.AddBuff(b);
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:9,代码来源:BuffIcons.cs

示例9: AddBuff

		public void AddBuff(BuffInfo b)
		{
			if (!BuffInfo.Enabled || b == null)
			{
				return;
			}

			RemoveBuff(b); //Check & subsequently remove the old one.

			if (m_BuffTable == null)
			{
				m_BuffTable = new Dictionary<BuffIcon, BuffInfo>();
			}

			m_BuffTable.Add(b.ID, b);

			NetState state = NetState;

			if (state != null && state.BuffIcon)
			{
				state.Send(new AddBuffPacket(this, b));
			}
		}
开发者ID:Jascen,项目名称:UOSmart,代码行数:23,代码来源:PlayerMobile.cs


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