This commit is contained in:
mark 2012-11-10 20:06:36 +00:00
parent 8ff1a903a0
commit 14873aaa3e
78 changed files with 360 additions and 231 deletions

View file

@ -5,6 +5,7 @@ using Server;
using Server.Items;
using Server.Engines.Harvest;
using Server.ContextMenus;
using Server.Network;
namespace Server.Items
{
@ -80,7 +81,7 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
if ( HarvestSystem == null )
if ( HarvestSystem == null || Deleted )
return;
Point3D loc = GetWorldLocation();
@ -90,8 +91,13 @@ namespace Server.Items
from.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3E9, 1019045 ); // I can't reach that
return;
}
if ( !( HarvestSystem is Mining ) )
else if ( !this.IsAccessibleTo( from ) )
{
this.PublicOverheadMessage( MessageType.Regular, 0x3E9, 1061637 ); // You are not allowed to access this.
return;
}
if ( !(this.HarvestSystem is Mining) )
from.SendLocalizedMessage( 1010018 ); // What do you want to use this item on?
HarvestSystem.BeginHarvesting( from, this );