Fixes implicit ternary expressions
This commit is contained in:
parent
c85b0a740c
commit
ff26dfa375
345 changed files with 1905 additions and 2336 deletions
|
|
@ -97,8 +97,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
if ( item.Name != null )
|
||||
return item.Name;
|
||||
else
|
||||
return item.LabelNumber.ToString();
|
||||
return item.LabelNumber.ToString();
|
||||
}
|
||||
|
||||
public bool IsSellable( Item item )
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ namespace Server.Mobiles
|
|||
|
||||
from.Stabled.Remove( pet );
|
||||
|
||||
(@from as PlayerMobile)?.AutoStabled.Remove( pet );
|
||||
(from as PlayerMobile)?.AutoStabled.Remove( pet );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -373,7 +373,7 @@ namespace Server.Mobiles
|
|||
|
||||
from.Stabled.RemoveAt( i );
|
||||
|
||||
(@from as PlayerMobile)?.AutoStabled.Remove( pet );
|
||||
(from as PlayerMobile)?.AutoStabled.Remove( pet );
|
||||
|
||||
--i;
|
||||
|
||||
|
|
@ -468,4 +468,4 @@ namespace Server.Mobiles
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,12 +40,13 @@ namespace Server.Mobiles
|
|||
SayTo( pm, 502089 ); // You cannot be a member of the Thieves' Guild while you are Young.
|
||||
return false;
|
||||
}
|
||||
else if ( pm.Kills > 0 )
|
||||
|
||||
if ( pm.Kills > 0 )
|
||||
{
|
||||
SayTo( pm, 501050 ); // This guild is for cunning thieves, not oafish cutthroats.
|
||||
return false;
|
||||
}
|
||||
else if ( pm.Skills[SkillName.Stealing].Base < 60.0 )
|
||||
if ( pm.Skills[SkillName.Stealing].Base < 60.0 )
|
||||
{
|
||||
SayTo( pm, 501051 ); // You must be at least a journeyman pickpocket to join this elite organization.
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -82,17 +82,13 @@ namespace Server.Mobiles
|
|||
deed.Delete();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
PublicOverheadMessage( MessageType.Regular, 0x3B2, 500390 ); // Your bank box is full.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PublicOverheadMessage( MessageType.Regular, 0x3B2, 500607 ); // I'm not interested in that.
|
||||
|
||||
PublicOverheadMessage( MessageType.Regular, 0x3B2, 500390 ); // Your bank box is full.
|
||||
return false;
|
||||
}
|
||||
|
||||
PublicOverheadMessage( MessageType.Regular, 0x3B2, 500607 ); // I'm not interested in that.
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.OnDragDrop (from, dropped);
|
||||
|
|
|
|||
|
|
@ -935,7 +935,7 @@ namespace Server.Mobiles
|
|||
|
||||
AddHtml( 250, 95, 500, 20, "Change this tip message", false, false );
|
||||
AddHtml( 100, 190, 50, 20, "Message", false, false );
|
||||
AddHtml( 100, 210, 450, 40, m_Barkeeper.TipMessage == null ? "No current message" : m_Barkeeper.TipMessage, true, false );
|
||||
AddHtml( 100, 210, 450, 40, m_Barkeeper.TipMessage ?? "No current message", true, false );
|
||||
|
||||
AddButton( 60, 210, 4005, 4007, GetButtonID( 3, 0 ), GumpButtonType.Reply, 0 );
|
||||
|
||||
|
|
@ -951,7 +951,7 @@ namespace Server.Mobiles
|
|||
|
||||
AddHtml( 250, 95, 500, 20, "Remove this tip message", false, false );
|
||||
AddHtml( 100, 190, 50, 20, "Message", false, false );
|
||||
AddHtml( 100, 210, 450, 40, m_Barkeeper.TipMessage == null ? "No current message" : m_Barkeeper.TipMessage, true, false );
|
||||
AddHtml( 100, 210, 450, 40, m_Barkeeper.TipMessage ?? "No current message", true, false );
|
||||
|
||||
AddButton( 60, 210, 4005, 4007, GetButtonID( 4, 0 ), GumpButtonType.Reply, 0 );
|
||||
|
||||
|
|
|
|||
|
|
@ -568,21 +568,19 @@ namespace Server.Mobiles
|
|||
{
|
||||
return ChargePerRealWorldDay / 12;
|
||||
}
|
||||
else
|
||||
|
||||
long total = 0;
|
||||
foreach ( VendorItem vi in m_SellItems.Values )
|
||||
{
|
||||
long total = 0;
|
||||
foreach ( VendorItem vi in m_SellItems.Values )
|
||||
{
|
||||
total += vi.Price;
|
||||
}
|
||||
|
||||
total -= 500;
|
||||
|
||||
if ( total < 0 )
|
||||
total = 0;
|
||||
|
||||
return (int)( 20 + (total / 500) );
|
||||
total += vi.Price;
|
||||
}
|
||||
|
||||
total -= 500;
|
||||
|
||||
if ( total < 0 )
|
||||
total = 0;
|
||||
|
||||
return (int)( 20 + (total / 500) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -600,10 +598,8 @@ namespace Server.Mobiles
|
|||
|
||||
return (int)( 60 + (total / 500) * 3 );
|
||||
}
|
||||
else
|
||||
{
|
||||
return ChargePerDay * 12;
|
||||
}
|
||||
|
||||
return ChargePerDay * 12;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -616,10 +612,8 @@ namespace Server.Mobiles
|
|||
{
|
||||
return House.IsOwner( m );
|
||||
}
|
||||
else
|
||||
{
|
||||
return m == Owner;
|
||||
}
|
||||
|
||||
return m == Owner;
|
||||
}
|
||||
|
||||
protected List<Item> GetItems()
|
||||
|
|
@ -883,49 +877,39 @@ namespace Server.Mobiles
|
|||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1062493 ); // Your vendor has sufficient funds for operation and cannot accept this gold.
|
||||
|
||||
return false;
|
||||
}
|
||||
from.SendLocalizedMessage( 1062493 ); // Your vendor has sufficient funds for operation and cannot accept this gold.
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
||||
if ( BankAccount < 1000000 )
|
||||
{
|
||||
if ( BankAccount < 1000000 )
|
||||
{
|
||||
SayTo( from, 503210 ); // I'll take that to fund my services.
|
||||
SayTo( from, 503210 ); // I'll take that to fund my services.
|
||||
|
||||
BankAccount += item.Amount;
|
||||
item.Delete();
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1062493 ); // Your vendor has sufficient funds for operation and cannot accept this gold.
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bool newItem = ( GetVendorItem( item ) == null );
|
||||
|
||||
if ( Backpack != null && Backpack.TryDropItem( from, item, false ) )
|
||||
{
|
||||
if ( newItem )
|
||||
OnItemGiven( from, item );
|
||||
BankAccount += item.Amount;
|
||||
item.Delete();
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
SayTo( from, 503211 ); // I can't carry any more.
|
||||
return false;
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage( 1062493 ); // Your vendor has sufficient funds for operation and cannot accept this gold.
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool newItem = ( GetVendorItem( item ) == null );
|
||||
|
||||
if ( Backpack != null && Backpack.TryDropItem( from, item, false ) )
|
||||
{
|
||||
if ( newItem )
|
||||
OnItemGiven( from, item );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
SayTo( from, 503211 ); // I can't carry any more.
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CheckNonlocalDrop( Mobile from, Item item, Item target )
|
||||
|
|
@ -940,11 +924,9 @@ namespace Server.Mobiles
|
|||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
SayTo( from, 503209 ); // I can only take item from the shop owner.
|
||||
return false;
|
||||
}
|
||||
|
||||
SayTo( from, 503209 ); // I can only take item from the shop owner.
|
||||
return false;
|
||||
}
|
||||
|
||||
private void NonLocalDropCallback( object state )
|
||||
|
|
@ -990,13 +972,12 @@ namespace Server.Mobiles
|
|||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
SayTo( from, 503223 ); // If you'd like to purchase an item, just ask.
|
||||
return false;
|
||||
}
|
||||
|
||||
SayTo( from, 503223 ); // If you'd like to purchase an item, just ask.
|
||||
return false;
|
||||
}
|
||||
else if ( BaseHouse.NewVendorSystem && IsOwner( from ) )
|
||||
|
||||
if ( BaseHouse.NewVendorSystem && IsOwner( from ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1359,8 +1340,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
if ( BaseHouse.NewVendorSystem )
|
||||
return TimeSpan.FromDays( 1.0 );
|
||||
else
|
||||
return TimeSpan.FromMinutes( Clock.MinutesPerUODay );
|
||||
return TimeSpan.FromMinutes( Clock.MinutesPerUODay );
|
||||
}
|
||||
|
||||
private PlayerVendor m_Vendor;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue