a few more fixes.
This commit is contained in:
parent
1f788d60d9
commit
53d92a9e4e
3 changed files with 45 additions and 19 deletions
|
|
@ -17,6 +17,9 @@
|
||||||
[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
|
||||||
{
|
{
|
||||||
|
|
@ -26,7 +29,7 @@
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if( value != m_Quantity )
|
if( value != m_Quantity && CanFill )
|
||||||
{
|
{
|
||||||
UpdateContainer( value );
|
UpdateContainer( value );
|
||||||
|
|
||||||
|
|
@ -43,6 +46,20 @@
|
||||||
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 )
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
using System;
|
|
||||||
using Server.Items;
|
|
||||||
|
|
||||||
namespace Server.Items
|
namespace Server.Items
|
||||||
{
|
{
|
||||||
public class GamblingStone : Item
|
public class GamblingStone : Item
|
||||||
|
|
@ -27,7 +24,8 @@ namespace Server.Items
|
||||||
}
|
}
|
||||||
|
|
||||||
[Constructable]
|
[Constructable]
|
||||||
public GamblingStone() : base( 0xED4 )
|
public GamblingStone()
|
||||||
|
: base( 0xED4 )
|
||||||
{
|
{
|
||||||
Movable = false;
|
Movable = false;
|
||||||
Hue = 0x56;
|
Hue = 0x56;
|
||||||
|
|
@ -59,7 +57,17 @@ namespace Server.Items
|
||||||
|
|
||||||
if( roll == 0 ) // Jackpot
|
if( roll == 0 ) // Jackpot
|
||||||
{
|
{
|
||||||
|
int maxCheck = 1000000;
|
||||||
|
|
||||||
from.SendMessage( 0x35, "You win the {0}gp jackpot!", m_GamblePot );
|
from.SendMessage( 0x35, "You win the {0}gp jackpot!", m_GamblePot );
|
||||||
|
|
||||||
|
while( m_GamblePot > maxCheck )
|
||||||
|
{
|
||||||
|
from.AddToBackpack( new BankCheck( maxCheck ) );
|
||||||
|
|
||||||
|
m_GamblePot -= maxCheck;
|
||||||
|
}
|
||||||
|
|
||||||
from.AddToBackpack( new BankCheck( m_GamblePot ) );
|
from.AddToBackpack( new BankCheck( m_GamblePot ) );
|
||||||
|
|
||||||
m_GamblePot = 2500;
|
m_GamblePot = 2500;
|
||||||
|
|
@ -90,7 +98,8 @@ namespace Server.Items
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public GamblingStone( Serial serial ) : base( serial )
|
public GamblingStone( Serial serial )
|
||||||
|
: base( serial )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue