|
|
|
@ -29,10 +29,10 @@
|
|
|
|
|
public static void FromMessage(this Farmland self, FarmlandProto farmlandProto) |
|
|
|
|
{ |
|
|
|
|
self.Id = farmlandProto.id; |
|
|
|
|
self.SeedCfgId = farmlandProto.SeedCfgId; |
|
|
|
|
self.CropCfgId = farmlandProto.SeedCfgId; |
|
|
|
|
self.Duration = farmlandProto.duration; |
|
|
|
|
self.ExProduct = farmlandProto.exProduct; |
|
|
|
|
self.PlanSeedCfgId = farmlandProto.plantCfgId; |
|
|
|
|
self.PlanCropCfgId = farmlandProto.plantCfgId; |
|
|
|
|
self.FarmlandState = farmlandProto.farmlandState; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -40,10 +40,10 @@
|
|
|
|
|
{ |
|
|
|
|
FarmlandProto proto = new FarmlandProto(); |
|
|
|
|
proto.id = self.Id; |
|
|
|
|
proto.SeedCfgId = self.SeedCfgId; |
|
|
|
|
proto.SeedCfgId = self.CropCfgId; |
|
|
|
|
proto.duration = self.Duration; |
|
|
|
|
proto.exProduct = self.ExProduct; |
|
|
|
|
proto.plantCfgId = self.PlanSeedCfgId; |
|
|
|
|
proto.plantCfgId = self.PlanCropCfgId; |
|
|
|
|
proto.farmlandState = self.FarmlandState; |
|
|
|
|
return proto; |
|
|
|
|
} |
|
|
|
@ -72,18 +72,17 @@
|
|
|
|
|
public static void Harvest(this Farmland self) |
|
|
|
|
{ |
|
|
|
|
self.Duration = 0; |
|
|
|
|
self.SeedCfgId = 0; |
|
|
|
|
self.PlanSeedCfgId = 0; |
|
|
|
|
self.CropCfgId = 0; |
|
|
|
|
self.ExProduct = 0; |
|
|
|
|
self.FarmlandState = FarmlandState.FARMLAND_STATE_FREE; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void Seed(this Farmland self,int seedCfgId) |
|
|
|
|
public static void Seed(this Farmland self,int cropCfgId) |
|
|
|
|
{ |
|
|
|
|
self.SeedCfgId = seedCfgId; |
|
|
|
|
self.CropCfgId = cropCfgId; |
|
|
|
|
self.FarmlandState = FarmlandState.FARMLAND_STATE_SEED; |
|
|
|
|
self.PlanSeedCfgId = seedCfgId; |
|
|
|
|
self.PlanCropCfgId = cropCfgId; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|