http://jira.runuo.com/browse/RUNUO-12 House decay stages should pass at random intervals http://jira.runuo.com/browse/RUNUO-113 Nature's Fury cast issues http://jira.runuo.com/browse/RUNUO-114 Animal Form inaccuracies and issue with Talisman of the Fey http://jira.runuo.com/browse/RUNUO-115 BaseWaterContainer fill messages and behavior http://jira.runuo.com/browse/RUNUO-116 AdminGump filter for accounts owning houses http://jira.runuo.com/browse/RUNUO-118 Seeds should be stackable http://jira.runuo.com/browse/RUNUO-119 Typo in case of a jailbreak http://jira.runuo.com/browse/RUNUO-120 Prevent creation of invalid account names http://jira.runuo.com/browse/RUNUO-121
35 lines
No EOL
914 B
C#
35 lines
No EOL
914 B
C#
using System;
|
|
using Server;
|
|
using Server.Targeting;
|
|
|
|
namespace Server.Engines.Plants
|
|
{
|
|
public class PlantPourTarget : Target
|
|
{
|
|
private PlantItem m_Plant;
|
|
|
|
public PlantPourTarget( PlantItem plant ) : base( 3, true, TargetFlags.None )
|
|
{
|
|
m_Plant = plant;
|
|
}
|
|
|
|
protected override void OnTarget( Mobile from, object targeted )
|
|
{
|
|
if ( !m_Plant.Deleted && from.InRange( m_Plant.GetWorldLocation(), 3 ) && targeted is Item )
|
|
{
|
|
m_Plant.Pour( from, (Item)targeted );
|
|
}
|
|
}
|
|
|
|
protected override void OnTargetFinish( Mobile from )
|
|
{
|
|
if ( !m_Plant.Deleted && m_Plant.PlantStatus < PlantStatus.DecorativePlant && from.InRange( m_Plant.GetWorldLocation(), 3 ) && m_Plant.IsUsableBy( from ) )
|
|
{
|
|
if ( from.HasGump( typeof( MainPlantGump ) ) )
|
|
from.CloseGump( typeof( MainPlantGump ) );
|
|
|
|
from.SendGump( new MainPlantGump( m_Plant ) );
|
|
}
|
|
}
|
|
}
|
|
} |