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 )]
|
[CommandProperty( AccessLevel.GameMaster )]
|
||||||
public virtual int currItemID { get { return ( IsEmpty ) ? voidItem_ID : fullItem_ID; } }
|
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 )]
|
[CommandProperty( AccessLevel.GameMaster )]
|
||||||
public int Quantity
|
public int Quantity
|
||||||
{
|
{
|
||||||
|
|
@ -29,11 +26,14 @@
|
||||||
}
|
}
|
||||||
set
|
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;
|
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 )
|
public override void OnDoubleClick( Mobile from )
|
||||||
{
|
{
|
||||||
if( IsEmpty )
|
if( IsEmpty )
|
||||||
|
|
@ -104,8 +90,10 @@
|
||||||
{
|
{
|
||||||
m_Quantity = ( MaxQuantity > amount ) ? amount : MaxQuantity;
|
m_Quantity = ( MaxQuantity > amount ) ? amount : MaxQuantity;
|
||||||
}
|
}
|
||||||
|
if( !IsLockedDown )
|
||||||
Movable = IsEmpty;
|
{
|
||||||
|
Movable = IsEmpty;
|
||||||
|
}
|
||||||
ItemID = currItemID;
|
ItemID = currItemID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue