private bool Check(Mat start, Mat end) { return(Material >= start && Material <= end); }
public int Low(Mat mat) { return(3 * (int)mat); }
private bool Check(Mat val) { return(Material == val); }
private bool Check( Mat start, Mat end ) { return ( Material >= start && Material <= end ); }
public int High(Mat mat) { return(2 + (3 * (int)mat)); }
public int Low( Mat mat ) { return 3 * (int)mat; }
private bool Check( Mat val ) { return ( Material == val ); }
public override List <Item> ComputeRewards(bool full) { List <Item> list = new List <Item>(); Type primaryType; if (Entries.Length > 0) { primaryType = Entries[0].Details.Type; } else { return(list); } bool cloth1 = false, cloth2 = false; bool cloth3 = false, cloth4 = false; bool cloth5 = false, sandals = false; bool ps5 = false, ps10 = false, ps15 = false, ps20 = false; bool smallHides = false, mediumHides = false; bool lightTapestry = false, darkTapestry = false; bool brownBearRug = false, polarBearRug = false; bool clothingBlessDeed = false; bool rSpined = false, rHorned = false, rBarbed = false; Mat mat; switch (Material) { default: mat = (primaryType.IsSubclassOf(typeof(BaseArmor)) || primaryType.IsSubclassOf(typeof(BaseShoes))) ? Mat.Plain : Mat.Cloth; break; case BulkMaterialType.Spined: mat = Mat.Spined; break; case BulkMaterialType.Horned: mat = Mat.Horned; break; case BulkMaterialType.Barbed: mat = Mat.Barbed; break; } m_Material = mat; int parts = Entries.Length; if (Core.AOS) { if (parts <= 4) { if (RequireExceptional) { ps15 = lightTapestry = darkTapestry = Check(Low(Mat.Cloth)) || Check(Low(Mat.Plain)); ps20 = brownBearRug = polarBearRug = Check(High(Mat.Cloth)) || Check(High(Mat.Plain), Low(Mat.Spined)); clothingBlessDeed = Check(High(Mat.Spined), Low(Mat.Barbed)); rSpined = Check(High(Mat.Barbed)); } else { ps10 = smallHides = mediumHides = Check(Low(Mat.Cloth), Low(Mat.Spined)); ps15 = lightTapestry = darkTapestry = Check(High(Mat.Spined), Low(Mat.Barbed)); ps20 = brownBearRug = polarBearRug = Check(High(Mat.Barbed)); } } else if (parts == 5) { if (RequireExceptional) { clothingBlessDeed = Check(Low(Mat.Cloth), Low(Mat.Spined)); rSpined = Check(High(Mat.Spined), Low(Mat.Horned)); rHorned = Check(High(Mat.Horned), Low(Mat.Barbed)); rBarbed = Check(High(Mat.Barbed)); } else { ps15 = lightTapestry = darkTapestry = Check(Low(Mat.Cloth)) || Check(Low(Mat.Plain)); ps20 = brownBearRug = polarBearRug = Check(High(Mat.Cloth)) || Check(High(Mat.Plain), Low(Mat.Spined)); clothingBlessDeed = Check(High(Mat.Spined), Low(Mat.Barbed)); rSpined = Check(High(Mat.Barbed)); } } else if (parts >= 6) { if (RequireExceptional) { rSpined = Check(Low(Mat.Cloth), Low(Mat.Plain)); rHorned = Check(High(Mat.Plain), Low(Mat.Spined)); rBarbed = Check(High(Mat.Spined), High(Mat.Barbed)); } else { clothingBlessDeed = Check(Low(Mat.Cloth), Low(Mat.Spined)); rSpined = Check(High(Mat.Spined), Low(Mat.Horned)); rHorned = Check(High(Mat.Horned), Low(Mat.Barbed)); rBarbed = Check(High(Mat.Barbed)); } } } else { if (parts <= 4) { if (RequireExceptional) { cloth5 = Check(Low(Mat.Cloth), Low(Mat.Barbed)); sandals = Check(Low(Mat.Cloth), Low(Mat.Spined)); ps5 = Check(Low(Mat.Cloth), Low(Mat.Spined)); ps10 = Check(High(Mat.Spined), Low(Mat.Barbed)); ps15 = Check(High(Mat.Barbed)); smallHides = Check(High(Mat.Spined), Low(Mat.Barbed)); mediumHides = Check(High(Mat.Spined), Low(Mat.Barbed)); lightTapestry = Check(High(Mat.Barbed)); darkTapestry = Check(High(Mat.Barbed)); } else { cloth4 = Check(Low(Mat.Cloth), Low(Mat.Spined)); cloth5 = Check(High(Mat.Spined), High(Mat.Barbed)); sandals = Check(Low(Mat.Cloth), Low(Mat.Barbed)); ps5 = Check(High(Mat.Spined), Low(Mat.Barbed)); ps10 = Check(High(Mat.Barbed)); smallHides = Check(High(Mat.Barbed)); mediumHides = Check(High(Mat.Barbed)); } } else if (parts == 5) { if (RequireExceptional) { cloth5 = Check(Low(Mat.Cloth), Low(Mat.Spined)); ps10 = Check(Low(Mat.Cloth), Low(Mat.Spined)); ps15 = Check(High(Mat.Spined), Low(Mat.Barbed)); ps20 = Check(High(Mat.Barbed)); smallHides = Check(Low(Mat.Cloth), Low(Mat.Spined)); mediumHides = Check(Low(Mat.Cloth), Low(Mat.Spined)); lightTapestry = Check(High(Mat.Spined), Low(Mat.Barbed)); darkTapestry = Check(High(Mat.Spined), Low(Mat.Barbed)); brownBearRug = Check(High(Mat.Barbed)); polarBearRug = Check(High(Mat.Barbed)); } else { cloth5 = Check(Low(Mat.Cloth), Low(Mat.Barbed)); sandals = Check(Low(Mat.Cloth), Low(Mat.Spined)); ps5 = Check(Low(Mat.Cloth), Low(Mat.Spined)); ps10 = Check(High(Mat.Spined), Low(Mat.Barbed)); ps15 = Check(High(Mat.Barbed)); smallHides = Check(High(Mat.Spined), Low(Mat.Barbed)); mediumHides = Check(High(Mat.Spined), Low(Mat.Barbed)); lightTapestry = Check(High(Mat.Barbed)); darkTapestry = Check(High(Mat.Barbed)); } } else if (parts >= 6) { if (RequireExceptional) { ps15 = Check(Low(Mat.Cloth), Low(Mat.Spined)); ps20 = Check(High(Mat.Spined), Low(Mat.Barbed)); lightTapestry = Check(Low(Mat.Cloth), Low(Mat.Spined)); darkTapestry = Check(Low(Mat.Cloth), Low(Mat.Spined)); brownBearRug = Check(High(Mat.Spined), Low(Mat.Barbed)); polarBearRug = Check(High(Mat.Spined), Low(Mat.Barbed)); clothingBlessDeed = Check(High(Mat.Barbed)); } else { cloth5 = Check(Low(Mat.Cloth), Low(Mat.Spined)); ps10 = Check(Low(Mat.Cloth), Low(Mat.Spined)); ps15 = Check(High(Mat.Spined), Low(Mat.Barbed)); ps20 = Check(High(Mat.Barbed)); smallHides = Check(Low(Mat.Cloth), Low(Mat.Spined)); mediumHides = Check(Low(Mat.Cloth), Low(Mat.Spined)); lightTapestry = Check(High(Mat.Spined), Low(Mat.Barbed)); darkTapestry = Check(High(Mat.Spined), Low(Mat.Barbed)); brownBearRug = Check(High(Mat.Barbed)); polarBearRug = Check(High(Mat.Barbed)); } } } list = new List <Item>(); if (cloth1) { list.Add(MakeCloth(0x557, 0x488, 0x4F4, 0x48C)); } if (cloth2) { list.Add(MakeCloth(0x55D, 0x48B, 0x4FB, 0x492)); } if (cloth3) { list.Add(MakeCloth(0x490, 0x48E, 0x48D, 0x495)); } if (cloth4) { list.Add(MakeCloth(0x455, 0x501, 0x487, 0x494)); } if (cloth5) { list.Add(MakeCloth(0x4F2, 0x4AA, 0x4AC, 0x47E)); } if (sandals) { list.Add(new Sandals(Utility.RandomList(0x490, 0x487, 0x4F2, 0x501, 0x48B, 0x4F4, 0x4FB, 0x494, 0x495, 0x48F, 0x48E, 0x455))); } if (ps5) { list.Add(new PowerScroll(SkillName.Tailoring, 105)); } if (ps10) { list.Add(new PowerScroll(SkillName.Tailoring, 110)); } if (ps15) { list.Add(new PowerScroll(SkillName.Tailoring, 115)); } if (ps20) { list.Add(new PowerScroll(SkillName.Tailoring, 120)); } if (smallHides) { if (Utility.RandomBool()) { list.Add(new SmallStretchedHideEastDeed()); } else { list.Add(new SmallStretchedHideSouthDeed()); } } if (mediumHides) { if (Utility.RandomBool()) { list.Add(new MediumStretchedHideEastDeed()); } else { list.Add(new MediumStretchedHideSouthDeed()); } } if (lightTapestry) { if (Utility.RandomBool()) { list.Add(new LightFlowerTapestryEastDeed()); } else { list.Add(new LightFlowerTapestrySouthDeed()); } } if (darkTapestry) { if (Utility.RandomBool()) { list.Add(new DarkFlowerTapestryEastDeed()); } else { list.Add(new DarkFlowerTapestrySouthDeed()); } } if (brownBearRug) { if (Utility.RandomBool()) { list.Add(new BrownBearRugEastDeed()); } else { list.Add(new BrownBearRugSouthDeed()); } } if (polarBearRug) { if (Utility.RandomBool()) { list.Add(new PolarBearRugEastDeed()); } else { list.Add(new PolarBearRugSouthDeed()); } } if (clothingBlessDeed) { list.Add(new ClothingBlessDeed()); } if (rSpined) { list.Add(new RunicSewingKit(CraftResource.SpinedLeather, 45)); } if (rHorned) { list.Add(new RunicSewingKit(CraftResource.HornedLeather, 30)); } if (rBarbed) { list.Add(new RunicSewingKit(CraftResource.BarbedLeather, 15)); } return(list); }
public int High( Mat mat ) { return 2 + (3 * (int)mat); }
private int Low(Mat mat) { return(3 * (int)mat); }
private int High(Mat mat) { return(2 + (3 * (int)mat)); }
public override ArrayList ComputeRewards() { Type primaryType; if ( Entries.Length > 0 ) primaryType = Entries[0].Details.Type; else return new ArrayList(); bool cloth1 = false, cloth2 = false; bool cloth3 = false, cloth4 = false; bool cloth5 = false, sandals = false; bool ps5 = false, ps10 = false, ps15 = false, ps20 = false; bool smallHides = false, mediumHides = false; bool lightTapestry = false, darkTapestry = false; bool brownBearRug = false, polarBearRug = false; bool clothingBlessDeed = false; bool rSpined = false, rHorned = false, rBarbed = false; Mat mat; switch ( Material ) { default: mat = ( primaryType.IsSubclassOf( typeof( BaseArmor ) ) || primaryType.IsSubclassOf( typeof( BaseShoes ) ) ) ? Mat.Plain : Mat.Cloth; break; case BulkMaterialType.Spined: mat = Mat.Spined; break; case BulkMaterialType.Horned: mat = Mat.Horned; break; case BulkMaterialType.Barbed: mat = Mat.Barbed; break; } m_Material = mat; int parts = Entries.Length; if ( Core.AOS ) { if ( parts <= 4 ) { if ( RequireExceptional ) { ps15 = lightTapestry = darkTapestry = Check( Low( Mat.Cloth ) ) || Check( Low( Mat.Plain ) ); ps20 = brownBearRug = polarBearRug = Check( High( Mat.Cloth ) ) || Check( High( Mat.Plain ), Low( Mat.Spined ) ); clothingBlessDeed = Check( High( Mat.Spined ), Low( Mat.Barbed ) ); rSpined = Check( High( Mat.Barbed ) ); } else { ps10 = smallHides = mediumHides = Check( Low( Mat.Cloth ), Low( Mat.Spined ) ); ps15 = lightTapestry = darkTapestry = Check( High( Mat.Spined ), Low( Mat.Barbed ) ); ps20 = brownBearRug = polarBearRug = Check( High( Mat.Barbed ) ); } } else if ( parts == 5 ) { if ( RequireExceptional ) { clothingBlessDeed = Check( Low( Mat.Cloth ), Low( Mat.Spined ) ); rSpined = Check( High( Mat.Spined ), Low( Mat.Horned ) ); rHorned = Check( High( Mat.Horned ), Low( Mat.Barbed ) ); rBarbed = Check( High( Mat.Barbed ) ); } else { ps15 = lightTapestry = darkTapestry = Check( Low( Mat.Cloth ) ) || Check( Low( Mat.Plain ) ); ps20 = brownBearRug = polarBearRug = Check( High( Mat.Cloth ) ) || Check( High( Mat.Plain ), Low( Mat.Spined ) ); clothingBlessDeed = Check( High( Mat.Spined ), Low( Mat.Barbed ) ); rSpined = Check( High( Mat.Barbed ) ); } } else if ( parts >= 6 ) { if ( RequireExceptional ) { rSpined = Check( Low( Mat.Cloth ), Low( Mat.Plain ) ); rHorned = Check( High( Mat.Plain ), Low( Mat.Spined ) ); rBarbed = Check( High( Mat.Spined ), High( Mat.Barbed ) ); } else { clothingBlessDeed = Check( Low( Mat.Cloth ), Low( Mat.Spined ) ); rSpined = Check( High( Mat.Spined ), Low( Mat.Horned ) ); rHorned = Check( High( Mat.Horned ), Low( Mat.Barbed ) ); rBarbed = Check( High( Mat.Barbed ) ); } } } else { if ( parts <= 4 ) { if ( RequireExceptional ) { cloth5 = Check( Low( Mat.Cloth ), Low( Mat.Barbed ) ); sandals = Check( Low( Mat.Cloth ), Low( Mat.Spined ) ); ps5 = Check( Low( Mat.Cloth ), Low( Mat.Spined ) ); ps10 = Check( High( Mat.Spined ), Low( Mat.Barbed ) ); ps15 = Check( High( Mat.Barbed ) ); smallHides = Check( High( Mat.Spined ), Low( Mat.Barbed ) ); mediumHides = Check( High( Mat.Spined ), Low( Mat.Barbed ) ); lightTapestry = Check( High( Mat.Barbed ) ); darkTapestry = Check( High( Mat.Barbed ) ); } else { cloth4 = Check( Low( Mat.Cloth ), Low( Mat.Spined ) ); cloth5 = Check( High( Mat.Spined ), High( Mat.Barbed ) ); sandals = Check( Low( Mat.Cloth ), Low( Mat.Barbed ) ); ps5 = Check( High( Mat.Spined ), Low( Mat.Barbed ) ); ps10 = Check( High( Mat.Barbed ) ); smallHides = Check( High( Mat.Barbed ) ); mediumHides = Check( High( Mat.Barbed ) ); } } else if ( parts == 5 ) { if ( RequireExceptional ) { cloth5 = Check( Low( Mat.Cloth ), Low( Mat.Spined ) ); ps10 = Check( Low( Mat.Cloth ), Low( Mat.Spined ) ); ps15 = Check( High( Mat.Spined ), Low( Mat.Barbed ) ); ps20 = Check( High( Mat.Barbed ) ); smallHides = Check( Low( Mat.Cloth ), Low( Mat.Spined ) ); mediumHides = Check( Low( Mat.Cloth ), Low( Mat.Spined ) ); lightTapestry = Check( High( Mat.Spined ), Low( Mat.Barbed ) ); darkTapestry = Check( High( Mat.Spined ), Low( Mat.Barbed ) ); brownBearRug = Check( High( Mat.Barbed ) ); polarBearRug = Check( High( Mat.Barbed ) ); } else { cloth5 = Check( Low( Mat.Cloth ), Low( Mat.Barbed ) ); sandals = Check( Low( Mat.Cloth ), Low( Mat.Spined ) ); ps5 = Check( Low( Mat.Cloth ), Low( Mat.Spined ) ); ps10 = Check( High( Mat.Spined ), Low( Mat.Barbed ) ); ps15 = Check( High( Mat.Barbed ) ); smallHides = Check( High( Mat.Spined ), Low( Mat.Barbed ) ); mediumHides = Check( High( Mat.Spined ), Low( Mat.Barbed ) ); lightTapestry = Check( High( Mat.Barbed ) ); darkTapestry = Check( High( Mat.Barbed ) ); } } else if ( parts >= 6 ) { if ( RequireExceptional ) { ps15 = Check( Low( Mat.Cloth ), Low( Mat.Spined ) ); ps20 = Check( High( Mat.Spined ), Low( Mat.Barbed ) ); lightTapestry = Check( Low( Mat.Cloth ), Low( Mat.Spined ) ); darkTapestry = Check( Low( Mat.Cloth ), Low( Mat.Spined ) ); brownBearRug = Check( High( Mat.Spined ), Low( Mat.Barbed ) ); polarBearRug = Check( High( Mat.Spined ), Low( Mat.Barbed ) ); clothingBlessDeed = Check( High( Mat.Barbed ) ); } else { cloth5 = Check( Low( Mat.Cloth ), Low( Mat.Spined ) ); ps10 = Check( Low( Mat.Cloth ), Low( Mat.Spined ) ); ps15 = Check( High( Mat.Spined ), Low( Mat.Barbed ) ); ps20 = Check( High( Mat.Barbed ) ); smallHides = Check( Low( Mat.Cloth ), Low( Mat.Spined ) ); mediumHides = Check( Low( Mat.Cloth ), Low( Mat.Spined ) ); lightTapestry = Check( High( Mat.Spined ), Low( Mat.Barbed ) ); darkTapestry = Check( High( Mat.Spined ), Low( Mat.Barbed ) ); brownBearRug = Check( High( Mat.Barbed ) ); polarBearRug = Check( High( Mat.Barbed ) ); } } } ArrayList list = new ArrayList(); if ( cloth1 ) list.Add( MakeCloth( 0x482, 0x48B, 0x487, 0x489 ) ); if ( cloth2 ) list.Add( MakeCloth( 0x494, 0x48A, 0x485, 0x484 ) ); if ( cloth3 ) list.Add( MakeCloth( 0x48C, 0x48F, 0x48D, 0x490 ) ); if ( cloth4 ) list.Add( MakeCloth( 0x48E, 0x493, 0x483, 0x496 ) ); if ( cloth5 ) list.Add( MakeCloth( 0x488, 0x47E, 0x481, 0x47D ) ); if ( sandals ) list.Add( new Sandals( Utility.RandomList( 0x489, 0x47F, 0x482, 0x47E, 0x48F, 0x494, 0x484, 0x497 ) ) ); if ( ps5 ) list.Add( new PowerScroll( SkillName.Tailoring, 105 ) ); if ( ps10 ) list.Add( new PowerScroll( SkillName.Tailoring, 110 ) ); if ( ps15 ) list.Add( new PowerScroll( SkillName.Tailoring, 115 ) ); if ( ps20 ) list.Add( new PowerScroll( SkillName.Tailoring, 120 ) ); if ( smallHides ) { if ( Utility.RandomBool() ) list.Add( new SmallStretchedHideEastDeed() ); else list.Add( new SmallStretchedHideSouthDeed() ); } if ( mediumHides ) { if ( Utility.RandomBool() ) list.Add( new MediumStretchedHideEastDeed() ); else list.Add( new MediumStretchedHideSouthDeed() ); } if ( lightTapestry ) { if ( Utility.RandomBool() ) list.Add( new LightFlowerTapestryEastDeed() ); else list.Add( new LightFlowerTapestrySouthDeed() ); } if ( darkTapestry ) { if ( Utility.RandomBool() ) list.Add( new DarkFlowerTapestryEastDeed() ); else list.Add( new DarkFlowerTapestrySouthDeed() ); } if ( brownBearRug ) { if ( Utility.RandomBool() ) list.Add( new BrownBearRugEastDeed() ); else list.Add( new BrownBearRugSouthDeed() ); } if ( polarBearRug ) { if ( Utility.RandomBool() ) list.Add( new PolarBearRugEastDeed() ); else list.Add( new PolarBearRugSouthDeed() ); } if ( clothingBlessDeed ) list.Add( new ClothingBlessDeed() ); if ( rSpined ) list.Add( new RunicSewingKit( CraftResource.SpinedLeather, 45 ) ); if ( rHorned ) list.Add( new RunicSewingKit( CraftResource.HornedLeather, 30 ) ); if ( rBarbed ) list.Add( new RunicSewingKit( CraftResource.BarbedLeather, 15 ) ); return list; }
private int Low( Mat mat ) { return 3 * (int)mat; }
private int High( Mat mat ) { return 2 + (3 * (int)mat); }