本文整理汇总了C#中BulkMaterialType类的典型用法代码示例。如果您正苦于以下问题:C# BulkMaterialType类的具体用法?C# BulkMaterialType怎么用?C# BulkMaterialType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BulkMaterialType类属于命名空间,在下文中一共展示了BulkMaterialType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
}
}
开发者ID:Godkong,项目名称:RunUO,代码行数:28,代码来源:BOBSmallEntry.cs
示例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;
}
}
}
开发者ID:FreeReign,项目名称:forkuo,代码行数:25,代码来源:BOBLargeEntry.cs
示例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;
}
开发者ID:Godkong,项目名称:RunUO,代码行数:8,代码来源:LargeSmithBOD.cs
示例4: LargeTailorBOD
public LargeTailorBOD( int amountMax, bool reqExceptional, BulkMaterialType mat, LargeBulkEntry[] entries )
{
Hue = 0x483;
AmountMax = amountMax;
Entries = entries;
RequireExceptional = reqExceptional;
Material = mat;
}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:8,代码来源:LargeTailorBOD.cs
示例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 );
}
}
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:58,代码来源:BOBGump.cs
示例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;
}
开发者ID:Crome696,项目名称:ServUO,代码行数:9,代码来源:SmallBODGump.cs
示例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;
}
开发者ID:justdanofficial,项目名称:khaeros,代码行数:9,代码来源:SmallBODAcceptGump.cs
示例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;
}
开发者ID:FreeReign,项目名称:forkuo,代码行数:10,代码来源:SmallTailorBOD.cs
示例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;
}
开发者ID:jackuoll,项目名称:Pre-AOS-RunUO,代码行数:13,代码来源:LargeBOD.cs
示例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;
}
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:12,代码来源:SmallSmithBOD.cs
示例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;
}
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:13,代码来源:SmallBOD.cs
示例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;
}
开发者ID:jackuoll,项目名称:Pre-AOS-RunUO,代码行数:14,代码来源:LargeBOD.cs
示例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 );
}
开发者ID:Godkong,项目名称:RunUO,代码行数:15,代码来源:Rewards.cs
示例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;
}
开发者ID:Godkong,项目名称:RunUO,代码行数:30,代码来源:Rewards.cs
示例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;
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:sunuo-svn,代码行数:101,代码来源:Docs.cs
示例16: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 0:
{
m_AmountMax = reader.ReadInt();
m_RequireExceptional = reader.ReadBool();
m_Material = (BulkMaterialType)reader.ReadInt();
m_Entries = new LargeBulkEntry[reader.ReadInt()];
for ( int i = 0; i < m_Entries.Length; ++i )
m_Entries[i] = new LargeBulkEntry( this, reader );
break;
}
}
if ( Weight == 0.0 )
Weight = 1.0;
if ( Core.AOS && ItemID == 0x14EF )
ItemID = 0x2258;
if ( Parent == null && Map == Map.Internal && Location == Point3D.Zero )
Delete();
}
开发者ID:vexilar,项目名称:RunUO_Rebar,代码行数:32,代码来源:LargeBOD.cs
示例17: GetRandomMaterial
public static BulkMaterialType GetRandomMaterial( BulkMaterialType start, double[] chances, double bonus )
{
double random = Utility.RandomDouble();
for ( int i = 0; i < chances.Length; ++i )
{
double chance = ( i == 0 ? chances[i] - ( chances[i] * bonus ) : chances[i] + ( chances[i] * bonus ) );
if ( random < chance )
return ( i == 0 ? BulkMaterialType.None : start + ( i - 1 ) );
random -= chance;
}
return BulkMaterialType.None;
}
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:16,代码来源:SmallBOD.cs
示例18: GetMaterialNumberFor
public static int GetMaterialNumberFor( BulkMaterialType material )
{
if ( material >= BulkMaterialType.DullCopper && material <= BulkMaterialType.Sunstone )
return 1045142 + (int)(material - BulkMaterialType.DullCopper);
else if ( material >= BulkMaterialType.Spined && material <= BulkMaterialType.Daemon )
return 1049348 + (int)(material - BulkMaterialType.Spined);
else if ( material >= BulkMaterialType.Pine && material <= BulkMaterialType.Oak )
return 1049348 + (int)(material - BulkMaterialType.Pine);
return 0;
}
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:11,代码来源:LargeBODGump.cs
示例19: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 0:
{
m_AmountCur = reader.ReadInt();
m_AmountMax = reader.ReadInt();
string type = reader.ReadString();
if ( type != null )
m_Type = ScriptCompiler.FindTypeByFullName( type );
m_Number = reader.ReadInt();
m_Graphic = reader.ReadInt();
m_RequireExceptional = reader.ReadBool();
m_Material = (BulkMaterialType)reader.ReadInt();
break;
}
}
if ( Weight == 0.0 )
Weight = 1.0;
if ( Core.AOS && ItemID == 0x14EF )
ItemID = 0x2258;
if ( Parent == null && Map == Map.Internal && Location == Point3D.Zero )
Delete();
}
开发者ID:BackupTheBerlios,项目名称:sunuo-svn,代码行数:36,代码来源:SmallBOD.cs
示例20: DocumentSmithBOD
private static void DocumentSmithBOD( StreamWriter html, ArrayList items, string amt, BulkMaterialType material )
{
bool[] rewards = new bool[24];
for ( int i = 0; i < items.Count; ++i )
{
Item item = (Item)items[i];
if ( item is SturdyPickaxe || item is SturdyShovel )
rewards[0] = true;
else if ( item is LeatherGlovesOfMining )
rewards[1] = true;
else if ( item is StuddedGlovesOfMining )
rewards[2] = true;
else if ( item is RingmailGlovesOfMining )
rewards[3] = true;
else if ( item is GargoylesPickaxe )
rewards[4] = true;
else if ( item is ProspectorsTool )
rewards[5] = true;
else if ( item is PowderOfTemperament )
rewards[6] = true;
else if ( item is ColoredAnvil )
rewards[7] = true;
else if ( item is PowerScroll )
{
PowerScroll ps = (PowerScroll)item;
if ( ps.Value == 105.0 )
rewards[8] = true;
else if ( ps.Value == 110.0 )
rewards[9] = true;
else if ( ps.Value == 115.0 )
rewards[10] = true;
else if ( ps.Value == 120.0 )
rewards[11] = true;
}
else if ( item is RunicHammer )
{
RunicHammer rh = (RunicHammer)item;
rewards[11 + CraftResources.GetIndex( rh.Resource )] = true;
}
else if ( item is AncientSmithyHammer )
{
AncientSmithyHammer ash = (AncientSmithyHammer)item;
if ( ash.Bonus == 10 )
rewards[20] = true;
else if ( ash.Bonus == 15 )
rewards[21] = true;
else if ( ash.Bonus == 30 )
rewards[22] = true;
else if ( ash.Bonus == 60 )
rewards[23] = true;
}
item.Delete();
}
string style = null;
string name = null;
switch ( material )
{
case BulkMaterialType.None: style = "ir"; name = "Iron"; break;
case BulkMaterialType.DullCopper: style = "du"; name = "Dull Copper"; break;
case BulkMaterialType.ShadowIron: style = "sh"; name = "Shadow Iron"; break;
case BulkMaterialType.Copper: style = "co"; name = "Copper"; break;
case BulkMaterialType.Bronze: style = "br"; name = "Bronze"; break;
case BulkMaterialType.Gold: style = "go"; name = "Gold"; break;
case BulkMaterialType.Agapite: style = "ag"; name = "Agapite"; break;
case BulkMaterialType.Verite: style = "ve"; name = "Verite"; break;
case BulkMaterialType.Valorite: style = "va"; name = "Valorite"; 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 < 24 )
{
if ( rewards[index] )
{
html.WriteLine( " <td width=\"25\" class=\"{0}\"><center><b>X</b></center></td>", style );
++index;
}
else
{
int count = 0;
while ( index < 24 && !rewards[index] )
{
++count;
++index;
if ( index == 4 || index == 8 || index == 12 || index == 20 )
break;
}
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:sunuo-svn,代码行数:101,代码来源:Docs.cs
注:本文中的BulkMaterialType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论