Filters/StaffFlags

* fixed flag filters visibility for spells
 * fixed implementation of staff flag filters. Now they acutually do something.
 * fixed localization
This commit is contained in:
Sarjuuk
2025-03-20 21:30:01 +01:00
parent f2bbb87eef
commit 197b097ee5
6 changed files with 23 additions and 23 deletions

View File

@@ -1257,12 +1257,12 @@ abstract class Filter
break;
case self::CR_BOOLEAN:
case self::CR_FLAG:
case self::CR_STAFFFLAG:
$_ = $_crs[$i];
if (!$this->int2Bool($_))
$unsetme = true;
break;
case self::CR_ENUM:
case self::CR_STAFFFLAG:
if (!Util::checkNumeric($_crs[$i], NUM_CAST_INT))
$unsetme = true;
break;
@@ -1545,8 +1545,8 @@ abstract class Filter
$result = $this->genericBooleanFlags($colOrFn, $param1, $crs, $param2);
break;
case self::CR_STAFFFLAG:
if (User::isInGroup(U_GROUP_EMPLOYEE) && $crs >= 0)
$result = $this->genericBooleanFlags($colOrFn, (1 << $crs), true);
if (User::isInGroup(U_GROUP_EMPLOYEE) && $crs > 0)
$result = $this->genericBooleanFlags($colOrFn, (1 << ($crs - 1)), true);
break;
case self::CR_BOOLEAN:
$result = $this->genericBoolean($colOrFn, $crs, !empty($param1));

View File

@@ -409,20 +409,20 @@ var fi_filters = {
{ id: 8, name: 'hasscreenshots', type: 'yn' },
{ id: 17, name: 'hasvideos', type: 'yn' },
{ id: 9999, name: 'sepstaffonly', staffOnly: true },
{ id: 96, name: 'flags1', type: 'flags', staffOnly: true },
{ id: 97, name: 'flags2', type: 'flags', staffOnly: true },
{ id: 98, name: 'flags3', type: 'flags', staffOnly: true },
{ id: 99, name: 'flags4', type: 'flags', staffOnly: true },
{ id: 100, name: 'flags5', type: 'flags', staffOnly: true },
{ id: 101, name: 'flags6', type: 'flags', staffOnly: true },
{ id: 102, name: 'flags7', type: 'flags', staffOnly: true },
{ id: 103, name: 'flags8', type: 'flags', staffOnly: true },
{ id: 104, name: 'flags9', type: 'flags', staffOnly: true },
{ id: 105, name: 'flags10', type: 'flags', staffOnly: true },
{ id: 106, name: 'flags11', type: 'flags', staffOnly: true },
{ id: 107, name: 'flags12', type: 'flags', staffOnly: true },
{ id: 108, name: 'flags13', type: 'flags', staffOnly: true }
{ id: 9999, name: 'sepstaffonly', staffonly: true },
{ id: 96, name: 'flags1', type: 'flags', staffonly: true },
{ id: 97, name: 'flags2', type: 'flags', staffonly: true },
{ id: 98, name: 'flags3', type: 'flags', staffonly: true },
{ id: 99, name: 'flags4', type: 'flags', staffonly: true },
{ id: 100, name: 'flags5', type: 'flags', staffonly: true },
{ id: 101, name: 'flags6', type: 'flags', staffonly: true },
{ id: 102, name: 'flags7', type: 'flags', staffonly: true },
{ id: 103, name: 'flags8', type: 'flags', staffonly: true },
{ id: 104, name: 'flags9', type: 'flags', staffonly: true },
{ id: 105, name: 'flags10', type: 'flags', staffonly: true },
{ id: 106, name: 'flags11', type: 'flags', staffonly: true },
{ id: 107, name: 'flags12', type: 'flags', staffonly: true },
{ id: 108, name: 'flags13', type: 'flags', staffonly: true }
],
achievements: [

View File

@@ -4284,7 +4284,7 @@ var LANG = {
hasscreenshots: "Verfügt über Screenshots",
hasvideos: "Verfügt über Videos",
sepstaffonly: 'Staff Only',
sepstaffonly: 'Nur für Personal',
flags: 'Flags'
},

View File

@@ -4069,7 +4069,7 @@ var LANG = {
hasscreenshots: "Has screenshots",
hasvideos: "Has videos",
sepstaffonly: 'Staff Only',
sepstaffonly: 'Staff only',
flags: 'Flags',
flags2: 'Flags (2)'
},
@@ -4332,7 +4332,7 @@ var LANG = {
hasscreenshots: "Has screenshots",
hasvideos: "Has videos",
sepstaffonly: 'Staff Only',
sepstaffonly: 'Staff only',
flags: 'Flags'
},

View File

@@ -4023,7 +4023,7 @@ var LANG = {
hasscreenshots: "Tiene capturas de pantalla",
hasvideos: "Tiene vídeos",
sepstaffonly: 'Staff Only',
sepstaffonly: 'Sólo para empleados',
flags: 'Flags',
flags2: 'Flags (2)'
},
@@ -4286,7 +4286,7 @@ var LANG = {
hasscreenshots: "Tiene capturas de pantalla",
hasvideos: "Tiene vídeos",
sepstaffonly: 'Staff Only',
sepstaffonly: 'Sólo para empleados',
flags: 'Flags'
},

View File

@@ -4276,7 +4276,7 @@ var LANG = {
hasscreenshots: "有截屏",
hasvideos: "有视频",
sepstaffonly: "Staff only",
sepstaffonly: "仅限员工",
flags1: "Flags (1)",
flags2: "Flags (2)",
flags3: "Flags (3)",