2 include_once("player_info_generator.php");
4 function showPlayerEquip($guid, $char, $char_data, $char_stat)
8 $char_name = $char['name'];
9 $genderId = $char['gender'];
10 $class = $char['class'];
11 $race = $char['race'];
12 $money = $char['money'];
13 $level = $char['level'];
14 $health = $char['health'];
15 $maxhealth = $char_stat['maxhealth'];
16 switch ($char['class']):
17 case 1: $powerType = 1; break;
24 case 11: $powerType = 0; break;
25 case 4: $powerType = 3; break;
26 case 6: $powerType = 6; break;
29 case 0: $power = $char['power1']; $maxpower = $char_stat['maxpower1']; break;
30 case 1: $power = $char['power2']; $maxpower = $char_stat['maxpower2']; break;
31 case 3: $power = $char['power4']; $maxpower = $char_stat['maxpower4']; break;
32 case 6: $power = $char['power7']; $maxpower = $char_stat['maxpower7']; break;
34 // Ярость надо делить на 10
35 if ($powerType == POWER_RAGE ||
$powerType == POWER_RUNIC_POWER
)
37 $power = intval($power/10);
38 $maxpower = intval($maxpower/10);
40 echo "<table cellSpacing=0 border=0>";
43 echo "<table cellSpacing=0 cellPadding=0 border=0px>";
44 echo "<tbody><tr><td width=356px height=468px align=left valign=top>";
45 echo "<div style=\"position: relative; border: 0px; left: 0px; top: 0px;\">";
46 if (getRace($race)) $frame = $genderId."_".$race.".gif";
47 else $frame="TempPortrait.gif";
48 echo "<img src=images/player_info/characterframe/$frame style=\"position: absolute; border: 0px; left: 9px; top: 6px;\">";
49 echo "<img src=images/player_info/characterframe/characterframe.png style=\"position: absolute; border: 0px; left: 0px; top: 0px;\">";
51 echo "<table cellspacing=0 class=playerName style='position: absolute; left: 73px; top: 15px;'>";
53 echo "<tr><td class=name>$char_name - ".getClass($class)." $level lvl</td></tr>";
57 // Вычисление и генерация переменных $health и $maxhealth для создания изменяемой полоски
58 if ($health > $maxhealth){ $health = $maxhealth; }
59 $maxhealth != 0 ?
$h_percent = round($health/$maxhealth*100,0) : $h_percent = 0;
60 $h_percent == 0 ?
$h_l_on_off = "left-off" : $h_l_on_off = "left-on";
61 $h_percent == 100 ?
$h_r_on_off = "right-on" : $h_r_on_off = "right-off";
62 echo "<table cellpadding='0' cellspacing='0' width=275px style='position:absolute; top:37px; left:73px;'>";
65 echo "<td style='position:absolute; width: 275px; font-size:10px;' align = center><font color=white><b>$health / $maxhealth</b></font></td>";
66 echo "<td style='width: 6px; background: url(images/bar/$h_l_on_off.gif) left no-repeat;'></td>";
67 echo "<td style='width: ".($h_percent*2.75)."px; height:13px; background: url(images/bar/bar-on.gif) repeat-x;'></td>";
68 echo "<td style='width: ".(275-$h_percent*2.75)."px; height:13px; background: url(images/bar/bar-off.gif) repeat-x;'></td>";
69 echo "<td style='width: 6px;background: url(images/bar/$h_r_on_off.gif) right no-repeat;'></td>";
74 // Вычисление и генерация переменных $power и $maxpower для создания изменяемой полоски
75 if ($power > $maxpower){ $power = $maxpower; }
78 if ($powerType == 3) $typeSlid="energy"; //Энергия
79 elseif ($powerType == 1) $typeSlid="rage"; //Ярость
80 else $typeSlid="mana"; //Мана
82 $m_percent = $maxpower != 0 ?
round($power/$maxpower*100,0) : 0;
83 $m_l_on_off = $m_percent == 0 ?
"left-off" : "$typeSlid-left-on";
84 $m_r_on_off = $m_percent == 100 ?
"$typeSlid-right-on" : "right-off";
86 echo "<table cellpadding='0' cellspacing='0' width=275px style='position:absolute; top:55px; left:73px'>";
89 echo "<td style='position:absolute; width: 275px; font-size:10px;' align = center><font color=white><b>$power / $maxpower</b></font></td>";
90 echo "<td style='width: 6px; height:13px; background: url(images/bar/$m_l_on_off.gif) left no-repeat;'></td>";
91 echo "<td style='width: ".($m_percent*2.75)."px; height:13px; background: url(images/bar/$typeSlid-bar-on.gif) repeat-x;'></td>";
92 echo "<td style='width: ".(275-$m_percent*2.75)."px; height:13px; background: url(images/bar/bar-off.gif) repeat-x;'></td>";
93 echo "<td style='width: 6px; height:13px; background: url(images/bar/$m_r_on_off.gif) right no-repeat;'></td>";
98 // Player stats render
99 echo '<table class=playerstats cellSpacing=0 style="width: 230px; position: absolute; left: 68px; top: 78px;">';
102 // Resistances render
103 echo '<tr><td colspan=2 align=center>';
104 echo '<table class=resistances cellSpacing=0>';
107 renderResist(SCHOOL_FIRE
,$char_stat['resFire'],$char); echo "\n";
108 renderResist(SCHOOL_NATURE
,$char_stat['resNature'],$char); echo "\n";
109 renderResist(SCHOOL_FROST
,$char_stat['resFrost'],$char); echo "\n";
110 renderResist(SCHOOL_SHADOW
,$char_stat['resShadow'],$char); echo "\n";
111 renderResist(SCHOOL_ARCANE
,$char_stat['resArcane'],$char); echo "\n";
117 echo '<tr><td class=head width=50%>'.$lang['player_page_base'].'</td><td class=head width=50%>'.$lang['player_page_defence'].'</td></tr>';
121 echo '<div style="position: relative; left: 0px; top: 0px;">';
122 echo '<table class=stattext cellSpacing=0>';
123 echo "<tr><td>".getStatTypeName(STAT_STRENGTH
).":</td></tr>\n";
124 echo "<tr><td>".getStatTypeName(STAT_AGILITY
).":</td></tr>\n";
125 echo "<tr><td>".getStatTypeName(STAT_STAMINA
).":</td></tr>\n";
126 echo "<tr><td>".getStatTypeName(STAT_INTELLECT
).":</td></tr>\n";
127 echo "<tr><td>".getStatTypeName(STAT_SPIRIT
).":</td></tr>\n";
128 echo "<tr><td>".getResistance(SCHOOL_ARMOR
).":</td></tr>\n";
130 echo "<table class=statvalue cellSpacing=0 style=\"position: absolute; left: 0px; top: 0px;\">\n";
131 echo "<tr>";renderStatRow(STAT_STRENGTH
,$char,$char_stat['strength']);echo "</tr>\n";
132 echo "<tr>";renderStatRow(STAT_AGILITY
,$char,$char_stat['agility']);echo "</tr>\n";
133 echo "<tr>";renderStatRow(STAT_STAMINA
,$char,$char_stat['stamina']);echo "</tr>\n";
134 echo "<tr>";renderStatRow(STAT_INTELLECT
,$char,$char_stat['intellect']);echo "</tr>\n";
135 echo "<tr>";renderStatRow(STAT_SPIRIT
,$char,$char_stat['spirit']);echo "</tr>\n";
136 echo "<tr>";renderResist(SCHOOL_ARMOR
,$char_stat['armor'],$char);echo "</tr>\n";
142 echo '<div style="position: relative; left: 0px; top: 0px;">';
143 echo '<table class=stattext cellSpacing=0>';
144 echo '<tr><td>'.$lang['player_armor'].'</td></tr>';
145 // echo '<tr><td>'.$lang['player_defence'].'</td></tr>';
146 echo '<tr><td>'.$lang['player_dodge'].'</td></tr>';
147 echo '<tr><td>'.$lang['player_parry'].'</td></tr>';
148 echo '<tr><td>'.$lang['player_block'].'</td></tr>';
149 // echo '<tr><td>'.$lang['player_recilence'].'</td></tr>';
151 echo '<table class=statvalue cellSpacing=0 style="position: absolute; left: 0px; top: 0px;">';
152 echo "<tr>";@renderResist
(SCHOOL_ARMOR
,$char_stat['armor'],$char);echo "</tr>\n";
153 // echo "<tr>";@renderDefence($char_data);echo "</tr>\n";
154 echo "<tr>";@renderDodge
($char_data);echo "</tr>\n"; // dodgePct
155 echo "<tr>";@renderParry
($char_data);echo "</tr>\n"; // parryPct
156 echo "<tr>";@renderBlock
($char_data);echo "</tr>\n"; // blockPct
157 // echo "<tr>";@renderRecilence($char_data);echo "</tr>\n";
163 echo '<tr><td class=head width=50%>'.$lang['player_melee'].'</td><td class=head width=50%>'.$lang['player_ranged'].'</td></tr>';
167 echo '<div style="position: relative; left: 0px; top: 0px;">';
169 echo '<table class=stattext cellSpacing=0>';
170 echo '<tr><td>'.$lang['player_m_skill'].'</td></tr>';
171 echo '<tr><td>'.$lang['player_m_damage'].'</td></tr>';
172 echo '<tr><td>'.$lang['player_m_speed'].'</td></tr>';
173 echo '<tr><td>'.$lang['player_m_power'].'</td></tr>';
174 echo '<tr><td>'.$lang['player_m_hit'].'</td></tr>';
175 echo '<tr><td>'.$lang['player_m_crit'].'</td></tr>';
177 echo '<table class=statvalue cellSpacing=0 style="position: absolute; left: 0px; top: 0px;">';
178 echo "<tr>";@renderMeleeSkill
($char_data);echo "</tr>\n";
179 echo "<tr>";@renderMeleeDamage
($char_data);echo "</tr>\n";
180 echo "<tr>";@renderMeleeSpeed
($char_data);echo "</tr>\n";
181 echo "<tr>";@renderMeleeAP
($char_data);echo "</tr>\n";
182 echo "<tr>";@renderMeleeHit
($char_data);echo "</tr>\n";
183 echo "<tr>";@renderMeleeCrit
($char_data);echo "</tr>\n";
189 echo '<div style="position: relative; left: 0px; top: 0px;">';
190 echo '<table class=stattext cellSpacing=0>';
191 echo '<tr><td>'.$lang['player_r_skill'].'</td></tr>';
192 echo '<tr><td>'.$lang['player_r_damage'].'</td></tr>';
193 echo '<tr><td>'.$lang['player_r_speed'].'</td></tr>';
194 echo '<tr><td>'.$lang['player_r_power'].'</td></tr>';
195 echo '<tr><td>'.$lang['player_r_hit'].'</td></tr>';
196 echo '<tr><td>'.$lang['player_r_crit'].'</td></tr>';
198 echo '<table class=statvalue cellSpacing=0 style="position: absolute; left: 0px; top: 0px;">';
199 echo "<tr>";@renderRangedSkill
($char_data);echo "</tr>\n";
200 echo "<tr>";@renderRangedDamage
($char_data) ;echo "</tr>\n";
201 echo "<tr>";@renderRangedSpeed
($char_data);echo "</tr>\n";
202 echo "<tr>";@renderRangedAP
($char_data);echo "</tr>\n";
203 echo "<tr>";@renderRangedHit
($char_data);echo "</tr>\n";
204 echo "<tr>";@renderRangedCrit
($char_data);echo "</tr>\n";
210 echo '<tr><td class=head colspan=2>'.$lang['player_spell'].'</td></tr>';
213 // 1 part Spell render
214 echo '<div style="position: relative; left: 0px; top: 0px;">';
215 echo '<table class=stattext cellSpacing=0>';
216 echo '<tr><td>'.$lang['player_s_damage'].'</td></tr>';
217 echo '<tr><td>'.$lang['player_s_healing'].'</td></tr>';
218 echo '<tr><td>'.$lang['player_s_hit'].'</td></tr>';
220 echo '<table class=statvalue cellSpacing=0 style="position: absolute; left: 0px; top: 0px;">';
221 echo "<tr>";@renderSpellDamage
($char_data);echo "</tr>\n";
222 echo "<tr>";@renderSpellHeal
($char_data);echo "</tr>\n";
223 echo "<tr>";@renderSpellHit
($char_data);echo "</tr>\n";
227 // 2 part Spell render
229 echo '<div style="position: relative; left: 0px; top: 0px;">';
230 echo '<table class=stattext cellSpacing=0>';
231 echo '<tr><td>'.$lang['player_s_crit'].'</td></tr>';
232 echo '<tr><td>'.$lang['player_s_haste'].'</td></tr>';
233 echo '<tr><td>'.$lang['player_s_regen'].'</td></tr>';
235 echo '<table class=statvalue cellSpacing=0 style="position: absolute; left: 0px; top: 0px;">';
237 echo "<tr>";@renderSpellCrit
($char_data);echo "</tr>\n";
238 echo "<tr>";@renderSpellHaste
($char_data);echo "</tr>\n";
239 echo "<tr>";@renderManaRegen
($char_data);echo "</td></tr>\n";
249 show_item_from_char($char_data[PLAYER_SLOT_ITEM_HEAD
],$guid,$imgsize,22,73,"head");
250 show_item_from_char($char_data[PLAYER_SLOT_ITEM_NECK
],$guid,$imgsize,22,114,"neck");
251 show_item_from_char($char_data[PLAYER_SLOT_ITEM_SHOULDER
],$guid,$imgsize,22,155,"shoulder");
252 show_item_from_char($char_data[PLAYER_SLOT_ITEM_BACK
],$guid,$imgsize,22,196,"back");
253 show_item_from_char($char_data[PLAYER_SLOT_ITEM_CHEST
],$guid,$imgsize,22,237,"chest");
254 show_item_from_char($char_data[PLAYER_SLOT_ITEM_SHIRT
],$guid,$imgsize,22,278,"shirt");
255 show_item_from_char($char_data[PLAYER_SLOT_ITEM_TABARD
],$guid,$imgsize,22,319,"tabard");
256 show_item_from_char($char_data[PLAYER_SLOT_ITEM_WRIST
],$guid,$imgsize,22,360,"wrist");
258 show_item_from_char($char_data[PLAYER_SLOT_ITEM_GLOVES
],$guid,$imgsize,306,73,"gloves");
259 show_item_from_char($char_data[PLAYER_SLOT_ITEM_BELT
],$guid,$imgsize,306,114,"belt");
260 show_item_from_char($char_data[PLAYER_SLOT_ITEM_LEGS
],$guid,$imgsize,306,155,"legs");
261 show_item_from_char($char_data[PLAYER_SLOT_ITEM_FEET
],$guid,$imgsize,306,196,"feet");
262 show_item_from_char($char_data[PLAYER_SLOT_ITEM_FINGER1
],$guid,$imgsize,306,237,"finger");
263 show_item_from_char($char_data[PLAYER_SLOT_ITEM_FINGER2
],$guid,$imgsize,306,278,"finger");
264 show_item_from_char($char_data[PLAYER_SLOT_ITEM_TRINKET1
],$guid,$imgsize,306,319,"trinket");
265 show_item_from_char($char_data[PLAYER_SLOT_ITEM_TRINKET2
],$guid,$imgsize,306,360,"trinket");
267 show_item_from_char($char_data[PLAYER_SLOT_ITEM_MAIN_HAND
],$guid,$imgsize,122,384,"main");
268 show_item_from_char($char_data[PLAYER_SLOT_ITEM_OFF_HAND
],$guid,$imgsize,164,384,"off");
269 show_item_from_char($char_data[PLAYER_SLOT_ITEM_RANGED
],$guid,$imgsize,206,384,"ranged");
271 // show_item_by_guid($char_data[PLAYER_SLOT_ITEM_TABARD+2],$imgsize,0,400);
272 // show_item_by_guid($char_data[PLAYER_SLOT_ITEM_TABARD+4],$imgsize,40,400);
273 // show_item_by_guid($char_data[PLAYER_SLOT_ITEM_TABARD+6],$imgsize,80,400);
274 // show_item_by_guid($char_data[PLAYER_SLOT_ITEM_TABARD+8],$imgsize,120,400);
276 //show_item_by_guid($char_data[OFFSET_EQU_RANGED+32],$imgsize,50,50);
278 echo "</td></tr></tbody>";
279 echo "</table></td>\n";
280 echo "<td valign=top>";
281 show_player_auras_from_db($guid);