Updated fields to match current database

This commit is contained in:
cabfever 2015-01-29 23:40:08 +00:00 committed by Antz
parent 6cd6c20a26
commit f3df2e3052
7 changed files with 16 additions and 16 deletions

View File

@ -75,8 +75,8 @@ if (!$faction = load_cache(18, intval($id))) {
SELECT ?#, entry
FROM ?_creature_template, ?_aowow_factiontemplate
WHERE
faction_A IN (SELECT factiontemplateID FROM ?_aowow_factiontemplate WHERE factionID=?d)
AND factiontemplateID=faction_A
FactionAlliance IN (SELECT factiontemplateID FROM ?_aowow_factiontemplate WHERE factionID=?d)
AND factiontemplateID=FactionAlliance
', $npc_cols[0], $id
);
if ($creature_rows) {

View File

@ -12,7 +12,7 @@
// Для списка creatureinfo()
$npc_cols[0] = array('name', 'subname', 'minlevel', 'maxlevel', 'Creaturetype', 'rank', 'FactionAlliance', 'FactionHorde');
$npc_cols[1] = array('subname', 'minlevel', 'maxlevel', 'Creaturetype', 'rank', 'minhealth', 'maxhealth', 'minmana', 'maxmana', 'mingold', 'maxgold', 'lootid', 'spell1', 'spell2', 'spell3', 'spell4', 'FactionAlliance', 'FactionHorde', 'mindmg', 'maxdmg', 'attackpower', 'dmg_multiplier', 'armor');
$npc_cols[1] = array('subname', 'minlevel', 'maxlevel', 'creaturetype', 'rank', 'MinLevelHealth', 'MaxLevelHealth', 'MinLevelMana', 'MaxLevelMana', 'MinLootGold', 'MaxLootGold', 'lootid', /*'spell1', 'spell2', 'spell3', 'spell4',*/ 'FactionAlliance', 'FactionHorde', 'MinMeleeDmg', 'MaxMeleeDmg', 'MeleeAttackPower', 'DamageMultiplier', 'armor');
// Функция информации о создании
/**
@ -66,7 +66,7 @@ function creatureinfo($id) {
}
WHERE
c.entry=?d
AND factiontemplateID=factionAlliance
AND factiontemplateID=FactionAlliance
LIMIT 1
', $npc_cols[0], ($_SESSION['locale'] > 0) ? 1 : DBSIMPLE_SKIP, ($_SESSION['locale'] > 0) ? 1 : DBSIMPLE_SKIP, $id
);

View File

@ -51,7 +51,7 @@ if (!$item = load_cache(5, $id)) {
{ LEFT JOIN (?_locales_creature l) ON l.entry=c.entry AND ? }
WHERE
lootid=?d
AND factiontemplateID=faction_A
AND factiontemplateID=FactionAlliance
', $npc_cols[0], ($_SESSION['locale'] > 0) ? $_SESSION['locale'] : DBSIMPLE_SKIP, ($_SESSION['locale'] > 0) ? 1 : DBSIMPLE_SKIP, $lootid
);
foreach ($rows as $numRow => $row)
@ -85,7 +85,7 @@ if (!$item = load_cache(5, $id)) {
{ LEFT JOIN (?_locales_creature l) ON l.entry=c.entry AND ? }
WHERE
c.lootid = ?d
AND factiontemplateID=faction_A
AND factiontemplateID=FactionAlliance
', $npc_cols[0], ($_SESSION['locale'] > 0) ? $_SESSION['locale'] : DBSIMPLE_SKIP, ($_SESSION['locale'] > 0) ? 1 : DBSIMPLE_SKIP, $lrow['entry']
);
foreach ($rows as $numRow => $row)
@ -152,7 +152,7 @@ if (!$item = load_cache(5, $id)) {
WHERE
v.item=?d
AND c.entry=v.entry
AND factiontemplateID=faction_A
AND factiontemplateID=FactionAlliance
ORDER BY 1 DESC, 2 DESC
', $npc_cols['0'], ($_SESSION['locale'] > 0) ? $_SESSION['locale'] : DBSIMPLE_SKIP, ($_SESSION['locale'] > 0) ? 1 : DBSIMPLE_SKIP, $item['entry']
);
@ -273,7 +273,7 @@ if (!$item = load_cache(5, $id)) {
{ LEFT JOIN (?_locales_creature l) ON l.entry=c.entry AND ? }
WHERE
pickpocketloot=?d
AND factiontemplateID=faction_A
AND factiontemplateID=FactionAlliance
', $npc_cols[0], ($_SESSION['locale'] > 0) ? $_SESSION['locale'] : DBSIMPLE_SKIP, ($_SESSION['locale'] > 0) ? 1 : DBSIMPLE_SKIP, $lootid
);
foreach ($rows as $numRow => $row)
@ -300,7 +300,7 @@ if (!$item = load_cache(5, $id)) {
{ LEFT JOIN (?_locales_creature l) ON l.entry=c.entry AND ? }
WHERE
skinloot=?d
AND factiontemplateID=faction_A
AND factiontemplateID=FactionAlliance
', $npc_cols[0], ($_SESSION['locale'] > 0) ? $_SESSION['locale'] : DBSIMPLE_SKIP, ($_SESSION['locale'] > 0) ? 1 : DBSIMPLE_SKIP, $lootid
);
foreach ($rows as $numRow => $row)

View File

@ -44,7 +44,7 @@ if (!$npc = load_cache(1, intval($id))) {
}
WHERE
c.entry=?
AND ft.factiontemplateID=c.faction_A
AND ft.factiontemplateID=c.FactionAlliance
AND f.factionID=ft.factionID
LIMIT 1
', $npc_cols[1], ($_SESSION['locale'] > 0) ? 1 : DBSIMPLE_SKIP, ($_SESSION['locale'] > 0) ? 1 : DBSIMPLE_SKIP, $id
@ -79,7 +79,7 @@ if (!$npc = load_cache(1, intval($id))) {
}
$npc['rank'] = $smarty->get_config_vars('rank' . $npc['rank']);
// faction_A = faction_H
// FactionAlliance = FactionHorde
$npc['faction_num'] = $row['factionID'];
$npc['faction'] = $row['faction-name'];
// Деньги

View File

@ -37,9 +37,9 @@ if (!$npcs = load_cache(2, $cache_str)) {
FROM ?_aowow_factiontemplate, ?_creature_template c
{ LEFT JOIN (?_locales_creature l) ON l.entry=c.entry AND ? }
WHERE 1=1
{AND type=?}
{AND creatureType=?}
{AND family=?}
AND factiontemplateID=faction_A
AND factiontemplateID=FactionAlliance
ORDER BY minlevel DESC, name
{LIMIT ?d}
', $npc_cols[0], ($_SESSION['locale'] > 0) ? $_SESSION['locale'] : DBSIMPLE_SKIP, ($_SESSION['locale'] > 0) ? 1 : DBSIMPLE_SKIP, ($type != '') ? $type : DBSIMPLE_SKIP, (isset($family)) ? $family : DBSIMPLE_SKIP, ($UDWBaseconf['limit'] != 0) ? $UDWBaseconf['limit'] : DBSIMPLE_SKIP

View File

@ -330,7 +330,7 @@ if (!$quest = load_cache(10, intval($id))) {
WHERE
q.quest=?d
AND c.entry=q.id
AND factiontemplateID=c.faction_A
AND factiontemplateID=c.FactionAlliance
', ($_SESSION['locale'] > 0) ? $_SESSION['locale'] : DBSIMPLE_SKIP, ($_SESSION['locale'] > 0) ? 1 : DBSIMPLE_SKIP, $quest['entry']
);
if ($rows) {
@ -396,7 +396,7 @@ if (!$quest = load_cache(10, intval($id))) {
WHERE
q.quest=?d
AND c.entry=q.id
AND factiontemplateID=c.faction_A
AND factiontemplateID=c.FactionAlliance
', ($_SESSION['locale'] > 0) ? $_SESSION['locale'] : DBSIMPLE_SKIP, ($_SESSION['locale'] > 0) ? 1 : DBSIMPLE_SKIP, $quest['entry']
);
if ($rows) {

View File

@ -94,7 +94,7 @@ $rows = $DB->select('
(name LIKE ?
OR subname LIKE ?
{OR c.entry IN (?a)})
AND factiontemplateID=faction_A
AND factiontemplateID=FactionAlliance
', $npc_cols[0], ($m) ? $_SESSION['locale'] : DBSIMPLE_SKIP, ($m) ? 1 : DBSIMPLE_SKIP, $nsearch, $nsearch, ($m) ? $m : DBSIMPLE_SKIP
);
unset($m);