RedBeard
Member
Trying to make a bonus resource subject to region
Errors:
+ Services/Harvest/Mining.cs:
CS0120: Line 136: An object reference is required for the non-static field,
method, or property 'Server.Region.IsPartOf(System.Type)'
Code:
if (Core.ML)
{
oreAndStone.BonusResources = new BonusHarvestResource[]
{
new BonusHarvestResource( 0, 99.2, null, null ), //Nothing
new BonusHarvestResource( 100, .1, 1072562, typeof( BlueDiamond ) ),
new BonusHarvestResource( 100, .1, 1072567, typeof( DarkSapphire ) ),
new BonusHarvestResource( 100, .1, 1072570, typeof( EcruCitrine ) ),
new BonusHarvestResource( 100, .1, 1072564, typeof( FireRuby ) ),
new BonusHarvestResource( 100, .1, 1072566, typeof( PerfectEmerald ) ),
new BonusHarvestResource( 100, .1, 1072568, typeof( Turquoise ) ),
new BonusHarvestResource( 100, .1, 1077180, typeof( RandomBlackRock ) ),//You uncover a small piece of blackrock!
//new BonusHarvestResource(100, .1, 1077181, typeof(RandomBlackRockLarge)),//You unearth a large piece of blackrock!
};
if (OreAndStoneMap == Server.Map.TerMur)
{
new BonusHarvestResource(100, .1, 1113799, typeof(CrystallineBlackrock));
}
else
new BonusHarvestResource(100, .1, 1077180, typeof(RandomBlackRock));
if (Region.IsPartOf(typeof(Regions.BlackrockRegion))) //this section throws error
{
new BonusHarvestResource(100, .1, 1077181, typeof(RandomBlackRockLarge));
}
else
new BonusHarvestResource(100, .1, 1077180, typeof(RandomBlackRock));
oreAndStone.RaceBonus = Core.ML;
oreAndStone.RandomizeVeins = Core.ML;
Definitions.Add(oreAndStone);
#endregion
+ Services/Harvest/Mining.cs:
CS0120: Line 136: An object reference is required for the non-static field,
method, or property 'Server.Region.IsPartOf(System.Type)'