From 5db461d1512bb544edbcecb3caead9c072c0fc47 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Mon, 28 Apr 2014 22:30:17 +0200 Subject: [PATCH] TC dropped faction_H from creature_template and so do i made opensearch auto-discoverable --- includes/types/creature.class.php | 4 ++-- pages/faction.php | 2 +- template/head.tpl | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/types/creature.class.php b/includes/types/creature.class.php index 419c1164..f3c6f479 100644 --- a/includes/types/creature.class.php +++ b/includes/types/creature.class.php @@ -16,7 +16,7 @@ class CreatureList extends BaseType protected $queryBase = 'SELECT ct.*, ct.id AS ARRAY_KEY FROM ?_creature ct'; public $queryOpts = array( 'ct' => [['ft', 'clsMin', 'clsMax', 'qse']], - 'ft' => ['j' => '?_factiontemplate ft ON ft.id = ct.factionA', 's' => ', ft.A, ft.H, ft.factionId'], + 'ft' => ['j' => '?_factiontemplate ft ON ft.id = ct.faction', 's' => ', ft.A, ft.H, ft.factionId'], 'clsMin' => ['j' => 'creature_classlevelstats clsMin ON ct.unitClass = clsMin.class AND ct.minLevel = clsMin.level', 's' => ', clsMin.attackpower AS mleAtkPwrMin, clsMin.rangedattackpower AS rngAtkPwrMin, clsMin.baseArmor * ct.armorMod AS armorMin, (CASE ct.exp WHEN 0 THEN clsMin.damage_base WHEN 1 THEN clsMin.damage_exp1 ELSE clsMin.damage_exp2 END) * ct.dmgMultiplier AS dmgMin, (CASE ct.exp WHEN 0 THEN clsMin.basehp0 WHEN 1 THEN clsMin.basehp1 ELSE clsMin.basehp2 END) * ct.healthMod AS healthMin, clsMin.baseMana * ct.manaMod AS manaMin'], 'clsMax' => ['j' => 'creature_classlevelstats clsMax ON ct.unitClass = clsMax.class AND ct.maxLevel = clsMax.level', 's' => ', clsMax.attackpower AS mleAtkPwrMax, clsMax.rangedattackpower AS rngAtkPwrMax, clsMax.baseArmor * ct.armorMod AS armorMax, (CASE ct.exp WHEN 0 THEN clsMin.damage_base WHEN 1 THEN clsMin.damage_exp1 ELSE clsMin.damage_exp2 END) * ct.dmgMultiplier AS dmgMax, (CASE ct.exp WHEN 0 THEN clsMax.basehp0 WHEN 1 THEN clsMax.basehp1 ELSE clsMax.basehp2 END) * ct.healthMod AS healthMax, clsMax.baseMana * ct.manaMod AS manaMax'], 'qse' => ['j' => ['?_quests_startend qse ON qse.type = 1 AND qse.typeId = ct.id', true], 's' => ', IF(min(qse.method) = 1 OR max(qse.method) = 3, 1, 0) AS startsQuests, IF(min(qse.method) = 2 OR max(qse.method) = 3, 1, 0) AS endsQuests', 'g' => 'ct.id'], @@ -363,7 +363,7 @@ class CreatureListFilter extends Filter if (!$facTpls) return [0]; - return ['OR', ['factionA', $facTpls], ['factionH', $facTpls]]; + return ['faction', $facTpls]; } break; case 42: // increasesrepwith [enum] diff --git a/pages/faction.php b/pages/faction.php index 6e162bea..f86b9996 100644 --- a/pages/faction.php +++ b/pages/faction.php @@ -202,7 +202,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) // tab: members if ($_ = $faction->getField('templateIds')) { - $members = new CreatureList(array(['factionA', $_], ['factionH', $_], 'OR')); + $members = new CreatureList(array(['faction', $_])); if (!$members->error) { $members->addGlobalsToJscript(); diff --git a/template/head.tpl b/template/head.tpl index 7c2c622b..42e90806 100644 --- a/template/head.tpl +++ b/template/head.tpl @@ -1,7 +1,8 @@ {if $title}{$title|escape:"html"} - {/if}{$appName} - + +