function makeTree($className, $treeData) { global $mysql; $talents = $mysql->getRows("select * from talent where ref_tab = ?1 order by row,col", $treeData['id'], 'armory'); $crrTier = -1; $open = 0; foreach ($talents as $talent) { // Add new tier if ($talent['row'] != $crrTier) { if ($crrTier != -1) { $output .= '</div>'; } $crrTier = $talent['row']; $output .= '<div class="tier" id="' . $className . $TreeData['nameESC'] . '_tier' . $crrTier . '">'; $open++; } // Get max rank $maxRank = 1; while ($talent['rank' . $maxRank]) { $maxRank++; } $maxRank--; // Get spell data for ($i = 1; $i <= $maxRank; $i++) { $rankData[$i] = getSpell($talent['rank' . $i]); } $talentName = str_replace(array(' ', "'"), '', $rankData[1]['SpellName']); // Get icon $icon = $mysql->getRow("select name from spellicon where id = ?1", $rankData[1]['SpellIconID'], 'armory'); if ($req = $mysql->getRow("select rank1 from talent where id = ?1", $talent['req_talent'])) { $req = getSpell($req['rank1']); $req = str_replace(array(' ', "'"), '', $req['SpellName']); } $output .= '<div class="talent staticTip col' . $talent['col'] . '" id="' . $talentName . '_iconHolder" style="background-image:url(\'images/icon43/' . $icon['name'] . '.gif\');">'; $output .= '<div class="talentHolder tier' . ($talent['row'] + 1) . ' ' . ($req ? 'requires t_' . $req : '') . ' disabled" id="' . $talentName . '" onmousedown="addTalent(event, \'' . $talentName . '\');" onmouseover="makeTalentTooltip(\'' . $talentName . '\');">'; for ($i = 1; $i <= $maxRank; $i++) { $output .= '<span id="rank' . $i . '_' . $talentName . '" style="display: none">' . spellReplace($rankData[$i]) . '</span>'; } $output .= '<div class="iconhighlight"></div> <span id="' . $talentName . '_name" style="display: none;">' . $rankData[1]['SpellName'] . '</span><span id="' . $talentName . '_icon" style="display: none;">' . $icon['name'] . '</span> <div class="rankCtr"> <span id="count_' . $talentName . '">0</span><span>/</span><span id="total_' . $talentName . '">' . $maxRank . '</span> </div> </div> </div>'; } $output .= '</div>'; while ($open <= 10) { $output .= '<div class="tier" id="' . $className . $TreeData['nameESC'] . '_tier' . $open . '">.</div>'; $open++; } return $output; }
function getSpellBuff($spell) { if ($spell['ToolTip'] == "") { return ""; } return spellReplace($spell, $spell['ToolTip']); }
function load_talent_info($list, $base) { global $mysql, $config; $d = $mysql->getRows("SELECT * FROM `spell` WHERE `id` IN (?1-1)", $list, 'armory'); if (!$d) { return; } foreach ($d as $spell) { $this->talentInfo[$base[$spell['id']][1]]['description'] = spellReplace($spell); $this->talentInfo[$base[$spell['id']][1]]['name'] = $spell['SpellName']; $this->talentInfo[$base[$spell['id']][1]]['id'] = $spell['id']; $this->talentInfo[$base[$spell['id']][1]]['sBase'] = $base[$spell['id']][0]; } }