using ET.EventType; namespace ET { public class PeopleMoveEnd_StartHarvest : AEvent { protected override void Run(PeopleMoveEnd args) { var people = args.People; var unit = UnitHelper.GetMyUnitFromZoneScene(people.ZoneScene()); int behave = people.GetBehaveType(); var targetId = people.GetTargetId(); if (behave == ConstBehaveType.BEHAVE_PREPARE_HARVEST) { var farmland = unit.GetGrandChild(targetId); FarmlandHelper.StartFarmlandHarvest(unit, people, farmland).Coroutine(); } } } }