Merge pull request #17 from Hjornskar/patch-3

TOL Fixes to Banker.cs OnSpeech
This commit is contained in:
Mark Sturgill 2016-06-28 10:47:25 -07:00 committed by GitHub
commit f11c19bc83

View file

@ -326,7 +326,7 @@ namespace Server.Mobiles
{
BankBox box = e.Mobile.FindBankNoCreate();
if (box == null || !box.ConsumeTotal(typeof(Gold), amount))
if (box == null || !Withdraw(e.Mobile, amount))
{
this.Say(500384); // Ah, art thou trying to fool me? Thou hast not so much gold!
}
@ -351,12 +351,14 @@ namespace Server.Mobiles
break;
}
BankBox box = e.Mobile.FindBankNoCreate();
if ( box != null )
this.Say( 1042759, box.TotalGold.ToString() ); // Thy current bank balance is ~1_AMOUNT~ gold.
if ( AccountGold.Enabled && e.Mobile.Account != null )
{
this.Say( 1155855, String.Format("{0:#,0}\t{1:#,0}", e.Mobile.Account.TotalPlat, e.Mobile.Account.TotalGold) ); // Thy current bank balance is ~1_AMOUNT~ platinum and ~2_AMOUNT~ gold.
}
else
this.Say( 1042759, "0" ); // Thy current bank balance is ~1_AMOUNT~ gold.
{
this.Say( 1042759, GetBalance(e.Mobile).ToString("#,0") ); // Thy current bank balance is ~1_AMOUNT~ gold.
}
break;
}
@ -378,6 +380,9 @@ namespace Server.Mobiles
{
e.Handled = true;
if ( AccountGold.Enabled )
break;
if ( e.Mobile.Criminal )
{
this.Say( 500389 ); // I will not do business with a criminal!
@ -455,4 +460,4 @@ namespace Server.Mobiles
int version = reader.ReadInt();
}
}
}
}