protected override void OnTarget(Mobile from, object o) { IPoint3D p = o as IPoint3D; if (o is Mobile) { mob.SendMessage("You can't plant that on a creature!"); } else if (o is Item && o is TAVFarmSpawn) { if (cropdel) { TAVFarmSpawn FarmCrop = (TAVFarmSpawn)o; if (FarmCrop.Farmer == mob) { FarmCrop.Delete(); } else { mob.SendMessage("That is not your crop!"); } } else { mob.SendMessage("You can't plant on top of another crop!"); } } else if (!cropdel) { TAVFarmSpawn plantit = new TAVFarmSpawn(pick, mob); plantit.MoveToWorld(new Point3D(p.X, p.Y, p.Z), mob.Map); TeiravonMobile tm = (TeiravonMobile)mob; tm.FarmCrops += 1; } }
public InternalTimer(TAVFarmSpawn spawner, TimeSpan delay) : base(delay) { if (spawner.IsFull) { Priority = TimerPriority.FiveSeconds; } else { Priority = TimerPriority.OneSecond; } m_Spawner = spawner; }