diff --git a/faction.php b/faction.php index 1f41f14..fdad76e 100644 --- a/faction.php +++ b/faction.php @@ -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) { diff --git a/includes/allnpcs.php b/includes/allnpcs.php index 2774152..6957f20 100644 --- a/includes/allnpcs.php +++ b/includes/allnpcs.php @@ -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 ); diff --git a/item.php b/item.php index 2ce5fb9..64f5043 100644 --- a/item.php +++ b/item.php @@ -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) diff --git a/npc.php b/npc.php index cee49ad..5bd271a 100644 --- a/npc.php +++ b/npc.php @@ -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']; // Деньги diff --git a/npcs.php b/npcs.php index ff06fcf..2997d86 100644 --- a/npcs.php +++ b/npcs.php @@ -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 diff --git a/quest.php b/quest.php index 8045a9b..c318ba4 100644 --- a/quest.php +++ b/quest.php @@ -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) { diff --git a/search.php b/search.php index f43df81..8fba22f 100644 --- a/search.php +++ b/search.php @@ -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);