From f21e8045b29f227cd6f2c9309a2edc7a82648b70 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Fri, 5 Jul 2024 18:11:21 +0200 Subject: [PATCH] Misc/Fixup * spell: resolve MiscValue for SPELL_AURA_MOD_INVISIBILITY * search: do not double escape page title * profiler: fixed typo, causing shaman spirit weapons to be applied _everywhere_ --- includes/types/spell.class.php | 19 +++++++++---------- pages/search.php | 2 +- pages/spell.php | 5 +++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/includes/types/spell.class.php b/includes/types/spell.class.php index 94801c81..ef4ef8b5 100644 --- a/includes/types/spell.class.php +++ b/includes/types/spell.class.php @@ -289,6 +289,14 @@ class SpellList extends BaseType if (!($this->getField('attributes0') & SPELL_ATTR0_PASSIVE)) continue; + // Shaman - Spirit Weapons (16268) (parry is normaly stored in g_statistics) + // i should recurse into SPELL_EFFECT_LEARN_SPELL and apply SPELL_EFFECT_PARRY from there + if ($id == 16268) + { + $data[$id]['parrypct'] = [5, 'add']; + continue; + } + for ($i = 1; $i < 4; $i++) { $pts = $this->calculateAmountForCurrent($i)[1]; @@ -304,15 +312,6 @@ class SpellList extends BaseType as a flat value (that is equal to the percentage, like they should be). So the stats-table won't show the actual deficit */ - - // Shaman - Spirit Weapons (16268) (parry is normaly stored in g_statistics) - // i should recurse into SPELL_EFFECT_LEARN_SPELL and apply SPELL_EFFECT_PARRY from there - if ($id = 16268) - { - $data[$id]['parrypct'] = [5, 'add']; - continue; - } - switch ($au) { case SPELL_AURA_MOD_RESISTANCE_PCT: @@ -419,7 +418,7 @@ class SpellList extends BaseType case SPELL_AURA_MOD_SPELL_HEALING_OF_ATTACK_POWER: $data[$id]['splheal'] = [$pts / 100, 'percentOf', 'mleatkpwr']; break; - case SPELL_AURA_MOD_ATTACK_POWER_PCT: // ingmae only melee..? + case SPELL_AURA_MOD_ATTACK_POWER_PCT: // ingame only melee..? $data[$id]['mleatkpwr'] = [$pts / 100, 'percentOf', 'mleatkpwr']; break; case SPELL_AURA_MOD_HEALTH_REGEN_PERCENT: diff --git a/pages/search.php b/pages/search.php index 648e73b6..43aa3a28 100644 --- a/pages/search.php +++ b/pages/search.php @@ -197,7 +197,7 @@ class SearchPage extends GenericPage protected function generateTitle() { - array_unshift($this->title, Util::htmlEscape($this->search), Lang::main('search')); + array_unshift($this->title, $this->search, Lang::main('search')); } protected function generatePath() { } diff --git a/pages/spell.php b/pages/spell.php index e62f975c..c62f70b0 100644 --- a/pages/spell.php +++ b/pages/spell.php @@ -1952,12 +1952,13 @@ class SpellPage extends GenericPage $bar = $effMV; switch ($effAura) { - case SPELL_AURA_MOD_STEALTH_DETECT: // Mod Stealth Detection + case SPELL_AURA_MOD_STEALTH_DETECT: if ($_ = Lang::spell('stealthType', $effMV)) $bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, $_) : $_; break; - case SPELL_AURA_MOD_INVISIBILITY_DETECT: // Mod Invisibility Detection + case SPELL_AURA_MOD_INVISIBILITY: + case SPELL_AURA_MOD_INVISIBILITY_DETECT: if ($_ = Lang::spell('invisibilityType', $effMV)) $bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, $_) : $_;