Items/Filters

* add 'fished' as valid item source
 * item source 'none' now properly selects items without source, not items without source from this list
 * fixed edgecases where filter callback might have no return value
This commit is contained in:
Sarjuuk
2025-03-06 18:46:56 +01:00
parent 3b0d288418
commit 460f4857ad
7 changed files with 19 additions and 15 deletions

View File

@@ -1831,7 +1831,8 @@ class ItemListFilter extends Filter
7 => 5, // Vendor 7 => 5, // Vendor
9 => 10, // Starter 9 => 10, // Starter
10 => 11, // Event 10 => 11, // Event
11 => 12 // Achievement 11 => 12, // Achievement
12 => 16 // Fished
) )
); );
@@ -2258,6 +2259,8 @@ class ItemListFilter extends Filter
$mask = 1 << ($cr[1] - 1); $mask = 1 << ($cr[1] - 1);
return ['AND', ['gemEnchantmentId', 0, '!'], ['gemColorMask', $mask, '&']]; return ['AND', ['gemEnchantmentId', 0, '!'], ['gemColorMask', $mask, '&']];
} }
return false;
} }
protected function cbGlyphType($cr) : mixed protected function cbGlyphType($cr) : mixed
@@ -2406,6 +2409,8 @@ class ItemListFilter extends Filter
); );
if ($items = DB::World()->selectCol($this->extCostQuery, $costs, $costs)) if ($items = DB::World()->selectCol($this->extCostQuery, $costs, $costs))
return ['id', $items]; return ['id', $items];
return false;
} }
protected function cbSoldByNPC($cr) : mixed protected function cbSoldByNPC($cr) : mixed
@@ -2618,14 +2623,7 @@ class ItemListFilter extends Filter
return $foo; return $foo;
} }
else // none else // none
{ return ['src.typeId', null];
$foo = ['AND'];
foreach ($this->enums[$cr[0]] as $bar)
if (is_int($bar))
$foo[] = ['src.src'.$bar, null];
return $foo;
}
} }
protected function cbTypeCheck(&$v) : bool protected function cbTypeCheck(&$v) : bool

View File

@@ -3777,7 +3777,8 @@ var LANG = {
], ],
itemsource: [ itemsource: [
[1, "Beliebig"], [11, "Erfolg"], [3, "Hergestellt"], [4, "Drop"], [10, "Ereignis"], [1, "Beliebig"], [11, "Erfolg"], [3, "Hergestellt"], [4, "Drop"], [10, "Ereignis"],
[5, "PvP"], [6, "Quest"], [9, "Startausrüstung"], [7, "Händler"], [2, "Nichts"] [5, "PvP"], [6, "Quest"], [9, "Startausrüstung"], [7, "Händler"], [12, "Geangelt"],
[2, "Nichts"]
], ],
glyphtype: [[ 1, "Erhebliche"], [2, "Geringe"] ], glyphtype: [[ 1, "Erhebliche"], [2, "Geringe"] ],
classs: [ classs: [

View File

@@ -3825,7 +3825,8 @@ var LANG = {
], ],
itemsource: [ itemsource: [
[1, "Any"], [11, "Achievement"], [3, "Crafted"], [4, "Drop"], [10, "Event"], [1, "Any"], [11, "Achievement"], [3, "Crafted"], [4, "Drop"], [10, "Event"],
[5, "PvP"], [6, "Quest"], [9, "Starter"], [7, "Vendor"], [2, "None"] [5, "PvP"], [6, "Quest"], [9, "Starter"], [7, "Vendor"], [12, "Fished"],
[2, "None"]
], ],
glyphtype: [ [1, "Major"], [2, "Minor"] ], glyphtype: [ [1, "Major"], [2, "Minor"] ],
classs: [ classs: [

View File

@@ -3778,7 +3778,8 @@ var LANG = {
], ],
itemsource: [ itemsource: [
[1, "Cualquiera"], [11, "Logro"], [3, "Creado"], [4, "Encontrado"], [10, "Evento"], [1, "Cualquiera"], [11, "Logro"], [3, "Creado"], [4, "Encontrado"], [10, "Evento"],
[5, "JcJ"], [6, "Misión"], [9, "Habilidad Inicial"], [7, "Vendedor"], [2, "Ninguno"] [5, "JcJ"], [6, "Misión"], [9, "Habilidad Inicial"], [7, "Vendedor"], [12, "Pescado"],
[2, "Ninguno"]
], ],
glyphtype: [ [1, "Sublime"], [2, "Menor"] ], glyphtype: [ [1, "Sublime"], [2, "Menor"] ],
classs: [ classs: [

View File

@@ -3779,7 +3779,8 @@ var LANG = {
], ],
itemsource: [ itemsource: [
[1, "N'importe quelle"], [11, "Haut fait"], [3, "Fabriqué"], [4, "Butin"], [10, "Événement"], [1, "N'importe quelle"], [11, "Haut fait"], [3, "Fabriqué"], [4, "Butin"], [10, "Événement"],
[5, "JcJ"], [6, "Quête"], [9, "Débutant"], [7, "Vendeur"], [2, "Aucun"] [5, "JcJ"], [6, "Quête"], [9, "Débutant"], [7, "Vendeur"], [12, "Pêché"],
[2, "Aucun"]
], ],
glyphtype: [ [1, "Majeur"], [2, "Mineur"] ], glyphtype: [ [1, "Majeur"], [2, "Mineur"] ],
classs: [ classs: [

View File

@@ -3779,7 +3779,8 @@ var LANG = {
], ],
itemsource: [ itemsource: [
[1, "Все"], [11, "Достижение"], [3, "Ремесло"], [4, "Добыча"], [10, "Мероприятие"], [1, "Все"], [11, "Достижение"], [3, "Ремесло"], [4, "Добыча"], [10, "Мероприятие"],
[5, "PvP"], [6, "Задание"], [9, "Начальное заклинание"], [7, "Продавец"], [2, "Нет"] [5, "PvP"], [6, "Задание"], [9, "Начальное заклинание"], [7, "Продавец"], [12, "Вылавливается"],
[2, "Нет"]
], ],
glyphtype: [ [1, "Большой"], [2, "Малый"] ], glyphtype: [ [1, "Большой"], [2, "Малый"] ],
classs: [ classs: [

View File

@@ -3804,7 +3804,8 @@ var LANG = {
], ],
itemsource: [ itemsource: [
[1, "任意"], [11, "成就"], [3, "已制造"], [4, "掉落"], [10, "活动"], [1, "任意"], [11, "成就"], [3, "已制造"], [4, "掉落"], [10, "活动"],
[5, "PvP"], [6, "任务"], [9, "新手"], [7, "商人"], [2, ""] [5, "PvP"], [6, "任务"], [9, "新手"], [7, "商人"], [12, "可钓"],
[2, "无"]
], ],
glyphtype: [ [1, "大"], [2, "小"] ], glyphtype: [ [1, "大"], [2, "小"] ],
classs: [ classs: [