當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。