本文整理汇总了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;
}
示例2: BasePotion
public BasePotion( int itemID, PotionEffect effect ) : base( itemID )
{
m_PotionEffect = effect;
Stackable = Core.ML;
Weight = 1.0;
}
示例3: BasePotion
public BasePotion(int itemID, PotionEffect effect)
: base(itemID)
{
this.m_PotionEffect = effect;
this.Stackable = Core.ML;
this.Weight = 1.0;
}
示例4: BasePotion
public BasePotion( int itemID, PotionEffect effect )
: base(itemID)
{
m_PotionEffect = effect;
Stackable = true;
Weight = 2.0;
}
示例5: BasePotion
public BasePotion( int itemID, PotionEffect effect ) : base( itemID )
{
m_PotionEffect = effect;
//Stackable = Core.ML;
Stackable = true;
Weight = 0.25;
}
示例6: BasePotion
public BasePotion( int itemID, PotionEffect effect )
: base(itemID)
{
m_PotionEffect = effect;
m_Tasters = new ArrayList();
Stackable = false;
Weight = 1.0;
}
示例7: BasePotion
public BasePotion( int itemID, PotionEffect effect ) : base( itemID )
{
m_PotionEffect = effect;
Stackable = Core.ML;
Weight = 1.0;
ItemValue = ItemValue.Common;
}
示例8: MakePotionKeg
private Item MakePotionKeg(PotionEffect type, int hue)
{
PotionKeg keg = new PotionKeg();
keg.Held = 100;
keg.Type = type;
keg.Hue = hue;
return keg;
}
示例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 );
}
示例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;
}
}
}
示例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 ) );
}
示例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;
}
}
示例13: BaseManaRefreshPotion
public BaseManaRefreshPotion( PotionEffect effect ) : base( 0xF0D, effect )
{
Hue = 1072;
}
示例14: BaseStrengthPotion
public BaseStrengthPotion( PotionEffect effect ) : base( 0xF09, effect )
{
}
示例15: BaseExplosionPotion
public BaseExplosionPotion( PotionEffect effect )
: base(0xF0D, effect)
{
}