Fix #446 TFS 1.3 premium time

which was implemented here: https://github.com/otland/forgottenserver/pull/2813
and merged 28th october 2020.
This commit is contained in:
Znote
2020-10-31 14:29:29 +01:00
parent a88d3710fb
commit fa5fac75a7
4 changed files with 28 additions and 14 deletions

View File

@@ -32,11 +32,7 @@ if ($house !== false && $config['ServerEngine'] === 'TFS_10') {
if (user_logged_in() === true && $player['account_id'] == $session_user_id) {
// Does player have or need premium?
$premstatus = $config['houseConfig']['requirePremium'];
if ($premstatus) {
$premstatus = mysql_select_single("SELECT `premdays` FROM `accounts` WHERE `id`='".$player['account_id']."' LIMIT 1;");
$premstatus = ($premstatus['premdays'] > 0) ? true : false;
} else $premstatus = true;
$premstatus = ($config['houseConfig']['requirePremium'] && $user_data['premdays'] == 0) ? false : true;
if ($premstatus) {
// Can player have or bid on more houses?
$pHouseCount = mysql_select_single("SELECT COUNT('id') AS `value` FROM `houses` WHERE ((`highest_bidder`='$bid_char' AND `owner`='$bid_char') OR (`highest_bidder`='$bid_char') OR (`owner`='$bid_char')) AND `id`!='".$house['id']."' LIMIT 1;");