diff --git a/Server/Hotfix/Demo/Construct/Handler/C2M_ConstructFinishHandler.cs b/Server/Hotfix/Demo/Construct/Handler/C2M_ConstructFinishHandler.cs index 5809f64..bce6620 100644 --- a/Server/Hotfix/Demo/Construct/Handler/C2M_ConstructFinishHandler.cs +++ b/Server/Hotfix/Demo/Construct/Handler/C2M_ConstructFinishHandler.cs @@ -10,7 +10,7 @@ namespace ET var building = ConstructOperate.ConstructFinish(unit, request.ConstructId); response.Error = ErrorCode.ERR_Success; reply(); - ConstructHelper.NofityConstructFinish(unit,request.ConstructId, building.Id); + ConstructHelper.NotifyConstructFinish(unit,request.ConstructId, building.Id); } catch (Exception e) { diff --git a/Server/Hotfix/Demo/Farmland/Handler/C2M_FarmlandHarvestHandler.cs b/Server/Hotfix/Demo/Farmland/Handler/C2M_FarmlandHarvestHandler.cs index 80b4e97..c26461a 100644 --- a/Server/Hotfix/Demo/Farmland/Handler/C2M_FarmlandHarvestHandler.cs +++ b/Server/Hotfix/Demo/Farmland/Handler/C2M_FarmlandHarvestHandler.cs @@ -10,11 +10,11 @@ namespace ET { try { - People people; + Farmland farmland = unit.GetGrandChild(request.FarmlandId); if (farmland!=null) { - people = unit.GetComponent().GetChild(request.PeopleId); + People people = unit.GetComponent().GetChild(request.PeopleId); if (people != null) { response.Error = FarmlandOperate.FinishHarvest(unit, farmland, people); diff --git a/Unity/Codes/Hotfix/Demo/Helper/FarmlandHelper.cs b/Unity/Codes/Hotfix/Demo/Helper/FarmlandHelper.cs index 35616fb..3cc4163 100644 --- a/Unity/Codes/Hotfix/Demo/Helper/FarmlandHelper.cs +++ b/Unity/Codes/Hotfix/Demo/Helper/FarmlandHelper.cs @@ -109,14 +109,14 @@ namespace ET public static async ETTask 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 FarmlandHarvest(Unit unit, Farmland farmland,People people) { try { C2M_FarmlandHarvest msg = new C2M_FarmlandHarvest() { FarmlandId = farmland.Id }; - M2C_FarmlandPlant resp = await unit.ZoneScene().GetComponent().Session.Call(msg) as M2C_FarmlandPlant; + M2C_FarmlandHarvest resp = await unit.ZoneScene().GetComponent().Session.Call(msg) as M2C_FarmlandHarvest; if (resp.Error == ErrorCode.ERR_Success) { FarmlandOperate.FinishHarvest(unit, farmland,people); diff --git a/Unity/Codes/Hotfix/Demo/Unit/UnitSystem.cs b/Unity/Codes/Hotfix/Demo/Unit/UnitSystem.cs index e5b6bf6..738fe01 100644 --- a/Unity/Codes/Hotfix/Demo/Unit/UnitSystem.cs +++ b/Unity/Codes/Hotfix/Demo/Unit/UnitSystem.cs @@ -252,8 +252,8 @@ namespace ET } } #if SERVER - FarmlandHelper.NotifyFarmlandRipe(unit,ripeIds); - FarmlandHelper.M2C_NtfFarmlandRipeProgress(unit,farmlandIds,ripeIds) + FarmlandHelper.NotifyFarmlandRipe(self,ripeIds); + FarmlandHelper.M2C_NtfFarmlandRipeProgress(self,farmlandIds,progresses); #endif }