function noBorderEnchantTable($enc) { global $UseorEquip, $game_text; echo "<table class=spell><tbody>"; echo "<tr><td class=Name>" . $enc['description'] . "</td></tr>"; // Вывод требования скила if ($enc['requiredSkill']) { echo '<tr><td class=req>' . sprintf($game_text['req_skill'], getSkillName($enc['requiredSkill']), $enc['requiredSkillRank']) . '</td></tr>'; } for ($i = 1; $i < 4; $i++) { if ($type = $enc['display_type_' . $i]) { $amount = $enc['amount_' . $i]; $spellid = $enc['spellid_' . $i]; switch ($type) { case 1: // ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL if ($spell = getSpell($spellid)) { if ($desc = getSpellDesc($spell)) { $text = $desc; } else { if ($buff = getSpellBuff($spell)) { $text = $buff; } else { $text = $spell['SpellName']; } } echo "<tr><td class=SpellEnch>" . $UseorEquip[2] . " <a href=\"?spell={$spellid}\">" . $text . "</a></td></tr>"; } else { echo "<tr><td class=SpellEnch>" . $UseorEquip[2] . " cast ?? {$spellid}</td></tr>"; } break; case 2: // ITEM_ENCHANTMENT_TYPE_DAMAGE echo "<tr><td class=SpellEnch>+ {$amount} damage</td></tr>"; break; case 3: // ITEM_ENCHANTMENT_TYPE_EQUIP_SPELL if ($spell = getSpell($spellid)) { if ($desc = getSpellDesc($spell)) { $text = $desc; } else { if ($buff = getSpellBuff($spell)) { $text = $buff; } else { $text = $spell['SpellName']; } } echo "<tr><td class=SpellEnch>" . $UseorEquip[1] . " <a href=\"?spell={$spellid}\">" . $text . "</a></td></tr>"; } else { echo "<tr><td class=SpellDesc>" . $UseorEquip[1] . " cast ?? {$spellid}</td></tr>"; } break; case 4: // ITEM_ENCHANTMENT_TYPE_RESISTANCE echo "<tr><td> " . getResistanceText($spellid, $amount) . "</td></tr>"; break; case 5: // ITEM_ENCHANTMENT_TYPE_STAT if ($spellid >= 0 && $spellid < 8) { echo "<tr><td class=SpellEnch> " . getItemBonusText($spellid, $amount) . "</td></tr>"; } else { echo "<tr><td class=SpellEnch> " . getItemBonusText($spellid, $amount) . "</td></tr>"; } break; case 6: // ITEM_ENCHANTMENT_TYPE_TOTEM echo "<tr><td class=SpellEnch>+ {$amount} damage (Rockbiter)</td></tr>"; break; case 7: // On Use if ($spell = getSpell($spellid)) { if ($desc = getSpellDesc($spell)) { $text = $desc; } else { if ($buff = getSpellBuff($spell)) { $text = $buff; } else { $text = $spell['SpellName']; } } echo "<tr><td class=SpellEnch>" . $UseorEquip[0] . " <a href=\"?spell={$spellid}\">" . $text . "</a></td></tr>"; } else { echo "<tr><td class=SpellDesc>" . $UseorEquip[0] . " cast ?? {$spellid}</td></tr>"; } break; case 8: // Add Sockets Enchant echo "<tr><td class=SpellEnch>Add Socket Enchant</td></tr>"; break; default: echo "<tr><td>Err type {$type}</td></tr>"; break; } } } echo "</tbody></table>"; }
function generateSpellBuffTable($spell) { echo "<table class=border cellspacing=0 cellpadding=0><tbody>"; echo "<tr><td class=btopl></td><td class=btop></td><td class=btopr></td></tr>"; echo "<tr><td class=bl></td><td class=bbody>"; echo "<table class=spell><tbody>"; $name = $spell['SpellName']; echo "<tr><td class=Name>" . $name . "</td></tr>"; echo "<tr><td colSpan=2 class=SpellDesc><a href=\"?spell={$spell['id']}\">" . getSpellBuff($spell) . "</a></td></tr>"; echo "</tbody></table>"; echo "</td><td class=br></td></tr>"; echo "<tr><td class=bbottoml></td><td class=bbottom></td><td class=bbottomr></td></tr>"; echo "</tbody></table>"; }
function createSpellDetails($spell) { global $lang; echo '<table class=details width=600><tbody>'; echo '<tr><td colspan=4 class=head>' . $lang['detail_info'] . '</td></tr>'; echo '<tr><th>Name</th><td colspan=2>' . $spell['SpellName'] . '</td><td align=right>' . $spell['Rank'] . '</td></tr>'; if ($spell['Description']) { echo '<tr><th width=60>Info:</th><td colspan=3>' . getSpellDesc($spell) . '</td></tr>'; } if ($spell['ToolTip']) { echo '<tr><th>Buff:</th><td colspan=3>' . getSpellBuff($spell) . '</td></tr>'; } // Стоимость и длительность $cost = getSpellCostText($spell); $duration = getSpellDurationText($spell); if ($cost or $duration) { echo '<tr><th>Cost</th><td>' . ($cost ? $cost : 'No Cost') . '</td><th>Duration</th><td>' . $duration . '</td></tr>'; } echo '<tr>'; echo '<th width=13%>Level</th>'; echo '<td width=37%>Base ' . $spell['baseLevel'] . ', Max ' . $spell['maxLevel'] . ', Spell ' . $spell['spellLevel'] . '</td>'; echo '<th width=20%>Range</th>'; echo '<td width=30%>' . getRangeText($spell['rangeIndex']) . '</td>'; echo '</tr>'; // Время квста и школа (выводятся всегда) echo '<tr><th>Cast time</th><td>' . getCastTimeText($spell) . '</td><th>School</th><td>' . getSpellSchool($spell['SchoolMask']) . '</td></tr>'; $skillAbility = getSkillLineAbility($spell['id']); if ($skillAbility or $spell['Category']) { echo '<tr>'; echo '<th>Skill</th>'; if ($skillAbility) { echo '<td>' . getSkillName($skillAbility['skillId']) . '</td>'; } else { echo '<td>n/a</td>'; } echo '<th>Category</th>'; if ($spell['Category']) { echo '<td>' . getCategoryName($spell['Category']) . '</td>'; } else { echo '<td>n/a</td>'; } echo '</tr>'; } // Вывод механики и диспелла if ($spell['Mechanic'] or $spell['Dispel']) { echo '<tr>'; echo '<th>Mechanic</th><td>' . getMechanicName($spell['Mechanic']) . '</td>'; echo '<th>Dispel type</th><td>' . getDispelName($spell['Dispel']) . '</td>'; echo '</tr>'; } // Вывод кулдаунов $cooldown = getSpellCooldown($spell); if ($cooldown or $spell['StartRecoveryCategory'] or $spell['StartRecoveryTime']) { echo '<tr>'; echo '<th>Cooldown</th>'; if ($cooldown) { echo '<td>' . getTimeText($cooldown / 1000) . '</td>'; } else { echo '<td>No cooldown</td>'; } echo '<th>Global cooldown</th>'; if ($spell['StartRecoveryCategory'] or $spell['StartRecoveryTime']) { echo '<td>'; echo 'Affected'; if ($spell['StartRecoveryTime']) { echo ', ' . getTimeText($spell['StartRecoveryTime'] / 1000); } else { echo ', Not start'; } echo '</td>'; } else { echo '<td>n/a</td>'; } echo '</tr>'; } // Вывод требований форм $stances = $spell['Stances']; $stancesNot = $spell['StancesNot']; if ($stances or $stancesNot) { echo '<tr>'; echo '<th>Req form</th>'; if ($stances) { echo '<td>' . getAllowableForm($stances) . '</td>'; } else { echo '<td>n/a</td>'; } echo '<th>Not in form</th>'; if ($stancesNot) { echo '<td>' . getAllowableForm($stancesNot) . '</td>'; } else { echo '<td>n/a</td>'; } echo '</tr>'; } // Вывод требований одетого снаряжения $itemClass = $spell['EquippedItemClass']; $itemSubClass = $spell['EquippedItemSubClassMask']; $inventoryTypeMask = $spell['EquippedItemInventoryTypeMask']; if ($itemClass >= 0 or $inventoryTypeMask) { echo '<tr>'; echo '<th>Req item</th>'; if ($itemClass >= 0) { echo '<td>'; if ($itemSubClass) { echo getClassName($itemClass, 0) . ': ' . getSubclassList($itemClass, $itemSubClass); } else { echo getClassName($itemClass); } echo '</td>'; } else { echo '<td>n/a</td>'; } echo '<th>Inv type</th>'; if ($inventoryTypeMask) { echo '<td>' . getInventoryTypeList($inventoryTypeMask) . '</td>'; } else { echo '<td>n/a</td>'; } echo '</tr>'; } // Вывод тотм категорий и спеллфокуса $totem1 = $spell['TotemCategory_1']; $totem2 = $spell['TotemCategory_2']; $focus = $spell['RequiresSpellFocus']; if ($totem1 or $totem2 or $focus) { echo '<tr>'; echo '<th>Tools</th>'; if ($totem1 or $totem2) { echo '<td>'; if ($totem1) { echo getTotemCategory($totem1); } if ($totem2) { echo ', ' . getTotemCategory($totem2); } echo '</td>'; } else { echo '<td>n/a</td>'; } echo '<th>Spell Focus</th>'; if ($focus) { echo '<td>' . getSpellFocusName($focus, 2) . '</td>'; } else { echo '<td>n/a</td>'; } echo '</tr>'; } $area = $spell['AreaGroupId']; if ($area) { echo '<tr>'; echo '<th>Area</th>'; if ($area) { echo '<td>' . $area . '</td>'; } else { echo '<td>n/a</td>'; } echo '</tr>'; } // Вывод требований целей $targets = $spell['Targets']; $targetCreature = $spell['TargetCreatureType']; if ($targets or $targetCreature) { echo '<tr>'; echo '<th>Targets</th>'; if ($targets) { echo '<td>' . getTargetsList($targets) . '</td>'; } else { echo '<td>n/a</td>'; } echo '<th>Creature type</th>'; if ($targetCreature) { echo '<td>' . getCreatureTypeList($targetCreature) . '</td>'; } else { echo '<td>n/a</td>'; } echo '</tr>'; } if ($spell['Reagent_1'] or $spell['Reagent_2'] or $spell['Reagent_3'] or $spell['Reagent_4'] or $spell['Reagent_5'] or $spell['Reagent_6'] or $spell['Reagent_7'] or $spell['Reagent_8']) { echo '<tr>'; echo '<th>Reagents</th>'; echo '<td colspan=3>'; r_spellReagents($spell); echo '</td>'; echo '</tr>'; } // Вывод эффектов showEffectData($spell, 1); showEffectData($spell, 2); showEffectData($spell, 3); echo '</tbody></table>'; }