Fix login.php boosted creature & boss (not sure exact version, but should be 14.12 or around)

Thanks @opentibiabr team
This commit is contained in:
slawkens 2025-05-13 16:29:19 +02:00
parent ef6549c17c
commit c48b800631

View File

@ -86,12 +86,25 @@ switch ($action) {
die(json_encode(['eventlist' => $eventlist, 'lastupdatetimestamp' => time()])); die(json_encode(['eventlist' => $eventlist, 'lastupdatetimestamp' => time()]));
case 'boostedcreature': case 'boostedcreature':
$clientVersion = (int)setting('core.client');
// 14.00 and up
if ($clientVersion >= 1400) {
$creatureBoost = $db->query("SELECT * FROM " . $db->tableName('boosted_creature'))->fetchAll();
$bossBoost = $db->query("SELECT * FROM " . $db->tableName('boosted_boss'))->fetchAll();
die(json_encode([
'boostedcreature' => true,
'creatureraceid' => intval($creatureBoost[0]['raceid']),
'bossraceid' => intval($bossBoost[0]['raceid'])
]));
}
// lower clients
$boostedCreature = BoostedCreature::first(); $boostedCreature = BoostedCreature::first();
die(json_encode([ die(json_encode([
'boostedcreature' => true, 'boostedcreature' => true,
'raceid' => $boostedCreature->raceid 'raceid' => $boostedCreature->raceid
])); ]));
break;
case 'login': case 'login':