From 95ce86a665f1708eadf8ef2531ee716a55b28996 Mon Sep 17 00:00:00 2001 From: wserver/wangdisen <1065498738@qq.com> Date: Thu, 18 Aug 2022 16:53:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E4=B8=AA=E6=94=B6?= =?UTF-8?q?=E8=8E=B7=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Demo/Construct/Handler/C2M_ConstructFinishHandler.cs | 2 +- .../Demo/Farmland/Handler/C2M_FarmlandHarvestHandler.cs | 4 ++-- Unity/Codes/Hotfix/Demo/Helper/FarmlandHelper.cs | 4 ++-- Unity/Codes/Hotfix/Demo/Unit/UnitSystem.cs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) 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 }