Fix max donation Alliance Bonuses

Fix max donation Alliance Bonuses - cannot donate over max
This commit is contained in:
novgorodschi catalin
2026-08-04 11:05:54 +03:00
parent 3946603591
commit b79ee61855
5 changed files with 59 additions and 1 deletions
+10
View File
@@ -71,6 +71,16 @@ if (isset($_POST['ab_donate'])) {
: 'Not enough resources in this village.';
$abError = true;
break;
case AllianceBonus::DONATE_OVER_MAX:
// La ultimul nivel surplusul ar ramane blocat, deci spunem exact
// cat se mai poate dona.
$abMessage = sprintf(
defined('ALLYBONUS_MSG_OVERMAX') ? ALLYBONUS_MSG_OVERMAX
: 'This is the final level: you can donate at most %s more resources.',
number_format(AllianceBonus::$overMaxAllowed)
);
$abError = true;
break;
case AllianceBonus::DONATE_NO_GOLD:
$abMessage = defined('ALLYBONUS_MSG_NOGOLD') ? ALLYBONUS_MSG_NOGOLD
: 'Not enough gold to triple this donation.';