mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
SoundDetailPage/Conditions
* fix error assigning a worldstate conditional from child zone to parent zone
This commit is contained in:
@@ -241,13 +241,19 @@ class SoundPage extends GenericPage
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (array_filter(array_column($zoneIds, 'worldStateId')))
|
if ($worldStates = array_filter($zoneIds, function ($x) { return $x['worldStateId'] > 0; }))
|
||||||
{
|
{
|
||||||
$tabData['extraCols'] = ['$Listview.extraCols.condition'];
|
$tabData['extraCols'] = ['$Listview.extraCols.condition'];
|
||||||
|
|
||||||
foreach ($zoneIds as $zData)
|
foreach ($worldStates as $state)
|
||||||
if ($zData['worldStateId'])
|
{
|
||||||
Conditions::extendListviewRow($zoneData[$zData['id']], Conditions::SRC_NONE, $this->typeId, [Conditions::WORLD_STATE, $zData['worldStateId'], $zData['worldStateValue']]);
|
if (isset($zoneData[$state['id']]))
|
||||||
|
Conditions::extendListviewRow($zoneData[$state['id']], Conditions::SRC_NONE, $this->typeId, [Conditions::WORLD_STATE, $state['worldStateId'], $state['worldStateValue']]);
|
||||||
|
else
|
||||||
|
foreach ($zoneData as &$d)
|
||||||
|
if (in_array($state['id'], $d['subzones']))
|
||||||
|
Conditions::extendListviewRow($d, Conditions::SRC_NONE, $this->typeId, [Conditions::WORLD_STATE, $state['worldStateId'], $state['worldStateValue']]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$tabData['data'] = array_values($zoneData);
|
$tabData['data'] = array_values($zoneData);
|
||||||
|
|||||||
Reference in New Issue
Block a user