public override void FinishHarvesting(Mobile from, Item tool, HarvestDefinition def, object toHarvest, object locked) { from.EndAction(locked); if (!CheckHarvest(from, tool)) { return; } int tileID; Map map; Point3D loc; if (!GetHarvestDetails(from, tool, toHarvest, out tileID, out map, out loc)) { OnBadHarvestTarget(from, tool, toHarvest); return; } else if (!def.Validate(tileID)) { OnBadHarvestTarget(from, tool, toHarvest); return; } if (!CheckRange(from, tool, def, map, loc, true)) { return; } else if (!CheckHarvest(from, tool, def, toHarvest)) { return; } double skillBase = from.Skills[def.Skill].Base; double skillValue = from.Skills[def.Skill].Value; StaticTarget harvestTarget = toHarvest as StaticTarget; if (harvestTarget != null) { if (from.CheckSkill(def.Skill, 0, 120)) { if (tool is IUsesRemaining) { IUsesRemaining toolWithUses = (IUsesRemaining)tool; toolWithUses.ShowUsesRemaining = true; if (toolWithUses.UsesRemaining > 0) { --toolWithUses.UsesRemaining; } if (toolWithUses.UsesRemaining < 1) { tool.Delete(); def.SendMessageTo(from, def.ToolBrokeMessage); } } } BaseHarvestablePhase hTreePhase = BaseHarvestablePhase.LookupPhase(harvestTarget.ItemID); if (hTreePhase != null && hTreePhase is BaseTreeHarvestPhase) { hTreePhase.Harvest(from, harvestTarget.ItemID, harvestTarget.Location, map); } } }