|
|
|
@ -109,14 +109,14 @@ namespace ET
|
|
|
|
|
|
|
|
|
|
public static async ETTask<int> StartFarmlandHarvest(Unit unit, People people, Farmland farmland) |
|
|
|
|
{ |
|
|
|
|
return await PeopleHelper.ChangeBehave(unit, people, ConstBehaveType.BEHAVE_PREPARE_HARVEST,farmland.Id); |
|
|
|
|
return await PeopleHelper.ChangeBehave(unit, people, ConstBehaveType.BEHAVE_HARVEST,farmland.Id); |
|
|
|
|
} |
|
|
|
|
public static async ETTask<int> FarmlandHarvest(Unit unit, Farmland farmland,People people) |
|
|
|
|
{ |
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
|
C2M_FarmlandHarvest msg = new C2M_FarmlandHarvest() { FarmlandId = farmland.Id }; |
|
|
|
|
M2C_FarmlandPlant resp = await unit.ZoneScene().GetComponent<SessionComponent>().Session.Call(msg) as M2C_FarmlandPlant; |
|
|
|
|
M2C_FarmlandHarvest resp = await unit.ZoneScene().GetComponent<SessionComponent>().Session.Call(msg) as M2C_FarmlandHarvest; |
|
|
|
|
if (resp.Error == ErrorCode.ERR_Success) |
|
|
|
|
{ |
|
|
|
|
FarmlandOperate.FinishHarvest(unit, farmland,people); |
|
|
|
|