Пример #1
0
 }
 //***********************************
 // НИП
 //***********************************
 $creatures_list = $dungeon ? $dDB->selectPage($totalRecords, "SELECT\n      `guid`,\n      `id`,\n      `map`,\n      `position_x`,\n      `position_y`,\n      `position_z`,\n      `spawntimesecs`\n      FROM\n      `creature`\n      WHERE\n      `map` = ?d\n      ORDER BY `id`", $mapId) : 0;
 if ($creatures_list) {
     foreach ($creatures_list as $point) {
         $posMap = $point['map'];
         $posX = $point['position_x'];
         $posY = $point['position_y'];
         $posZ = $point['position_z'];
         transformWorldCoordinates($posMap, $posX, $posY, $posZ);
         if ($mapId == $posMap and $areaY1 >= $posY and $areaY2 <= $posY and $areaX1 >= $posX and $areaX2 <= $posX) {
             $x = ($posX - $areaX1) / ($areaX2 - $areaX1) * 100;
             $y = ($posY - $areaY1) / ($areaY2 - $areaY1) * 100;
             $c = getCreature($point['id']);
             $id = "c" . $point['id'];
             $mapdata['points'][$i]['id'] = $id;
             $mapdata['points'][$i]['x'] = $y;
             $mapdata['points'][$i]['y'] = $x;
             $mapdata['points'][$i]['image'] = 0;
             $mapdata['points'][$i]['icenterx'] = 0;
             $mapdata['points'][$i]['icentery'] = 0;
             $mapdata['points'][$i]['href'] = "\"?npc=" . $point['id'] . "\" onclick=\"return changeSelect('" . $id . "');\"";
             $tt = "<table class=maptooltip>";
             $tt .= "<tr><td class=name>" . validateText($c['name']) . " (" . $point['guid'] . ")</td></tr>";
             $tt .= "</table>";
             $mapdata['points'][$i]['tooltip'] = $tt;
             $i++;
         }
     }
Пример #2
0
function getCreatureName($creature_id, $as_ref = 1)
{
    if ($Creature = getCreature($creature_id, "`entry`, `name`")) {
        if ($Creature['name'] == "") {
            $Creature['name'] = "npc_{$creature_id}";
        }
        if ($as_ref) {
            return "<a href=?npc=" . $Creature['entry'] . ">" . $Creature['name'] . "</a>";
        }
        return $Creature['name'];
    }
    return "Unknown creature - {$creature_id}";
}
Пример #3
0
             }
         } else {
             echo "Error item guid {$entry}";
         }
     } else {
         if ($item = getItem($entry)) {
             noBorderItemTable($item, 0, 0);
         } else {
             echo "Error item {$entry}";
         }
     }
     break;
     // Показ  Существа
 // Показ  Существа
 case "c":
     if ($creature = getCreature($entry)) {
         include_once "include/creature_table.php";
         noBorderCreatureTable($creature);
     } else {
         echo "Error creature {$entry}";
     }
     break;
     // Показ Обьекта
 // Показ Обьекта
 case "o":
     if ($obj = getGameobject($entry)) {
         include_once "include/gameobject_table.php";
         noBorderGameobjectTable($obj);
     } else {
         echo "Error object {$entry}";
     }
function r_npcRName($data)
{
    $h = getHeroicList();
    $h1 = getHeroicList1();
    $h2 = getHeroicList2();
    if (isset($h[$data['entry']])) {
        $heroic = getCreature($h[$data['entry']]);
        $data['name'] = $heroic['name'] . ' (difficulty_1)';
        $data['name_loc'] = $heroic['name'] . ' (difficulty_1)';
        $data['subname'] = $heroic['subname'];
    }
    if (isset($h1[$data['entry']])) {
        $heroic = getCreature($h1[$data['entry']]);
        $data['name'] = $heroic['name'] . ' (difficulty_2)';
        $data['name_loc'] = $heroic['name'] . ' (difficulty_2)';
        $data['subname'] = $heroic['subname'];
    }
    if (isset($h2[$data['entry']])) {
        $heroic = getCreature($h2[$data['entry']]);
        $data['name'] = $heroic['name'] . ' (difficulty_3)';
        $data['name_loc'] = $heroic['name'] . ' (difficulty_3)';
        $data['subname'] = $heroic['subname'];
    }
    $name = @$data['name_loc'] ? $data['name_loc'] : $data['name'];
    $subname = @$data['subname_loc'] ? $data['subname_loc'] : $data['subname'];
    echo '<a href="?npc=' . $data['entry'] . '">' . ($name ? $name : 'no name') . '</a> <font size=-3>(' . getLoyality($data['faction_A']) . ')</font>';
    if ($subname) {
        echo '<br><div class=subname><a href="?s=n&subname=' . $subname . '">&lt;' . $subname . '&gt;</a></div>';
    }
}
Пример #5
0
  - Что кастует
  - Каким спеллом может быть призыван
  - Что он продаёт
  - Чему обучает
  - Нужен для какого квеста
  - В какую группу входит НИП (kredit)
  - Какие квесты даёт
  - Какие квесты принимает
  - Лут с НИП
  - Лут который можно украсть у НИП
  - Лут шкурок с трупа НИП
*/
$entry = intval(@$_REQUEST['npc']);
$page = intval(@$_REQUEST['page']);
$mark = @$_REQUEST['mark'];
$cr = getCreature($entry);
if (!$cr) {
    RenderError("{$lang['creature_not_found']}");
} else {
    $baseLink = '?npc=' . $entry;
    if ($ajaxmode == 0) {
        if ($lang['www_creature']) {
            echo "<a href=\"" . sprintf($lang['www_creature'], $entry) . "\" target=\"_blank\"\">" . sprintf($lang['www_creature'], $entry) . "</a><br>";
        }
        echo "<table cellspacing=0 cellpadding=0 width=500>";
        echo "<tbody>";
        echo "<tr>";
        echo "<td align=center>";
        generateCreatureTable($cr);
        echo "</td>";
        echo "</tr>";