13 changed files with 202 additions and 2 deletions
@ -0,0 +1,35 @@
|
||||
using System; |
||||
|
||||
namespace ET |
||||
{ |
||||
|
||||
|
||||
public class C2M_CabinHarvestHandler: AMActorLocationRpcHandler<Unit, C2M_CabinHarvest, M2C_CabinHarvest> |
||||
{ |
||||
protected async override ETTask Run(Unit unit, C2M_CabinHarvest request, M2C_CabinHarvest response, Action reply) |
||||
{ |
||||
try |
||||
{ |
||||
Farmland farmland = unit.GetGrandChild<Farmland>(request.FarmlandId); |
||||
if (farmland == null) |
||||
{ |
||||
response.Error = ErrorCode.ERR_FarmlandNotFound; |
||||
} |
||||
else |
||||
{ |
||||
response.Error = CabinOperate.CabinHarvest(unit, farmland); |
||||
reply(); |
||||
} |
||||
|
||||
} |
||||
catch (Exception e) |
||||
{ |
||||
response.Message = e.ToString(); |
||||
response.Error = ErrorCode.ERR_OperateFail; |
||||
reply(); |
||||
} |
||||
|
||||
await ETTask.CompletedTask; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,28 @@
|
||||
using System.Collections.Generic; |
||||
|
||||
namespace ET |
||||
{ |
||||
public struct WatherInfo |
||||
{ |
||||
public int ConfigId; |
||||
public int Cd; |
||||
public int StartTime; //game day |
||||
} |
||||
public class Weather:Entity,IAwake,ISerializeToEntity |
||||
{ |
||||
public int ConfigId; |
||||
public int Times; //当前季节触发次数 |
||||
public int Cd; |
||||
public List<int> SpringList; //春天列表 |
||||
public List<int> SummerList; |
||||
public List<int> AutumnList; |
||||
public List<int> WinterList; |
||||
public int StartTime;//开始时间,游戏时间 |
||||
public int RealStartTime; //实际时间 |
||||
public int Duration; //持续 |
||||
|
||||
|
||||
|
||||
|
||||
} |
||||
} |
Loading…
Reference in new issue