mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
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:
@@ -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));
|
||||
|
||||
1
setup/updates/1741361137_01.sql
Normal file
1
setup/updates/1741361137_01.sql
Normal file
@@ -0,0 +1 @@
|
||||
UPDATE `aowow_dbversion` SET `sql` = CONCAT(IFNULL(`sql`, ''), ' itemset'), `build` = CONCAT(IFNULL(`build`, ''), ' itemsets');
|
||||
@@ -2483,6 +2483,7 @@ Summary.prototype = {
|
||||
if (g_items[p]) {
|
||||
var
|
||||
s = g_items[p].jsonequip.itemset,
|
||||
t = g_items[p].jsonequip.slot,
|
||||
_ = g_itemsets[s];
|
||||
|
||||
if (_) {
|
||||
@@ -2491,7 +2492,9 @@ Summary.prototype = {
|
||||
if (itemsetpcs[s] == null) {
|
||||
itemsetpcs[s] = {};
|
||||
}
|
||||
itemsetpcs[s][p] = 1;
|
||||
// aowow: group by slot, not itemId, to avoid multiple items of the same slot activating boni
|
||||
// itemsetpcs[s][p] = 1;
|
||||
itemsetpcs[s][t] = 1;
|
||||
itemsetbak[s] = _;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user