From 6263ccd92a7bb8f2e6a5c3c288d50815168d6cdc Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Fri, 3 Oct 2025 18:02:34 +0200 Subject: [PATCH] SkillDetailPage/Tabs * add tab for spells modifying skill value --- endpoints/skill/skill.php | 20 ++++++++++++++++++++ endpoints/spell/spell.php | 6 ++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/endpoints/skill/skill.php b/endpoints/skill/skill.php index 18fb8d8e..005bc0cf 100644 --- a/endpoints/skill/skill.php +++ b/endpoints/skill/skill.php @@ -227,6 +227,26 @@ class SkillBaseResponse extends TemplateResponse implements ICache } } + // tab: modified by [spell] + $conditions = array( + 'OR', + ['AND', ['effect1AuraId', [SPELL_AURA_MOD_SKILL, SPELL_AURA_MOD_SKILL_TALENT]], ['effect1MiscValue', $this->typeId]], + ['AND', ['effect2AuraId', [SPELL_AURA_MOD_SKILL, SPELL_AURA_MOD_SKILL_TALENT]], ['effect2MiscValue', $this->typeId]], + ['AND', ['effect3AuraId', [SPELL_AURA_MOD_SKILL, SPELL_AURA_MOD_SKILL_TALENT]], ['effect3MiscValue', $this->typeId]] + ); + $modBy = new SpellList($conditions); + if (!$modBy->error) + { + $this->extendGlobalData($modBy->getJSGlobals()); + + $this->lvTabs->addListviewTab(new Listview(array( + 'data' => $modBy->getListviewData(), + 'id' => 'modified-by', + 'name' => '$LANG.tab_modifiedby', + 'hiddenCols' => ['skill'], + ), SpellList::$brickFile)); + } + // tab: spells [spells] (exclude first tab) $reqClass = 0x0; $reqRace = 0x0; diff --git a/endpoints/spell/spell.php b/endpoints/spell/spell.php index ad9fd262..9d224044 100644 --- a/endpoints/spell/spell.php +++ b/endpoints/spell/spell.php @@ -1892,6 +1892,7 @@ class SpellBaseResponse extends TemplateResponse implements ICache $_nameMV = $this->fmtStaffTip($_, 'MiscValue: '.$effMV); break; case SPELL_AURA_MOD_LANGUAGE: + case SPELL_AURA_COMPREHEND_LANGUAGE: if ($_ = Lang::game('languages', $effMV)) $_nameMV = $this->fmtStaffTip($_, 'MiscValue: '.$effMV); break; @@ -1967,8 +1968,9 @@ class SpellBaseResponse extends TemplateResponse implements ICache if ($_ = Lang::getMagicSchools($effMV)) $_nameMV = $this->fmtStaffTip($_, 'MiscValue: '.Util::asHex($effMV)); break; - case SPELL_AURA_MOD_SKILL: - case SPELL_AURA_MOD_SKILL_TALENT: + case SPELL_AURA_MOD_SKILL: // temp + case SPELL_AURA_MOD_SKILL_TALENT: // perm + $valueFmt = '%+d'; if ($a = SkillList::makeLink($effMV)) $_nameMV = $a; else