fix(core/blackmarket): enforce auction minimum starting bid [porte d ArgusCore 888e3f24]
This commit is contained in:
@@ -452,6 +452,13 @@ bool BlackMarketEntry::ValidateBid(uint64 bid) const
|
|||||||
if (bid >= BMAH_MAX_BID)
|
if (bid >= BMAH_MAX_BID)
|
||||||
return false;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,12 @@ void WorldSession::HandleVoidStorageUnlock(WorldPackets::VoidStorage::UnlockVoid
|
|||||||
return;
|
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->ModifyMoney(-int64(VOID_STORAGE_UNLOCK_COST));
|
||||||
_player->UnlockVoidStorage();
|
_player->UnlockVoidStorage();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user