fix(core/blackmarket): enforce auction minimum starting bid [porte d ArgusCore 888e3f24]

This commit is contained in:
SylvaniaCore deploy
2026-07-26 12:52:43 +00:00
parent d89d733051
commit a5c511d04a
2 changed files with 13 additions and 0 deletions
@@ -452,6 +452,13 @@ bool BlackMarketEntry::ValidateBid(uint64 bid) const
if (bid >= BMAH_MAX_BID)
return false;
// GetMinIncrement() is 0 while _currentBid is still 0 (no bids placed yet), which
// otherwise lets any bid of 1 copper or more win a fresh auction outright, bypassing
// the auction's actual starting price.
if (BlackMarketTemplate const* templ = GetTemplate())
if (bid < templ->MinBid)
return false;
return true;
}
@@ -46,6 +46,12 @@ void WorldSession::HandleVoidStorageUnlock(WorldPackets::VoidStorage::UnlockVoid
return;
}
if (!_player->HasEnoughMoney(uint64(VOID_STORAGE_UNLOCK_COST)))
{
TC_LOG_DEBUG("network", "WORLD: HandleVoidStorageUnlock - Player ({}, name: {}) does not have enough money to unlock void storage.", _player->GetGUID().ToString(), _player->GetName());
return;
}
_player->ModifyMoney(-int64(VOID_STORAGE_UNLOCK_COST));
_player->UnlockVoidStorage();
}