NpcDetailPage/Skinning Skill

* fix displayed skill requirement for non-standard skinning (engineering, herbalism)
This commit is contained in:
Sarjuuk
2025-03-25 17:30:33 +01:00
parent 73f4a69a41
commit 390801f53c
2 changed files with 7 additions and 5 deletions

View File

@@ -468,6 +468,7 @@ class Game
switch ($skillId)
{
case SKILL_SKINNING:
$reqLevel /= 5; // we pass creature level * 5 (so, skill value), but formula depends on actual creature level
if ($reqLevel < 10)
$reqLevel = 0;
else if ($reqLevel < 20)
@@ -479,6 +480,7 @@ class Game
case SKILL_JEWELCRAFTING:
case SKILL_INSCRIPTION:
case SKILL_MINING:
case SKILL_ENGINEERING:
$points = [$reqLevel]; // red/orange
if ($reqLevel + 25 <= MAX_SKILL) // orange/yellow

View File

@@ -744,7 +744,7 @@ class NpcPage extends GenericPage
if ($note)
$tabData['note'] = $note;
else if ($lootTpl == LOOT_SKINNING)
$tabData['note'] = '<b>'.Lang::formatSkillBreakpoints(Game::getBreakpointsForSkill($skinTab[2], $this->subject->getField('maxLevel')), Lang::FMT_HTML).'</b>';
$tabData['note'] = '<b>'.Lang::formatSkillBreakpoints(Game::getBreakpointsForSkill($skinTab[2], $this->subject->getField('maxLevel') * 5), Lang::FMT_HTML).'</b>';
if ($hiddenCols)
$tabData['hiddenCols'] = $hiddenCols;