$i = 0; //*********************************** // Обьекты //*********************************** $go_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 `gameobject`\n WHERE\n `map` = ?d\n ORDER BY `id`", $mapId) : 0; if ($go_list) { foreach ($go_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; $o = getGameobject($point['id']); $id = "o" . $point['id']; $mapdata['points'][$i]['id'] = $id; $mapdata['points'][$i]['x'] = $y; $mapdata['points'][$i]['y'] = $x; $mapdata['points'][$i]['image'] = "images/map_points/vein.gif"; $mapdata['points'][$i]['icenterx'] = 4; $mapdata['points'][$i]['icentery'] = 4; $mapdata['points'][$i]['href'] = "\"?object=" . $point['id'] . "\" onclick=\"return changeSelect('" . $id . "');\""; $tt = "<table class=maptooltip>"; $tt .= "<tr><td class=name>" . getGameobjectType($o['type']) . " - " . validateText($o['name']) . " (" . $point['guid'] . ")</td></tr>"; $tt .= "</table>"; $mapdata['points'][$i]['tooltip'] = $tt; $i++; } }
function getGameobjectName($gameobject_id, $as_ref = 1) { if ($gameobject = getGameobject($gameobject_id, "`entry`, `name`")) { if (empty($gameobject['name'])) { $gameobject['name'] = "go_{$gameobject_id}"; } if ($as_ref) { return "<a href=?object=" . $gameobject['entry'] . ">" . $gameobject['name'] . "</a>"; } return $gameobject['name']; } return "Unknown go - {$gameobject_id}"; }
Script show GO data by its entry Show: - Show simple GO table tooltip - Details GO info - Summoned by spell - Cast spells - How can possible open it (lock info) - Required for quest list - Give quest list - Take quest list - Item loot */ $entry = intval(@$_REQUEST['object']); $page = intval(@$_REQUEST['page']); $mark = @$_REQUEST['mark']; $obj = getGameobject($entry); if (!$obj) { RenderError($lang['go_not_found']); } else { $baseLink = '?object=' . $entry; if ($ajaxmode == 0) { if ($lang['www_gameobject']) { echo "<a href=\"" . sprintf($lang['www_gameobject'], $entry) . "\" target=\"_blank\"\">" . sprintf($lang['www_gameobject'], $entry) . "</a><br>"; } echo "<table cellspacing=0 cellpadding=0 width=500>"; echo "<tbody>"; echo "<tr>"; // $icon = "--";//getObjIcon($obj[displayId]); // echo "<td valign=top align=right width=20><br><a href=\"#\"><IMG height=64 width=64 border=0 src='$icon'></a></td>"; echo "<td align=center>"; generateGameobjectTable($obj);
} 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}"; } break; // Показ спелла // Показ спелла case "s": if ($spell = getSpell($entry)) { noBorderSpellTable($spell); } else { echo "Error spell {$entry}"; } break;