fix: Fixes bank box withdraw using account gold (#671)
Fixes various locations where account gold is not used.
This commit is contained in:
parent
677e44d35f
commit
3dc406624e
5 changed files with 11 additions and 28 deletions
|
|
@ -280,15 +280,7 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
|
||||
public override bool HandlesOnSpeech(Mobile from)
|
||||
{
|
||||
if (from.InRange(Location, 12))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.HandlesOnSpeech(from);
|
||||
}
|
||||
public override bool HandlesOnSpeech(Mobile from) => from.InRange(Location, 12) || base.HandlesOnSpeech(from);
|
||||
|
||||
public override void OnSpeech(SpeechEventArgs e)
|
||||
{
|
||||
|
|
@ -441,11 +433,11 @@ namespace Server.Mobiles
|
|||
else
|
||||
{
|
||||
Say(
|
||||
1042673,
|
||||
1042673, // Into your bank box I have placed a check in the amount of:
|
||||
AffixType.Append,
|
||||
amount.ToString(),
|
||||
""
|
||||
); // Into your bank box I have placed a check in the amount of:
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -230,8 +230,7 @@ namespace Server.Mobiles
|
|||
|
||||
if (!bought && totalCost >= 2000)
|
||||
{
|
||||
cont = buyer.FindBankNoCreate();
|
||||
if (cont?.ConsumeTotal(typeof(Gold), totalCost) == true)
|
||||
if (Banker.Withdraw(buyer, totalCost))
|
||||
{
|
||||
bought = true;
|
||||
fromBank = true;
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ namespace Server.Mobiles
|
|||
Container bank = from.FindBankNoCreate();
|
||||
|
||||
if (!(from.Backpack?.GetAmount(typeof(Gold)) >= 30) &&
|
||||
!(bank?.GetAmount(typeof(Gold)) >= 30))
|
||||
!(Banker.GetBalance(from) >= 30))
|
||||
{
|
||||
SayTo(from, 1042556); // Thou dost not have enough gold, not even in thy bank account.
|
||||
}
|
||||
|
|
@ -246,8 +246,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
Container bank = from.FindBankNoCreate();
|
||||
|
||||
if (from.Backpack?.ConsumeTotal(typeof(Gold), 30) == true ||
|
||||
bank?.ConsumeTotal(typeof(Gold), 30) == true)
|
||||
if (from.Backpack?.ConsumeTotal(typeof(Gold), 30) == true || Banker.Withdraw(from, 30))
|
||||
{
|
||||
pet.ControlTarget = null;
|
||||
pet.ControlOrder = OrderType.Stay;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue