Локализация и другое.)
[cswow.git] / include / talent_table.php
blob0732aaef19816294d9796ef1fc3b889bd80a4d6b
1 <?php
3 function noBorderTalentTable($talentTab, $rank)
5 global $game_text;
6 if ($rank) $spell = getSpell($talentTab["Rank_$rank"]);
7 else $spell = getSpell($talentTab["Rank_1"]);
9 if ($spell)
11 $maxRank = 0;
12 if ($talentTab["Rank_5"]) $maxRank = 5;
13 else if ($talentTab["Rank_4"]) $maxRank = 4;
14 else if ($talentTab["Rank_3"]) $maxRank = 3;
15 else if ($talentTab["Rank_2"]) $maxRank = 2;
16 else if ($talentTab["Rank_1"]) $maxRank = 1;
18 echo "<TABLE class=spell><TBODY>";
19 $name = $spell['SpellName'];
20 // if ($spell['Rank']) $name .=" ($spell[Rank])";
21 echo "<TR><TD class=Name>".$name."</TD></TR>";
22 echo "<TR><TD>".$game_text['talent_rank']." $rank / $maxRank</TD></TR>";
23 echo "<TR><TD class=Talent>".getSpellDesc($spell)."</TD></TR>";
24 if ($rank!=0 && $rank!=$maxRank)
26 echo "<TR><TD><br>".$game_text['talent_next_rank']."</TD></TR>";
27 $spell = getSpell($talentTab["Rank_".($rank+1)]);
28 echo "<TR><TD class=Talent>".getSpellDesc($spell)."</TD></TR>";
30 echo "</TBODY></TABLE>";
32 else
34 echo "Talent error";
37 function generateTalentTable($talentTab, $rank)
39 echo "<table class=border cellSpacing=0 cellPadding=0><tbody>";
40 echo "<tr><td class=btopl></td><td class=btop></td><td class=btopr></td></tr>";
41 echo "<tr><td class=bl></td><td class=bbody>";
42 noBorderTalentTable($talentTab, $rank);
43 echo "</td><td class=br></td></tr>";
44 echo "<tr><td class=bbottoml></td><td class=bbottom></td><td class=bbottomr></td></tr>";
45 echo "</tbody></table>";