SkillDetailPage/Tabs

* add tab for spells modifying skill value
This commit is contained in:
Sarjuuk
2025-10-03 18:02:34 +02:00
parent 60eb816002
commit 6263ccd92a
2 changed files with 24 additions and 2 deletions

View File

@@ -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;

View File

@@ -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