mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Core/Conditions
* minor rework * fixed columns of tab item loot * fixed lookup of classes/races (as they are the only type used as bitmask) * implemented reverse lookups everywhere (arguably class, race and skill are too spammy) * reverse lookups no longer contain redundant data * changed how the groupKey is set, so there are no more cases that can't be looked up * fixes #273 * title: added tab 'criteria-of'
This commit is contained in:
@@ -246,8 +246,7 @@ class Loot
|
||||
continue;
|
||||
}
|
||||
|
||||
$cndKey = $lootId . ':' . (-1 * ($set['reference'] ?? -$set['content']));
|
||||
$loot[$cndKey] = $set;
|
||||
$loot[] = $set;
|
||||
}
|
||||
|
||||
foreach (array_keys($nGroupEquals) as $k)
|
||||
@@ -264,10 +263,10 @@ class Loot
|
||||
$groupChances[$k] = (100 - $sum) / ($nGroupEquals[$k] ?: 1);
|
||||
}
|
||||
|
||||
if ($cnd->getBySourceGroup($lootId, Conditions::lootTableToConditionSource($tableName)))
|
||||
if ($cnd->getBySourceGroup($lootId, Conditions::lootTableToConditionSource($tableName))->prepare())
|
||||
{
|
||||
self::storeJSGlobals($cnd->getJsGlobals());
|
||||
$cnd->toListviewColumn($loot, $this->extraCols);
|
||||
$cnd->toListviewColumn($loot, $this->extraCols, $lootId, 'content');
|
||||
}
|
||||
|
||||
return [$loot, array_unique($rawItems)];
|
||||
|
||||
Reference in New Issue
Block a user