You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
668 B

using ET.EventType;
namespace ET
{
public class PeopleMoveEnd_StartFarm : AEvent<EventType.PeopleMoveEnd>
{
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_PLANT)
{
var farmland = unit.GetGrandChild<Farmland>(targetId);
FarmlandHelper.StartFarmlandPlant(unit, people, farmland).Coroutine();
}
}
}
}