function showPlayerSkills($guid) { global $wDB, $lang; $skill_category = $wDB->select('-- CACHE: 1h SELECT `id` AS ARRAY_KEY, `name`, `order` FROM `wowd_skill_line_category`'); $skill_rev = array(); // Put the data on skills in buffer for sotrirovki their class $playerSkill = array(); $skillcount = getCharacterSkills($guid); if ($skillcount) { foreach ($skillcount as $guid) { $skillId = $guid['skill']; // skill id if ($skillId == 0) { continue; } $skill = $guid['value']; // skill $maxskill = $guid['max']; // max skill $skillPerm = 0; // with talent (add and skill, and to maxSkill (zanulil) $skillTemp = 0; // Temporary BNF, affects only the skill (zanulil yet) if ($skillLine = getSkillLine($skillId)) { $skill = $skill + $skillPerm; $maxskill = $maxskill + $skillPerm; $category = $skillLine['Category']; // Category 12 hidden if ($category == 12) { continue; } $order = $skill_category[$category]['order']; $skill_rev[$order] = $category; $playerSkill[$order][] = array('id' => $skillId, 'Name' => $skillLine['Name'], 'Category' => $category, 'Description' => $skillLine['Description'], 'icon' => $skillLine['iconId'], 'Skill' => $skill, 'maxSkill' => $maxskill, 'bonus' => $skillTemp); } } } if ($playerSkill) { ksort($playerSkill); // Output data to a table echo '<table class=report cellSpacing=0 cellPadding=0><TBODY>'; echo '<tr><td class=head colspan=3>' . $lang['player_skills'] . '</td></tr>'; foreach ($playerSkill as $id => $skill_data) { $id = $skill_rev[$id]; echo '<tr><td class=skill_category colspan=3> ' . $skill_category[$id]['name'] . '</td></tr>'; foreach ($skill_data as $skill) { if ($skill['Description'] != '') { $tip = '<table class=skilltip><tr class=top><td>' . $skill['Name'] . '</td></tr><tr><td>' . $skill['Description'] . '</td></tr></table>'; echo '<tr ' . addTooltip($tip, 'BORDER, false, STICKY, false') . '>'; } else { echo '<tr>'; } $pct = intval($skill['Skill'] / $skill['maxSkill'] * 100); $text = $skill['Skill']; if ($skill['bonus'] > 0) { $text .= '<font class=posstat>+' . $skill['bonus'] . '</font>'; } else { if ($skill['bonus'] < 0) { $text .= '<font class=negstat>' . $skill['bonus'] . '</font>'; } } $text .= ' / ' . $skill['maxSkill']; $ico = ''; if ($skill['icon'] > 1) { $ico = '<img src=' . getSpellIcon($skill['icon']) . '>'; } echo '<td class=skill_ico>' . $ico . '</td>'; echo '<td class=skill_name><A href="?skill=' . $skill['id'] . '&guid=' . $guid . '">' . $skill['Name'] . '</td>'; echo '<td class=skill_bar><div class=skill_bar><b class=s1 style="width: ' . $pct . '%;"></b><span>' . $text . '</span></div></td>'; echo '</tr>'; } } echo '</tbody></table>'; } }
function renderAchievement($id, &$a, $guid) { // Skip show if not completed parent present or no_points not completed if ($a['parentAchievement'] || !$a['date'] && !$a['points'] && $guid) { return; } echo '<div class="ach_show' . ($a['date'] ? '' : ' locked') . '" onclick="showAchReq(this);">'; // Render icon echo '<img class=ach_icon src="' . getSpellIcon($a['iconId']) . '">'; echo '<div class=ach_frame></div>'; // Render points if ($a['points']) { echo '<div class=ach_point>' . $a['points'] . '</div>'; } echo '<div class=ach_title>' . $a['name'] . '</div>'; echo '<div class=ach_desc>' . $a['description'] . '</div>'; // echo '<div class=ach_desc>Flags - 0x'.dechex($a['flags']).' - '.$a['count'].'</div>'; // Render requirements echo '<div class=ach_req id=' . $id . '>'; if ($a['flags'] & CUSTOM_ACHIEVEMENT_SHOW) { getAchievementValue(&$a, &$value, &$maxvalue); if ($a['flags'] & ACHIEVEMENT_FLAG_BAR) { echo '<div class="sub bar">' . renderProgress($value, $maxvalue) . '</div>'; } else { if ($a['flags'] & ACHIEVEMENT_FLAG_MAX_USED) { echo '<div class="sub bar">' . renderProgress($value, $maxvalue) . '</div>'; } else { echo '<div class="sub ' . ($value >= $maxvalue ? 'compl' : '') . '">' . $value . '</div>'; } } } foreach ($a['requirement'] as $r) { if ($r['completionFlag'] & ACHIEVEMENT_CRITERIA_FLAG_HIDE_CRITERIA) { continue; } if ($r['completionFlag'] & ACHIEVEMENT_CRITERIA_FLAG_SHOW_PROGRESS_BAR) { echo '<div class=sub_bar>' . renderProgress(@$r['counter'], $r['value'], $r['completionFlag'] & ACHIEVEMENT_CRITERIA_FLAG_MONEY_COUNTER) . '</div>'; } else { $text = $r['name'] ? $r['name'] : $a['name']; $completed = $r['counter'] ? $r['counter'] >= $r['value'] ? 'compl' : '' : ''; // $text.="-> $r[id] - f=$r[completionFlag], c=$r[counter], d=$r[data], v=$r[value]"; echo '<div class="sub ' . $completed . '">' . $text . '</div>'; } } echo '<br clear="all"/></div>' . "\n"; // render date if ($a['date']) { echo '<div class=ach_date>' . getFormattedDate($a['date']) . '</div>'; } if ($a['titleReward']) { echo '<div class=ach_reward>' . $a['titleReward'] . '</div>'; } echo '</div>'; }
} if ($go = $dDB->select("SELECT {$filelds} FROM {$tables} WHERE {$filter} LIMIT 0, ?d", '%' . $name . '%', $limit)) { foreach ($go as $g) { $result['g'][] = array('txt' => $g['name'], 'link' => '?object=' . $g['entry'], 'type' => $ls_type_name['g']); } } } // Spell search if ($type == 's' or $type == 'all') { if ($spells = $wDB->select('SELECT `id`, `SpellName`, `Rank`, `SpellIconID` FROM `wowd_spell` WHERE `SpellName` like ? LIMIT 0, ?d', '%' . $name . '%', $limit)) { foreach ($spells as $spell) { $n = $spell['SpellName']; if ($spell['Rank']) { $n .= ' (' . $spell['Rank'] . ')'; } $result['s'][] = array('ico' => getSpellIcon($spell['SpellIconID'], 0), 'txt' => $n, 'link' => '?spell=' . $spell['id'], 'type' => $ls_type_name['s']); } } } // Faction search if ($type == 'f' or $type == 'all') { $factions = $wDB->select('SELECT `id`, `name` FROM `wowd_faction` WHERE `name` like ? LIMIT 0, ?d', '%' . $name . '%', $limit); if ($factions) { foreach ($factions as $f) { $result['f'][] = array('txt' => $f['name'], 'link' => '?faction=' . $f['id'], 'type' => $ls_type_name['f']); } } } // Area search if ($type == 'a' or $type == 'all') { $area = $wDB->select('SELECT `id`, `name` FROM `wowd_zones` WHERE `name` like ? LIMIT 0, ?d', '%' . $name . '%', $limit);
function show_spell($entry, $iconId = 0, $style = 0) { global $wDB; if (!$iconId) { $iconId = $wDB->selectCell('-- CACHE: 1h SELECT `SpellIconID` FROM `wowd_spell` WHERE `id` = ?d', $entry); } $icon = getSpellIcon($iconId); echo '<a href="?spell=' . $entry . '"><img' . ($style ? ' class=' . $style : '') . ' src="' . $icon . '"></a>'; return; }
function r_glyphIcon($data) { echo '<img src="' . getSpellIcon($data['iconId']) . '">'; }
echo "<a href=\"" . sprintf($lang['www_spell'], $entry) . "\" target=\"_blank\"\">" . sprintf($lang['www_spell'], $entry) . "</a><br>"; } $icon = getSpellIcon($spell['SpellIconID']); echo "<table cellspacing=0 celloadding=0 width=500><tbody>"; echo "<tr>"; echo "<td valign=top align=right width=20%>"; echo "<br><a href=\"#\"><img border=0 src='{$icon}' width=64></a></td>"; echo "<td>"; generateSpellTable($spell); echo "</td>"; echo "</tr>"; if ($spell['ToolTip'] && $spell['ToolTip'] != $spell['Description']) { echo "<tr>"; echo "<td valign=top align=right>"; if ($spell['activeIconID'] && $spell['SpellIconID'] != $spell['activeIconID']) { $buff_icon = getSpellIcon($spell['activeIconID']); echo "<br><a href=\"#\"><img border=0 src='{$buff_icon}' width=64></a>"; } echo "</td>"; echo "<td>"; generateSpellBuffTable($spell); echo "</td>"; echo "</tr>"; } echo "</tbody></table>"; echo "<br>"; //******************************************************************************** // Вывод данных по спеллу //******************************************************************************** createSpellDetails($spell); }