public override void OnDoubleClick(Mobile from) { BankBox box = from.BankBox; if (box != null && IsChildOf(box)) { Delete(); int deposited = 0; int toAdd = m_Worth; Abyssalcoin Abyssalcoin; while (toAdd > 60000) { Abyssalcoin = new Abyssalcoin(60000); if (box.TryDropItem(from, Abyssalcoin, false)) { toAdd -= 60000; deposited += 60000; } else { Abyssalcoin.Delete(); from.AddToBackpack(new AbyssalCoinBankCheck(toAdd)); toAdd = 0; break; } } if (toAdd > 0) { Abyssalcoin = new Abyssalcoin(toAdd); if (box.TryDropItem(from, Abyssalcoin, false)) { deposited += toAdd; } else { Abyssalcoin.Delete(); from.AddToBackpack(new AbyssalCoinBankCheck(toAdd)); } } // Tokens was deposited in your Backpack: from.SendMessage(m_Worth / 1000 + "Abyssal Coins were placed in your backpack."); } else { from.SendLocalizedMessage(1047026); } }
public override void OnDoubleClick( Mobile from ) { BankBox box = from.BankBox; if ( box != null && IsChildOf( box ) ) { Delete(); int deposited = 0; int toAdd = m_Worth; Abyssalcoin Abyssalcoin; while ( toAdd > 60000 ) { Abyssalcoin = new Abyssalcoin( 60000 ); if ( box.TryDropItem( from, Abyssalcoin, false ) ) { toAdd -= 60000; deposited += 60000; } else { Abyssalcoin.Delete(); from.AddToBackpack( new AbyssalCoinBankCheck( toAdd ) ); toAdd = 0; break; } } if ( toAdd > 0 ) { Abyssalcoin = new Abyssalcoin( toAdd ); if ( box.TryDropItem( from, Abyssalcoin, false ) ) { deposited += toAdd; } else { Abyssalcoin.Delete(); from.AddToBackpack( new AbyssalCoinBankCheck( toAdd ) ); } } // Tokens was deposited in your Backpack: from.SendMessage( m_Worth/1000 + "Abyssal Coins were placed in your backpack." ); } else { from.SendLocalizedMessage( 1047026 ); } }