fix: Fixes bank box withdraw using account gold (#671)

Fixes various locations where account gold is not used.
This commit is contained in:
Kamron Batman 2021-08-02 19:23:25 -07:00 • committed by GitHub
parent 677e44d35f
commit 3dc406624e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 28 deletions

View file

@ -161,22 +161,14 @@ namespace Server.Engines.Quests.Collector
return;
}
if (player.Backpack?.ConsumeTotal(typeof(Gold), 10) == true)
if (player.Backpack?.ConsumeTotal(typeof(Gold), 10) == true || Banker.Withdraw(player, 10))
{
obj.Complete();
}
else
{
if (player.FindBankNoCreate()?.ConsumeTotal(typeof(Gold), 10) == true)
{
obj.Complete();
}
else
{
player.SendLocalizedMessage(
1055108
); // You don't have enough gold to buy the sheet music.
}
// You don't have enough gold to buy the sheet music.
player.SendLocalizedMessage(1055108);
}
}
}