lots of little stuff, but mostly bank optimization, due to the weirdness of the calls
This commit is contained in:
parent
566de1c2cf
commit
f95101c201
29 changed files with 214 additions and 282 deletions
|
|
@ -115,7 +115,7 @@ namespace Server.Items
|
|||
{
|
||||
int number;
|
||||
|
||||
BankBox box = from.BankBox;
|
||||
BankBox box = from.FindBankNoCreate();
|
||||
|
||||
if ( m_Commodity != null )
|
||||
{
|
||||
|
|
@ -169,7 +169,7 @@ namespace Server.Items
|
|||
}
|
||||
else if ( targeted is Item )
|
||||
{
|
||||
BankBox box = from.BankBox;
|
||||
BankBox box = from.FindBankNoCreate();
|
||||
|
||||
if ( box != null && m_Deed.IsChildOf( box ) && ((Item)targeted).IsChildOf( box ) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
BankBox box = from.BankBox;
|
||||
BankBox box = from.FindBankNoCreate();
|
||||
|
||||
if ( box != null && IsChildOf( box ) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -392,7 +392,7 @@ namespace Server.Items
|
|||
|
||||
writer.Write( count );
|
||||
|
||||
for ( int i = 0; i < list.Count; ++i )
|
||||
for ( int i = 0; i < count; ++i )
|
||||
{
|
||||
KeyValuePair<Item, Point3D> kvp = list[i];
|
||||
Item item = kvp.Key;
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ namespace Server.Items
|
|||
{
|
||||
from.SendLocalizedMessage( 1062089 ); // You cannot use that here.
|
||||
}
|
||||
else if ( from.BankBox == null || !from.BankBox.TryDropItem( from, item, false ) )
|
||||
else if ( !from.BankBox.TryDropItem( from, item, false ) )
|
||||
{
|
||||
MessageHelper.SendLocalizedMessageTo( m_Bag, from, 1054110, 0x59 ); // Your bank box is full.
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue