This commit is contained in:
parent
ea0e037770
commit
96a37544fd
17 changed files with 211 additions and 163 deletions
|
|
@ -202,6 +202,7 @@ namespace Server.Items
|
|||
else if ( targeted is Item )
|
||||
{
|
||||
Item item = (Item)targeted;
|
||||
int reqCharges = (int)Math.Max( 1, Math.Ceiling( item.TotalWeight / 10.0 ) );
|
||||
|
||||
if ( !item.IsChildOf( from.Backpack ) )
|
||||
{
|
||||
|
|
@ -227,9 +228,13 @@ namespace Server.Items
|
|||
{
|
||||
MessageHelper.SendLocalizedMessageTo( m_Bag, from, 1054110, 0x59 ); // Your bank box is full.
|
||||
}
|
||||
else if ( Core.ML && reqCharges > m_Bag.Charges )
|
||||
{
|
||||
from.SendLocalizedMessage( 1079932 ); //You don't have enough charges to send that much weight
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Bag.Charges--;
|
||||
m_Bag.Charges -= (Core.ML ? reqCharges : 1);
|
||||
|
||||
MessageHelper.SendLocalizedMessageTo( m_Bag, from, 1054150, 0x59 ); // The item was placed in your bank box.
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue