Кондиция 28.)
[cswowd.git] / module / armory / show_char_3d.php
blob9657b1b60bbc7e8393f6c3e7dcff11fcdc02c589
1 <?php
2 // 3D ìîäåëü
3 // ïîëó÷àåì displayid âåùè
4 function wowhead_did($item)
6 global $dDB;
7 $displayid = $dDB->selectCell("SELECT displayid FROM item_template WHERE entry = ?d", $item);
8 echo $displayid;
10 // ïîëó÷àåì ðàñó è êëàññ â âèäå, ïðèãîäíîì äëÿ WH 3D ïðîñìîòðùèêà
11 function char_racegender($race, $gender)
13 $char_race = array(
14 1 => 'human',
15 2 => 'orc',
16 3 => 'dwarf',
17 4 => 'nightelf',
18 5 => 'scourge',
19 6 => 'tauren',
20 7 => 'gnome',
21 8 => 'troll',
22 10 => 'bloodelf',
23 11 => 'draenei');
25 $char_gender = array(
26 0 => 'male',
27 1 => 'female');
29 echo $char_race[$race].$char_gender[$gender];
31 function showPlayer3d($char, $char_data){
33 <div id="model_scene" align="center">
34 <object id="wowhead" type="application/x-shockwave-flash" data="http://static.wowhead.com/modelviewer/ModelView.swf" height="640px" width="480px">
35 <param name="quality" value="high">
36 <param name="allowscriptaccess" value="always">
37 <param name="menu" value="false">
38 <param value="transparent" name="wmode">
39 <param name="flashvars" value="model=<?php char_racegender($char['race'], $char['gender']); ?>&amp;modelType=16&amp;ha=0&amp;hc=0&amp;fa=0&amp;sk=0&amp;fh=0&amp;fc=0&amp;contentPath=http://static.wowhead.com/modelviewer/&amp;blur=1&amp;equipList=1,<?php wowhead_did($char_data[PLAYER_SLOT_ITEM_HEAD]); ?>,3,<?php wowhead_did($char_data[PLAYER_SLOT_ITEM_SHOULDER]); ?>,16,<?php wowhead_did($char_data[PLAYER_SLOT_ITEM_BACK]); ?>,5,<?php wowhead_did($char_data[PLAYER_SLOT_ITEM_CHEST]); ?>,9,<?php wowhead_did($char_data[PLAYER_SLOT_ITEM_WRIST]); ?>,10,<?php wowhead_did($char_data[PLAYER_SLOT_ITEM_GLOVES]); ?>,6,<?php wowhead_did($char_data[PLAYER_SLOT_ITEM_BELT]); ?>,7,<?php wowhead_did($char_data[PLAYER_SLOT_ITEM_LEGS]); ?>,8,<?php wowhead_did($char_data[PLAYER_SLOT_ITEM_FEET]); ?>,14,<?php wowhead_did($char_data[PLAYER_SLOT_ITEM_OFF_HAND]); ?>,21,<?php wowhead_did($char_data[PLAYER_SLOT_ITEM_MAIN_HAND]); ?>">
40 <param name="movie" value="http://static.wowhead.com/modelviewer/ModelView.swf">
41 </object>
42 </div>
43 <?php