本文整理汇总了C#中BulkMaterialType类的典型用法代码示例。如果您正苦于以下问题:C# BulkMaterialType类的具体用法?C# BulkMaterialType怎么用?C# BulkMaterialType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BulkMaterialType类属于命名空间,在下文中一共展示了BulkMaterialType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BOBSmallEntry
public BOBSmallEntry( GenericReader reader )
{
int version = reader.ReadEncodedInt();
switch ( version )
{
case 0:
{
string type = reader.ReadString();
if ( type != null )
m_ItemType = ScriptCompiler.FindTypeByFullName( type );
m_RequireExceptional = reader.ReadBool();
m_DeedType = (BODType)reader.ReadEncodedInt();
m_Material = (BulkMaterialType)reader.ReadEncodedInt();
m_AmountCur = reader.ReadEncodedInt();
m_AmountMax = reader.ReadEncodedInt();
m_Number = reader.ReadEncodedInt();
m_Graphic = reader.ReadEncodedInt();
m_Price = reader.ReadEncodedInt();
break;
}
}
}
示例2: BOBLargeEntry
public BOBLargeEntry(GenericReader reader)
{
int version = reader.ReadEncodedInt();
switch ( version )
{
case 0:
{
this.m_RequireExceptional = reader.ReadBool();
this.m_DeedType = (BODType)reader.ReadEncodedInt();
this.m_Material = (BulkMaterialType)reader.ReadEncodedInt();
this.m_AmountMax = reader.ReadEncodedInt();
this.m_Price = reader.ReadEncodedInt();
this.m_Entries = new BOBLargeSubEntry[reader.ReadEncodedInt()];
for (int i = 0; i < this.m_Entries.Length; ++i)
this.m_Entries[i] = new BOBLargeSubEntry(reader);
break;
}
}
}
示例3: LargeSmithBOD
public LargeSmithBOD( int amountMax, bool reqExceptional, BulkMaterialType mat, LargeBulkEntry[] entries )
{
this.Hue = 0x44E;
this.AmountMax = amountMax;
this.Entries = entries;
this.RequireExceptional = reqExceptional;
this.Material = mat;
}
示例4: LargeTailorBOD
public LargeTailorBOD( int amountMax, bool reqExceptional, BulkMaterialType mat, LargeBulkEntry[] entries )
{
Hue = 0x483;
AmountMax = amountMax;
Entries = entries;
RequireExceptional = reqExceptional;
Material = mat;
}
示例5: CheckFilter
public bool CheckFilter( BulkMaterialType mat, int amountMax, bool isLarge, bool reqExc, BODType deedType, Type itemType )
{
BOBFilter f = ( m_From.UseOwnFilter ? m_From.BOBFilter : m_Book.Filter );
if ( f.IsDefault )
return true;
if ( f.Quality == 1 && reqExc )
return false;
else if ( f.Quality == 2 && !reqExc )
return false;
if ( f.Quantity == 1 && amountMax != 10 )
return false;
else if ( f.Quantity == 2 && amountMax != 15 )
return false;
else if ( f.Quantity == 3 && amountMax != 20 )
return false;
if ( f.Type == 1 && isLarge )
return false;
else if ( f.Type == 2 && !isLarge )
return false;
switch ( f.Material )
{
default:
case 0: return true;
case 1: return ( deedType == BODType.Smith );
case 2: return ( deedType == BODType.Tailor );
case 3: return ( mat == BulkMaterialType.None && BGTClassifier.Classify( deedType, itemType ) == BulkGenericType.Iron );
case 4: return ( mat == BulkMaterialType.DullCopper );
case 5: return ( mat == BulkMaterialType.ShadowIron );
case 6: return ( mat == BulkMaterialType.Copper );
case 7: return ( mat == BulkMaterialType.Bronze );
case 8: return ( mat == BulkMaterialType.Gold );
case 9: return ( mat == BulkMaterialType.Agapite );
case 10: return ( mat == BulkMaterialType.Verite );
case 11: return ( mat == BulkMaterialType.Valorite );
case 12: return ( mat == BulkMaterialType.Silver );
//case 13: return ( mat == BulkMaterialType.Platinum );
//case 14: return ( mat == BulkMaterialType.Mythril );
//case 15: return ( mat == BulkMaterialType.Obsidian );
case 13: return ( mat == BulkMaterialType.Jade );
case 14: return ( mat == BulkMaterialType.Moonstone );
case 15: return ( mat == BulkMaterialType.Sunstone );
//case 19: return ( mat == BulkMaterialType.Bloodstone );
case 16: return ( mat == BulkMaterialType.None && BGTClassifier.Classify( deedType, itemType ) == BulkGenericType.Cloth );
case 17: return ( mat == BulkMaterialType.None && BGTClassifier.Classify( deedType, itemType ) == BulkGenericType.Leather );
case 18: return ( mat == BulkMaterialType.Spined );
case 19: return ( mat == BulkMaterialType.Horned );
case 20: return ( mat == BulkMaterialType.Barbed );
case 21: return ( mat == BulkMaterialType.DragonL );
case 22: return ( mat == BulkMaterialType.Daemon );
}
}
示例6: GetMaterialNumberFor
public static int GetMaterialNumberFor(BulkMaterialType material)
{
if (material >= BulkMaterialType.DullCopper && material <= BulkMaterialType.Valorite)
return 1045142 + (int)(material - BulkMaterialType.DullCopper);
else if (material >= BulkMaterialType.Spined && material <= BulkMaterialType.Barbed)
return 1049348 + (int)(material - BulkMaterialType.Spined);
return 0;
}
示例7: GetMaterialNumberFor
public static int GetMaterialNumberFor( BulkMaterialType material )
{
if ( material >= BulkMaterialType.Copper && material <= BulkMaterialType.Steel )
return 1045142 + (int)(material - BulkMaterialType.Copper);
else if ( material >= BulkMaterialType.Thick && material <= BulkMaterialType.Scaled )
return 1049348 + (int)(material - BulkMaterialType.Thick);
return 0;
}
示例8: SmallTailorBOD
private SmallTailorBOD(SmallBulkEntry entry, BulkMaterialType material, int amountMax, bool reqExceptional)
{
this.Hue = 0x483;
this.AmountMax = amountMax;
this.Type = entry.Type;
this.Number = entry.Number;
this.Graphic = entry.Graphic;
this.RequireExceptional = reqExceptional;
this.Material = material;
}
示例9: LargeBOD
public override int LabelNumber{ get{ return 1045151; } } // a bulk order deed
public LargeBOD( int hue, int amountMax, bool requireExeptional, BulkMaterialType material, LargeBulkEntry[] entries ) : base( Core.AOS ? 0x2258 : 0x14EF )
{
Weight = 1.0;
Hue = hue; // Blacksmith: 0x44E; Tailoring: 0x483
LootType = LootType.Blessed;
m_AmountMax = amountMax;
m_RequireExceptional = requireExeptional;
m_Material = material;
m_Entries = entries;
}
示例10: SmallSmithBOD
public SmallSmithBOD( int amountCur, int amountMax, Type type, int number, int graphic, bool reqExceptional, BulkMaterialType mat, Mobile m )
{
this.Mobile = m;
this.Hue = 0x44E;
this.AmountMax = amountMax;
this.AmountCur = amountCur;
this.Type = type;
this.Number = number;
this.Graphic = graphic;
this.RequireExceptional = reqExceptional;
this.Material = mat;
}
示例11: SmallBOD
public SmallBOD( int hue, int amountMax, Type type, int number, int graphic, bool requireExeptional, BulkMaterialType material ) : base( Core.AOS ? 0x2258 : 0x14EF )
{
Weight = 1.0;
Hue = hue; // Blacksmith: 0x44E; Tailoring: 0x483
LootType = LootType.Blessed;
m_AmountMax = amountMax;
m_Type = type;
m_Number = number;
m_Graphic = graphic;
m_RequireExceptional = requireExeptional;
m_Material = material;
}
示例12: GetRandomMaterial
public static BulkMaterialType GetRandomMaterial( BulkMaterialType start, double[] chances )
{
double random = Utility.RandomDouble();
for ( int i = 0; i < chances.Length; ++i )
{
if ( random < chances[i] )
return ( i == 0 ? BulkMaterialType.None : start + (i - 1) );
random -= chances[i];
}
return BulkMaterialType.None;
}
示例13: ComputeGold
public override int ComputeGold( int quantity, bool exceptional, BulkMaterialType material, int itemCount, Type type )
{
int[][][] goldTable = ( Core.AOS ? m_AosGoldTable : m_OldGoldTable );
int typeIndex = (( itemCount == 6 ? 3 : itemCount == 5 ? 2 : itemCount == 4 ? 1 : 0 ) * 2) + (exceptional ? 1 : 0);
int quanIndex = ( quantity == 20 ? 2 : quantity == 15 ? 1 : 0 );
int mtrlIndex = ( material == BulkMaterialType.Barbed ? 3 : material == BulkMaterialType.Horned ? 2 : material == BulkMaterialType.Spined ? 1 : 0 );
int gold = goldTable[typeIndex][quanIndex][mtrlIndex];
int min = (gold * 9) / 10;
int max = (gold * 10) / 9;
return Utility.RandomMinMax( min, max );
}
示例14: ComputePoints
public override int ComputePoints( int quantity, bool exceptional, BulkMaterialType material, int itemCount, Type type )
{
int points = 0;
if ( quantity == 10 )
points += 10;
else if ( quantity == 15 )
points += 25;
else if ( quantity == 20 )
points += 50;
if ( exceptional )
points += 100;
if ( itemCount == 4 )
points += 300;
else if ( itemCount == 5 )
points += 400;
else if ( itemCount == 6 )
points += 500;
if ( material == BulkMaterialType.Spined )
points += 50;
else if ( material == BulkMaterialType.Horned )
points += 100;
else if ( material == BulkMaterialType.Barbed )
points += 150;
return points;
}
示例15: DocumentTailorBOD
private static void DocumentTailorBOD( StreamWriter html, ArrayList items, string amt, BulkMaterialType material, Type type )
{
bool[] rewards = new bool[20];
for ( int i = 0; i < items.Count; ++i )
{
Item item = (Item)items[i];
if ( item is Sandals )
rewards[5] = true;
else if ( item is SmallStretchedHideEastDeed || item is SmallStretchedHideSouthDeed )
rewards[10] = rewards[11] = true;
else if ( item is MediumStretchedHideEastDeed || item is MediumStretchedHideSouthDeed )
rewards[10] = rewards[11] = true;
else if ( item is LightFlowerTapestryEastDeed || item is LightFlowerTapestrySouthDeed )
rewards[12] = rewards[13] = true;
else if ( item is DarkFlowerTapestryEastDeed || item is DarkFlowerTapestrySouthDeed )
rewards[12] = rewards[13] = true;
else if ( item is BrownBearRugEastDeed || item is BrownBearRugSouthDeed )
rewards[14] = rewards[15] = true;
else if ( item is PolarBearRugEastDeed || item is PolarBearRugSouthDeed )
rewards[14] = rewards[15] = true;
else if ( item is ClothingBlessDeed )
rewards[16] = true;
else if ( item is PowerScroll )
{
PowerScroll ps = (PowerScroll)item;
if ( ps.Value == 105.0 )
rewards[6] = true;
else if ( ps.Value == 110.0 )
rewards[7] = true;
else if ( ps.Value == 115.0 )
rewards[8] = true;
else if ( ps.Value == 120.0 )
rewards[9] = true;
}
else if ( item is UncutCloth )
{
if ( item.Hue == 0x483 || item.Hue == 0x48C || item.Hue == 0x488 || item.Hue == 0x48A )
rewards[0] = true;
else if ( item.Hue == 0x495 || item.Hue == 0x48B || item.Hue == 0x486 || item.Hue == 0x485 )
rewards[1] = true;
else if ( item.Hue == 0x48D || item.Hue == 0x490 || item.Hue == 0x48E || item.Hue == 0x491 )
rewards[2] = true;
else if ( item.Hue == 0x48F || item.Hue == 0x494 || item.Hue == 0x484 || item.Hue == 0x497 )
rewards[3] = true;
else
rewards[4] = true;
}
else if ( item is RunicSewingKit )
{
RunicSewingKit rkit = (RunicSewingKit)item;
rewards[16 + CraftResources.GetIndex( rkit.Resource )] = true;
}
item.Delete();
}
string style = null;
string name = null;
switch ( material )
{
case BulkMaterialType.None:
{
if ( type.IsSubclassOf( typeof( BaseArmor ) ) || type.IsSubclassOf( typeof( BaseShoes ) ) )
{
style = "pl";
name = "Plain";
}
else
{
style = "cl";
name = "Cloth";
}
break;
}
case BulkMaterialType.Spined: style = "sp"; name = "Spined"; break;
case BulkMaterialType.Horned: style = "ho"; name = "Horned"; break;
case BulkMaterialType.Barbed: style = "ba"; name = "Barbed"; break;
}
html.WriteLine( " <tr>" );
html.WriteLine( " <td width=\"250\" class=\"entry\"> - {0} <font size=\"1pt\">{1}</font></td>", name, amt );
int index = 0;
while ( index < 20 )
{
if ( rewards[index] )
{
html.WriteLine( " <td width=\"25\" class=\"{0}\"><center><b>X</b></center></td>", style );
++index;
}
else
{
int count = 0;
//.........这里部分代码省略.........