2 include_once("functions.php");
3 include_once("spell_data.php");
5 function noBorderEnchantTable($enc)
7 global $UseorEquip, $game_text;
8 echo "<TABLE class=spell><TBODY>";
9 echo "<TR><TD class=Name>".$enc['description']."</TD></TR>";
10 // Âûâîä òðåáîâàíèÿ ñêèëà
11 if ($enc['requiredSkill'])
12 echo '<tr><td class=req>'.sprintf($game_text['req_skill'], getSkillName($enc['requiredSkill']), $enc['requiredSkillRank']).'</td></tr>';
16 if ($type = $enc['display_type_'.$i])
18 $amount = $enc['amount_'.$i];
19 $spellid = $enc['spellid_'.$i];
22 case 1: // ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL
23 if ($spell = getSpell($spellid))
25 if ($desc = getSpellDesc($spell))
27 else if ($buff = getSpellBuff($spell))
30 $text = $spell['SpellName'];
31 echo "<tr><td class=SpellEnch>".$UseorEquip[2]." <a href=\"?spell=$spellid\">".$text."</a></td></tr>";
34 echo "<tr><td class=SpellEnch>".$UseorEquip[2]." cast ?? $spellid</td></tr>";
36 case 2: // ITEM_ENCHANTMENT_TYPE_DAMAGE
37 echo "<tr><td class=SpellEnch>+ $amount damage</td></tr>";
39 case 3: // ITEM_ENCHANTMENT_TYPE_EQUIP_SPELL
40 if ($spell = getSpell($spellid))
42 if ($desc = getSpellDesc($spell))
44 else if ($buff = getSpellBuff($spell))
47 $text = $spell['SpellName'];
48 echo "<tr><td class=SpellEnch>".$UseorEquip[1]." <a href=\"?spell=$spellid\">".$text."</a></td></tr>";
51 echo "<tr><td class=SpellDesc>".$UseorEquip[1]." cast ?? $spellid</td></tr>";
53 case 4: // ITEM_ENCHANTMENT_TYPE_RESISTANCE
54 echo "<tr><td> ".getResistanceText($spellid, $amount)."</td></tr>";
56 case 5: // ITEM_ENCHANTMENT_TYPE_STAT
57 if ($spellid >=0 && $spellid < 8)
58 echo "<tr><td class=SpellEnch> ".getItemBonusText($spellid, $amount)."</td></tr>";
60 echo "<tr><td class=SpellEnch> ".getItemBonusText($spellid, $amount)."</td></tr>";
62 case 6: // ITEM_ENCHANTMENT_TYPE_TOTEM
63 echo "<tr><td class=SpellEnch>+ $amount damage (Rockbiter)</td></tr>";
66 if ($spell = getSpell($spellid))
68 if ($desc = getSpellDesc($spell))
70 else if ($buff = getSpellBuff($spell))
73 $text = $spell['SpellName'];
74 echo "<tr><td class=SpellEnch>".$UseorEquip[0]." <a href=\"?spell=$spellid\">".$text."</a></td></tr>";
77 echo "<tr><td class=SpellDesc>".$UseorEquip[0]." cast ?? $spellid</td></tr>";
79 case 8: // Add Sockets Enchant
80 echo "<tr><td class=SpellEnch>Add Socket Enchant</td></tr>";
83 echo "<tr><td>Err type $type</TD></TR>";
88 echo "</TBODY></TABLE>";
91 function generateEnchantTable($enc)
93 echo "<table class=border cellSpacing=0 cellPadding=0><tbody>";
94 echo "<tr><td class=btopl></td><td class=btop></td><td class=btopr></td></tr>";
95 echo "<tr><td class=bl></td><td class=bbody>";
96 noBorderEnchantTable($enc);
97 echo "</td><td class=br></td></tr>";
98 echo "<tr><td class=bbottoml></td><td class=bbottom></td><td class=bbottomr></td></tr>";
99 echo "</tbody></table>";