示例#1
0
function getPointData($area_id, &$data, $x, $y)
{
    global $gZoneToAreaImage, $lang;
    $area = getAreaIdFromPoint($data['map'], $data['position_x'], $data['position_y'], $data['position_z']);
    $area_data = getArea($area);
    if (!$area_data) {
        return 0;
    }
    $zone = @$area_data['zone_id'] ? $area_data['zone_id'] : $area;
    $areaname = $area_data['zone_id'] ? getAreaName($zone) . " (" . $area_data['name'] . ")" : $area_data['name'];
    $img = 'images/map_points/';
    $img .= $gZoneToAreaImage[$zone] == $area_id ? 'gps_icon.png' : 'gps_icon1.png';
    $imgX = 16;
    $imgY = 16;
    $name = '';
    if (@$data['type'] == 'n') {
        $text = getCreatureName($data['id'], 0) . "&nbsp;({$data['guid']})<br>{$areaname}<br>{$lang['respawn']}&nbsp;" . getTimeText($data['spawntimesecs']);
        if (getCreatureEvent($data['guid']) > 0) {
            $text = substr_replace("<br>{$lang['spawn_at_event']}&nbsp;-&nbsp;" . getGameEventName(getCreatureEvent($data['guid'])), $text, 0, 0);
        }
        if (getCreatureEvent($data['guid']) < 0) {
            $text = substr_replace("<br>{$lang['despawn_at_event']}&nbsp;-&nbsp;" . getGameEventName(abs(getCreatureEvent($data['guid']))), $text, 0, 0);
        }
        if (getCreaturePool($data['guid'])) {
            $text = substr_replace("<br>{$lang['pool']}&nbsp;(" . getCreaturePool($data['guid']) . ")", $text, 0, 0);
        }
        if (getCreaturePoolTemplate($data['id'])) {
            $text = substr_replace("<br>{$lang['pool']}&nbsp;(" . getCreaturePoolTemplate($data['id']) . ")", $text, 0, 0);
        }
    }
    if (@$data['type'] == 'o') {
        $text = getGameobjectName($data['id'], 0) . "&nbsp;({$data['guid']})<br>{$areaname}<br>{$lang['respawn']}&nbsp;" . getTimeText($data['spawntimesecs']);
        if (getGameobjectEvent($data['guid']) > 0) {
            $text = substr_replace("<br>{$lang['spawn_at_event']}&nbsp;-&nbsp;" . getGameEventName(getGameobjectEvent($data['guid'])), $text, 0, 0);
        }
        if (getGameobjectEvent($data['guid']) < 0) {
            $text = substr_replace("<br>{$lang['despawn_at_event']}&nbsp;-&nbsp;" . getGameEventName(abs(getGameobjectEvent($data['guid']))), $text, 0, 0);
        }
        if (getGameobjectPool($data['guid'])) {
            $text = substr_replace("<br>{$lang['pool']}&nbsp;(" . getGameobjectPool($data['guid']) . ")", $text, 0, 0);
        }
        if (getGameobjectPoolTemplate($data['id'])) {
            $text = substr_replace("<br>{$lang['pool']}&nbsp;(" . getGameobjectPoolTemplate($data['id']) . ")", $text, 0, 0);
        }
    }
    return array('id' => $data['id'], 'x' => $y, 'y' => $x, 'imgX' => $imgX, 'imgY' => $imgY, 'image' => $img, 'href' => "", 'tooltip' => $text);
}
示例#2
0
function noBorderSpellTable($spell)
{
    echo "<table class=spell><tbody>";
    $name = $spell['SpellName'];
    if ($spell['Rank']) {
        echo "<tr><td class=Name>" . $name . "</td><td class=Rank align=right>" . $spell['Rank'] . "</td></tr>";
    } else {
        echo "<tr><td class=Name colspan=2>" . $name . "</td></tr>";
    }
    $cost = getSpellCostText($spell);
    if ($cost or $spell['rangeIndex'] > 1) {
        echo "<tr><td>";
        if ($cost) {
            echo $cost . "</td><td align=right>";
        }
        if ($spell['rangeIndex'] > 0 and $range = getRange($spell['rangeIndex']) and $range != 0) {
            echo $range . " yds range";
        }
        echo "</td></tr>";
    }
    // Заполняем поле времени каста
    $cast_time = "";
    if (($spell['Attributes'] & 0x404) == 0x404) {
        $cast_time = "Next melee";
    } else {
        if ($spell['AttributesEx'] & 0x44) {
            $cast_time = "Chanelled";
        } else {
            $cast_time = getCastTimeText($spell);
        }
    }
    // Заполняем поле кулдауна
    $cooldown = getSpellCooldown($spell);
    if ($cooldown) {
        $cooldown = getTimeText($cooldown / 1000) . " cooldown";
    } else {
        $cooldown = "";
    }
    if ($cast_time or $cooldown) {
        echo "<tr><td>" . $cast_time . "</td><td align=right>" . $cooldown . "</td></tr>";
    }
    // Тотем категория
    if ($spell['TotemCategory_1'] or $spell['TotemCategory_2']) {
        echo "<tr><td colspan=2 class=tool> Tools: ";
        if ($spell['TotemCategory_1']) {
            echo getTotemCategory($spell['TotemCategory_1']);
        }
        if ($spell['TotemCategory_2']) {
            echo ", " . getTotemCategory($spell['TotemCategory_2']);
        }
        echo "</td></tr>";
    }
    $itemClass = $spell['EquippedItemClass'];
    // Требования мили или рангед оружия
    if ($spell['Attributes'] & 0x2) {
        echo "<tr><td colspan=2>Requires Ranged Weapon</td></tr>";
    } else {
        if ($spell['Attributes'] & 0x4) {
            echo "<tr><td colspan=2>Requires Melee Weapon</td></tr>";
        } else {
            if ($itemClass == 2) {
                echo "<tr><td colSpan=2 class=req>";
                if ($itemSubClass = $spell['EquippedItemSubClassMask']) {
                    echo getSubclassList($itemClass, $itemSubClass);
                } else {
                    echo getClassName($itemClass);
                }
                echo "</td></tr>";
            }
        }
    }
    $reqForm = getAllowableForm($spell['Stances'], 0);
    if ($reqForm) {
        echo "<tr><td colspan=2>Requires: " . $reqForm . "</td></tr>";
    }
    $notreqForm = getAllowableForm($spell['StancesNot'], 0);
    if ($notreqForm) {
        echo "<tr><td class=SpellErr colspan=2>Not cast in: " . $notreqForm . "</td></tr>";
    }
    echo "<tr><td colspan=2 class=SpellDesc><a href=\"?spell={$spell['id']}\">" . getSpellDesc($spell) . "</a></td></tr>";
    echo "</tbody></table>";
}
示例#3
0
function getSpellData($spell)
{
    // Basepoints
    $s1 = abs($spell['EffectBasePoints_1'] + 1);
    $s2 = abs($spell['EffectBasePoints_2'] + 1);
    $s3 = abs($spell['EffectBasePoints_3'] + 1);
    if ($spell['EffectDieSides_1'] > 1) {
        $s1 .= " - " . abs($spell['EffectBasePoints_1'] + $spell['EffectDieSides_1']);
    }
    if ($spell['EffectDieSides_2'] > 1) {
        $s2 .= " - " . abs($spell['EffectBasePoints_2'] + $spell['EffectDieSides_2']);
    }
    if ($spell['EffectDieSides_3'] > 1) {
        $s3 .= " - " . abs($spell['EffectBasePoints_3'] + $spell['EffectDieSides_3']);
    }
    $d = 0;
    if ($spell['DurationIndex']) {
        if ($spell_duration = getSpellDurationData($spell['DurationIndex'])) {
            $d = $spell_duration['duration_1'] / 1000;
        }
    }
    // Tick duration
    $t1 = $spell['EffectAmplitude_1'] ? $spell['EffectAmplitude_1'] / 1000 : 5;
    $t2 = $spell['EffectAmplitude_1'] ? $spell['EffectAmplitude_2'] / 1000 : 5;
    $t3 = $spell['EffectAmplitude_1'] ? $spell['EffectAmplitude_3'] / 1000 : 5;
    // Points per tick
    $o1 = @intval($s1 * $d / $t1);
    $o2 = @intval($s2 * $d / $t2);
    $o3 = @intval($s3 * $d / $t3);
    $spellData['t1'] = $t1;
    $spellData['t2'] = $t2;
    $spellData['t3'] = $t3;
    $spellData['o1'] = $o1;
    $spellData['o2'] = $o2;
    $spellData['o3'] = $o3;
    $spellData['s1'] = $s1;
    $spellData['s2'] = $s2;
    $spellData['s3'] = $s3;
    $spellData['m1'] = $s1;
    $spellData['m2'] = $s2;
    $spellData['m3'] = $s3;
    $spellData['x1'] = $spell['EffectChainTarget_1'];
    $spellData['x2'] = $spell['EffectChainTarget_2'];
    $spellData['x3'] = $spell['EffectChainTarget_3'];
    //  $spellData['i'] = $spell['MaxAffectedTargets'];
    $spellData['d'] = getTimeText($d);
    $spellData['d1'] = getTimeText($d);
    $spellData['d2'] = getTimeText($d);
    $spellData['d3'] = getTimeText($d);
    $spellData['v'] = $spell['AffectedTargetLevel'];
    $spellData['u'] = $spell['StackAmount'];
    $spellData['a1'] = getRadius($spell['EffectRadiusIndex_1']);
    $spellData['a2'] = getRadius($spell['EffectRadiusIndex_2']);
    $spellData['a3'] = getRadius($spell['EffectRadiusIndex_3']);
    $spellData['b1'] = $spell['EffectPointsPerComboPoint_1'];
    $spellData['b2'] = $spell['EffectPointsPerComboPoint_2'];
    $spellData['b3'] = $spell['EffectPointsPerComboPoint_3'];
    $spellData['e'] = $spell['EffectMultipleValue_1'];
    $spellData['e1'] = $spell['EffectMultipleValue_1'];
    $spellData['e2'] = $spell['EffectMultipleValue_2'];
    $spellData['e3'] = $spell['EffectMultipleValue_3'];
    $spellData['f1'] = $spell['DmgMultiplier_1'];
    $spellData['f2'] = $spell['DmgMultiplier_2'];
    $spellData['f3'] = $spell['DmgMultiplier_3'];
    $spellData['q1'] = $spell['EffectMiscValue_1'];
    $spellData['q2'] = $spell['EffectMiscValue_2'];
    $spellData['q3'] = $spell['EffectMiscValue_3'];
    $spellData['h'] = $spell['procChance'];
    $spellData['n'] = $spell['procCharges'];
    $spellData['z'] = "<home>";
    return $spellData;
}
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>';
}
示例#5
0
     if ($quest['ZoneOrSort'] < 0 and (-$quest['ZoneOrSort'] >= 374 or -$quest['ZoneOrSort'] == 221 or -$quest['ZoneOrSort'] == 241 or -$quest['ZoneOrSort'] >= 344 and -$quest['ZoneOrSort'] < 371 or -$quest['ZoneOrSort'] == 284 or -$quest['ZoneOrSort'] == 25 or -$quest['ZoneOrSort'] == 41 or -$quest['ZoneOrSort'] < 24)) {
         echo "<a style='float: right;' href=\"?s=q&SortID=" . -$quest['ZoneOrSort'] . "\">" . getQuestSort(-$quest['ZoneOrSort'], 0) . "</a>";
     }
 }
 echo "{$lang['quest_level']}&nbsp;{$quest['QuestLevel']}<br>";
 if ($quest['RequiredSkill']) {
     echo "<a style='float: right;' href=\"?s=q&SkillID=" . $quest['RequiredSkill'] . "\">" . getSkillName($quest['RequiredSkill'], 0) . "&nbsp;({$quest['RequiredSkillValue']})</a>";
 }
 if ($quest['MinLevel']) {
     echo "{$lang['obtained_at_level']}&nbsp;{$quest['MinLevel']}</td></tr>";
 }
 if ($quest['SuggestedPlayers']) {
     echo "<tr><td>{$lang['suggestedplayers']}&nbsp;<b>{$quest['SuggestedPlayers']}</b></td></tr>";
 }
 if ($quest['LimitTime']) {
     echo '<tr><td>' . $lang['qlimittime'] . '&nbsp;' . getTimeText($quest['LimitTime']) . '</td></tr>';
 }
 if (getGameEventQuest($quest['entry'])) {
     $qevent = getGameEventQuest($quest['entry']);
     echo '<tr><td>' . $lang['obtained_at_event'] . ':&nbsp;<FONT color=#E614E6>' . getGameEventName($qevent) . '</FONT></td></tr>';
 }
 if ($quest['SpecialFlags'] & QUEST_SPECIAL_FLAG_MONTHLY) {
     echo "<tr><td>{$lang['item_type']}:&nbsp;<a href=\"?s=q&Sfm=" . $quest['SpecialFlags'] . "\">" . $lang['quest_type3'] . "</a></td></tr>";
 }
 if ($quest['QuestFlags'] & QUEST_FLAGS_WEEKLY) {
     echo "<tr><td>{$lang['item_type']}:&nbsp;<a href=\"?s=q&Sfw=" . $quest['QuestFlags'] . "\">" . $lang['quest_type2'] . "</a></td></tr>";
 }
 if ($quest['QuestFlags'] & QUEST_FLAGS_DAILY) {
     echo "<tr><td>{$lang['item_type']}:&nbsp;<a href=\"?s=q&Sfd=" . $quest['QuestFlags'] . "\">" . $lang['quest_type1'] . "</a></td></tr>";
 }
 if ($quest['SpecialFlags'] & QUEST_SPECIAL_FLAG_REPEATABLE && ($quest['SpecialFlags'] & QUEST_SPECIAL_FLAG_MONTHLY) == 0 && ($quest['QuestFlags'] & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY)) == 0) {
示例#6
0
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>&nbsp;&nbsp;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>&nbsp;</td></tr>';
                    renderItemData($ritem);
                }
                if ($req = getRecipeReqString($spell)) {
                    echo '<tr><td>&nbsp;</td></tr>';
                    echo '<tr><td>' . $game_text['req_ingridients'] . ' ' . $req . '</td></tr>';
                }
            }
        } else {
            echo '<tr><td class=itemdesc>&quot;' . $item['description'] . '&quot;</td></tr>';
        }
    }
    // Written by %s
    if ($creator) {
        echo '<tr><td class=enSpell>&lt;' . sprintf($game_text['made_by'], $creator) . '&gt;</td></tr>';
    }
    if ($item['startquest']) {
        echo '<tr><td>' . $game_text['start_quest'] . '</td></tr>';
    }
}
function r_vendorTime($data)
{
    echo $data['incrtime'] ? getTimeText($data['incrtime']) : '';
}