function noBorderFactionTable($faction) { global $game_text; echo '<table class=factiontip cellspacing=0>'; echo '<tbody>'; echo '<tr><td class=name>' . $faction['name'] . '</td></tr>'; if ($faction['team']) { echo '<tr><td>' . getFactionName($faction['team']) . '</td></tr>'; } if ($faction['details']) { echo '<tr><td>' . $faction['details'] . '</td></tr>'; } echo '</tbody></table>'; }
break; case 'inv': $breadcrumbs = "<a href='index.php?editor=" . $editor . "'>Player Inventory</a>"; break; case 'keys': $breadcrumbs = "<a href='index.php?editor=" . $editor . "'>Player Keys</a>"; break; } if ($z != '') { $breadcrumbs .= " >> " . "<a href='index.php?editor=" . $editor . "&z=" . $z . "&zoneid=" . getZoneIDByName($z) . "'>" . getZoneLongName($z) . "</a>"; } if ($npcid != '' && $npcid != 'ID' && $editor != 'altcur' && $editor != 'qglobal') { $breadcrumbs .= " >> " . getNPCName($npcid) . " ({$npcid})"; } if ($fid != '') { $breadcrumbs .= " >> " . getFactionName($fid); } if ($tskid != '') { $breadcrumbs .= " >> " . getTaskTitle($tskid); } if ($ts != '') { $breadcrumbs .= " >> " . "<a href='index.php?editor=" . $editor . "&ts=" . $ts . "'>" . $tradeskills[$ts] . "</a>"; } if ($rec != '0') { $breadcrumbs .= " >> " . getRecipeName($rec); } if ($spellset != '') { $breadcrumbs .= " >> " . getSpellsetName($spellset); } if ($playerid != '' && $playerid != 'Player ID') { $breadcrumbs .= " >> <a href='index.php?editor=" . $editor . "&playerid=" . $playerid . "'>" . getPlayerName($playerid) . " ({$playerid})</a>";
function showEffectInfo($spell, $effect, $eff_id) { global $lang; $misc = $spell['EffectMiscValue_' . $effect]; switch ($eff_id) { // школа case 2: echo ' (' . getSpellSchool($spell['SchoolMask']) . ')'; break; // Misc - тип энергии // Misc - тип энергии case 8: // SPELL_EFFECT_POWER_DRAIN // SPELL_EFFECT_POWER_DRAIN case 30: // SPELL_EFFECT_ENERGIZE // SPELL_EFFECT_ENERGIZE case 62: echo ' (' . getPowerTypeName($misc) . ')'; break; case 16: // SPELL_EFFECT_QUEST_COMPLETE // SPELL_EFFECT_QUEST_COMPLETE case 147: // SPELL_EFFECT_QUEST_FAIL // SPELL_EFFECT_QUEST_FAIL case 139: echo ' (' . getQuestName($misc) . ')'; break; case 28: // SPELL_EFFECT_SUMMON // SPELL_EFFECT_SUMMON case 56: // SPELL_EFFECT_SUMMON_PET // SPELL_EFFECT_SUMMON_PET case 90: // Kill Credit // Kill Credit case 134: echo ' (' . getCreatureName($misc) . ')'; break; case 50: // SPELL_EFFECT_SUMMON_OBJECT // SPELL_EFFECT_SUMMON_OBJECT case 76: // SPELL_EFFECT_SUMMON_OBJECT_WILD // SPELL_EFFECT_SUMMON_OBJECT_WILD case 104: case 105: case 106: case 107: echo ' (' . getGameobjectName($misc) . ')'; break; case 53: // SPELL_EFFECT_ENCHANT_ITEM // SPELL_EFFECT_ENCHANT_ITEM case 54: // SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY // SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY case 92: echo ' (' . getEnchantmentDesc($misc) . ')'; break; case 39: echo ' (' . getLaungageName($misc) . ')'; break; case 44: // SPELL_EFFECT_SKILL_STEP // SPELL_EFFECT_SKILL_STEP case 118: echo ' (' . getSkillName($misc) . ')'; break; // Misc - тип рейтинга // Misc - тип рейтинга case 189: echo ' (' . getRatingList($misc) . ')'; break; // Misc - тип диспелла // Misc - тип диспелла case 38: // SPELL_EFFECT_DISPEL // SPELL_EFFECT_DISPEL case 126: echo ' (' . getDispelName(abs($misc)) . ')'; break; // Misc - тип механики // Misc - тип механики case 108: echo ' (' . getMechanicName($misc) . ')'; break; case 94: // SPELL_EFFECT_SELF_RESURRECT // SPELL_EFFECT_SELF_RESURRECT case 113: echo ' (Restore ' . $misc . ' power)'; break; case 103: echo ' (' . getFactionName($misc) . ')'; break; case 33: echo ' (' . getLockType($misc, 2) . ')'; break; case 146: echo ' (' . getRuneName($misc) . ')'; break; case 74: echo ' (' . getGlyphName($misc) . ')'; break; default: if ($misc) { echo ' (' . $misc . ')'; } break; } if ($effect == 1) { // Spell target position on map if ($t = getSpellTargetPosition($spell['id'])) { echo '<a style="float: right;" href="?map&point=' . $t['target_map'] . ':' . $t['target_position_x'] . ':' . $t['target_position_y'] . ':' . $t['target_position_z'] . '">' . $lang['map'] . '</a>'; } // Spell target if ($s = getSpellScriptTarget($spell['id'])) { foreach ($s as $s1) { if ($s1['type'] == 0) { echo '<br><a style="float: right;" href="?object=' . $s1['targetEntry'] . '">' . getGameobjectName($s1['targetEntry'], 0) . '</a>'; } else { if ($s1['type'] == 1) { echo '<br><a style="float: right;" href="?npc=' . $s1['targetEntry'] . '">' . getCreatureName($s1['targetEntry'], 0) . '</a>'; } else { if ($s1['type'] == 2) { echo '<br><a style="float: right;" href="?npc=' . $s1['targetEntry'] . '">' . getCreatureName($s1['targetEntry'], 0) . '</a>'; } } } } } } }
function getFactionTemplateName($faction_id) { if ($faction_id == 0) { return 0; } if ($faction_template = getFactionTemplate($faction_id)) { return getFactionName($faction_template['faction']); } return "Faction template - {$faction_id}"; }
if ($quest['RewRepFaction1'] or $quest['RewRepFaction2'] or $quest['RewRepFaction3'] or $quest['RewRepFaction4'] or $quest['RewRepFaction5']) { echo "<tr><td class=mark>{$lang['Rew_reputation']}</td></tr>"; if ($quest['RewRepFaction1'] && $quest['RewRepValue1']) { echo "<tr><td> " . getFactionName($quest['RewRepFaction1']) . ": {$quest['RewRepValue1']}</td></tr>"; } if ($quest['RewRepFaction2'] && $quest['RewRepValue2']) { echo "<tr><td> " . getFactionName($quest['RewRepFaction2']) . ": {$quest['RewRepValue2']}</td></tr>"; } if ($quest['RewRepFaction3'] && $quest['RewRepValue3']) { echo "<tr><td> " . getFactionName($quest['RewRepFaction3']) . ": {$quest['RewRepValue3']}</td></tr>"; } if ($quest['RewRepFaction4'] && $quest['RewRepValue4']) { echo "<tr><td> " . getFactionName($quest['RewRepFaction4']) . ": {$quest['RewRepValue4']}</td></tr>"; } if ($quest['RewRepFaction5'] && $quest['RewRepValue5']) { echo "<tr><td> " . getFactionName($quest['RewRepFaction5']) . ": {$quest['RewRepValue5']}</td></tr>"; } } if ($quest['RewMoneyMaxLevel']) { echo "<tr><td class=mark>{$lang['Rew_XP']} " . getQuestXPValue($quest) . " xp"; } if ($quest['RewHonorAddition'] or $quest['RewHonorMultiplier']) { if ($quest['RewHonorMultiplier']) { $ihonor = round(getTeamContributionPoints(79) * $quest['RewHonorMultiplier'] * 0.1 + $quest['RewHonorAddition']); } else { $ihonor = round($quest['RewHonorAddition']); } echo "<tr><td class=mark>{$lang['Rew_honor']} " . substr($ihonor, 0, 4); } if ($quest['RewOrReqMoney']) { echo "<tr><td class=mark>{$lang['Rew_money']} " . money($quest['RewOrReqMoney']) . "</td></tr>";
function renderItemData($item, $item_data = 0) { global $gBonding, $Quality, $UseorEquip, $game_text; $colorname = $item['Quality']; $bonding = $item['bonding']; $invtype = $item['InventoryType']; $class = $item['class']; $subclass = $item['subclass']; $speed = $item['delay'] / 1000.0; $ssd = 0; $level = 80; $creator = 0; $giftCreator = 0; $random_suffix = 0; $random_prop = 0; $char_data = 0; $stack_count = 1; if ($item_data) { if ($item['ScalingStatValue'] || $item['ScalingStatDistribution']) { $level = getCharacterLevel($item_data[ITEM_FIELD_OWNER]); } if (intval(-$item_data[ITEM_FIELD_RANDOM_PROPERTIES_ID]) > 0) { $random_suffix = getRandomSuffix(intval(-$item_data[ITEM_FIELD_RANDOM_PROPERTIES_ID])); } if (intval($item_data[ITEM_FIELD_RANDOM_PROPERTIES_ID]) > 0) { $random_prop = getRandomProperty(intval($item_data[ITEM_FIELD_RANDOM_PROPERTIES_ID])); } if ($item_data[ITEM_FIELD_CREATOR]) { $creator = getCharacterName($item_data[ITEM_FIELD_CREATOR]); } if ($item_data[ITEM_FIELD_GIFTCREATOR]) { $giftCreator = getCharacterName($item_data[ITEM_FIELD_GIFTCREATOR]); } if ($item_data[ITEM_FIELD_STACK_COUNT]) { $stack_count = $item_data[ITEM_FIELD_STACK_COUNT]; } if ($random_suffix) { $item['name'] = $item['name'] . ' ' . $random_suffix['name']; } else { if ($random_prop) { $item['name'] = $item['name'] . ' ' . $random_prop['name']; } } if ($item_data[ITEM_FIELD_FLAGS] & ITEM_FLAGS_BINDED) { $bonding = -1; } } if ($item['ScalingStatDistribution'] && ($ssd = getScalingStatDistribution($item['ScalingStatDistribution']))) { if ($ssd['maxlevel'] && $level > $ssd['maxlevel']) { $level = $ssd['maxlevel']; } $mask = $item['ScalingStatValue']; $ssv = getScalingStatValues($level); $stat_multi = 0; // Stat multiplier if ($mask & 0x1f) { if ($mask & 1 << 0) { $stat_multi = $ssv['multiplier_1']; } if ($mask & 1 << 1) { $stat_multi = $ssv['multiplier_2']; } if ($mask & 1 << 2) { $stat_multi = $ssv['multiplier_3']; } if ($mask & 1 << 3) { $stat_multi = $ssv['multiplier_4']; } if ($mask & 1 << 4) { $stat_multi = $ssv['multiplier_5']; } } // Armor mod if ($mask & 0x1e0) { if ($mask & 1 << 5) { $item['armor'] = $ssv['multiplier_6']; } if ($mask & 1 << 6) { $item['armor'] = $ssv['multiplier_7']; } if ($mask & 1 << 7) { $item['armor'] = $ssv['multiplier_8']; } if ($mask & 1 << 8) { $item['armor'] = $ssv['multiplier_9']; } } // DPS mod (min = 70% from averange max = 130%) if ($mask & 0x7e00) { if ($mask & 1 << 9) { $dps = $ssv['multiplier_10']; } if ($mask & 1 << 10) { $dps = $ssv['multiplier_11']; } if ($mask & 1 << 11) { $dps = $ssv['multiplier_12']; } if ($mask & 1 << 12) { $dps = $ssv['multiplier_13']; } if ($mask & 1 << 13) { $dps = $ssv['multiplier_14']; } if ($mask & 1 << 14) { $dps = $ssv['multiplier_15']; } $averange = $speed * $dps; $item['dmg_min1'] = floor(0.7 * $averange); $item['dmg_max1'] = floor(1.3 * $averange); } // if ($mask & 0x08000) // spell power // ???=$ssv['multiplier_16']; // if ($mask & 0x10000) // feral AP // ???=$ssv['multiplier_17']; } // Вывод имени echo '<tr><td class=name><SPAN class=' . $Quality[$colorname] . '>' . $item['name'] . '</SPAN></td></tr>'; // Heroic item (green) if ($item['Flags'] & ITEM_FLAGS_HEROIC) { echo '<tr><td class=SpellStat>' . $game_text['item_heroic'] . '</td></tr>'; } if ($item['area']) { echo '<tr><td>' . getAreaName($item['area']) . '</td></tr>'; } if ($item['Map']) { echo '<tr><td>' . getMapName($item['Map']) . '</td></tr>'; } if ($item['Flags'] & ITEM_FLAGS_CONJURED) { echo '<tr><td>' . $game_text['conjured_item'] . '</td></tr>'; } // Вывод привязки вещи if ($bonding) { echo '<tr><td>' . $gBonding[$bonding] . '</td></tr>'; } // Вывод того что вещь содержит чтото if ($item['Flags'] & ITEM_FLAGS_OPENABLE) { echo '<tr><td class=SpellStat>' . $game_text['right_click'] . '</td></tr>'; } // <Right Click to Read> // Вывод уникальности вещи if ($item['maxcount'] == 1) { echo '<tr><td class=Unique>' . $game_text['unique'] . '</td></tr>'; } if ($item['maxcount'] > 1) { echo '<tr><td class=Unique>' . $game_text['unique'] . '(' . $item['maxcount'] . ')</td></tr>'; } $className = getClassName($class, 0); $subClassName = getShortSubclassName($class, $subclass, 0); // Зависимые от класса вещи параметры switch ($class) { // case 0:// Consumable // break; case 1: // Container echo "<tr><td>" . sprintf($game_text['slot'], $item['ContainerSlots'], $subClassName) . "</td></tr>"; break; case 2: // Weapon echo '<tr><td>' . '<div class=right>' . $subClassName . '</div>' . getInventoryType($invtype, 0) . '</td></tr>'; break; //case 3:// Gem //break; //case 3:// Gem //break; case 4: // Armor if ($invtype == 14) { $invtype = 22; } $sub = ''; if ($invtype != 16 && $subclass > 0) { $sub = '<div class=right>' . $subClassName . '</div>'; } echo '<tr><td>' . $sub . getInventoryType($invtype, 0) . '</td></tr>'; break; // case 5:// Reagent // break; // case 5:// Reagent // break; case 6: // Projectile echo '<tr><td><div class=right>' . $subClassName . '</div>' . $className . '</td></tr>'; $dps = ($item['dmg_min1'] + $item['dmg_max1']) / 2; echo '<tr><td>' . sprintf($game_text['ammo_dps'], $dps) . '</td></tr>'; break; // case 7:// Trade Goods // break; // case 8:// Generic // break; // case 9:// Recipe // break; // case 10:// Money // break; // case 7:// Trade Goods // break; // case 8:// Generic // break; // case 9:// Recipe // break; // case 10:// Money // break; case 11: //Quiver echo '<tr><td>' . sprintf($game_text['slot'], $item['ContainerSlots'], $subClassName) . '</td></tr>'; break; // case 12: //Quest // break; // case 13: //Key // break; // case 14: //Permanent // break; // case 15: //Misc // break; // case 12: //Quest // break; // case 13: //Key // break; // case 14: //Permanent // break; // case 15: //Misc // break; default: break; } // Вывод урона наносимого оружием но не боеприпасами if ($item['dmg_min1'] > 0 and $class != 6) { if ($speed == 0) { $speed = 1; } $dps = ($item['dmg_min1'] + $item['dmg_max1']) / (2 * $speed); $sub = '<div class=right>' . sprintf($game_text['weapon_speed'], $speed) . '</div>'; echo '<tr><td>' . $sub . sprintf($game_text['weapon_damage'], $item['dmg_min1'], $item['dmg_max1']) . '</td></tr>'; if ($class == 2) { echo '<tr><td>' . sprintf($game_text['weapon_dps'], $dps) . '</td></tr>'; } } // вывод брони if ($item['armor']) { echo '<tr><td>' . sprintf($game_text['iarmor'], $item['armor']) . '</td></tr>'; } // вывод блока if ($item['block']) { echo '<tr><td>' . sprintf($game_text['iblock'], $item['block']) . '</td></tr>'; } // Вывод статов на силу, ловкость, стамину, интелект, стамину if ($ssd) { for ($i = 1; $i <= 10; $i++) { renderPrimalStat($ssd['statmod_' . $i], $stat_multi * $ssd['modifier_' . $i] / 10000); } } else { for ($i = 1; $i <= $item['StatsCount']; $i++) { renderPrimalStat($item['stat_type' . $i], $item['stat_value' . $i]); } } // Вывод резистов if ($item['holy_res']) { echo "<tr><td>" . getResistanceText(1, $item['holy_res']) . "</td></tr>"; } if ($item['fire_res']) { echo "<tr><td>" . getResistanceText(2, $item['fire_res']) . "</td></tr>"; } if ($item['nature_res']) { echo "<tr><td>" . getResistanceText(3, $item['nature_res']) . "</td></tr>"; } if ($item['frost_res']) { echo "<tr><td>" . getResistanceText(4, $item['frost_res']) . "</td></tr>"; } if ($item['shadow_res']) { echo "<tr><td>" . getResistanceText(5, $item['shadow_res']) . "</td></tr>"; } if ($item['arcane_res']) { echo "<tr><td>" . getResistanceText(6, $item['arcane_res']) . "</td></tr>"; } // Описание камней if ($item['GemProperties']) { $GemProperties = getGemProperties($item['GemProperties']); echo "<tr><td class=SpellStat>{$GemProperties}</td></tr>"; } // Вывод сокетов if ($item_data) { renderSocketed($item['socketColor_1'], $item_data[SOCK_ENCHANTMENT_SLOT]); renderSocketed($item['socketColor_2'], $item_data[SOCK_ENCHANTMENT_SLOT_2]); renderSocketed($item['socketColor_3'], $item_data[SOCK_ENCHANTMENT_SLOT_3]); } else { renderSocket($item['socketColor_1']); renderSocket($item['socketColor_2']); renderSocket($item['socketColor_3']); } // Вывод бонуса сокетов (если есть доп инфо выводим данные из нее) if ($item_data) { // Вывод активного бонуса if ($item_data[BONUS_ENCHANTMENT_SLOT]) { echo '<tr><td class=SpellStat>' . sprintf($game_text['socket_bonus'], getEnchantmentDesc($item_data[BONUS_ENCHANTMENT_SLOT])) . '</td></tr>'; } else { if ($item['socketBonus']) { echo '<tr><td class=disBonus>' . sprintf($game_text['socket_bonus'], getEnchantmentDesc($item['socketBonus'])) . '</td></tr>'; } } } else { if ($item['socketBonus']) { echo '<tr><td class=SpellStat>' . sprintf($game_text['socket_bonus'], getEnchantmentDesc($item['socketBonus'])) . '</td></tr>'; } } // Вывод энчантов вещи if ($item_data) { renderEnchant($item_data, PERM_ENCHANTMENT_SLOT, $random_suffix); renderEnchant($item_data, TEMP_ENCHANTMENT_SLOT, $random_suffix); renderEnchant($item_data, WOTLK_ENCHANTMENT_SLOT, $random_suffix); renderEnchant($item_data, PROP_ENCHANTMENT_SLOT_0, $random_suffix); renderEnchant($item_data, PROP_ENCHANTMENT_SLOT_1, $random_suffix); renderEnchant($item_data, PROP_ENCHANTMENT_SLOT_2, $random_suffix); renderEnchant($item_data, PROP_ENCHANTMENT_SLOT_3, $random_suffix); renderEnchant($item_data, PROP_ENCHANTMENT_SLOT_4, $random_suffix); } else { if ($item['RandomProperty'] or $item['RandomSuffix']) { echo '<tr><td class=SpellStat>' . $game_text['random_enchant'] . '</td></tr>'; } } // Вывод крепкости if ($item_data && $item_data[ITEM_FIELD_MAXDURABILITY] > 0) { echo '<tr><td>' . sprintf($game_text['durability'], $item_data[ITEM_FIELD_DURABILITY], $item_data[ITEM_FIELD_MAXDURABILITY]) . '</td></tr>'; } else { if ($item['MaxDurability'] > 0) { echo '<tr><td>' . sprintf($game_text['durability'], $item['MaxDurability'], $item['MaxDurability']) . '</td></tr>'; } } // Вывод требования расы if ($text = getAllowableRace($item['AllowableRace'])) { echo '<tr><td>' . $game_text['allowable_race'] . ' ' . $text . '</td></tr>'; } // Вывод требований классов if ($text = getAllowableClass($item['AllowableClass'])) { echo '<tr><td>' . $game_text['allowable_class'] . ' ' . $text . '</td></tr>'; } // Вывод времени продолжительности if ($item['Duration']) { if ($item['ExtraFlags'] & 2) { echo '<tr><td>' . sprintf($game_text['idurationr'], getTimeText($item['Duration'])) . '</td></tr>'; } else { echo '<tr><td>' . sprintf($game_text['iduration'], getTimeText($item['Duration'])) . '</td></tr>'; } } // Вывод требования уровня if ($item['RequiredLevel'] > 1) { echo '<tr><td class=req>' . sprintf($game_text['req_level'], $item['RequiredLevel']) . '</td></tr>'; } // Уровень предмета if ($item['ItemLevel']) { echo '<tr><td>' . sprintf($game_text['ilevel'], $item['ItemLevel']) . '</td></tr>'; } // Вывод prospectable если надо 0x40000 if ($item['Flags'] & ITEM_FLAGS_PROSPECTABLE) { echo '<tr><td>' . $game_text['prospectable'] . '</td></tr>'; } // Вывод Millable если надо 0x20000000 if ($item['Flags'] & ITEM_FLAGS_MILLABLE) { echo '<tr><td>' . $game_text['millable'] . '</td></tr>'; } // Вывод требования скила if ($item['RequiredSkill']) { echo '<tr><td class=req>' . sprintf($game_text['req_skill'], getSkillName($item['RequiredSkill']), $item['RequiredSkillRank']) . '</td></tr>'; } // Требование знать спелл if ($item['requiredspell']) { echo '<tr><td class=req>' . $game_text['req_spell'] . ' ' . getSpellName(getSpell($item['requiredspell'])) . '</td></tr>'; } // Требования арена рейтинга "Requires personal arena rating of %d"; -- %d is the rating number required // $item['RequiredCityRank'] ?? // PVP_MEDAL1 = "Protector of Stormwind"; // PVP_MEDAL2 = "Overlord of Orgrimmar"; // PVP_MEDAL3 = "Thane of Ironforge"; // PVP_MEDAL4 = "High Sentinel of Darnassus"; // PVP_MEDAL5 = "Deathlord of the Undercity"; // PVP_MEDAL6 = "Chieftain of Thunderbluff"; // PVP_MEDAL7 = "Avenger of Gnomeregan"; // PVP_MEDAL8 = "Voodoo Boss of Sen'jin"; // Требования репутации -- Required faction reputation to use the item if ($item['RequiredReputationFaction']) { $faction = getFactionName($item['RequiredReputationFaction']); $rank = getReputationRankName($item['RequiredReputationRank']); echo '<tr><td class=faction>' . sprintf($game_text['req_reputation'], $faction, $rank) . '</td></tr>'; } if ($ssd) { echo '<tr><td>' . sprintf($game_text['ssd_req_level'], $ssd['maxlevel'], $level) . '</td></tr>'; } // Вывод статов на силу, ловкость, стамину, интелект, стамину if ($ssd) { for ($i = 1; $i <= 10; $i++) { renderSpellStat($ssd['statmod_' . $i], $stat_multi * $ssd['modifier_' . $i] / 10000); } } else { for ($i = 1; $i <= $item['StatsCount']; $i++) { renderSpellStat($item['stat_type' . $i], $item['stat_value' . $i]); } } if ($item['spellid_1'] != 483 and $item['spellid_1'] != 55884) { renderSpell($item['spellid_1'], $item['spelltrigger_1'], $item_data ? $item_data[ITEM_FIELD_SPELL_CHARGES + 0] : $item['spellcharges_1'], $item['spellcooldown_1'], $item['spellcategory_1'], $item['spellcategorycooldown_1']); renderSpell($item['spellid_2'], $item['spelltrigger_2'], $item_data ? $item_data[ITEM_FIELD_SPELL_CHARGES + 1] : $item['spellcharges_2'], $item['spellcooldown_2'], $item['spellcategory_2'], $item['spellcategorycooldown_2']); renderSpell($item['spellid_3'], $item['spelltrigger_3'], $item_data ? $item_data[ITEM_FIELD_SPELL_CHARGES + 2] : $item['spellcharges_3'], $item['spellcooldown_3'], $item['spellcategory_3'], $item['spellcategorycooldown_3']); renderSpell($item['spellid_4'], $item['spelltrigger_4'], $item_data ? $item_data[ITEM_FIELD_SPELL_CHARGES + 3] : $item['spellcharges_4'], $item['spellcooldown_4'], $item['spellcategory_4'], $item['spellcategorycooldown_4']); renderSpell($item['spellid_5'], $item['spelltrigger_5'], $item_data ? $item_data[ITEM_FIELD_SPELL_CHARGES + 4] : $item['spellcharges_5'], $item['spellcooldown_5'], $item['spellcategory_5'], $item['spellcategorycooldown_5']); } if ($item['itemset']) { $set = getItemSet($item['itemset']); if ($set == 0) { echo '<tr><td class=itemsetname> Unknown set - ' . $item['itemset'] . '</td></tr>'; } else { // Получаем игрока чтобы вывести инфу о сете if ($item_data && ($char = getCharacter($item_data[ITEM_FIELD_OWNER]))) { $char_data = explode(' ', $char['data']); } $text = ""; $count = 0; $itemnum = 0; // Подсчитываем всего вещей в сете (а также если на игроке то сколько из вещей сета на нём) // Одновременно составяем список for ($i = 1; $i < 18; $i++) { if ($setitem = $set['item_' . $i]) { $count++; $name = getItemName($setitem); if (isItemOnPlayer($setitem, $char_data)) { $itemnum++; $text = $text . '<tr><td class=enSetName><a href="?item=' . $setitem . '">' . $name . '</a></td></tr>'; } else { $text = $text . '<tr><td class=disSetName><a href="?item=' . $setitem . '">' . $name . '</a></td></tr>'; } } } echo '<tr><td class=itemsetname><a href="?itemset=' . $set['id'] . '">' . $set['name'] . "</a> ({$itemnum}/{$count})</td></tr>"; if ($set['req_skill']) { echo '<tr><td class=req>' . sprintf($game_text['req_skill'], getSkillName($set['req_skill']), $set['req_skill_value']) . '</td></tr>'; } echo $text; // Выводим бонусы сета (если на игроке - то активны ион или нет) for ($i = 1; $i < 9; $i++) { if ($setSpell = $set['spell_' . $i]) { $name = get_spell_details($setSpell); $num = $set['count_' . $i]; if ($char_data) { $iclass = $num <= $itemnum ? 'enSpell' : 'disSpell'; echo '<tr><td class=' . $iclass . '><a href="?spell=' . $setSpell . '">(' . $num . ') ' . $name . '</a></td></tr>'; } else { echo '<tr><td><a href="?spell=' . $setSpell . '">(' . $num . ') ' . $name . '</a></td></tr>'; } } } } } if ($item['description'] != "") { if ($item['spellid_1'] == 483 or $item['spellid_1'] == 55884) { echo '<tr><td><a href="?spell=' . $item['spellid_2'] . '">' . $UseorEquip[$item['spelltrigger_2']] . ' ' . $item['description'] . '</a></td></tr>'; if ($spell = getSpell($item['spellid_2'])) { if ($ritem = getItem($spell['EffectItemType_1'])) { echo '<tr><td> </td></tr>'; renderItemData($ritem); } if ($req = getRecipeReqString($spell)) { echo '<tr><td> </td></tr>'; echo '<tr><td>' . $game_text['req_ingridients'] . ' ' . $req . '</td></tr>'; } } } else { echo '<tr><td class=itemdesc>"' . $item['description'] . '"</td></tr>'; } } // Written by %s if ($creator) { echo '<tr><td class=enSpell><' . sprintf($game_text['made_by'], $creator) . '></td></tr>'; } if ($item['startquest']) { echo '<tr><td>' . $game_text['start_quest'] . '</td></tr>'; } }
$x = 0; foreach ($player_factions as $player_faction) { ?> <tr bgcolor="#<?php echo $x % 2 == 0 ? "BBBBBB" : "AAAAAA"; ?> "> <td align="center" width="20%"><a title="Character ID: <?php echo $player_faction['char_id']; ?> "><?php echo getPlayerName($player_faction['char_id']); ?> </a></td> <td align="center" width="20%"><a title="Faction: <?php echo getFactionName($player_faction['faction_id']); ?> "><?php echo $player_faction['faction_id']; ?> </a></td> <td align="center" width="20%"><?php echo $player_faction['current_value']; ?> </td> <td align="right"><a href="index.php?editor=faction&char_id=<?php echo $player_faction['char_id']; ?> &faction_id=<?php echo $player_faction['faction_id']; ?>
function r_questReward($quest) { global $lang; if ($quest['RewItemId1'] or $quest['RewItemId2'] or $quest['RewItemId3'] or $quest['RewItemId4']) { // echo $lang['Rew_item'].'<br>'; if ($quest['RewItemId1']) { echo text_show_item($quest['RewItemId1'], 0, 'quest'); } if ($quest['RewItemId2']) { echo $lang['item_sel_and'] . text_show_item($quest['RewItemId2'], 0, 'quest'); } if ($quest['RewItemId3']) { echo $lang['item_sel_and'] . text_show_item($quest['RewItemId3'], 0, 'quest'); } if ($quest['RewItemId4']) { echo $lang['item_sel_and'] . text_show_item($quest['RewItemId4'], 0, 'quest'); } echo '<br>'; } if ($quest['RewChoiceItemId1'] or $quest['RewChoiceItemId2'] or $quest['RewChoiceItemId3'] or $quest['RewChoiceItemId4'] or $quest['RewChoiceItemId5'] or $quest['RewChoiceItemId6']) { echo $lang['Rew_select_item'] . '<br>'; if ($quest['RewChoiceItemId1']) { echo text_show_item($quest['RewChoiceItemId1'], 0, 'quest'); } if ($quest['RewChoiceItemId2']) { echo $lang['item_sel_or'] . text_show_item($quest['RewChoiceItemId2'], 0, 'quest'); } if ($quest['RewChoiceItemId3']) { echo $lang['item_sel_or'] . text_show_item($quest['RewChoiceItemId3'], 0, 'quest'); } if ($quest['RewChoiceItemId4']) { echo $lang['item_sel_or'] . text_show_item($quest['RewChoiceItemId4'], 0, 'quest'); } if ($quest['RewChoiceItemId5']) { echo $lang['item_sel_or'] . text_show_item($quest['RewChoiceItemId5'], 0, 'quest'); } if ($quest['RewChoiceItemId6']) { echo $lang['item_sel_or'] . text_show_item($quest['RewChoiceItemId6'], 0, 'quest'); } echo "<br>"; } if ($quest['RewSpell'] and $quest['RewSpellCast']) { show_spell($quest['RewSpell'], 0, 'quest'); echo '<br>'; } if (!$quest['RewSpell'] and $quest['RewSpellCast']) { show_spell($quest['RewSpellCast'], 0, 'quest'); echo '<br>'; } for ($i = 1; $i <= 5; $i++) { switch (ABS($quest['RewRepValueId' . $i])) { case 1: $RepValueId[$i] = 10; break; case 2: $RepValueId[$i] = 25; break; case 3: $RepValueId[$i] = 75; break; case 4: $RepValueId[$i] = 150; break; case 5: $RepValueId[$i] = 250; break; case 6: $RepValueId[$i] = 350; break; case 7: $RepValueId[$i] = 500; break; case 8: $RepValueId[$i] = 1000; break; case 9: $RepValueId[$i] = 5; break; default: $RepValueId[$i] = 0; } $quest_rate[$i] = getRepRewRate($quest['RewRepFaction' . $i]); if ($quest['RewRepValueId' . $i] < 0) { $RepValueId[$i] = -$RepValueId[$i]; } if ($quest['RewRepValue' . $i] && $quest['RewRepValueId' . $i]) { $quest['RewRepValue' . $i] = $quest['RewRepValue' . $i] / 100; } if (!$quest['RewRepValue' . $i] && $quest['RewRepValueId' . $i]) { $quest['RewRepValue' . $i] = $RepValueId[$i]; } $quest['RewRepValue' . $i] = $quest['RewRepValue' . $i] * $quest_rate[$i]; } if ($quest['RewRepFaction1'] and !$quest['RewRepFaction2'] and !$quest['RewRepFaction3'] and !$quest['RewRepFaction4'] and !$quest['RewRepFaction5']) { $spillover = getRepSpillover($quest['RewRepFaction1']); if ($spillover) { foreach ($spillover as $faction) { if ($faction['faction1']) { $quest['RewRepFaction2'] = $faction['faction1']; $quest['RewRepValue2'] = $quest['RewRepValue1'] * $faction['rate_1']; } if ($faction['faction2']) { $quest['RewRepFaction3'] = $faction['faction2']; $quest['RewRepValue3'] = $quest['RewRepValue1'] * $faction['rate_2']; } if ($faction['faction3']) { $quest['RewRepFaction4'] = $faction['faction3']; $quest['RewRepValue4'] = $quest['RewRepValue1'] * $faction['rate_3']; } if ($faction['faction4']) { $quest['RewRepFaction5'] = $faction['faction4']; $quest['RewRepValue5'] = $quest['RewRepValue1'] * $faction['rate_4']; } } } } if ($quest['RewRepFaction1'] && $quest['RewRepValue1']) { echo getFactionName($quest['RewRepFaction1']) . ': ' . $quest['RewRepValue1'] . '<br>'; } if ($quest['RewRepFaction2'] && $quest['RewRepValue2']) { echo getFactionName($quest['RewRepFaction2']) . ': ' . $quest['RewRepValue2'] . '<br>'; } if ($quest['RewRepFaction3'] && $quest['RewRepValue3']) { echo getFactionName($quest['RewRepFaction3']) . ': ' . $quest['RewRepValue3'] . '<br>'; } if ($quest['RewRepFaction4'] && $quest['RewRepValue4']) { echo getFactionName($quest['RewRepFaction4']) . ': ' . $quest['RewRepValue4'] . '<br>'; } if ($quest['RewRepFaction5'] && $quest['RewRepValue5']) { echo getFactionName($quest['RewRepFaction5']) . ': ' . $quest['RewRepValue5'] . '<br>'; } if ($quest['RewMoneyMaxLevel']) { echo $lang['Rew_XP'] . ' ' . getQuestXPValue($quest) . ' xp<br>'; } if ($quest['RewOrReqMoney']) { echo $lang['Rew_money'] . ' ' . money($quest['RewOrReqMoney'], 7) . '<br>'; } }