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


C# PotionEffect类代码示例

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


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


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