Items/Summary

* Fixed itemset bonus calculation for sets with interchangeable items.
 * Fixed multiple items for the same slot activating set boni
This commit is contained in:
Sarjuuk
2025-03-07 15:48:48 +01:00
parent 460f4857ad
commit 50a5ccbaf6
3 changed files with 10 additions and 4 deletions

View File

@@ -296,15 +296,17 @@ CLISetup::registerSetup("sql", new class extends SetupScript
$sorted[$k][$data['slot']] = $data;
}
foreach ($sorted as $i => $set)
$i = 0;
foreach ($sorted as $set)
{
ksort($set);
$vRow = $row;
$this->getDataFromSet($vRow, $set);
// is virtual set
if ($i)
// only assign a virtual setId to followup sets or the ItemSummary tool can't find the setboni
// is this the correct way..?
if ($i++)
$vRow['id'] = --$virtualId;
DB::Aowow()->query('INSERT INTO ?_itemset (?#) VALUES (?a)', array_keys($vRow), array_values($vRow));