• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# PotionEffect类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: GetPotion

        public static Item GetPotion(Mobile from, PotionEffect[] effects)
        {
            if (from.Backpack == null)
                return null;

            Item[] items = from.Backpack.FindItemsByType(new Type[] { typeof(BasePotion), typeof(PotionKeg) });

            foreach (Item item in items)
            {
                if (item is BasePotion)
                {
                    BasePotion potion = (BasePotion)item;

                    if (Array.IndexOf(effects, potion.PotionEffect) >= 0)
                        return potion;
                }
                else
                {
                    PotionKeg keg = (PotionKeg)item;

                    if (keg.Held > 0 && Array.IndexOf(effects, keg.Type) >= 0)
                        return keg;
                }
            }

            return null;
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:27,代码来源:MainPlantGump.cs


示例2: BasePotion

		public BasePotion( int itemID, PotionEffect effect ) : base( itemID )
		{
			m_PotionEffect = effect;

			Stackable = Core.ML;
			Weight = 1.0;
		}
开发者ID:andyhebear,项目名称:HappyQ-WowServer,代码行数:7,代码来源:BasePotion.cs


示例3: BasePotion

        public BasePotion(int itemID, PotionEffect effect)
            : base(itemID)
        {
            this.m_PotionEffect = effect;

            this.Stackable = Core.ML;
            this.Weight = 1.0;
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:8,代码来源:BasePotion.cs


示例4: BasePotion

        public BasePotion( int itemID, PotionEffect effect )
            : base(itemID)
        {
            m_PotionEffect = effect;

            Stackable = true;
            Weight = 2.0;
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:8,代码来源:BasePotion.cs


示例5: BasePotion

		public BasePotion( int itemID, PotionEffect effect ) : base( itemID )
		{
			m_PotionEffect = effect;

            //Stackable = Core.ML;
		    Stackable = true;
			Weight = 0.25;
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:8,代码来源:BasePotion.cs


示例6: BasePotion

        public BasePotion( int itemID, PotionEffect effect )
            : base(itemID)
        {
            m_PotionEffect = effect;
            m_Tasters = new ArrayList();

            Stackable = false;
            Weight = 1.0;
        }
开发者ID:cynricthehun,项目名称:UOLegends,代码行数:9,代码来源:BasePotion.cs


示例7: BasePotion

		public BasePotion( int itemID, PotionEffect effect ) : base( itemID )
		{
			m_PotionEffect = effect;

			Stackable = Core.ML;
			Weight = 1.0;

			ItemValue = ItemValue.Common;
		}
开发者ID:romeov007,项目名称:imagine-uo,代码行数:9,代码来源:BasePotion.cs


示例8: MakePotionKeg

		private Item MakePotionKeg(PotionEffect type, int hue)
		{
			PotionKeg keg = new PotionKeg();

			keg.Held = 100;
			keg.Type = type;
			keg.Hue = hue;

			return keg;
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:10,代码来源:PotionBag.cs


示例9: MakePotionKeg

		private static Item MakePotionKeg( PotionEffect type, int hue )
		{
			PotionKeg keg = new PotionKeg();

			keg.Held = 100;
			keg.Type = type;
			keg.Hue = hue;

			return MakeNewbie( keg );
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:10,代码来源:CharacterCreation.cs


示例10: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 0:
				{
					m_Type = (PotionEffect)reader.ReadInt();
					m_Held = reader.ReadInt();

					break;
				}
			}
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:17,代码来源:PotionKeg.cs


示例11: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch( version )
			{
				case 1:
				case 0:
					{
						m_Type = (PotionEffect)reader.ReadInt();
						m_Held = reader.ReadInt();

						break;
					}
			}

			if( version < 1 )
				Timer.DelayCall( TimeSpan.Zero, new TimerCallback( UpdateWeight ) );
		}
开发者ID:greeduomacro,项目名称:hubroot,代码行数:21,代码来源:PotionKeg.cs


示例12: completePotion

 private void completePotion(PotionName p)
 {
     switch(p) {
     case PotionName.None:
         itemName = "Empty";
         itemDescription = "Empty";
         weight = 0;
         value = 0;
         potionEffect = PotionEffect.None;
         potency = 0;
         break;
     case PotionName.Health:
         itemName = "Health Potion";
         itemDescription = "";
         weight = 1;
         value = 1;
         potionEffect = PotionEffect.Health;
         potency = 4;
         break;
     case PotionName.Strength:
         itemName = "Strength Potion";
         itemDescription = "";
         weight = 1;
         value = 1;
         potionEffect = PotionEffect.Strength;
         potency = 4;
         break;
     case PotionName.Dexterity:
         itemName = "Dexterity Potion";
         itemDescription = "";
         weight = 1;
         value = 1;
         potionEffect = PotionEffect.Dexterity;
         potency = 4;
         break;
     default:
         break;
     }
 }
开发者ID:TheAlchemistStudio,项目名称:DnD,代码行数:39,代码来源:Potion.cs


示例13: BaseManaRefreshPotion

		public BaseManaRefreshPotion( PotionEffect effect ) : base( 0xF0D, effect )
		{
			Hue = 1072;
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:4,代码来源:BaseManaRefreshPotion.cs


示例14: BaseStrengthPotion

		public BaseStrengthPotion( PotionEffect effect ) : base( 0xF09, effect )
		{
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:3,代码来源:BaseStrengthPotion.cs


示例15: BaseExplosionPotion

 public BaseExplosionPotion( PotionEffect effect )
     : base(0xF0D, effect)
 {
 }
开发者ID:Leodinas,项目名称:uolite,代码行数:4,代码来源:BaseExplosionPotion.cs


示例16: BaseFragmentationPotion

		private const int   ExplosionRange   = 2;     // How long is the blast radius?

		public BaseFragmentationPotion( PotionEffect effect ) : base( 0xF0D, effect )
		{
		}
开发者ID:nick12344356,项目名称:The-Basement,代码行数:5,代码来源:BaseFragmentationPotion.cs


示例17: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 1:
				case 0:
				{
					m_PotionEffect = (PotionEffect)reader.ReadInt();
					break;
				}
			}

			if( version ==  0 )
				Stackable = Core.ML;
		}
开发者ID:romeov007,项目名称:imagine-uo,代码行数:19,代码来源:BasePotion.cs


示例18: BaseAgilityPotion

		public BaseAgilityPotion( PotionEffect effect ) : base( 0xF08, effect )
		{
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:3,代码来源:BaseAgilityPotion.cs


示例19: ApplyPotion

        public bool ApplyPotion( PotionEffect effect, bool testOnly, out int message )
        {
            if ( m_PlantStatus >= PlantStatus.DecorativePlant )
            {
                message = 1053049; // This is a decorative plant, it does not need watering!
                return false;
            }

            if ( m_PlantStatus == PlantStatus.BowlOfDirt )
            {
                message = 1053066; // You should only pour potions on a plant or seed!
                return false;
            }

            bool full = false;

            if ( effect == PotionEffect.PoisonGreater || effect == PotionEffect.PoisonDeadly )
            {
                if ( m_PlantSystem.IsFullPoisonPotion )
                {
                    full = true;
                }
                else if ( !testOnly )
                {
                    m_PlantSystem.PoisonPotion++;
                }
            }
            else if ( effect == PotionEffect.CureGreater )
            {
                if ( m_PlantSystem.IsFullCurePotion )
                {
                    full = true;
                }
                else if ( !testOnly )
                {
                    m_PlantSystem.CurePotion++;
                }
            }
            else if ( effect == PotionEffect.HealGreater )
            {
                if ( m_PlantSystem.IsFullHealPotion )
                {
                    full = true;
                }
                else if ( !testOnly )
                {
                    m_PlantSystem.HealPotion++;
                }
            }
            else if ( effect == PotionEffect.StrengthGreater )
            {
                if ( m_PlantSystem.IsFullStrengthPotion )
                {
                    full = true;
                }
                else if ( !testOnly )
                {
                    m_PlantSystem.StrengthPotion++;
                }
            }
            else if ( effect == PotionEffect.PoisonLesser || effect == PotionEffect.Poison || effect == PotionEffect.CureLesser || effect == PotionEffect.Cure || effect == PotionEffect.HealLesser || effect == PotionEffect.Heal || effect == PotionEffect.Strength )
            {
                message = 1053068; // This potion is not powerful enough to use on a plant!
                return false;
            }
            else
            {
                message = 1053069; // You can't use that on a plant!
                return false;
            }

            if ( full )
            {
                message = 1053065; // The plant is already soaked with this type of potion!
                return false;
            }
            else
            {
                message = 1053067; // You pour the potion over the plant.
                return true;
            }
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:82,代码来源:PlantItem.cs


示例20: BaseRefreshPotion

 public BaseRefreshPotion( PotionEffect effect )
     : base(0xF0B, effect)
 {
 }
开发者ID:Godkong,项目名称:RunUO,代码行数:4,代码来源:BaseRefreshPotion.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Power类代码示例发布时间:2022-05-24
下一篇:
C# PostExecuteWorkItemCallback类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap