Exemplo n.º 1
0
 function __construct($idIn)
 {
     $query = mysql_query("SELECT * FROM WA_MarketPrices WHERE id='{$idIn}'");
     $marketRow = mysql_fetch_object($query);
     $this->id = $marketRow->id;
     $this->name = $marketRow->name;
     $this->damage = $marketRow->damage;
     $this->price = $marketRow->price;
     $this->time = $marketRow->time;
     $this->price = $marketRow->marketprice;
     $this->fullname = getItemName($this->name, $this->damage);
     $this->image = getItemImage($this->name, $this->damage);
     $this->ref = $marketRow->ref;
     $queryEnchantLinks = mysql_query("SELECT * FROM WA_EnchantLinks WHERE itemId = '{$this->id}' AND itemTableId = '4'");
     $itemEnchantsArray = array();
     while (list($idt, $enchIdt, $itemTableIdt, $itemIdt) = mysql_fetch_row($queryEnchantLinks)) {
         $eArray = array();
         $q = mysql_query("SELECT * FROM WA_Enchantments WHERE id = '{$enchIdt}'");
         list($ide, $fullnamee, $namee, $levele) = mysql_fetch_row($q);
         $eArray["id"] = $ide;
         $eArray["name"] = $namee;
         $eArray["level"] = $levele;
         $itemEnchantsArray[] = $eArray;
     }
     $this->enchants = $itemEnchantsArray;
 }
Exemplo n.º 2
0
 function __construct($idIn)
 {
     $query = mysql_query("SELECT * FROM WA_Items WHERE id='{$idIn}'");
     $itemRow = mysql_fetch_object($query);
     $this->id = $itemRow->id;
     $this->name = $itemRow->name;
     $this->damage = $itemRow->damage;
     $this->owner = $itemRow->player;
     $this->quantity = $itemRow->quantity;
     $this->marketprice = getMarketPrice($this->id, 0);
     $this->fullname = getItemName($this->name, $this->damage);
     $this->maxstack = getItemMaxStack($this->name);
     $queryEnchantLinks = mysql_query("SELECT * FROM WA_EnchantLinks WHERE itemId = '{$this->id}' AND itemTableId = '0'");
     $itemEnchantsArray = array();
     while (list($idt, $enchIdt, $itemTableIdt, $itemIdt) = mysql_fetch_row($queryEnchantLinks)) {
         $eArray = array();
         $q = mysql_query("SELECT * FROM WA_Enchantments WHERE id = '{$enchIdt}'");
         list($ide, $fullnamee, $namee, $levele) = mysql_fetch_row($q);
         $eArray["id"] = $ide;
         $eArray["name"] = $namee;
         $eArray["level"] = $levele;
         $itemEnchantsArray[] = $eArray;
     }
     $this->enchants = $itemEnchantsArray;
 }
Exemplo n.º 3
0
function renderQuestSource($srcID, $srcCount)
{
    if (!$srcID) {
        return;
    }
    $name = getItemName($srcID);
    echo "<tr><td>&nbsp;&nbsp;<a href=\"?item={$srcID}\">{$name}</a>" . ($srcCount ? '&nbsp;x&nbsp;' . $srcCount : '') . '</td></tr>';
}
Exemplo n.º 4
0
    echo $grade;
    ?>
">
                                                <td>
                                                        <a href="graph.php?name=<?php 
    echo $name . "&damage=" . $damage;
    ?>
"><img src="<?php 
    echo getItemImage($name, $damage);
    ?>
" alt="<?php 
    echo getItemName($name, $damage);
    ?>
"/><br/>
<?php 
    echo getItemName($name, $damage);
    $queryEnchantLinks = mysql_query("SELECT enchId FROM WA_EnchantLinks WHERE itemId='{$id}' AND itemTableId=1");
    while (list($enchId) = mysql_fetch_row($queryEnchantLinks)) {
        $queryEnchants = mysql_query("SELECT * FROM WA_Enchantments WHERE id='{$enchId}'");
        while (list($idj, $enchName, $enchantId, $level) = mysql_fetch_row($queryEnchants)) {
            echo "<br/>" . getEnchName($enchantId) . " - Level: " . $level;
        }
    }
    ?>
                                                        </a>
                                                </td>
                                                <td>
<?php 
    if ($quantity == 0) {
        echo "Never";
    } else {
Exemplo n.º 5
0
function KillFighter($dead)
{
    global $map, $fighters, $totalgold, $reporttext, $dungeonlevel;
    $fighters[$dead]['hp'] = 0;
    $map[$fighters[$dead]['y']][$fighters[$dead]['x']] = -1;
    $reporttext .= $fighters[$dead]['name'] . " dies.<br>";
    if ($fighters[$dead]['party'] == "Enemy") {
        $totalgold += $fighters[$dead]['gold'];
        if (rand(1, 100) <= $fighters[$dead]['loot']) {
            $droppeditem = createItem($dungeonlevel);
            $dropstats = explode(",", $droppeditem);
            $totalloot[] = $droppeditem;
            $reporttext .= "<span style='color:yellow;'>" . $fighters[$dead]['name'] . " drops " . getItemName(0, 0, 0, $dropstats[0], $dropstats[1], $dropstats[2], $dropstats[3], $dropstats[4], $dropstats[5]) . "!</span><br>";
            echo "<span style='color:yellow;'>" . $fighters[$dead]['name'] . " drops " . getItemName(0, 0, 0, $dropstats[0], $dropstats[1], $dropstats[2], $dropstats[3], $dropstats[4], $dropstats[5]) . "</span><br>";
        }
    }
}
Exemplo n.º 6
0
function grantItem($PID, $IID, $QUANT)
{
    $conn = conDB();
    $QUANT2 = checkBag($PID, $IID);
    $stack = checkStackable($IID);
    $Bspace = CheckBagSpace($PID);
    if ($stack == 1) {
        if ($QUANT2 == 0) {
            if ($Bspace > 0) {
                $sql = "INSERT INTO bag (PlayerID,ItemID,Quantity,Active) VALUES ('{$PID}','{$IID}','{$QUANT}','0')";
                mysqli_query($conn, $sql);
            }
        } else {
            $fQuant = $QUANT + $QUANT2;
            $sql = "UPDATE bag SET Quantity='{$fQuant}' WHERE PlayerID='{$PID}' AND ItemID='{$IID}'";
            mysqli_query($conn, $sql);
        }
    } else {
        if ($Bspace > 0) {
            $HP = getItemMaxHP($IID);
            $sql = "INSERT INTO bag (PlayerID,ItemID,Quantity,Active,Health) VALUES ('{$PID}','{$IID}','{$QUANT}','0','{$HP}')";
            mysqli_query($conn, $sql);
        }
    }
    $name = getItemName($IID);
    AddtoLog($PID, "You place the {$name} in your bag!", 0, 1);
}
Exemplo n.º 7
0
<?php

session_start();
if (!isset($_SESSION['User'])) {
    header("Location: login.php");
}
$user = $_SESSION['User'];
require 'scripts/config.php';
require 'scripts/itemInfo.php';
$isAdmin = $_SESSION['Admin'];
$queryAuctions = mysql_query("SELECT * FROM WA_Auctions");
$itemName = mysql_real_escape_string(stripslashes($_POST['Name']));
$itemDamage = mysql_real_escape_string(stripslashes($_POST['Damage']));
$itemFullName = getItemName($itemName, $itemDamage);
if ($useMySQLiConomy) {
    $queryiConomy = mysql_query("SELECT * FROM {$iConTableName} WHERE username='******'");
    $iConRow = mysql_fetch_row($queryiConomy);
}
$queryMarket = mysql_query("SELECT * FROM WA_MarketPrices WHERE name='{$itemName}' AND damage='{$itemDamage}'");
$jsArrayString = "[";
while (list($id, $name, $damage, $time, $price, $ref) = mysql_fetch_row($queryMarket)) {
    if (strlen($jsArrayString) > 3) {
        $jsArrayString = $jsArrayString . ",";
    }
    $jsArrayString = $jsArrayString . "[";
    $jsArrayString = $jsArrayString . date("\"m/d/Y H:i:s\"", $time) . "," . $price;
    $jsArrayString = $jsArrayString . "]";
}
$jsArrayString = $jsArrayString . "]";
$playerQuery = mysql_query("SELECT * FROM WA_Players WHERE name='{$user}'");
$playerRow = mysql_fetch_row($playerQuery);
Exemplo n.º 8
0
$rResultTotal = mysql_query($sQuery, $gaSql['link']) or die(mysql_error());
$aResultTotal = mysql_fetch_array($rResultTotal);
$iTotal = $aResultTotal[0];
/*
 * Output
 */
if (isset($_GET['sEcho'])) {
    $output = array("sEcho" => intval($_GET['sEcho']), "iTotalRecords" => $iTotal, "iTotalDisplayRecords" => $iFilteredTotal, "aaData" => array());
}
while ($aRow = mysql_fetch_array($rResult)) {
    $row = array();
    $quantity = $aRow[$aColumns[3]];
    $timeCreated = $aRow[$aColumns[6]];
    if (time() < $timeCreated + $auctionDurationSec || $quantity == 0) {
        $itemName = $aRow[$aColumns[0]];
        $fullItemName = getItemName($aRow[$aColumns[0]], $aRow[$aColumns[1]]);
        $itemDamage = $aRow[$aColumns[1]];
        $marketPrice = getMarketPrice($aRow[$aColumns[5]], 1);
        if ($marketPrice > 0) {
            $marketPercent = round($aRow[$aColumns[4]] / $marketPrice * 100, 1);
        } else {
            $marketPercent = "N/A";
        }
        if ($marketPercent == "N/A") {
            $marketPercent = 0;
            $grade = "gradeU";
        } else {
            if ($marketPercent <= 50) {
                $grade = "gradeA";
            } else {
                if ($marketPercent <= 150) {
Exemplo n.º 9
0
function userComment($bauerID, $email, $kommentar)
{
    global $tablePrefix;
    $toUser = $from = "*****@*****.**";
    if (!isEntryMessageSpam($kommentar)) {
        $dateTime = getCETDateTimeString();
        mysql_query("INSERT INTO " . $tablePrefix . "kommentar VALUES ({$bauerID}, \"{$dateTime}\", \"{$email}\", \"{$kommentar}\")") or die("itemView.php;userComment(): Database error (" . mysql_error() . ")");
        $subject = "Neicha Eintrag: 'Gast-Kommentar zum Bauern'";
        $message = "Datum: {$dateTime}\nVon: {$email}\nBauer: " . getItemName($bauerID) . "\n---\n{$kommentar}\n---";
        mail($toUser, $subject, $message, "From: " . $from);
    } else {
        $subject = "Neicha Eintrag SPAM-notInserted: 'Gast-Kommentar zum Bauern'";
        $message = "Datum: {$dateTime}\nVon: {$email}\nBauer: " . getItemName($bauerID) . "\n---\n{$kommentar}\n---";
        mail($toUser, $subject, $message, "From: " . $from);
    }
}
Exemplo n.º 10
0
function getRecipeReqString($spell)
{
    $text = "";
    if ($spell['Reagent_1']) {
        $text .= getItemName($spell['Reagent_1']) . getCount($spell['ReagentCount_1']);
    }
    if ($spell['Reagent_2']) {
        $text .= ", " . getItemName($spell['Reagent_2']) . getCount($spell['ReagentCount_2']);
    }
    if ($spell['Reagent_3']) {
        $text .= ", " . getItemName($spell['Reagent_3']) . getCount($spell['ReagentCount_3']);
    }
    if ($spell['Reagent_4']) {
        $text .= ", " . getItemName($spell['Reagent_4']) . getCount($spell['ReagentCount_4']);
    }
    if ($spell['Reagent_5']) {
        $text .= ", " . getItemName($spell['Reagent_5']) . getCount($spell['ReagentCount_5']);
    }
    if ($spell['Reagent_6']) {
        $text .= ", " . getItemName($spell['Reagent_6']) . getCount($spell['ReagentCount_6']);
    }
    if ($spell['Reagent_7']) {
        $text .= ", " . getItemName($spell['Reagent_7']) . getCount($spell['ReagentCount_7']);
    }
    if ($spell['Reagent_8']) {
        $text .= ", " . getItemName($spell['Reagent_8']) . getCount($spell['ReagentCount_8']);
    }
    return $text;
}
Exemplo n.º 11
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>';
    }
}
Exemplo n.º 12
0
function getItems($item)
{
    $getItemName = getItemName($item);
    return $getItemName;
}
Exemplo n.º 13
0
    getAllSlot($id, $hero['dungeonlevel'], 'Legs', 1);
    echo "</select></td><td>" . getItemDes(0, $id, 'Legs', 1) . "</td></tr>";
    echo "<tr><td>Feet:</td><td><select name='feet' onChange='this.form.submit();'>";
    getAllSlot($id, $hero['dungeonlevel'], 'Feet', 1);
    echo "</select></td><td>" . getItemDes(0, $id, 'Feet', 1) . "</td></tr>";
    echo "</table>";
    echo "</form>";
} else {
    echo "<br><table>";
    echo "<tr><td>Main Hand:</td><td>" . getItemName($id, 'Two Hand', 1, 0, 0, 0, 0, 0, 0) . "</td><td>" . getItemDes(0, $id, 'Two Hand', 1) . "</td></tr>";
    echo "<tr><td>Off Hand:</td><td>" . getItemName($id, 'Hand', 2, 0, 0, 0, 0, 0, 0) . "</td><td>" . getItemDes(0, $id, 'Hand', 2) . "</td></tr>";
    echo "<tr><td>Head:</td><td>" . getItemName($id, 'Head', 1, 0, 0, 0, 0, 0, 0) . "</td><td>" . getItemDes(0, $id, 'Head', 1) . "</td></tr>";
    echo "<tr><td>Torso:</td><td>" . getItemName($id, 'Torso', 1, 0, 0, 0, 0, 0, 0) . "</td><td>" . getItemDes(0, $id, 'Torso', 1) . "</td></tr>";
    echo "<tr><td>Arms:</td><td>" . getItemName($id, 'Arms', 1, 0, 0, 0, 0, 0, 0) . "</td><td>" . getItemDes(0, $id, 'Arms', 1) . "</td></tr>";
    echo "<tr><td>Legs:</td><td>" . getItemName($id, 'Legs', 1, 0, 0, 0, 0, 0, 0) . "</td><td>" . getItemDes(0, $id, 'Legs', 1) . "</td></tr>";
    echo "<tr><td>Feet:</td><td>" . getItemName($id, 'Feet', 1, 0, 0, 0, 0, 0, 0) . "</td><td>" . getItemDes(0, $id, 'Feet', 1) . "</td></tr>";
}
echo "</table></div>";
echo "<form name='attributefrm' id='attributefrm' method='POST' action='profile.php'><input name='attribute' type='hidden' value='' id='attributeID'></form>";
mysqli_close($conn);
function getAllSlot($hero, $level, $slot, $equip)
{
    $conn = mysqli_connect("ucfsh.ucfilespace.uc.edu", "piattjd", "curtis1", "piattjd");
    /*if($slot == 'Hand' && getItemName($hero, 'Two Hand', 1, 0, 0, 0, 0, 0, 0)) {
        echo "<option value=''>N/A</option>";
        mysqli_close($conn);
        return;
      }*/
    echo "<option value=''>----------</option>";
    if ($slot == 'Two Hand') {
        $query = "SELECT * FROM Inventory LEFT JOIN ItemBase ON Inventory.base = ItemBase.baseid Left JOIN ItemPrefix ON Inventory.prefix = ItemPrefix.prefixid LEFT JOIN ItemSuffix ON Inventory.suffix = ItemSuffix.suffixid WHERE Inventory.owner = '{$hero}' AND Inventory.time = '0' AND Inventory.baselevel <= '{$level}' AND (ItemBase.slot = 'Two Hand' OR ItemBase.slot = 'Hand')";
Exemplo n.º 14
0
<?php

require "itemView.php";
if (!($nameFamName = getItemNameFamName($ID))) {
    die("Der Mostbauer mit der ID='{$ID}' ist nicht oder nicht mehr im System.");
}
$name = getItemName($ID);
global $CmsLinkInfo;
?>

<?php 
if (!isset($_REQUEST["include"])) {
    ?>
<html>
<head>
<title>www.Mostbauer.com - Mostbauern Eckn f&uuml;r d' Stodleit - Detail: <?php 
    echo $nameFamName;
    ?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="styles.css" type="text/css">
	<link rel="stylesheet" type="text/css" href="mb_gmaps.css" />
	<script type="text/javascript">
		// set page-parameters
		var anfahrtId=<?php 
    echo $ID;
    ?>
;
		var gmapsBackendURL = "mb_gmaps_backend.php";
	</script>
	<script src="javascript/detail_div.js" type="text/javascript"></script>
Exemplo n.º 15
0
    list($passwortOrig) = mysql_fetch_row($itemResult2);
    if ($passwort == $passwortOrig) {
        //alten text auslesen für infomail
        $itemResult = mysql_query("SELECT text3 FROM most_bauer WHERE ID=" . $betrieb) or die("Fehler beim Laden der Sprüche");
        list($alterText) = mysql_fetch_row($itemResult);
        $sqlstatement = "UPDATE most_bauer SET text3='" . $neuerText . "' WHERE ID=" . $betrieb;
        //speichern
        //echo ($sqlstatement);
        mysql_query($sqlstatement);
        echo "<font face='Verdana, Arial, Helvetica, sans-serif' size='2'>";
        echo "<B>&nbsp;&nbsp;Ihr neuer Text wurde erfolgreich gespeichert !</B>";
        $textsuccessfullysaved = 1;
        //mailnotiz an uns
        $toUser = $from = "*****@*****.**";
        $subject = "Update erfolgt: 'Was der Bauer selber sagt!'";
        $message = "Bauer: " . getItemName($betrieb) . "\n---alter Text---\n{$alterText}\n\n\n---neuer Text---\n{$neuerText}\n---";
        mail($toUser, $subject, $message, "From: " . $from);
    } else {
        //echo "hallo";
        echo "<BR><font face='Verdana, Arial, Helvetica, sans-serif' size='2'>";
        echo "&nbsp;&nbsp;Das Passwort war nicht korrekt!<BR>";
        echo "</font><B><font size='2' face='Verdana, Arial, Helvetica, sans-serif' color=red>";
        echo "&nbsp;&nbsp;Ihr neuer Text konnte NICHT gespeichert werden!</B><font size='2' face='Verdana, Arial, Helvetica, sans-serif' color=black>";
        $textnotsaved = 1;
    }
    //passwort is ok
}
//isset passwort
//echo'betrieb:'.$betrieb;
if (isset($betrieb)) {
    //Betriebsbezeichnung
Exemplo n.º 16
0
			<th>Item</th>
			<th>Number Sold</th>
            <th>Market Price</th>
			<th>Value Graph</th>           
		</tr>
	</thead>
	<tbody>
	<?php 
$marketNames = array();
while (list($id, $name, $damage, $time, $price, $ref) = mysql_fetch_row($queryMarket)) {
    $keyName = array_search($name . ":" . $damage, $marketNames);
    if (!$keyName == false) {
        //found this item id
    } else {
        $marketNames[] = $name . ":" . $damage;
        $fullName = getItemName($name, $damage);
        ?>
			<tr class="gradeC">
				<td><img src="<?php 
        echo getItemImage($name, $damage);
        ?>
" alt="<?php 
        echo $fullName;
        ?>
"/><br/><?php 
        echo $fullName;
        ?>
</td>
				<td><?php 
        echo $ref;
        ?>
Exemplo n.º 17
0
    die;
}
if ($status === 18) {
    echo "Erro ao utilizar a SteamID, inexistente.";
    die;
} else {
    $result = array();
}
$new = array();
// Iterate through each item
foreach ($backpack_items['items'] as $ind => $backpack_items) {
    // Store all of the item's information in separate variables
    $id = $backpack_items['id'];
    $defindex = $backpack_items['defindex'];
    $image_url = "";
    $name = getItemName($schema_items, $defindex, $image_url);
    $level = $backpack_items['level'];
    $quantity = $backpack_items['quantity'];
    $origin = $backpack_items['origin'];
    $origin = getOrigin($origin);
    $flag_cannot_trade = array_key_exists('flag_cannot_trade', $backpack_items) ? $backpack_items['flag_cannot_trade'] : false;
    $flag_cannot_craft = array_key_exists('flag_cannot_craft', $backpack_items) ? $backpack_items['flag_cannot_craft'] : false;
    $inventory = $backpack_items['inventory'];
    // The inventory value is stored just like all of the others
    $position = $inventory & 65535;
    // You can directly perform bitwise operations on the value. PHP understands that you mean this to be a number
    $equipped = array_key_exists('equipped', $backpack_items);
    //$equipped = ($inventory >> 16) & 1023; // More bitwise operations to get the equipped number
    //$equippedString = getEquipped($equipped); // Convert the equipped number into a string
    $quality = $backpack_items['quality'];
    $quality = getQuality($quality);