Replaces types with built-in types.

This commit is contained in:
Kamron Batman 2018-09-14 13:22:16 -07:00
parent fee83ce560
commit 22ab83ea9e
98 changed files with 248 additions and 248 deletions

View file

@ -33,7 +33,7 @@ namespace Server.Mobiles
if (AccountGold.Enabled && m.Account != null)
{
balance = m.Account.GetTotalGold();
if (balance >= Int32.MaxValue) { return Int32.MaxValue; }
if (balance >= int.MaxValue) { return int.MaxValue; }
}
Container bank = m.FindBankNoCreate();
@ -44,11 +44,11 @@ namespace Server.Mobiles
var checks = bank.FindItemsByType<BankCheck>();
balance += gold.Aggregate(0L, (c, t) => c + t.Amount);
if (balance >= Int32.MaxValue) { return Int32.MaxValue; }
if (balance >= int.MaxValue) { return int.MaxValue; }
balance += checks.Aggregate(0L, (c, t) => c + t.Worth);
}
return Math.Max(0, (int)Math.Min(Int32.MaxValue, balance));
return Math.Max(0, (int)Math.Min(int.MaxValue, balance));
}
public static int GetBalance(Mobile m, out Item[] gold, out Item[] checks)
@ -59,10 +59,10 @@ namespace Server.Mobiles
{
balance = m.Account.GetTotalGold();
if (balance > Int32.MaxValue)
if (balance > int.MaxValue)
{
gold = checks = new Item[0];
return Int32.MaxValue;
return int.MaxValue;
}
}
@ -74,7 +74,7 @@ namespace Server.Mobiles
checks = bank.FindItemsByType(typeof(BankCheck));
balance += gold.OfType<Gold>().Aggregate(0L, (c, t) => c + t.Amount);
if (balance >= Int32.MaxValue) { return Int32.MaxValue; }
if (balance >= int.MaxValue) { return int.MaxValue; }
balance += checks.OfType<BankCheck>().Aggregate(0L, (c, t) => c + t.Worth);
}
else
@ -82,7 +82,7 @@ namespace Server.Mobiles
gold = checks = new Item[0];
}
return Math.Max(0, (int)Math.Min(Int32.MaxValue, balance));
return Math.Max(0, (int)Math.Min(int.MaxValue, balance));
}
public static bool Withdraw(Mobile from, int amount)

View file

@ -153,7 +153,7 @@ namespace Server.Mobiles
from.SendMessage( "Duration set to: {0}", ts );
from.SendMessage( "Enter the first line to shout:" );
from.Prompt = new TownCrierLinesPrompt( m_Owner, null, new List<String>(), ts );
from.Prompt = new TownCrierLinesPrompt( m_Owner, null, new List<string>(), ts );
}
public override void OnCancel( Mobile from )
@ -167,10 +167,10 @@ namespace Server.Mobiles
{
private ITownCrierEntryList m_Owner;
private TownCrierEntry m_Entry;
private List<String> m_Lines;
private List<string> m_Lines;
private TimeSpan m_Duration;
public TownCrierLinesPrompt( ITownCrierEntryList owner, TownCrierEntry entry, List<String> lines, TimeSpan duration )
public TownCrierLinesPrompt( ITownCrierEntryList owner, TownCrierEntry entry, List<string> lines, TimeSpan duration )
{
m_Owner = owner;
m_Entry = entry;
@ -235,7 +235,7 @@ namespace Server.Mobiles
m_From.SendMessage( "Editing entry #{0}.", index + 1 );
m_From.SendMessage( "Enter the first line to shout:" );
m_From.Prompt = new TownCrierLinesPrompt( m_Owner, tce, new List<String>(), ts );
m_From.Prompt = new TownCrierLinesPrompt( m_Owner, tce, new List<string>(), ts );
}
}
}