diff --git a/includes/defines.php b/includes/defines.php index 747140a1..3864c540 100644 --- a/includes/defines.php +++ b/includes/defines.php @@ -324,6 +324,7 @@ define('PROFILER_CU_NEEDS_RESYNC', 0x10); define('MAX_LEVEL', 80); define('MAX_SKILL', 450); +define('MAX_LOCALES', 16); // technical limitation, 6 in use here define('WOW_BUILD', 12340); // Loot handles diff --git a/includes/kernel.php b/includes/kernel.php index 53efcaa5..f11a4ab5 100644 --- a/includes/kernel.php +++ b/includes/kernel.php @@ -253,8 +253,9 @@ if (!CLI) // all strings attached.. if (!empty($AoWoWconf['aowow'])) { - if (isset($_GET['locale']) && (CFG_LOCALES & (1 << (int)$_GET['locale']))) - User::useLocale($_GET['locale']); + if (isset($_GET['locale']) && (int)$_GET['locale'] <= MAX_LOCALES && (int)$_GET['locale'] >= 0) + if (CFG_LOCALES & (1 << $_GET['locale'])) + User::useLocale($_GET['locale']); Lang::load(User::$localeString); } diff --git a/includes/types/spell.class.php b/includes/types/spell.class.php index 1b883ff1..4c7f5287 100644 --- a/includes/types/spell.class.php +++ b/includes/types/spell.class.php @@ -1440,7 +1440,7 @@ class SpellList extends BaseType // step 3: try to evaluate result $evaled = $this->resolveEvaluation($str); - $return = is_numeric($evaled) ? Lang::nf($evaled, $precision, true) : $evaled; + $return = is_numeric($evaled) ? round($evaled, $precision) : $evaled; return [$return, $fSuffix, $fRating]; } diff --git a/pages/spell.php b/pages/spell.php index d155ebe3..4e803ff1 100644 --- a/pages/spell.php +++ b/pages/spell.php @@ -1906,7 +1906,7 @@ class SpellPage extends GenericPage case 212: // Mod Ranged Attack Power Of Stat Percent case 219: // Mod Mana Regeneration from Stat case 268: // Mod Attack Power Of Stat Percent - $mask = $effMV == -1 ? 0x1F : 1 << $effMV; + $mask = $effMV < 0 ? 0x1F : 1 << $effMV; $_ = []; for ($j = 0; $j < 5; $j++) if ($mask & (1 << $j))