Imported AoWoW.

This version of AoWoW is based on https://github.com/udw/udwbase and is
not yet usable.

An initial amount of testing has been finished, and you can import the
aowow.sql database into your world database, and create a local copy of
config.php.in as config.php to test this version.

FirePHP (http://firephp.org/) has been added for testing purposes.

Signed-off-by: TheLuda <theluda@getmangos.com>
This commit is contained in:
TheLuda
2011-09-25 20:57:24 +02:00
parent 0fab20e9d4
commit 947f95fb20
12244 changed files with 102011 additions and 0 deletions
+74
View File
@@ -0,0 +1,74 @@
<?php
/*
* UDWBase: WOWDB Web Interface
*
* © UDW 2009-2011
*
* Released under the terms and conditions of the
* GNU General Public License (http://gnu.org).
*
*/
// Для списка creatureinfo()
$npc_cols[0] = array('name', 'subname', 'minlevel', 'maxlevel', 'type', 'rank', 'A', 'H');
$npc_cols[1] = array('subname', 'minlevel', 'maxlevel', 'type', 'rank', 'minhealth', 'maxhealth', 'minmana', 'maxmana', 'mingold', 'maxgold', 'lootid', 'spell1', 'spell2', 'spell3', 'spell4', 'A', 'H', 'mindmg', 'maxdmg', 'attackpower', 'dmg_multiplier', 'armor');
// Функция информации о создании
/**
*
* @param type $Row
* @return type
*/
function creatureinfo2(&$Row) {
// Номер создания
$creature['entry'] = $Row['entry'];
// Имя создания
$creature['name'] = !empty($Row['name_loc']) ? $Row['name_loc'] : $Row['name'];
// Подимя создания
$creature['subname'] = !empty($Row['subname_loc']) ? $Row['subname_loc'] : $Row['subname'];
// Min/Max уровни
$creature['minlevel'] = $Row['minlevel'];
$creature['maxlevel'] = $Row['maxlevel'];
// TODO: Месторасположение
// $creature['location'] = location($creature['entry'],'creature');
// TODO: Реакция на фракции
$creature['react'] = ($Row['A']) . ',' . ($Row['H']);
// Тип NPC
$creature['type'] = $Row['type'];
// Тег NPC
$creature['tag'] = str_normalize($Row['subname']);
// Ранг NPC
$creature['classification'] = $Row['rank'];
return $creature;
}
// Функция информации о создании
/**
*
* @param type $id
* @return type
*/
function creatureinfo($id) {
global $DB;
global $npc_cols;
$row = $DB->selectRow('
SELECT ?#, c.entry
{
, l.name_loc' . $_SESSION['locale'] . ' as `name_loc`
, l.subname_loc' . $_SESSION['locale'] . ' as `subname_loc`
, ?
}
FROM ?_aowow_factiontemplate, ?_creature_template c
{
LEFT JOIN (?_locales_creature l)
ON l.entry=c.entry AND ?
}
WHERE
c.entry=?d
AND factiontemplateID=faction_A
LIMIT 1
', $npc_cols[0], ($_SESSION['locale'] > 0) ? 1 : DBSIMPLE_SKIP, ($_SESSION['locale'] > 0) ? 1 : DBSIMPLE_SKIP, $id
);
return creatureinfo2($row);
}