fix a warning.
This commit is contained in:
parent
53d92a9e4e
commit
7f12ed70fe
1 changed files with 10 additions and 22 deletions
|
|
@ -17,9 +17,6 @@
|
|||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public virtual int currItemID { get { return ( IsEmpty ) ? voidItem_ID : fullItem_ID; } }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public virtual bool CanFill { get { return ( !IsFull && !IsLockedDown() ); } }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Quantity
|
||||
{
|
||||
|
|
@ -29,11 +26,14 @@
|
|||
}
|
||||
set
|
||||
{
|
||||
if( value != m_Quantity && CanFill )
|
||||
if( ( value <= 0 && IsEmpty ) || ( value >= MaxQuantity && IsFull ) )
|
||||
{
|
||||
UpdateContainer( value );
|
||||
if( value != m_Quantity )
|
||||
{
|
||||
UpdateContainer( value );
|
||||
|
||||
InvalidateProperties();
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -46,20 +46,6 @@
|
|||
m_Quantity = ( filled ) ? MaxQuantity : 0;
|
||||
}
|
||||
|
||||
public virtual bool IsLockedDown()
|
||||
{
|
||||
Multis.BaseHouse house = Multis.BaseHouse.FindHouseAt( this );
|
||||
|
||||
if( house == null || !house.IsLockedDown( this ) )
|
||||
{
|
||||
if( Parent == null )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if( IsEmpty )
|
||||
|
|
@ -104,8 +90,10 @@
|
|||
{
|
||||
m_Quantity = ( MaxQuantity > amount ) ? amount : MaxQuantity;
|
||||
}
|
||||
|
||||
Movable = IsEmpty;
|
||||
if( !IsLockedDown )
|
||||
{
|
||||
Movable = IsEmpty;
|
||||
}
|
||||
ItemID = currItemID;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue