opl must be sent in all cases for proper display of vendor items
minor bug in name verification
This commit is contained in:
parent
0fba903e3a
commit
5741d5e371
2 changed files with 13 additions and 17 deletions
|
|
@ -35,7 +35,7 @@ namespace Server.Misc
|
|||
|
||||
public static bool Validate( string name, int minLength, int maxLength, bool allowLetters, bool allowDigits, bool noExceptionsAtStart, int maxExceptions, char[] exceptions, string[] disallowed, string[] startDisallowed )
|
||||
{
|
||||
if ( name.Length < minLength || name.Length > maxLength )
|
||||
if ( name == null || name.Length < minLength || name.Length > maxLength )
|
||||
return false;
|
||||
|
||||
int exceptCount = 0;
|
||||
|
|
|
|||
|
|
@ -565,16 +565,14 @@ namespace Server.Mobiles
|
|||
list.Add( new BuyItemState( buyItem.Name, cont.Serial, disp == null ? (Serial) 0x7FC0FFEE : disp.Serial, buyItem.Price, buyItem.Amount, buyItem.ItemID, buyItem.Hue ) );
|
||||
count++;
|
||||
|
||||
if ( ObjectPropertyList.Enabled ) {
|
||||
if ( opls == null ) {
|
||||
opls = new List<ObjectPropertyList>();
|
||||
}
|
||||
if ( opls == null ) {
|
||||
opls = new List<ObjectPropertyList>();
|
||||
}
|
||||
|
||||
if ( disp is Item ) {
|
||||
opls.Add( ( ( Item ) disp ).PropertyList );
|
||||
} else if ( disp is Mobile ) {
|
||||
opls.Add( ( ( Mobile ) disp ).PropertyList );
|
||||
}
|
||||
if ( disp is Item ) {
|
||||
opls.Add( ( ( Item ) disp ).PropertyList );
|
||||
} else if ( disp is Mobile ) {
|
||||
opls.Add( ( ( Mobile ) disp ).PropertyList );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -613,13 +611,11 @@ namespace Server.Mobiles
|
|||
list.Add( new BuyItemState( name, cont.Serial, item.Serial, price, item.Amount, item.ItemID, item.Hue ) );
|
||||
count++;
|
||||
|
||||
if ( ObjectPropertyList.Enabled ) {
|
||||
if ( opls == null ) {
|
||||
opls = new List<ObjectPropertyList>();
|
||||
}
|
||||
|
||||
opls.Add( item.PropertyList );
|
||||
if ( opls == null ) {
|
||||
opls = new List<ObjectPropertyList>();
|
||||
}
|
||||
|
||||
opls.Add( item.PropertyList );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -644,7 +640,7 @@ namespace Server.Mobiles
|
|||
from.Send( new DisplayBuyList( this ) );
|
||||
from.Send( new MobileStatusExtended( from ) );//make sure their gold amount is sent
|
||||
|
||||
if ( ObjectPropertyList.Enabled && opls != null ) {
|
||||
if ( opls != null ) {
|
||||
for ( int i = 0; i < opls.Count; ++i ) {
|
||||
from.Send( opls[i] );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue