This commit is contained in:
parent
7ad00dceac
commit
0b4c3b15d9
41 changed files with 976 additions and 144 deletions
|
|
@ -65,11 +65,8 @@ namespace Server.Gumps
|
|||
|
||||
if ( from.Backpack != null )
|
||||
totalGold += from.Backpack.GetAmount( typeof( Gold ) );
|
||||
|
||||
BankBox bank = from.FindBankNoCreate();
|
||||
|
||||
if ( bank != null )
|
||||
totalGold += bank.GetAmount( typeof( Gold ) );
|
||||
|
||||
totalGold += Banker.GetBalance( from );
|
||||
|
||||
if ( totalGold < m_VI.Price )
|
||||
{
|
||||
|
|
@ -85,9 +82,9 @@ namespace Server.Gumps
|
|||
|
||||
if ( from.Backpack != null )
|
||||
leftPrice -= from.Backpack.ConsumeUpTo( typeof( Gold ), leftPrice );
|
||||
|
||||
if ( leftPrice > 0 && bank != null )
|
||||
bank.ConsumeUpTo( typeof( Gold ), leftPrice );
|
||||
|
||||
if ( leftPrice > 0 )
|
||||
Banker.Withdraw( from, leftPrice );
|
||||
|
||||
m_Vendor.HoldGold += m_VI.Price;
|
||||
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ namespace Server.Gumps
|
|||
|
||||
CPA cpa = GetCPA( prop );
|
||||
|
||||
if ( prop.CanWrite && cpa != null && m_Mobile.AccessLevel >= cpa.WriteLevel )
|
||||
if ( prop.CanWrite && cpa != null && m_Mobile.AccessLevel >= cpa.WriteLevel && !cpa.ReadOnly )
|
||||
AddButton( x + SetOffsetX, y + SetOffsetY, SetButtonID1, SetButtonID2, i + 3, GumpButtonType.Reply, 0 );
|
||||
}
|
||||
}
|
||||
|
|
@ -282,7 +282,7 @@ namespace Server.Gumps
|
|||
|
||||
CPA attr = GetCPA( prop );
|
||||
|
||||
if ( !prop.CanWrite || attr == null || from.AccessLevel < attr.WriteLevel )
|
||||
if ( !prop.CanWrite || attr == null || from.AccessLevel < attr.WriteLevel || attr.ReadOnly )
|
||||
return;
|
||||
|
||||
Type type = prop.PropertyType;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
|
@ -89,7 +90,7 @@ namespace Server.Gumps
|
|||
AddHtmlLocalized( 158, 22, 100, 18, 1011299, false, false ); // Rename book
|
||||
|
||||
// List of entries
|
||||
ArrayList entries = m_Book.Entries;
|
||||
List<RunebookEntry> entries = m_Book.Entries;
|
||||
|
||||
for ( int i = 0; i < 16; ++i )
|
||||
{
|
||||
|
|
@ -98,8 +99,8 @@ namespace Server.Gumps
|
|||
|
||||
if ( i < entries.Count )
|
||||
{
|
||||
desc = GetName( ((RunebookEntry)entries[i]).Description );
|
||||
hue = GetMapHue( ((RunebookEntry)entries[i]).Map );
|
||||
desc = GetName( entries[i].Description );
|
||||
hue = GetMapHue( entries[i].Map );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ namespace Server.Gumps
|
|||
{
|
||||
Mobile m = states[i].Mobile;
|
||||
|
||||
if ( m != null && (m == owner ||!m.Hidden || owner.AccessLevel > m.AccessLevel || (m is PlayerMobile && ((PlayerMobile)m).VisibilityList.Contains( owner ) ) ) )
|
||||
if ( m != null && (m == owner || !m.Hidden || owner.AccessLevel > m.AccessLevel || (m is PlayerMobile && ((PlayerMobile)m).VisibilityList.Contains( owner ) ) ) )
|
||||
{
|
||||
if ( filter != null && ( m.Name == null || m.Name.ToLower().IndexOf( filter ) < 0 ) )
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue