Misc/Fixup

* floating changes
 * condense several switch() into match() constructs
 * fix ucFirst not making the rest of the word lowercase
This commit is contained in:
Sarjuuk
2025-04-02 22:19:52 +02:00
parent 44ff43c113
commit 3078763ec3
5 changed files with 53 additions and 92 deletions

View File

@@ -1488,15 +1488,15 @@ class ItemList extends BaseType
{
$mask = $this->curTpl['scalingStatValue'];
switch ($type)
$mask &= match ($type)
{
case 'stats': $mask &= 0x04001F; break;
case 'armor': $mask &= 0xF001E0; break;
case 'dps' : $mask &= 0x007E00; break;
case 'spell': $mask &= 0x008000; break;
case 'fap' : $mask &= 0x010000; break; // unused
default: $mask &= 0x0;
}
'stats' => 0x04001F,
'armor' => 0xF001E0,
'dps' => 0x007E00,
'spell' => 0x008000,
'fap' => 0x010000, // unused
default => 0x0
};
$field = null;
for ($i = 0; $i < count(Util::$ssdMaskFields); $i++)