Skip to content

Commit

Permalink
Exclude past bosses
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninjasoturi committed Nov 3, 2023
1 parent 5aeac17 commit 7a7c595
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion logic/createRaidBossList.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@ function createRaidBossList() {
$dateFormat = 'j.m.';
$timeFormat = 'H:i';
$levelList = '(' . implode(',', $config->RAID_BOSS_LIST_RAID_LEVELS). ')';
$q = my_query('SELECT pokedex_id,pokemon_form_id,date_start,date_end,concat(date_format(date_start,"%d%m%y%k"),date_format(date_end,"%d%m%y%k")) as arrkey,CASE WHEN date(date_start) = date(date_end) THEN 1 ELSE 0 END as sameDay FROM raid_bosses where raid_level in ' . $levelList . ' order by sameDay, date_start, date_end');
$q = my_query('
SELECT
pokedex_id, pokemon_form_id, date_start, date_end,
CONCAT(DATE_FORMAT(date_start,"%d%m%y%k"), DATE_FORMAT(date_end,"%d%m%y%k")) AS arrkey,
CASE WHEN date(date_start) = date(date_end) THEN 1 ELSE 0 END AS sameDay
FROM raid_bosses
WHERE raid_level IN ' . $levelList . '
AND date_end > DATE_ADD(NOW(), INTERVAL 1 HOUR)
ORDER BY sameDay, date_start, date_end
');
$list = '';
$prevStartDate = '';
$data[0] = $data[1] = [];
Expand Down

0 comments on commit 7a7c595

Please sign in to comment.