mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Skills/Requirements
* fix requirements display for low level skinning * display fishing skill requirements on zone detail page in fishing tab
This commit is contained in:
@@ -486,13 +486,27 @@ class Game
|
|||||||
|
|
||||||
public static function getBreakpointsForSkill(int $skillId, int $reqLevel) : array
|
public static function getBreakpointsForSkill(int $skillId, int $reqLevel) : array
|
||||||
{
|
{
|
||||||
|
if ($skillId == SKILL_FISHING)
|
||||||
|
return array(
|
||||||
|
round(sqrt(.25) * $reqLevel), // 25% valid catches
|
||||||
|
round(sqrt(.50) * $reqLevel), // 50% valid catches
|
||||||
|
round(sqrt(.75) * $reqLevel), // 75% valid catches
|
||||||
|
$reqLevel // 100% valid catches
|
||||||
|
);
|
||||||
|
|
||||||
switch ($skillId)
|
switch ($skillId)
|
||||||
{
|
{
|
||||||
|
case SKILL_SKINNING:
|
||||||
|
if ($reqLevel < 10)
|
||||||
|
$reqLevel = 0;
|
||||||
|
else if ($reqLevel < 20)
|
||||||
|
$reqLevel = ($reqLevel - 10) * 10;
|
||||||
|
else
|
||||||
|
$reqLevel *= 5;
|
||||||
case SKILL_HERBALISM:
|
case SKILL_HERBALISM:
|
||||||
case SKILL_LOCKPICKING:
|
case SKILL_LOCKPICKING:
|
||||||
case SKILL_JEWELCRAFTING:
|
case SKILL_JEWELCRAFTING:
|
||||||
case SKILL_INSCRIPTION:
|
case SKILL_INSCRIPTION:
|
||||||
case SKILL_SKINNING:
|
|
||||||
case SKILL_MINING:
|
case SKILL_MINING:
|
||||||
$points = [$reqLevel]; // red/orange
|
$points = [$reqLevel]; // red/orange
|
||||||
|
|
||||||
|
|||||||
@@ -1181,6 +1181,7 @@ $lang = array(
|
|||||||
'hcAvailable' => "Heroischer Modus verfügbar (%d)",
|
'hcAvailable' => "Heroischer Modus verfügbar (%d)",
|
||||||
'numPlayers' => "Anzahl an Spielern",
|
'numPlayers' => "Anzahl an Spielern",
|
||||||
'noMap' => "Für dieses Gebiet steht keine Karte zur Verfügung.",
|
'noMap' => "Für dieses Gebiet steht keine Karte zur Verfügung.",
|
||||||
|
'fishingSkill' => "25 – 100% Chance einen gelisteten Fisch zu fangen.",
|
||||||
'instanceTypes' => ["Zone", "Durchgang", "Dungeon", "Schlachtzug", "Battleground", "Dungeon", "Arena", "Schlachtzug", "Schlachtzug"],
|
'instanceTypes' => ["Zone", "Durchgang", "Dungeon", "Schlachtzug", "Battleground", "Dungeon", "Arena", "Schlachtzug", "Schlachtzug"],
|
||||||
'territories' => ["Allianz", "Horde", "Umkämpft", "Sicheres Gebiet", "PvP", "Welt-PvP"],
|
'territories' => ["Allianz", "Horde", "Umkämpft", "Sicheres Gebiet", "PvP", "Welt-PvP"],
|
||||||
'cat' => array(
|
'cat' => array(
|
||||||
|
|||||||
@@ -1181,6 +1181,7 @@ $lang = array(
|
|||||||
'hcAvailable' => "Heroic mode available (%d)",
|
'hcAvailable' => "Heroic mode available (%d)",
|
||||||
'numPlayers' => "Number of players",
|
'numPlayers' => "Number of players",
|
||||||
'noMap' => "There is no map available for this zone.",
|
'noMap' => "There is no map available for this zone.",
|
||||||
|
'fishingSkill' => "25 – 100% chance to catch a listed fish.",
|
||||||
'instanceTypes' => ["Zone", "Transit", "Dungeon", "Raid", "Battleground", "Dungeon", "Arena", "Raid", "Raid"],
|
'instanceTypes' => ["Zone", "Transit", "Dungeon", "Raid", "Battleground", "Dungeon", "Arena", "Raid", "Raid"],
|
||||||
'territories' => ["Alliance", "Horde", "Contested", "Sanctuary", "PvP", "World PvP"],
|
'territories' => ["Alliance", "Horde", "Contested", "Sanctuary", "PvP", "World PvP"],
|
||||||
'cat' => array(
|
'cat' => array(
|
||||||
|
|||||||
@@ -1181,6 +1181,7 @@ $lang = array(
|
|||||||
'hcAvailable' => "Modo heroico disponible (%di)",
|
'hcAvailable' => "Modo heroico disponible (%di)",
|
||||||
'numPlayers' => "Número de jugadores",
|
'numPlayers' => "Número de jugadores",
|
||||||
'noMap' => "No hay mapa disponible para esta zona.",
|
'noMap' => "No hay mapa disponible para esta zona.",
|
||||||
|
'fishingSkill' => "[25 – 100% chance to catch a listed fish.]",
|
||||||
'instanceTypes' => ["Zona", "Tránsito", "Mazmorra", "Banda", "Campo de batalla", "Mazmorra", "Arena", "Banda", "Banda"],
|
'instanceTypes' => ["Zona", "Tránsito", "Mazmorra", "Banda", "Campo de batalla", "Mazmorra", "Arena", "Banda", "Banda"],
|
||||||
'territories' => ["Alianza", "Horda", "En disputa", "Santuario", "JcJ", "JcJ abierto"],
|
'territories' => ["Alianza", "Horda", "En disputa", "Santuario", "JcJ", "JcJ abierto"],
|
||||||
'cat' => array(
|
'cat' => array(
|
||||||
|
|||||||
@@ -1181,6 +1181,7 @@ $lang = array(
|
|||||||
'hcAvailable' => "Mode héroïque disponible (%d)",
|
'hcAvailable' => "Mode héroïque disponible (%d)",
|
||||||
'numPlayers' => "Nombre de joueurs",
|
'numPlayers' => "Nombre de joueurs",
|
||||||
'noMap' => "Il n'y a aucune carte disponible pour cette zone.",
|
'noMap' => "Il n'y a aucune carte disponible pour cette zone.",
|
||||||
|
'fishingSkill' => "[25 – 100% chance to catch a listed fish.]",
|
||||||
'instanceTypes' => ["Zone", "Transit", "Donjon", "Raid", "Champ de bataille", "Donjon", "Arène", "Raid", "Raid"],
|
'instanceTypes' => ["Zone", "Transit", "Donjon", "Raid", "Champ de bataille", "Donjon", "Arène", "Raid", "Raid"],
|
||||||
'territories' => ["Alliance", "Horde", "Contesté", "Sanctuaire", "JcJ", "JcJ Global"],
|
'territories' => ["Alliance", "Horde", "Contesté", "Sanctuaire", "JcJ", "JcJ Global"],
|
||||||
'cat' => array(
|
'cat' => array(
|
||||||
|
|||||||
@@ -1181,6 +1181,7 @@ $lang = array(
|
|||||||
'hcAvailable' => "Доступен героический режим (%d)",
|
'hcAvailable' => "Доступен героический режим (%d)",
|
||||||
'numPlayers' => "Количество игроков",
|
'numPlayers' => "Количество игроков",
|
||||||
'noMap' => "Для данной местности нет доступной карты.",
|
'noMap' => "Для данной местности нет доступной карты.",
|
||||||
|
'fishingSkill' => "[25 – 100% chance to catch a listed fish.]",
|
||||||
'instanceTypes' => ["Игровая зона", "Транзит", "Подземелье", "Рейд", "Поле боя", "Подземелье", "Арена", "Рейд", "Рейд"],
|
'instanceTypes' => ["Игровая зона", "Транзит", "Подземелье", "Рейд", "Поле боя", "Подземелье", "Арена", "Рейд", "Рейд"],
|
||||||
'territories' => ["Альянс", "Орда", "Оспариваемая", "Святилище", "PvP", "Мировое PvP"],
|
'territories' => ["Альянс", "Орда", "Оспариваемая", "Святилище", "PvP", "Мировое PvP"],
|
||||||
'cat' => array(
|
'cat' => array(
|
||||||
|
|||||||
@@ -1180,6 +1180,7 @@ $lang = array(
|
|||||||
'hcAvailable' => "英雄模式可用 (%d)",
|
'hcAvailable' => "英雄模式可用 (%d)",
|
||||||
'numPlayers' => "玩家人数",
|
'numPlayers' => "玩家人数",
|
||||||
'noMap' => "这个区域没有可用地图。",
|
'noMap' => "这个区域没有可用地图。",
|
||||||
|
'fishingSkill' => "[25 – 100% chance to catch a listed fish.]",
|
||||||
'instanceTypes' => ["区域", "运送", "地下城", "团队副本", "战场", "地下城", "竞技场", "团队副本", "团队副本"],
|
'instanceTypes' => ["区域", "运送", "地下城", "团队副本", "战场", "地下城", "竞技场", "团队副本", "团队副本"],
|
||||||
'territories' => ["联盟", "部落", "争夺中", "安全区域", "PvP", "世界PvP"],
|
'territories' => ["联盟", "部落", "争夺中", "安全区域", "PvP", "世界PvP"],
|
||||||
'cat' => array(
|
'cat' => array(
|
||||||
|
|||||||
@@ -742,7 +742,7 @@ class NpcPage extends GenericPage
|
|||||||
if (!empty($sf['note']))
|
if (!empty($sf['note']))
|
||||||
$tabData['note'] = $sf['note'];
|
$tabData['note'] = $sf['note'];
|
||||||
else if ($sf[0] == LOOT_SKINNING)
|
else if ($sf[0] == LOOT_SKINNING)
|
||||||
$tabData['note'] = '<b>'.Lang::formatSkillBreakpoints(Game::getBreakpointsForSkill($skinTab[2], $this->subject->getField('maxLevel') * 5), Lang::FMT_HTML).'</b>';
|
$tabData['note'] = '<b>'.Lang::formatSkillBreakpoints(Game::getBreakpointsForSkill($skinTab[2], $this->subject->getField('maxLevel')), Lang::FMT_HTML).'</b>';
|
||||||
|
|
||||||
if ($sf[4])
|
if ($sf[4])
|
||||||
$tabData['hiddenCols'] = $sf[4];
|
$tabData['hiddenCols'] = $sf[4];
|
||||||
|
|||||||
@@ -639,12 +639,17 @@ class ZonePage extends GenericPage
|
|||||||
$lv['condition'][0][$this->typeId][] = [[CND_QUESTTAKEN, &$reqQuest[$lv['id']]]];
|
$lv['condition'][0][$this->typeId][] = [[CND_QUESTTAKEN, &$reqQuest[$lv['id']]]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$note = '';
|
||||||
|
if ($skill = DB::World()->selectCell('SELECT `skill` FROM skill_fishing_base_level WHERE `entry` = ?d', $this->typeId))
|
||||||
|
$note = '<b class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, \''.Lang::zone('fishingSkill').'\', 0, 0, \'q\')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()">'.Lang::formatSkillBreakpoints(Game::getBreakpointsForSkill(SKILL_FISHING, $skill), Lang::FMT_HTML).'</b>';
|
||||||
|
|
||||||
$this->lvTabs[] = ['item', array(
|
$this->lvTabs[] = ['item', array(
|
||||||
'data' => array_values($fish->getResult()),
|
'data' => array_values($fish->getResult()),
|
||||||
'name' => '$LANG.tab_fishing',
|
'name' => '$LANG.tab_fishing',
|
||||||
'id' => 'fishing',
|
'id' => 'fishing',
|
||||||
'extraCols' => array_unique($xCols),
|
'extraCols' => array_unique($xCols),
|
||||||
'hiddenCols' => ['side']
|
'hiddenCols' => ['side'],
|
||||||
|
'note' => $note
|
||||||
)];
|
)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user