Разделение иконок для нпц, на дающих и принимающих квест...
[cswow.git] / module / show / show_enchant.php
blobafa0d922923f483b3e8d7403aedfcb9f783739fa
1 <?php
2 include_once("conf.php");
3 include_once("include/enchant_table.php");
4 include_once("include/report_generator.php");
5 ##########
6 /*
7 Ñêðèïò ïîêàçûâàåò ýí÷àíò ïî åãî $entry
8 Ïîêàçûâàåò:
9 - Äåëàåòñÿ ñïåëëîì
10 - Êàìíè äàþùèå ýòîò ýí÷àíò
11 - Âåùè ñ áîíóñàìè êàìíåé, äàþùèå ýòîò ýí÷àíò
12 - Âûáðàòü ðàíäîì ýí÷àíòû ñïèñîê
13 - Ðàíäîì ñóôôèêñû
16 $entry = intval(@$_REQUEST['enchant']);
17 $page = intval(@$_REQUEST['page']);
18 $mark = @$_REQUEST['mark'];
19 $enc=getEnchantment($entry);
20 if (!$enc)
22 RenderError($lang['enchant_not_found']);
24 else
26 $baseLink = '?enchant='.$entry;
27 if ($ajaxmode==0)
29 echo "<table cellspacing=0 cellpadding=0 width=500>";
30 echo "<tbody>";
31 echo "<tr>";
32 echo "<td align=center>";generateEnchantTable($enc);echo "</td>";
33 echo "</tr>";
34 echo "</tbody></table>";
36 createReportTab();
37 //********************************************************************************
38 // Äåëàåòñÿ ñïåëëîì
39 //********************************************************************************
40 $spell_list =& new SpellReportGenerator;
41 $fields = array('SPELL_REPORT_LEVEL','SPELL_REPORT_ICON','SPELL_REPORT_NAME');
42 if ($spell_list->Init($fields, $baseLink, 'spellLIST', $config['fade_limit'], 'name'))
44 $spell_list->enchantFromSpells($entry);
45 $spell_list->createReport($lang['enchant_by_spell']);
47 //**************************************************
48 // Êàìíè äàþùèå ýòîò ýí÷àíò
49 //**************************************************
50 $sitem_req =& new ItemReportGenerator();
51 $fields = array('ITEM_REPORT_LEVEL','ITEM_REPORT_ICON','ITEM_REPORT_NAME');
52 if ($sitem_req->Init($fields, $baseLink, 'itemreqLIST', $config['fade_limit'], 'rep_rank'))
54 $sitem_req->enchantByGems($entry);
55 $sitem_req->createReport($lang['enchant_by_gems']);
57 //**************************************************
58 // Âåùè ñ áîíóñàìè êàìíåé, äàþùèå ýòîò ýí÷àíò
59 //**************************************************
60 $item_req =& new ItemReportGenerator();
61 $fields = array('ITEM_REPORT_LEVEL','ITEM_REPORT_ICON','ITEM_REPORT_NAME');
62 if ($item_req->Init($fields, $baseLink, 'itemreqLIST', $config['fade_limit'], 'rep_rank'))
64 $item_req->socketBonus($entry);
65 $item_req->createReport($lang['enchant_by_socket']);
67 //**************************************************
68 // Âûáðàòü ðàíäîì ýí÷àíòû ñïèñîê
69 //**************************************************
70 $rnd_propety =& new RandomPropetyReportGenerator();
71 $fields = array('RPROP_REPORT_ID','RPROP_REPORT_NAME','RPROP_REPORT_ENCHANTS');
72 if ($rnd_propety->Init($fields, $baseLink, 'randPropLIST', $config['fade_limit'], 'name'))
74 $rnd_propety->enchantFrom($entry);
75 $rnd_propety->createReport($lang['enchant_by_rand_prop']);
77 //**************************************************
78 // Ðàíäîì ñóôôèêñû
79 //**************************************************
80 $rnd_suffix =& new RandomSuffixReportGenerator();
81 $fields = array('RSUFF_REPORT_ID','RSUFF_REPORT_NAME','RSUFF_REPORT_ENCHANTS');
82 if ($rnd_suffix->Init($fields, $baseLink, 'randSuffLIST', $config['fade_limit'], 'name'))
84 $rnd_suffix->enchantFrom($entry);
85 $rnd_suffix->createReport($lang['enchant_by_rand_suff']);