Чуть локали.)
[cswow.git] / module / talent_calc / talent.php
blob34e858710e52171f96ffe131d16b944bb149bb1e
1 <?php
2 include_once("include/functions.php");
3 include_once("include/talent_calc.php");
4 //==============================================================================
5 // Скрипт предназначен для вывода талантов игрока
6 //==============================================================================
7 $talent = (isset($_REQUEST['talent']) ? strtolower(@$_REQUEST['talent']) : "");
8 if (isset($_REQUEST['pet']))
9 $pid = intval($_REQUEST['pet']);
10 else
11 $pid = -1;
13 $bild = (isset($_REQUEST['bild']) ? @$_REQUEST['bild'] : "");
15 $cid = 0;
17 $link = '?talent';
18 $header = '';
20 echo '<div>';
21 //echo '<b>Classes:</b> ';
22 $cname = array(1=>'warrior',2=>'paladin',3=>'hunter',4=>'rogue',5=>'priest',6=>'death_knight',7=>'shaman',8=>'mage',9=>'warlock',11=>'druid');
24 foreach($cname as $c=>$name)
26 echo '<a href="?talent='.$name.'" '.addTooltip(getClass($c)).'><img class=item src="'.getClassImage($c).'"></a>&nbsp;';
27 if ($talent==$name)
29 $header = getClass($c);
30 $link.="=".$name;
31 $cid = $c;
34 echo "<br>";
35 //echo "<br><b>Pets:</b> ";
36 $list = $wDB->select('SELECT `id`, `category` FROM `wowd_creature_family` WHERE `category` <> -1 ORDER BY `name`');
37 foreach($list as $family)
39 $f = $family['id'];
40 $c = $family['category'];
41 echo '<a href="?talent&pet='.$c.'" '.addTooltip(getCreatureFamily($f,0)).'><img class=item src="'.getFamilyImage($f).'"></a>&nbsp;';
42 if ($pid==$c)
44 $header = getCreatureFamily($f);
45 $link.="&pet=".$c;
48 echo '</div><br>';
51 if ($cid OR $pid>=0)
53 echo '<div id="talent"></div>';
54 includeTalentScript($cid, $pid, $config['talent_calc_max_level'], $header);
55 if ($bild) echo '<script type="text/javascript">tc_bildFromStr("'.$bild.'");</script>';
56 echo '<script type="text/javascript">tc_renderTree("talent");</script>';
58 echo '<div class=faq><center>';
59 echo '<a href="'.$link.'" id=talent_bild_link>'.$lang['bild_link'].'</a> | <a href="#" onclick="return tc_resetBild();">'.$lang['reset_talents'].'</a>';
60 echo '</center></div>';