diff --git a/.htaccess b/.htaccess index 3a5ed06c..753acd4f 100644 --- a/.htaccess +++ b/.htaccess @@ -22,7 +22,7 @@ AddDefaultCharset utf8 RewriteEngine on # Mapper-Helper: If you cant provide maps for all locales, redirect the browser - RewriteRule ^images/maps/(frfr|dede|eses|ruru)/(.*)$ images/maps/enus/$2 [NC] + RewriteRule ^static/images/wow/maps/(frfr|dede|eses|ruru)/(.*)$ static/images/wow/maps/enus/$2 [NC] # accept flattened urls | NYI - need more work :x RewriteRule ^([a-z0-9\-]+)$ ?$1 [NC] # /items => ?items diff --git a/includes/defines.php b/includes/defines.php index 70f91fd9..ebad03d9 100644 --- a/includes/defines.php +++ b/includes/defines.php @@ -362,6 +362,26 @@ define('NPC_FLAG_BATTLEMASTER', 0x00100000); define('NPC_FLAG_AUCTIONEER', 0x00200000); define('NPC_FLAG_STABLE_MASTER', 0x00400000); +// quest +define('QUEST_FLAG_STAY_ALIVE', 0x00001); +define('QUEST_FLAG_PARTY_ACCEPT', 0x00002); +define('QUEST_FLAG_EXPLORATION', 0x00004); +define('QUEST_FLAG_SHARABLE', 0x00008); +define('QUEST_FLAG_AUTO_REWARDED', 0x00400); +define('QUEST_FLAG_DAILY', 0x01000); +define('QUEST_FLAG_REPEATABLE', 0x02000); +define('QUEST_FLAG_UNAVAILABLE', 0x04000); +define('QUEST_FLAG_WEEKLY', 0x08000); +define('QUEST_FLAG_AUTO_COMPLETE', 0x10000); +define('QUEST_FLAG_AUTO_ACCEPT', 0x80000); + +define('QUEST_FLAG_SPECIAL_REPEATABLE', 0x01); +define('QUEST_FLAG_SPECIAL_EXT_COMPLETE', 0x02); +define('QUEST_FLAG_SPECIAL_AUTO_ACCEPT', 0x04); +define('QUEST_FLAG_SPECIAL_DUNGEON_FINDER', 0x08); +define('QUEST_FLAG_SPECIAL_MONTHLY', 0x10); +define('QUEST_FLAG_SPECIAL_SPELLCAST', 0x20); // not documented in wiki! :[ + // GameObject define('OBJECT_DOOR', 0); define('OBJECT_BUTTON', 1); diff --git a/includes/types/achievement.class.php b/includes/types/achievement.class.php index 16225228..9cb1eb4b 100644 --- a/includes/types/achievement.class.php +++ b/includes/types/achievement.class.php @@ -24,9 +24,9 @@ class AchievementList extends BaseType todo: evaluate TC custom-data-tables: a*_criteria_data should be merged on installation, a*_reward linked with mail_loot_template and achievement */ - public function __construct($conditions = []) + public function __construct($conditions = [], $miscData = null) { - parent::__construct($conditions); + parent::__construct($conditions, $miscData); // post processing foreach ($this->iterate() as &$_curTpl) @@ -47,12 +47,12 @@ class AchievementList extends BaseType } } - public function addGlobalsToJscript(&$template, $addMask = GLOBALINFO_ANY) + public function addGlobalsToJScript($addMask = GLOBALINFO_ANY) { foreach ($this->iterate() as $__) { if ($addMask & GLOBALINFO_SELF) - $template->extendGlobalData(self::$type, [$this->id => array( + Util::$pageTemplate->extendGlobalData(self::$type, [$this->id => array( 'icon' => $this->curTpl['iconString'], 'name' => $this->getField('name', true) )]); @@ -60,10 +60,10 @@ class AchievementList extends BaseType if ($addMask & GLOBALINFO_REWARDS) { foreach ($this->curTpl['rewards'][TYPE_ITEM] as $_) - $template->extendGlobalIds(TYPE_ITEM, $_); + Util::$pageTemplate->extendGlobalIds(TYPE_ITEM, $_); foreach ($this->curTpl['rewards'][TYPE_TITLE] as $_) - $template->extendGlobalIds(TYPE_TITLE, $_); + Util::$pageTemplate->extendGlobalIds(TYPE_TITLE, $_); } } } diff --git a/includes/types/basetype.class.php b/includes/types/basetype.class.php index 11d8d78d..59148eb3 100644 --- a/includes/types/basetype.class.php +++ b/includes/types/basetype.class.php @@ -340,6 +340,7 @@ abstract class BaseType protected function extendQueryOpts($extra) // needs to be called from __construct { + foreach ($extra as $tbl => $sets) { if (!isset($this->queryOpts[$tbl])) // allow adding only to known tables @@ -347,18 +348,25 @@ abstract class BaseType foreach ($sets as $module => $value) { - if (!$value) + if (!$value || !is_array($value)) continue; switch ($module) { // additional (str) case 'g': // group by + case 's': // select + if (!empty($this->queryOpts[$tbl][$module])) + $this->queryOpts[$tbl][$module] .= implode(' ', $value); + else + $this->queryOpts[$tbl][$module] = implode(' ', $value); + + break; case 'h': // having if (!empty($this->queryOpts[$tbl][$module])) - $this->queryOpts[$tbl][$module] .= $value; + $this->queryOpts[$tbl][$module] .= implode(' AND ', $value); else - $this->queryOpts[$tbl][$module] = $value; + $this->queryOpts[$tbl][$module] = implode(' AND ', $value); break; // additional (arr) @@ -371,9 +379,8 @@ abstract class BaseType break; // replacement (str) case 'l': // limit - case 's': // select case 'o': // order by - $this->queryOpts[$tbl][$module] = $value; + $this->queryOpts[$tbl][$module] = $value[0]; break; } } @@ -385,7 +392,7 @@ abstract class BaseType abstract public function getListviewData(); // should return data to extend global js variables for a certain type (e.g. g_items) - abstract public function addGlobalsToJScript(&$smarty, $addMask = GLOBALINFO_ANY); + abstract public function addGlobalsToJScript($addMask = GLOBALINFO_ANY); // NPC, GO, Item, Quest, Spell, Achievement, Profile would require this abstract public function renderTooltip(); @@ -714,7 +721,7 @@ abstract class Filter switch ($name) { case 'setCriteria': - $form[$name] = $raw ? $data : 'fi_setCriteria('.$data['cr'].', '.$data['crs'].', '.$data['crv'].');'; + $form[$name] = $raw ? $data : 'fi_setCriteria('.(empty($data['cr']) ? '[]' : $data['cr']).', '.(empty($data['crs']) ? '[]' : $data['crs']).', '.(empty($data['crv']) ? '[]' : $data['crv']).');'; break; case 'extraCols': $form[$name] = $raw ? $data : 'fi_extraCols = '.json_encode(array_unique($data), JSON_NUMERIC_CHECK).';'; @@ -762,7 +769,7 @@ abstract class Filter foreach ($fields as $n => $f) { $sub = []; - $parts = explode(' ', $string); + $parts = array_filter(explode(' ', $string)); foreach ($parts as $p) { diff --git a/includes/types/charclass.class.php b/includes/types/charclass.class.php index 9b6ccadf..62df92a0 100644 --- a/includes/types/charclass.class.php +++ b/includes/types/charclass.class.php @@ -42,10 +42,10 @@ class CharClassList extends BaseType return $data; } - public function addGlobalsToJscript(&$template, $addMask = 0) + public function addGlobalsToJScript($addMask = 0) { foreach ($this->iterate() as $__) - $template->extendGlobalData(self::$type, [$this->id => ['name' => $this->getField('name', true)]]); + Util::$pageTemplate->extendGlobalData(self::$type, [$this->id => ['name' => $this->getField('name', true)]]); } public function addRewardsToJScript(&$ref) { } diff --git a/includes/types/charrace.class.php b/includes/types/charrace.class.php index 9a76f5ca..ca994311 100644 --- a/includes/types/charrace.class.php +++ b/includes/types/charrace.class.php @@ -34,10 +34,10 @@ class CharRaceList extends BaseType return $data; } - public function addGlobalsToJscript(&$template, $addMask = 0) + public function addGlobalsToJScript($addMask = 0) { foreach ($this->iterate() as $__) - $template->extendGlobalData(self::$type, [$this->id => ['name' => $this->getField('name', true)]]); + Util::$pageTemplate->extendGlobalData(self::$type, [$this->id => ['name' => $this->getField('name', true)]]); } public function addRewardsToJScript(&$ref) { } diff --git a/includes/types/creature.class.php b/includes/types/creature.class.php index 89ce041e..2c18e31c 100644 --- a/includes/types/creature.class.php +++ b/includes/types/creature.class.php @@ -15,14 +15,12 @@ class CreatureList extends BaseType protected $queryBase = 'SELECT ct.*, ct.id AS ARRAY_KEY FROM ?_creature ct'; public $queryOpts = array( - 'ct' => [['ft', 'clsMin', 'clsMax', 'qr']], + 'ct' => [['ft', 'clsMin', 'clsMax', 'qse']], 'ft' => ['j' => '?_factiontemplate ft ON ft.id = ct.factionA', '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 * armorMod AS armorMin, (CASE ct.exp WHEN 0 THEN clsMin.damage_base WHEN 1 THEN clsMin.damage_exp1 ELSE clsMin.damage_exp2 END) * dmgMultiplier AS dmgMin, (CASE ct.exp WHEN 0 THEN clsMin.basehp0 WHEN 1 THEN clsMin.basehp1 ELSE clsMin.basehp2 END) * healthMod AS healthMin, clsMin.baseMana * 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 * armorMod AS armorMax, (CASE ct.exp WHEN 0 THEN clsMin.damage_base WHEN 1 THEN clsMin.damage_exp1 ELSE clsMin.damage_exp2 END) * dmgMultiplier AS dmgMax, (CASE ct.exp WHEN 0 THEN clsMax.basehp0 WHEN 1 THEN clsMax.basehp1 ELSE clsMax.basehp2 END) * healthMod AS healthMax, clsMax.baseMana * manaMod AS manaMax'], - 'qr' => ['j' => ['creature_questrelation qr ON qr.id = ct.id', true], 's' => ', qr.quest', 'g' => 'ct.id'], // start - 'ir' => ['j' => ['creature_involvedrelation ir ON ir.id = ct.id', true]], // end - 'qtqr' => ['j' => 'quest_template qtqr ON qr.quest = qtqr.id'], - 'qtir' => ['j' => 'quest_template qtir ON ir.quest = qtir.id'], + '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'], + 'qt' => ['j' => '?_quests qt ON qse.questId = qt.id'], 'rep' => ['j' => ['creature_onkill_reputation rep ON rep.creature_id = ct.id', true]] ); @@ -200,7 +198,7 @@ class CreatureList extends BaseType 'react' => [$this->curTpl['A'], $this->curTpl['H']], ); - if ($this->getField('quest')) + if ($this->getField('startsQuests')) $data[$this->id]['hasQuests'] = 1; if ($_ = $this->getField('subname', true)) @@ -215,10 +213,10 @@ class CreatureList extends BaseType return $data; } - public function addGlobalsToJScript(&$template, $addMask = 0) + public function addGlobalsToJScript($addMask = 0) { foreach ($this->iterate() as $__) - $template->extendGlobalData(TYPE_NPC, [$this->id => ['name' => $this->getField('name', true)]]); + Util::$pageTemplate->extendGlobalData(TYPE_NPC, [$this->id => ['name' => $this->getField('name', true)]]); } public function addRewardsToJScript(&$refs) { } @@ -280,20 +278,20 @@ class CreatureListFilter extends Filter switch ($cr[1]) { case '=': // min > max is totally possible - $this->extraOpts['clsMin']['h'] = 'IF(healthMin > healthMax, healthMax, healthMin) <= '.$cr[2]; - $this->extraOpts['clsMax']['h'] = 'IF(healthMin > healthMax, healthMin, healthMax) >= '.$cr[2]; + $this->extraOpts['clsMin']['h'][] = 'IF(healthMin > healthMax, healthMax, healthMin) <= '.$cr[2]; + $this->extraOpts['clsMax']['h'][] = 'IF(healthMin > healthMax, healthMin, healthMax) >= '.$cr[2]; break; case '>': - $this->extraOpts['clsMin']['h'] = 'IF(healthMin > healthMax, healthMax, healthMin) > '.$cr[2]; + $this->extraOpts['clsMin']['h'][] = 'IF(healthMin > healthMax, healthMax, healthMin) > '.$cr[2]; break; case '>=': - $this->extraOpts['clsMin']['h'] = 'IF(healthMin > healthMax, healthMax, healthMin) >= '.$cr[2]; + $this->extraOpts['clsMin']['h'][] = 'IF(healthMin > healthMax, healthMax, healthMin) >= '.$cr[2]; break; case '<': - $this->extraOpts['clsMax']['h'] = 'IF(healthMin > healthMax, healthMin, healthMax) < '.$cr[2]; + $this->extraOpts['clsMax']['h'][] = 'IF(healthMin > healthMax, healthMin, healthMax) < '.$cr[2]; break; case '<=': - $this->extraOpts['clsMax']['h'] = 'IF(healthMin > healthMax, healthMin, healthMax) <= '.$cr[2]; + $this->extraOpts['clsMax']['h'][] = 'IF(healthMin > healthMax, healthMin, healthMax) <= '.$cr[2]; break; } return [1]; // always true, use post-filter @@ -305,20 +303,20 @@ class CreatureListFilter extends Filter switch ($cr[1]) { case '=': - $this->extraOpts['clsMin']['h'] = 'IF(manaMin > manaMax, manaMax, manaMin) <= '.$cr[2]; - $this->extraOpts['clsMax']['h'] = 'IF(manaMin > manaMax, manaMin, manaMax) => '.$cr[2]; + $this->extraOpts['clsMin']['h'][] = 'IF(manaMin > manaMax, manaMax, manaMin) <= '.$cr[2]; + $this->extraOpts['clsMax']['h'][] = 'IF(manaMin > manaMax, manaMin, manaMax) => '.$cr[2]; break; case '>': - $this->extraOpts['clsMax']['h'] = 'IF(manaMin > manaMax, manaMin, manaMax) > '.$cr[2]; + $this->extraOpts['clsMax']['h'][] = 'IF(manaMin > manaMax, manaMin, manaMax) > '.$cr[2]; break; case '>=': - $this->extraOpts['clsMax']['h'] = 'IF(manaMin > manaMax, manaMin, manaMax) >= '.$cr[2]; + $this->extraOpts['clsMax']['h'][] = 'IF(manaMin > manaMax, manaMin, manaMax) >= '.$cr[2]; break; case '<': - $this->extraOpts['clsMin']['h'] = 'IF(manaMin > manaMax, manaMax, manaMin) < '.$cr[2]; + $this->extraOpts['clsMin']['h'][] = 'IF(manaMin > manaMax, manaMax, manaMin) < '.$cr[2]; break; case '<=': - $this->extraOpts['clsMin']['h'] = 'IF(manaMin > manaMax, manaMax, manaMin) <= '.$cr[2]; + $this->extraOpts['clsMin']['h'][] = 'IF(manaMin > manaMax, manaMax, manaMin) <= '.$cr[2]; break; } return [1]; // always true, use post-filter @@ -326,30 +324,32 @@ class CreatureListFilter extends Filter switch ($cr[1]) { case 1: // any - return ['ir.quest', 0, '!']; + return ['AND', ['qse.method', 0x1, '&'], ['qse.questId', null, '!']]; case 2: // alliance - return ['AND', ['ir.quest', 0, '!'], [['qtqr.RequiredRaces', RACE_MASK_HORDE, '&'], 0], ['qtqr.RequiredRaces', RACE_MASK_ALLIANCE, '&']]; + return ['AND', ['qse.method', 0x1, '&'], ['qse.questId', null, '!'], [['qt.reqRaceMask', RACE_MASK_HORDE, '&'], 0], ['qt.reqRaceMask', RACE_MASK_ALLIANCE, '&']]; case 3: // horde - return ['AND', ['ir.quest', 0, '!'], [['qtqr.RequiredRaces', RACE_MASK_ALLIANCE, '&'], 0], ['qtqr.RequiredRaces', RACE_MASK_HORDE, '&']]; + return ['AND', ['qse.method', 0x1, '&'], ['qse.questId', null, '!'], [['qt.reqRaceMask', RACE_MASK_ALLIANCE, '&'], 0], ['qt.reqRaceMask', RACE_MASK_HORDE, '&']]; case 4: // both - return ['AND', ['ir.quest', 0, '!'], ['OR', ['AND', ['qtqr.RequiredRaces', RACE_MASK_ALLIANCE, '&'], ['qtqr.RequiredRaces', RACE_MASK_HORDE, '&']], ['qtqr.RequiredRaces', 0]]]; + return ['AND', ['qse.method', 0x1, '&'], ['qse.questId', null, '!'], ['OR', ['AND', ['qt.reqRaceMask', RACE_MASK_ALLIANCE, '&'], ['qt.reqRaceMask', RACE_MASK_HORDE, '&']], ['qt.reqRaceMask', 0]]]; case 5: // none - return ['ir.quest', NULL]; + $this->extraOpts['ct']['h'][] = 'startsQuests = 0'; + return [1]; } break; case 8: // endsquest [enum] switch ($cr[1]) { case 1: // any - return ['qr.quest', 0, '!']; + return ['AND', ['qse.method', 0x2, '&'], ['qse.questId', null, '!']]; case 2: // alliance - return ['AND', ['qr.quest', 0, '!'], [['qtqi.RequiredRaces', RACE_MASK_HORDE, '&'], 0], ['qtqi.RequiredRaces', RACE_MASK_ALLIANCE, '&']]; + return ['AND', ['qse.method', 0x2, '&'], ['qse.questId', null, '!'], [['qt.reqRaceMask', RACE_MASK_HORDE, '&'], 0], ['qt.reqRaceMask', RACE_MASK_ALLIANCE, '&']]; case 3: // horde - return ['AND', ['qr.quest', 0, '!'], [['qtqi.RequiredRaces', RACE_MASK_ALLIANCE, '&'], 0], ['qtqi.RequiredRaces', RACE_MASK_HORDE, '&']]; + return ['AND', ['qse.method', 0x2, '&'], ['qse.questId', null, '!'], [['qt.reqRaceMask', RACE_MASK_ALLIANCE, '&'], 0], ['qt.reqRaceMask', RACE_MASK_HORDE, '&']]; case 4: // both - return ['AND', ['qr.quest', 0, '!'], ['OR', ['AND', ['qtqi.RequiredRaces', RACE_MASK_ALLIANCE, '&'], ['qtqi.RequiredRaces', RACE_MASK_HORDE, '&']], ['qtqi.RequiredRaces', 0]]]; + return ['AND', ['qse.method', 0x2, '&'], ['qse.questId', null, '!'], ['OR', ['AND', ['qt.reqRaceMask', RACE_MASK_ALLIANCE, '&'], ['qt.reqRaceMask', RACE_MASK_HORDE, '&']], ['qt.reqRaceMask', 0]]]; case 5: // none - return ['qr.quest', NULL]; + $this->extraOpts['ct']['h'][] = 'endsQuests = 0'; + return [1]; } break; case 3: // faction [enum] diff --git a/includes/types/currency.class.php b/includes/types/currency.class.php index a511c73d..d26ce1cf 100644 --- a/includes/types/currency.class.php +++ b/includes/types/currency.class.php @@ -28,18 +28,19 @@ class CurrencyList extends BaseType return $data; } - public function addGlobalsToJscript(&$template, $addMask = 0) + public function addGlobalsToJScript($addMask = 0) { foreach ($this->iterate() as $__) { + // todo (low): find out, why i did this in the first place if ($this->id == 104) // in case of honor commit sebbuku - $icon = ['alliance', 'horde']; + $icon = ['inv_bannerpvp_02', 'inv_bannerpvp_01']; // ['alliance', 'horde']; else if ($this->id == 103) // also arena-icon diffs from item-icon $icon = ['money_arena', 'money_arena']; else $icon = [$this->curTpl['iconString'], $this->curTpl['iconString']]; - $template->extendGlobalData(self::$type, [$this->id => array( + Util::$pageTemplate->extendGlobalData(self::$type, [$this->id => array( 'name' => $this->getField('name', true), 'icon' => $icon )]); diff --git a/includes/types/faction.class.php b/includes/types/faction.class.php index 50991bd7..0cb2ccd2 100644 --- a/includes/types/faction.class.php +++ b/includes/types/faction.class.php @@ -70,10 +70,10 @@ class FactionList extends BaseType return $data; } - public function addGlobalsToJScript(&$template, $addMask = 0) + public function addGlobalsToJScript($addMask = 0) { foreach ($this->iterate() as $__) - $template->extendGlobalData(self::$type, [$this->id => ['name' => $this->getField('name', true)]]); + Util::$pageTemplate->extendGlobalData(self::$type, [$this->id => ['name' => $this->getField('name', true)]]); } public function renderTooltip() { } diff --git a/includes/types/gameobject.class.php b/includes/types/gameobject.class.php index b394b5da..2fc7e7a9 100644 --- a/includes/types/gameobject.class.php +++ b/includes/types/gameobject.class.php @@ -13,15 +13,15 @@ class GameObjectList extends BaseType protected $queryBase = 'SELECT o.*, o.id AS ARRAY_KEY FROM ?_objects o'; protected $queryOpts = array( - 'o' => [['ft', 'qr']], + 'o' => [['ft', 'qse']], 'ft' => ['j' => ['?_factiontemplate ft ON ft.id = o.faction', true], 's' => ', ft.factionId, ft.A, ft.H'], - 'qr' => ['j' => ['gameobject_questrelation qr ON qr.id = o.id', true], 's' => ', qr.quest', 'g' => 'o.id'], // started by GO - 'ir' => ['j' => ['gameobject_involvedrelation ir ON ir.id = o.id', true]] // ends at GO + 'qse' => ['j' => ['?_quests_startend qse ON qse.type = 2 AND qse.typeId = o.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' => 'o.id'], + 'qt' => ['j' => '?_quests qt ON qse.questId = qt.id'] ); - public function __construct($conditions = []) + public function __construct($conditions = [], $miscData = null) { - parent::__construct($conditions); + parent::__construct($conditions, $miscData); if ($this->error) return; @@ -29,7 +29,7 @@ class GameObjectList extends BaseType // post processing foreach ($this->iterate() as $_id => &$curTpl) { - // unpack miscInfo: + // unpack miscInfo $curTpl['lootStack'] = []; $curTpl['spells'] = []; @@ -87,7 +87,7 @@ class GameObjectList extends BaseType if (!empty($this->curTpl['reqSkill'])) $data[$this->id]['skill'] = $this->curTpl['reqSkill']; - if ($this->curTpl['quest']) + if ($this->curTpl['startsQuests']) $data[$this->id]['hasQuests'] = 1; } @@ -120,18 +120,20 @@ class GameObjectList extends BaseType return $this->tooltips[$this->id]; } - public function addGlobalsToJScript(&$template, $addMask = 0) + public function addGlobalsToJScript($addMask = 0) { foreach ($this->iterate() as $id => $__) - $template->extendGlobalData(self::$type, [$id => ['name' => $this->getField('name', true)]]); + Util::$pageTemplate->extendGlobalData(self::$type, [$id => ['name' => $this->getField('name', true)]]); } } class GameObjectListFilter extends Filter { + public $extraOpts = []; + protected $genericFilter = array( - 15 => [FILTER_CR_NUMERIC, 'entry', null], // id + 15 => [FILTER_CR_NUMERIC, 'id', null], // id 7 => [FILTER_CR_NUMERIC, 'reqSkill', null], // requiredskilllevel ); @@ -168,30 +170,32 @@ class GameObjectListFilter extends Filter switch ($cr[1]) { case 1: // any - return ['qr.id', null, '!']; + return ['AND', ['qse.method', 0x1, '&'], ['qse.questId', null, '!']]; case 2: // alliance only - return ['AND', ['qr.id', null, '!'], ['ft.A', -1, '!'], ['ft.H', -1]]; + return ['AND', ['qse.method', 0x1, '&'], ['qse.questId', null, '!'], [['qt.reqRaceMask', RACE_MASK_HORDE, '&'], 0], ['qt.reqRaceMask', RACE_MASK_ALLIANCE, '&']]; case 3: // horde only - return ['AND', ['qr.id', null, '!'], ['ft.A', -1], ['ft.H', -1, '!']]; + return ['AND', ['qse.method', 0x1, '&'], ['qse.questId', null, '!'], [['qt.reqRaceMask', RACE_MASK_ALLIANCE, '&'], 0], ['qt.reqRaceMask', RACE_MASK_HORDE, '&']]; case 4: // both - return ['AND', ['qr.id', null, '!'], ['OR', ['faction', 0], ['AND', ['ft.A', -1, '!'], ['ft.H', -1, '!']]]]; + return ['AND', ['qse.method', 0x1, '&'], ['qse.questId', null, '!'], ['OR', ['AND', ['qt.reqRaceMask', RACE_MASK_ALLIANCE, '&'], ['qt.reqRaceMask', RACE_MASK_HORDE, '&']], ['qt.reqRaceMask', 0]]]; case 5: // none - return ['qr.id', null]; + $this->extraOpts['o']['h'][] = 'startsQuests = 0'; + return [1]; } break; case 3: // endsquest [side] switch ($cr[1]) { case 1: // any - return ['qi.id', null, '!']; + return ['AND', ['qse.method', 0x2, '&'], ['qse.questId', null, '!']]; case 2: // alliance only - return ['AND', ['qi.id', null, '!'], ['ft.A', -1, '!'], ['ft.H', -1]]; + return ['AND', ['qse.method', 0x2, '&'], ['qse.questId', null, '!'], [['qt.reqRaceMask', RACE_MASK_HORDE, '&'], 0], ['qt.reqRaceMask', RACE_MASK_ALLIANCE, '&']]; case 3: // horde only - return ['AND', ['qi.id', null, '!'], ['ft.A', -1], ['ft.H', -1, '!']]; + return ['AND', ['qse.method', 0x2, '&'], ['qse.questId', null, '!'], [['qt.reqRaceMask', RACE_MASK_ALLIANCE, '&'], 0], ['qt.reqRaceMask', RACE_MASK_HORDE, '&']]; case 4: // both - return ['AND', ['qi.id', null, '!'], ['OR', ['faction', 0], ['AND', ['ft.A', -1, '!'], ['ft.H', -1, '!']]]]; - case 5: // none - return ['qi.id', null]; + return ['AND', ['qse.method', 0x2, '&'], ['qse.questId', null, '!'], ['OR', ['AND', ['qt.reqRaceMask', RACE_MASK_ALLIANCE, '&'], ['qt.reqRaceMask', RACE_MASK_HORDE, '&']], ['qt.reqRaceMask', 0]]]; + case 5: // none todo: broken, if entry starts and ends quests... + $this->extraOpts['o']['h'][] = 'endsQuests = 0'; + return [1]; } break; case 13: // hascomments [yn] @@ -214,7 +218,8 @@ class GameObjectListFilter extends Filter // name if (isset($_v['na'])) - $parts[] = ['name_loc'.User::$localeId, $_v['na']]; + if ($_ = $this->modularizeString(['name_loc'.User::$localeId])) + $parts[] = $_; return $parts; } diff --git a/includes/types/item.class.php b/includes/types/item.class.php index 90b11527..fba7fb3e 100644 --- a/includes/types/item.class.php +++ b/includes/types/item.class.php @@ -134,7 +134,7 @@ class ItemList extends BaseType if ($cItems) { $moneyItems = new CurrencyList(array(['itemId', $cItems])); - $moneyItems->addGlobalsToJscript(Util::$pageTemplate); + $moneyItems->addGlobalsToJscript(); foreach ($itemz as $id => $vendors) { @@ -357,7 +357,7 @@ class ItemList extends BaseType return $data; } - public function addGlobalsToJscript(&$template, $addMask = GLOBALINFO_SELF) + public function addGlobalsToJScript($addMask = GLOBALINFO_SELF) { foreach ($this->iterate() as $id => $__) { @@ -385,7 +385,7 @@ class ItemList extends BaseType } if ($data || $extra) - $template->extendGlobalData(self::$type, $data, $extra); + Util::$pageTemplate->extendGlobalData(self::$type, $data, $extra); } } @@ -719,8 +719,8 @@ class ItemList extends BaseType // required races if ($races = Lang::getRaceString($this->curTpl['requiredRace'])) - if ($races['name'] != Lang::$game['ra'][0]) // not "both" - $x .= Lang::$game['races'].Lang::$colon.$races['name'].'
'; + if ($races != Lang::$game['ra'][0]) // not "both", but display combinations like: troll, dwarf + $x .= Lang::$game['races'].Lang::$colon.$races.'
'; // required honorRank (not used anymore) if ($rhr = $this->curTpl['requiredHonorRank']) @@ -1595,7 +1595,7 @@ class ItemListFilter extends Filter $cnd = $cnd[0]; if ($select) - $this->extraOpts['is']['s'] = ', ('.implode(' + ', $select).') / '.$wtSum.' AS score'; + $this->extraOpts['is']['s'][] = ', ('.implode(' + ', $select).') / '.$wtSum.' AS score'; return $cnd; } diff --git a/includes/types/itemset.class.php b/includes/types/itemset.class.php index 07fa7a36..5679b219 100644 --- a/includes/types/itemset.class.php +++ b/includes/types/itemset.class.php @@ -73,13 +73,13 @@ class ItemsetList extends BaseType return $data; } - public function addGlobalsToJscript(&$template, $addMask = GLOBALINFO_ANY) + public function addGlobalsToJScript($addMask = GLOBALINFO_ANY) { if ($this->classes && ($addMask & GLOBALINFO_RELATED)) - $template->extendGlobalIds(TYPE_CLASS, $this->classes); + Util::$pageTemplate->extendGlobalIds(TYPE_CLASS, $this->classes); if ($this->pieceToSet && ($addMask & GLOBALINFO_SELF)) - $template->extendGlobalIds(TYPE_ITEM, array_keys($this->pieceToSet)); + Util::$pageTemplate->extendGlobalIds(TYPE_ITEM, array_keys($this->pieceToSet)); } public function renderTooltip() { } diff --git a/includes/types/pet.class.php b/includes/types/pet.class.php index b4d5681b..ecb47fa0 100644 --- a/includes/types/pet.class.php +++ b/includes/types/pet.class.php @@ -47,17 +47,17 @@ class PetList extends BaseType return $data; } - public function addGlobalsToJscript(&$template, $addMask = GLOBALINFO_ANY) + public function addGlobalsToJScript($addMask = GLOBALINFO_ANY) { foreach ($this->iterate() as $__) { if ($addMask & GLOBALINFO_RELATED) for ($i = 1; $i <= 4; $i++) if ($this->curTpl['spellId'.$i] > 0) - $template->extendGlobalIds(TYPE_SPELL, $this->curTpl['spellId'.$i]); + Util::$pageTemplate->extendGlobalIds(TYPE_SPELL, $this->curTpl['spellId'.$i]); if ($addMask & GLOBALINFO_SELF) - $template->extendGlobalData(self::$type, [$this->id => ['icon' => $this->curTpl['iconString']]]); + Util::$pageTemplate->extendGlobalData(self::$type, [$this->id => ['icon' => $this->curTpl['iconString']]]); } } diff --git a/includes/types/quest.class.php b/includes/types/quest.class.php index bcaad293..dc31d369 100644 --- a/includes/types/quest.class.php +++ b/includes/types/quest.class.php @@ -11,27 +11,26 @@ class QuestList extends BaseType public $requires = []; public $rewards = []; + public $choices = []; - protected $queryBase = 'SELECT *, qt.id AS ARRAY_KEY FROM quest_template qt'; + protected $queryBase = 'SELECT q.*, q.id AS ARRAY_KEY FROM ?_quests q'; protected $queryOpts = array( - 'qt' => [['lq', 'xp']], - 'lq' => ['j' => ['locales_quest lq ON qt.id = lq.id', true]], - 'xp' => ['j' => ['?_questxp xp ON qt.level = xp.id', true], 's' => ', xp.*'], - 'goStart' => ['j' => 'gameobject_questrelation goStart ON goStart.quest = qt.id'], // started by GO - 'goEnd' => ['j' => 'gameobject_involvedrelation goEnd ON goEnd.quest = qt.id'], // ends at GO - 'npcStart' => ['j' => 'creature_questrelation npcStart ON npcStart.quest = qt.id'], // started by NPC - 'npcEnd' => ['j' => 'creature_involvedrelation npcEnd ON npcEnd.quest = qt.id'], // ends at NPC - 'itemStart' => ['j' => ['?_items itemStart ON itemStart.startQuest = qt.id', true], 'g' => 'qt.id'] // started by item .. grouping required, as the same quest may have multiple starter + 'q' => [], + 'rsc' => ['j' => '?_spell rsc ON q.rewardSpellCast = rsc.id'], // limit rewardSpellCasts + 'qse' => ['j' => '?_quests_startend qse ON q.id = qse.questId', 's' => ', qse.method'], // groupConcat..? ); - public function __construct($conditions = []) + public function __construct($conditions = [], $miscData = null) { - parent::__construct($conditions); + parent::__construct($conditions, $miscData); + + // i don't like this very much + $currencies = DB::Aowow()->selectCol('SELECT id AS ARRAY_KEY, itemId FROM ?_currencies'); // post processing foreach ($this->iterate() as $id => &$_curTpl) { - $_curTpl['cat1'] = $_curTpl['ZoneOrSort']; // should probably be in a method... + $_curTpl['cat1'] = $_curTpl['zoneOrSort']; // should probably be in a method... $_curTpl['cat2'] = 0; foreach (Util::$questClasses as $k => $arr) @@ -43,82 +42,98 @@ class QuestList extends BaseType } } - // set xp - $_curTpl['xp'] = $_curTpl['Field'.$_curTpl['RewardXPId']]; - for ($i = 0; $i < 9; $i++) - unset($_curTpl['Field'.$i]); - // store requirements - $data = []; + $requires = []; for ($i = 1; $i < 7; $i++) { - if ($_ = $_curTpl['RequiredItemId'.$i]) - $data[TYPE_ITEM][] = $_; + if ($_ = $_curTpl['reqItemId'.$i]) + $requires[TYPE_ITEM][] = $_; if ($i > 4) continue; - if ($_curTpl['RequiredNpcOrGo'.$i] > 0) - $data[TYPE_NPC][] = $_curTpl['RequiredNpcOrGo'.$i]; - else if ($_curTpl['RequiredNpcOrGo'.$i] < 0) - $data[TYPE_OBJECT][] = -$_curTpl['RequiredNpcOrGo'.$i]; + if ($_curTpl['reqNpcOrGo'.$i] > 0) + $requires[TYPE_NPC][] = $_curTpl['reqNpcOrGo'.$i]; + else if ($_curTpl['reqNpcOrGo'.$i] < 0) + $requires[TYPE_OBJECT][] = -$_curTpl['reqNpcOrGo'.$i]; - if ($_ = $_curTpl['RequiredSourceItemId'.$i]) - $data[TYPE_ITEM][] = $_; + if ($_ = $_curTpl['reqSourceItemId'.$i]) + $requires[TYPE_ITEM][] = $_; } - if ($data) - $this->requires[$id] = $data; + if ($requires) + $this->requires[$id] = $requires; // store rewards - $data = []; + $rewards = []; + $choices = []; - if ($_ = $_curTpl['RewardTitleId']) - $data[TYPE_TITLE][] = $_; + if ($_ = $_curTpl['rewardTitleId']) + $rewards[TYPE_TITLE][] = $_; + + if ($_ = $_curTpl['rewardHonorPoints']) + $rewards[TYPE_CURRENCY][104] = $_; + + if ($_ = $_curTpl['rewardArenaPoints']) + $rewards[TYPE_CURRENCY][103] = $_; for ($i = 1; $i < 7; $i++) { - if ($_ = $_curTpl['RewardChoiceItemId'.$i]) - $data[TYPE_ITEM][] = $_; + if ($_ = $_curTpl['rewardChoiceItemId'.$i]) + $choices[TYPE_ITEM][$_] = $_curTpl['rewardChoiceItemCount'.$i]; if ($i > 5) continue; - if ($_ = $_curTpl['RewardFactionId'.$i]) - $data[TYPE_FACTION][] = $_; + if ($_ = $_curTpl['rewardFactionId'.$i]) + $rewards[TYPE_FACTION][$_] = $_curTpl['rewardFactionValue'.$i]; if ($i > 4) continue; - if ($_ = $_curTpl['RewardItemId'.$i]) - $data[TYPE_ITEM][] = $_; + if ($_ = $_curTpl['rewardItemId'.$i]) + { + $qty = $_curTpl['rewardItemCount'.$i]; + if (in_array($_, $currencies)) + $rewards[TYPE_CURRENCY][array_search($_, $currencies)] = $qty; + else + $rewards[TYPE_ITEM][$_] = $qty; + } } - if ($data) - $this->rewards[$id] = $data; + if ($rewards) + $this->rewards[$id] = $rewards; + + if ($choices) + $this->choices[$id] = $choices; } } // static use START public static function getName($id) { - $n = DB::Aowow()->SelectRow(' - SELECT - title, - title_loc2, - title_loc3, - title_loc6, - title_loc8 - FROM - quest_template q, - locales_quest l - WHERE - q.id = l.id AND - q.id = ?d', - $id - ); - return Util::localizedString($n, 'title'); + $n = DB::Aowow()->SelectRow('SELECT name_loc0, name_loc2, name_loc3, name_loc6, name_loc8 FROM ?_quests WHERE id = ?d', $id); + return Util::localizedString($n, 'name'); } // static use END + public function isRepeatable() + { + return $this->curTpl['flags'] & QUEST_FLAG_REPEATABLE || $this->curTpl['specialFlags'] & QUEST_FLAG_SPECIAL_REPEATABLE; + } + + public function isDaily($strict = false) + { + if ($strict) + return $this->curTpl['flags'] & QUEST_FLAG_DAILY; + else + return $this->curTpl['flags'] & (QUEST_FLAG_DAILY | QUEST_FLAG_WEEKLY) || $this->curTpl['specialFlags'] & QUEST_FLAG_SPECIAL_MONTHLY; + } + + // using reqPlayerKills and rewardHonor as a crutch .. has TC this even implemented..? + public function isPvPEnabled() + { + return $this->curTpl['reqPlayerKills'] || $this->curTpl['rewardHonorPoints'] || $this->curTpl['rewardArenaPoints']; + } + public function getSourceData() { $data = []; @@ -126,7 +141,7 @@ class QuestList extends BaseType foreach ($this->iterate() as $__) { $data[$this->id] = array( - "n" => $this->getField('Title', true), + "n" => $this->getField('name', true), "t" => TYPE_QUEST, "ti" => $this->id, "c" => $this->curTpl['cat1'], @@ -147,73 +162,68 @@ class QuestList extends BaseType 'category' => $this->curTpl['cat1'], 'category2' => $this->curTpl['cat2'], 'id' => $this->id, - 'level' => $this->curTpl['Level'], - 'reqlevel' => $this->curTpl['MinLevel'], - 'name' => $this->getField('Title', true), - 'side' => Util::sideByRaceMask($this->curTpl['RequiredRaces']), + 'level' => $this->curTpl['level'], + 'reqlevel' => $this->curTpl['minLevel'], + 'name' => $this->getField('name', true), + 'side' => Util::sideByRaceMask($this->curTpl['reqRaceMask']), 'wflags' => 0x0, - 'xp' => $this->curTpl['xp'] + 'xp' => $this->curTpl['rewardXP'] ); - $rewards = []; - for ($i = 1; $i < 5; $i++) - if ($this->curTpl['RewardItemId'.$i]) - $rewards[] = [$this->curTpl['RewardItemId'.$i], $this->curTpl['RewardItemCount'.$i]]; + if (!empty($this->rewards[$this->id][TYPE_CURRENCY])) + foreach ($this->rewards[$this->id][TYPE_CURRENCY] as $iId => $qty) + $data[$this->id]['currencyrewards'][] = [$iId, $qty]; - $choices = []; - for ($i = 1; $i < 7; $i++) - if ($this->curTpl['RewardChoiceItemId'.$i]) - $choices[] = [$this->curTpl['RewardChoiceItemId'.$i], $this->curTpl['RewardChoiceItemCount'.$i]]; + if (!empty($this->rewards[$this->id][TYPE_ITEM])) + foreach ($this->rewards[$this->id][TYPE_ITEM] as $iId => $qty) + $data[$this->id]['itemrewards'][] = [$iId, $qty]; - if ($rewards) - $data[$this->id]['itemrewards'] = $rewards; + if (!empty($this->choices[$this->id][TYPE_ITEM])) + foreach ($this->choices[$this->id][TYPE_ITEM] as $iId => $qty) + $data[$this->id]['itemchoices'][] = [$iId, $qty]; - if ($choices) - $data[$this->id]['itemchoices'] = $choices; - - if ($_ = $this->curTpl['RewardTitleId']) + if ($_ = $this->curTpl['rewardTitleId']) $data[$this->id]['titlereward'] = $_; - if ($_ = $this->curTpl['Type']) + if ($_ = $this->curTpl['type']) $data[$this->id]['type'] = $_; - if ($_ = $this->curTpl['RequiredClasses']) + if ($_ = $this->curTpl['reqClassMask']) $data[$this->id]['reqclass'] = $_; - if ($_ = ($this->curTpl['RequiredRaces'] & RACE_MASK_ALL)) + if ($_ = ($this->curTpl['reqRaceMask'] & RACE_MASK_ALL)) if ((($_ & RACE_MASK_ALLIANCE) != RACE_MASK_ALLIANCE) && (($_ & RACE_MASK_HORDE) != RACE_MASK_HORDE)) $data[$this->id]['reqrace'] = $_; - if ($_ = $this->curTpl['RewardOrRequiredMoney']) + if ($_ = $this->curTpl['rewardOrReqMoney']) if ($_ > 0) $data[$this->id]['money'] = $_; - if ($this->curTpl['Flags'] & 0x1000) + if ($this->curTpl['flags'] & QUEST_FLAG_DAILY) $data[$this->id]['daily'] = true; - if ($this->curTpl['Flags'] & 0x8000) + if ($this->curTpl['flags'] & QUEST_FLAG_WEEKLY) $data[$this->id]['weekly'] = true; - // flags & 64: Hostile - there are quests, that flag the player for pvp when taken .. where is that set..? // wflags: &1: disabled/historical; &32: AutoAccept; &64: Hostile(?) - if ($this->curTpl['Flags'] & 0x4000) // Unavailable (todo (med): get disables) + // todo (med): also get disables + if ($this->curTpl['flags'] & QUEST_FLAG_UNAVAILABLE) { $data[$this->id]['historical'] = true; // post 5.0 $data[$this->id]['wflags'] |= 0x1; // pre 5.0 } - if ($this->curTpl['Flags'] & 0x80000) // Auto Accept + if ($this->curTpl['flags'] & QUEST_FLAG_AUTO_ACCEPT) $data[$this->id]['wflags'] |= 0x20; + if ($this->isPvPEnabled()) + $data[$this->id]['wflags'] |= 0x60; // not sure why this flag also requires auto-accept to be set + $data[$this->id]['reprewards'] = []; for ($i = 1; $i < 6; $i++) { - $foo = $this->curTpl['RewardFactionId'.$i]; - $bar = $this->curTpl['RewardFactionValueIdOverride'.$i] / 100; - - if (!$bar && ($_ = $this->curTpl['RewardFactionValueId'.$i])) - $bar = Util::$questFactionReward[abs($_)] * ($_ < 0 ? -1 : 1); - + $foo = $this->curTpl['rewardFactionId'.$i]; + $bar = $this->curTpl['rewardFactionValue'.$i]; if ($foo && $bar) { $data[$this->id]['reprewards'][] = [$foo, $bar]; @@ -227,7 +237,7 @@ class QuestList extends BaseType return $data; } - private function parseText($type = 'Objectives') + public function parseText($type = 'objectives', $jsEscaped = true) { $text = $this->getField($type, true); if (!$text) @@ -235,7 +245,10 @@ class QuestList extends BaseType $text = Util::parseHtmlText($text); - return Util::jsEscape($text); + if ($jsEscaped) + $text = Util::jsEscape($text); + + return $text; } public function renderTooltip() @@ -246,8 +259,8 @@ class QuestList extends BaseType if (isset($this->tooltips[$this->id])) return $this->tooltips[$this->id]; - $title = Util::jsEscape($this->getField('Title', true)); - $level = $this->curTpl['Level']; + $title = Util::jsEscape($this->getField('name', true)); + $level = $this->curTpl['level']; if ($level < 0) $level = 0; @@ -256,7 +269,7 @@ class QuestList extends BaseType { $level = sprintf(Lang::$quest['questLevel'], $level); - if ($this->curTpl['Flags'] & 0x1000) // daily + if ($this->curTpl['flags'] & QUEST_FLAG_DAILY) // daily $level .= ' '.Lang::$quest['daily']; $x .= '
'.$title.''.$level.'
'; @@ -265,14 +278,15 @@ class QuestList extends BaseType $x .= '
'.$title.'
'; - $x .= ' {/if} {if !empty($series)} - - {/if} diff --git a/template/bricks/mapper.tpl b/template/bricks/mapper.tpl index 87ee42e9..6e184373 100644 --- a/template/bricks/mapper.tpl +++ b/template/bricks/mapper.tpl @@ -1,11 +1,35 @@ -
- {if isset($som)}
{/if} -
-
-
+{if !empty($map) && isset($map.data)} + {if $map.data.zone < 0} +
+ {if isset($map.som)} +
+ {/if} +
+
+
+ {else} +
+ {if isset($map.som)} +
+ {/if} + {if isset($map.mapperData)} +
{$lang.foundIn} {$map.mapSelector}.
+ {/if} +
+
+ {/if} - + +{/if} diff --git a/template/bricks/rewards.tpl b/template/bricks/rewards.tpl new file mode 100644 index 00000000..bbd1b018 --- /dev/null +++ b/template/bricks/rewards.tpl @@ -0,0 +1,28 @@ +{if $rewTitle} + {$rewTitle}{$lang.colon} + {if isset($extra)}{$extra}{/if} + +{/if} +{if $rewData} +
+

'.$this->parseText('Objectives').'

'.Lang::$quest['requirements'].Lang::$colon.''; + $x .= '

'.$this->parseText('objectives'); + $xReq = ''; for ($i = 1; $i < 5; $i++) { - $ot = $this->getField('ObjectiveText'.$i, true); - $rng = $this->curTpl['RequiredNpcOrGo'.$i]; - $rngQty = $this->curTpl['RequiredNpcOrGoCount'.$i]; + $ot = $this->getField('objectiveText'.$i, true); + $rng = $this->curTpl['reqNpcOrGo'.$i]; + $rngQty = $this->curTpl['reqNpcOrGoCount'.$i]; if ($rngQty < 1 && (!$rng || $ot)) continue; @@ -282,22 +296,29 @@ class QuestList extends BaseType else $name = $rng > 0 ? CreatureList::getName($rng) : GameObjectList::getName(-$rng); - $x .= '
- '.Util::jsEscape($name).($rngQty > 1 ? ' x '.$rngQty : null); + $xReq .= '
- '.Util::jsEscape($name).($rngQty > 1 ? ' x '.$rngQty : null); } for ($i = 1; $i < 7; $i++) { - $ri = $this->curTpl['RequiredItemId'.$i]; - $riQty = $this->curTpl['RequiredItemCount'.$i]; + $ri = $this->curTpl['reqItemId'.$i]; + $riQty = $this->curTpl['reqItemCount'.$i]; if (!$ri || $riQty < 1) continue; - $x .= '
- '.Util::jsEscape(ItemList::getName($ri)).($riQty > 1 ? ' x '.$riQty : null); + $xReq .= '
- '.Util::jsEscape(ItemList::getName($ri)).($riQty > 1 ? ' x '.$riQty : null); } - if ($et = $this->getField('EndText', true)) - $x .= '
- '.$et; + if ($et = $this->getField('end', true)) + $xReq .= '
- '.Util::jsEscape($et); + + if ($_ = $this->getField('rewardOrReqMoney')) + if ($_ < 0) + $xReq .= '
- '.Lang::$quest['money'].Lang::$colon.Util::formatMoney(abs($_)); + + if ($xReq) + $x .= '

'.Lang::$quest['requirements'].Lang::$colon.''.$xReq; $x .= '
'; @@ -306,7 +327,7 @@ class QuestList extends BaseType return $x; } - public function addGlobalsToJScript(&$template, $addMask = GLOBALINFO_ANY) + public function addGlobalsToJScript($addMask = GLOBALINFO_ANY) { foreach ($this->iterate() as $__) { @@ -314,27 +335,31 @@ class QuestList extends BaseType { // items for ($i = 1; $i < 5; $i++) - if ($this->curTpl['RewardItemId'.$i] > 0) - $template->extendGlobalIds(TYPE_ITEM, $this->curTpl['RewardItemId'.$i]); + if ($this->curTpl['rewardItemId'.$i] > 0) + Util::$pageTemplate->extendGlobalIds(TYPE_ITEM, $this->curTpl['rewardItemId'.$i]); for ($i = 1; $i < 7; $i++) - if ($this->curTpl['RewardChoiceItemId'.$i] > 0) - $template->extendGlobalIds(TYPE_ITEM, $this->curTpl['RewardChoiceItemId'.$i]); + if ($this->curTpl['rewardChoiceItemId'.$i] > 0) + Util::$pageTemplate->extendGlobalIds(TYPE_ITEM, $this->curTpl['rewardChoiceItemId'.$i]); // spells - if ($this->curTpl['RewardSpell'] > 0) - $template->extendGlobalIds(TYPE_SPELL, $this->curTpl['RewardSpell']); + if ($this->curTpl['rewardSpell'] > 0) + Util::$pageTemplate->extendGlobalIds(TYPE_SPELL, $this->curTpl['rewardSpell']); - if ($this->curTpl['RewardSpellCast'] > 0) - $template->extendGlobalIds(TYPE_SPELL, $this->curTpl['RewardSpellCast']); + if ($this->curTpl['rewardSpellCast'] > 0) + Util::$pageTemplate->extendGlobalIds(TYPE_SPELL, $this->curTpl['rewardSpellCast']); // titles - if ($this->curTpl['RewardTitleId'] > 0) - $template->extendGlobalIds(TYPE_TITLE, $this->curTpl['RewardTitleId']); + if ($this->curTpl['rewardTitleId'] > 0) + Util::$pageTemplate->extendGlobalIds(TYPE_TITLE, $this->curTpl['rewardTitleId']); + + // currencies + if ($_ = @$this->rewards[$this->id][TYPE_CURRENCY]) + Util::$pageTemplate->extendGlobalIds(TYPE_CURRENCY, array_keys($_)); } if ($addMask & GLOBALINFO_SELF) - $template->extendGlobalData(self::$type, [$this->id => ['name' => $this->getField('Title', true)]]); + Util::$pageTemplate->extendGlobalData(self::$type, [$this->id => ['name' => $this->getField('name', true)]]); } } } @@ -342,41 +367,25 @@ class QuestList extends BaseType class QuestListFilter extends Filter { - protected $enums = array(); - protected $genericFilter = array(); - -/* - { id: 34, name: 'availabletoplayers', type: 'yn' }, - { id: 37, name: 'classspecific', type: 'classs' }, - { id: 38, name: 'racespecific', type: 'race' }, - { id: 27, name: 'daily', type: 'yn' }, - { id: 28, name: 'weekly', type: 'yn' }, - { id: 29, name: 'repeatable', type: 'yn' }, - { id: 30, name: 'id', type: 'num', before: 'name' }, - { id: 44, name: 'countsforloremaster_stc', type: 'yn' }, - { id: 9, name: 'objectiveearnrepwith', type: 'faction-any+none' }, - { id: 33, name: 'relatedevent', type: 'event-any+none' }, - { id: 5, name: 'sharable', type: 'yn' }, - { id: 11, name: 'suggestedplayers', type: 'num' }, - { id: 6, name: 'timer', type: 'num' }, - { id: 42, name: 'flags', type: 'flags', staffonly: true }, - { id: 2, name: 'experiencegained', type: 'num' }, - { id: 43, name: 'currencyrewarded', type: 'currency' }, - { id: 45, name: 'titlerewarded', type: 'yn' }, - { id: 23, name: 'itemchoices', type: 'num' }, - { id: 22, name: 'itemrewards', type: 'num' }, - { id: 3, name: 'moneyrewarded', type: 'num' }, - { id: 4, name: 'spellrewarded', type: 'yn' }, - { id: 1, name: 'increasesrepwith', type: 'faction' }, - { id: 10, name: 'decreasesrepwith', type: 'faction' }, - { id: 7, name: 'firstquestseries', type: 'yn' }, - { id: 15, name: 'lastquestseries', type: 'yn' }, - { id: 16, name: 'partseries', type: 'yn' }, - { id: 25, name: 'hascomments', type: 'yn' }, - { id: 18, name: 'hasscreenshots', type: 'yn' }, - { id: 36, name: 'hasvideos', type: 'yn' }, - -*/ + public $extraOpts = []; + protected $enums = array( // massive enums could be put here, if you want to restrict inputs further to be valid IDs instead of just integers + 37 => [null, 1, 2, 3, 4, 5, 6, 7, 8, 9, null, 11, true, false], + 38 => [null, 1, 2, 3, 4, 5, 6, 7, 8, null, 10, 11, true, false], + ); + protected $genericFilter = array( + 27 => [FILTER_CR_FLAG, 'flags', QUEST_FLAG_DAILY ], // daily + 28 => [FILTER_CR_FLAG, 'flags', QUEST_FLAG_WEEKLY ], // weekly + 29 => [FILTER_CR_FLAG, 'flags', QUEST_FLAG_REPEATABLE ], // repeatable + 30 => [FILTER_CR_NUMERIC, 'id', null, true], // id + 5 => [FILTER_CR_FLAG, 'flags', QUEST_FLAG_SHARABLE ], // sharable + 11 => [FILTER_CR_NUMERIC, 'suggestedPlayers', ], // suggestedplayers + 6 => [FILTER_CR_NUMERIC, 'timeLimit', ], // timer + 42 => [FILTER_CR_STAFFFLAG, 'flags', ], // flags + 45 => [FILTER_CR_BOOLEAN, 'rewardTitleId', ], // titlerewarded + 2 => [FILTER_CR_NUMERIC, 'rewardXP', ], // experiencegained + 3 => [FILTER_CR_NUMERIC, 'rewardOrReqMoney', ], // moneyrewarded + 33 => [FILTER_CR_ENUM, 'holidayId', ], // relatedevent + ); protected function createSQLForCriterium(&$cr) { @@ -392,39 +401,156 @@ class QuestListFilter extends Filter switch ($cr[0]) { + case 1: // increasesrepwith + if ($this->isSaneNumeric($cr[1]) && $cr[1] > 0) + { + return [ + 'OR', + ['AND', ['rewardFactionId1', $cr[1]], ['rewardFactionValue1', 0, '>']], + ['AND', ['rewardFactionId2', $cr[1]], ['rewardFactionValue2', 0, '>']], + ['AND', ['rewardFactionId3', $cr[1]], ['rewardFactionValue3', 0, '>']], + ['AND', ['rewardFactionId4', $cr[1]], ['rewardFactionValue4', 0, '>']], + ['AND', ['rewardFactionId5', $cr[1]], ['rewardFactionValue5', 0, '>']] + ]; + } + break; + case 10: // decreasesrepwith + if ($this->isSaneNumeric($cr[1]) && $cr[1] > 0) + { + return [ + 'OR', + ['AND', ['rewardFactionId1', $cr[1]], ['rewardFactionValue1', 0, '<']], + ['AND', ['rewardFactionId2', $cr[1]], ['rewardFactionValue2', 0, '<']], + ['AND', ['rewardFactionId3', $cr[1]], ['rewardFactionValue3', 0, '<']], + ['AND', ['rewardFactionId4', $cr[1]], ['rewardFactionValue4', 0, '<']], + ['AND', ['rewardFactionId5', $cr[1]], ['rewardFactionValue5', 0, '<']] + ]; + } + break; + case 43: // currencyrewarded + if ($this->isSaneNumeric($cr[1]) && $cr[1] > 0) + { + return [ + 'OR', + ['rewardItemId1', $cr[1]], ['rewardItemId2', $cr[1]], ['rewardItemId3', $cr[1]], ['rewardItemId4', $cr[1]], + ['rewardChoiceItemId1', $cr[1]], ['rewardChoiceItemId2', $cr[1]], ['rewardChoiceItemId3', $cr[1]], ['rewardChoiceItemId4', $cr[1]], ['rewardChoiceItemId5', $cr[1]], ['rewardChoiceItemId6', $cr[1]] + ]; + } + break; + case 34: // availabletoplayers + if ($this->int2Bool($cr[1])) + { + if ($cr[1]) + return ['AND', [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0], [['flags', QUEST_FLAG_UNAVAILABLE, '&'], 0]]; + else + return ['OR', ['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], ['flags', QUEST_FLAG_UNAVAILABLE, '&']]; + } + break; + case 23: // itemchoices [op] [int] + if (!$this->isSaneNumeric($cr[2], false) || !$this->int2Op($cr[1])) + break; + + $this->extraOpts['q']['s'][] = ', (IF(rewardChoiceItemId1, 1, 0) + IF(rewardChoiceItemId2, 1, 0) + IF(rewardChoiceItemId3, 1, 0) + IF(rewardChoiceItemId4, 1, 0) + IF(rewardChoiceItemId5, 1, 0) + IF(rewardChoiceItemId6, 1, 0)) as numChoices'; + $this->extraOpts['q']['h'][] = 'numChoices '.$cr[1].' '.$cr[2]; + return [1]; + case 22: // itemrewards [op] [int] + if (!$this->isSaneNumeric($cr[2], false) || !$this->int2Op($cr[1])) + break; + + $this->extraOpts['q']['s'][] = ', (IF(rewardItemId1, 1, 0) + IF(rewardItemId2, 1, 0) + IF(rewardItemId3, 1, 0) + IF(rewardItemId4, 1, 0)) as numRewards'; + $this->extraOpts['q']['h'][] = 'numRewards '.$cr[1].' '.$cr[2]; + return [1]; + case 44: // countsforloremaster_stc [bool] + if ($this->int2Bool($cr[1])) + { + if ($cr[1]) + return ['AND', ['zoneOrSort', 0, '>'], [['flags', QUEST_FLAG_DAILY | QUEST_FLAG_WEEKLY | QUEST_FLAG_REPEATABLE , '&'], 0], [['specialFlags', QUEST_FLAG_SPECIAL_REPEATABLE | QUEST_FLAG_SPECIAL_MONTHLY , '&'], 0]]; + else + return ['OR', ['zoneOrSort', 0, '<'], ['flags', QUEST_FLAG_DAILY | QUEST_FLAG_WEEKLY | QUEST_FLAG_REPEATABLE , '&'], ['specialFlags', QUEST_FLAG_SPECIAL_REPEATABLE | QUEST_FLAG_SPECIAL_MONTHLY , '&']];; + } + + break; + case 4: // spellrewarded [bool] + if ($this->int2Bool($cr[1])) + { + if ($cr[1]) + return ['OR', ['sourceSpellId', 0, '>'], ['rewardSpell', 0, '>'], ['rsc.effect1Id', SpellList::$effects['teach']], ['rsc.effect2Id', SpellList::$effects['teach']], ['rsc.effect3Id', SpellList::$effects['teach']]]; + else + return ['AND', ['sourceSpellId', 0], ['rewardSpell', 0], ['rewardSpellCast', 0]]; + } + break; + case 9: // objectiveearnrepwith [enum] + $_ = intVal($cr[1]); + if ($_ > 0) + return ['OR', ['reqFactionId1', $_], ['reqFactionId2', $_]]; + else if ($cr[1] == -2323) // any + return ['OR', ['reqFactionId1', 0, '>'], ['reqFactionId2', 0, '>']]; + else if ($cr[1] == -2324) // none + return ['AND', ['reqFactionId1', 0], ['reqFactionId2', 0]]; + + break; + case 37: // classspecific [enum] + $_ = @$this->enums[$cr[0]][$cr[1]]; + if ($_ !== null) + { + if ($_ === true) + return ['AND', ['reqClassMask', 0, '!'], [['reqClassMask', CLASS_MASK_ALL, '&'], CLASS_MASK_ALL, '!']]; + else if ($_ === false) + return ['OR', ['reqClassMask', 0], [['reqClassMask', CLASS_MASK_ALL, '&'], CLASS_MASK_ALL]]; + else if (is_int($_)) + return ['AND', ['reqClassMask', (1 << ($_ - 1)), '&'], [['reqClassMask', CLASS_MASK_ALL, '&'], CLASS_MASK_ALL, '!']]; + } + break; + case 38: // racespecific [enum] + $_ = @$this->enums[$cr[0]][$cr[1]]; + if ($_ !== null) + { + if ($_ === true) + return ['AND', ['reqRaceMask', 0, '!'], [['reqRaceMask', RACE_MASK_ALL, '&'], RACE_MASK_ALL, '!'], [['reqRaceMask', RACE_MASK_ALLIANCE, '&'], RACE_MASK_ALLIANCE, '!'], [['reqRaceMask', RACE_MASK_HORDE, '&'], RACE_MASK_HORDE, '!']]; + else if ($_ === false) + return ['OR', ['reqRaceMask', 0], ['reqRaceMask', RACE_MASK_ALL], ['reqRaceMask', RACE_MASK_ALLIANCE], ['reqRaceMask', RACE_MASK_HORDE]]; + else if (is_int($_)) + return ['AND', ['reqRaceMask', (1 << ($_ - 1)), '&'], [['reqRaceMask', RACE_MASK_ALLIANCE, '&'], RACE_MASK_ALLIANCE, '!'], [['reqRaceMask', RACE_MASK_HORDE, '&'], RACE_MASK_HORDE, '!']]; + } + break; case 19: // startsfrom [enum] switch ($cr[1]) { case 1: // npc - return ['npcStart.id', null, '!']; - break; + return ['AND', ['qse.type', TYPE_NPC], ['qse.method', 0x1, '&']]; case 2: // object - return ['goStart.id', null, '!']; - break; + return ['AND', ['qse.type', TYPE_OBJECT], ['qse.method', 0x1, '&']]; case 3: // item - return ['itemStart.id', null, '!']; + return ['AND', ['qse.type', TYPE_ITEM], ['qse.method', 0x1, '&']]; } break; case 21: // endsat [enum] switch ($cr[1]) { case 1: // npc - return ['npcEnd.id', null, '!']; - break; + return ['AND', ['qse.type', TYPE_NPC], ['qse.method', 0x2, '&']]; case 2: // object - return ['goEnd.id', null, '!']; - break; + return ['AND', ['qse.type', TYPE_OBJECT], ['qse.method', 0x2, '&']]; } break; - // case 24: // lacksstartend [bool] cost an impossible amount of resources - // if ($this->int2Bool($cr[1])) - // { - // if ($cr[1]) - // return ['OR', ['AND', ['npcStart.id', null], ['goStart.id', null], ['itemStart.id', null]], ['AND', ['npcEnd.id', null], ['goEnd.id', null]]]; - // else - // return ['AND', ['OR', ['npcStart.id', null, '!'], ['goStart.id', null, '!'], ['itemStart.id', null, '!']], ['OR', ['npcEnd.id', null, '!'], ['goEnd.id', null, '!']]]; - // } - // break; + case 24: // lacksstartend [bool] + $missing = DB::Aowow()->selectCol('SELECT questId, max(method) a, min(method) b FROM ?_quests_startend GROUP BY questId HAVING (a | b) <> 3'); + if ($this->int2Bool($cr[1])) + { + if ($cr[1]) + return ['id', $missing]; + else + return ['id', $missing, '!']; + } + break; + case 7: // firstquestseries + case 15: // lastquestseries + case 16: // partseries +/* todo */ return [1]; // self-joining eats substential amounts of time: should restructure that and also incorporate reqQ and openQ cases from infobox + case 25: // hascomments + case 18: // hasscreenshots + case 36: // hasvideos +/* todo */ return [1]; default: break; } @@ -442,14 +568,14 @@ class QuestListFilter extends Filter // name if (isset($_v['na'])) { - $name = User::$localeId ? 'title_loc'.User::$localeId : 'title'; - $objectives = User::$localeId ? 'objectives_loc'.User::$localeId : 'objectives'; - $description = User::$localeId ? 'details_loc'.User::$localeId : 'details'; - + $_ = []; if (isset($_v['ex']) && $_v['ex'] == 'on') - $parts[] = ['OR', [$name, $_v['na']], [$objectives, $_v['na']], [$description, $_v['na']]]; + $_ = $this->modularizeString(['name_loc'.User::$localeId, 'objectives_loc'.User::$localeId, 'details_loc'.User::$localeId]); else - $parts[] = [$name, $_v['na']]; + $_ = $this->modularizeString(['name_loc'.User::$localeId]); + + if ($_) + $parts[] = $_; } // level min @@ -491,8 +617,8 @@ class QuestListFilter extends Filter // side if (isset($_v['si'])) { - $ex = [['requiredRaces', RACE_MASK_ALL, '&'], RACE_MASK_ALL, '!']; - $notEx = ['OR', ['requiredRaces', 0], [['requiredRaces', RACE_MASK_ALL, '&'], RACE_MASK_ALL]]; + $ex = [['reqRaceMask', RACE_MASK_ALL, '&'], RACE_MASK_ALL, '!']; + $notEx = ['OR', ['reqRaceMask', 0], [['reqRaceMask', RACE_MASK_ALL, '&'], RACE_MASK_ALL]]; switch ($_v['si']) { @@ -500,22 +626,32 @@ class QuestListFilter extends Filter $parts[] = $notEx; break; case 2: - $parts[] = ['OR', $notEx, ['requiredRaces', RACE_MASK_HORDE, '&']]; + $parts[] = ['OR', $notEx, ['reqRaceMask', RACE_MASK_HORDE, '&']]; break; case -2: - $parts[] = ['AND', $ex, ['requiredRaces', RACE_MASK_HORDE, '&']]; + $parts[] = ['AND', $ex, ['reqRaceMask', RACE_MASK_HORDE, '&']]; break; case 1: - $parts[] = ['OR', $notEx, ['requiredRaces', RACE_MASK_ALLIANCE, '&']]; + $parts[] = ['OR', $notEx, ['reqRaceMask', RACE_MASK_ALLIANCE, '&']]; break; case -1: - $parts[] = ['AND', $ex, ['requiredRaces', RACE_MASK_ALLIANCE, '&']]; + $parts[] = ['AND', $ex, ['reqRaceMask', RACE_MASK_ALLIANCE, '&']]; break; default: unset($_v['si']); } } + // type [list] + if (isset($_v['ty'])) + { + $_ = (array)$_v['ty']; + if (!array_diff($_, [0, 1, 21, 41, 62, 81, 82, 83, 84, 85, 88, 89])) + $parts[] = ['type', $_]; + else + unset($_v['ty']); + } + return $parts; } } diff --git a/includes/types/skill.class.php b/includes/types/skill.class.php index 456aaa3d..761564a3 100644 --- a/includes/types/skill.class.php +++ b/includes/types/skill.class.php @@ -69,11 +69,11 @@ class SkillList extends BaseType return $data; } - public function addGlobalsToJScript(&$template, $addMask = 0) + public function addGlobalsToJScript($addMask = 0) { foreach ($this->iterate() as $__) { - $template->extendGlobalData(self::$type, [ + Util::$pageTemplate->extendGlobalData(self::$type, [ $this->id => [ 'name' => Util::jsEscape($this->getField('name', true)), 'icon' => Util::jsEscape($this->curTpl['iconString']) diff --git a/includes/types/spell.class.php b/includes/types/spell.class.php index 19ceaf62..14df1ca2 100644 --- a/includes/types/spell.class.php +++ b/includes/types/spell.class.php @@ -24,6 +24,7 @@ class SpellList extends BaseType 10 => [ 98, 109, 111, 113, 115, 137, 138, 139, 140, 141, 313, 315, 673, 759], // Languages 11 => [164, 165, 171, 182, 186, 197, 202, 333, 393, 755, 773] // prim. Professions ); + public static $spellTypes = array( 6 => 1, 8 => 2, @@ -1765,10 +1766,10 @@ Lasts 5 min. $?$gte($pl,68)[][Cannot be used on items level 138 and higher.] return $data; } - public function addGlobalsToJScript(&$template, $addMask = GLOBALINFO_SELF) + public function addGlobalsToJScript($addMask = GLOBALINFO_SELF) { if ($this->relItems && ($addMask & GLOBALINFO_RELATED)) - $this->relItems->addGlobalsToJscript($template); + $this->relItems->addGlobalsToJscript(); foreach ($this->iterate() as $id => $__) { @@ -1777,12 +1778,12 @@ Lasts 5 min. $?$gte($pl,68)[][Cannot be used on items level 138 and higher.] if ($mask = $this->curTpl['reqClassMask']) for ($i = 0; $i < 11; $i++) if ($mask & (1 << $i)) - $template->extendGlobalIds(TYPE_CLASS, $i + 1); + Util::$pageTemplate->extendGlobalIds(TYPE_CLASS, $i + 1); if ($mask = $this->curTpl['reqRaceMask']) for ($i = 0; $i < 11; $i++) if ($mask & (1 << $i)) - $template->extendGlobalIds(TYPE_RACE, $i + 1); + Util::$pageTemplate->extendGlobalIds(TYPE_RACE, $i + 1); } $data = null; @@ -1820,7 +1821,7 @@ spells / buffspells = { } if ($data || $extra) - $template->extendGlobalData(self::$type, $data, $extra); + Util::$pageTemplate->extendGlobalData(self::$type, $data, $extra); } } @@ -1962,7 +1963,7 @@ class SpellListFilter extends Filter if (is_bool($_)) return ['source', 0, ($_ ? '!' : null)]; else if (is_int($_)) - return ['source', $_.':']; + return ['source', '%'.$_.':%']; } break; case 20: // has Reagents [yn] diff --git a/includes/types/title.class.php b/includes/types/title.class.php index 91950580..2b779823 100644 --- a/includes/types/title.class.php +++ b/includes/types/title.class.php @@ -64,7 +64,7 @@ class TitleList extends BaseType return $data; } - public function addGlobalsToJscript(&$template, $addMask = 0) + public function addGlobalsToJScript($addMask = 0) { $data = []; @@ -76,7 +76,7 @@ class TitleList extends BaseType $data[$this->id]['namefemale'] = $_; } - $template->extendGlobalData(self::$type, $data); + Util::$pageTemplate->extendGlobalData(self::$type, $data); } private function createSource() diff --git a/includes/types/worldevent.class.php b/includes/types/worldevent.class.php index f760fde1..e4ad3b29 100644 --- a/includes/types/worldevent.class.php +++ b/includes/types/worldevent.class.php @@ -148,11 +148,11 @@ class WorldEventList extends BaseType return $data; } - public function addGlobalsToJScript(&$template, $addMask = 0) + public function addGlobalsToJScript($addMask = 0) { foreach ($this->iterate() as $__) { - $template->extendGlobalData(self::$type, [$this->id => array( + Util::$pageTemplate->extendGlobalData(self::$type, [$this->id => array( 'name' => $this->getField('name', true), 'icon' => $this->curTpl['iconString'] )]); diff --git a/includes/types/zone.class.php b/includes/types/zone.class.php index 3dc3deb2..12378839 100644 --- a/includes/types/zone.class.php +++ b/includes/types/zone.class.php @@ -131,10 +131,10 @@ visibleCols: ['heroiclevel', 'players'] return $data; } - public function addGlobalsToJscript(&$template, $addMask = 0) + public function addGlobalsToJScript($addMask = 0) { foreach ($this->iterate() as $__) - $template->extendGlobalData(self::$type, [$this->id => ['name' => Util::jsEscape($this->getField('name', true))]]); + Util::$pageTemplate->extendGlobalData(self::$type, [$this->id => ['name' => Util::jsEscape($this->getField('name', true))]]); } public function renderTooltip() { } diff --git a/includes/utilities.php b/includes/utilities.php index 41b79281..0f1a9b4d 100644 --- a/includes/utilities.php +++ b/includes/utilities.php @@ -93,7 +93,7 @@ class SmartyAoWoW extends Smarty $tv['infobox'] = $article['quickInfo']; if ($article['locale'] != User::$localeId) - $tv['article']['params'] = ['prepend' => Util::jsEscape('
'.Lang::$main['englishOnly'].'
')]; + $tv['article']['params'] = ['prepend' => Util::jsEscape('
'.Lang::$main['englishOnly'].'
')]; foreach ($article as $text) if (preg_match_all('/\[(npc|object|item|itemset|quest|spell|zone|faction|pet|achievement|title|holiday|class|race|skill|currency)=(\d+)[^\]]*\]/i', $text, $matches, PREG_SET_ORDER)) @@ -221,38 +221,42 @@ class SmartyAoWoW extends Smarty $ids = array_unique($ids, SORT_NUMERIC); $cnd = [['id', $ids], 0]; - (new Util::$typeClasses[$type]($cnd))->addGlobalsToJscript($this, GLOBALINFO_SELF); + (new Util::$typeClasses[$type]($cnd))->addGlobalsToJScript(GLOBALINFO_SELF); } } public function notFound($subject, $entry) { - $this->updatePageVars(array( - 'subject' => Util::ucFirst($subject), - 'id' => $entry, - 'notFound' => sprintf(Lang::$main['pageNotFound'], $subject) - )); + $this->assign([ + 'typeStr' => Util::ucFirst($subject), + 'typeId' => $entry, + 'title' => Lang::$main['nfPageTitle'], + 'notFound' => sprintf(Lang::$main['pageNotFound'], $subject), + 'lang' => Lang::$main, + 'mysql' => DB::Aowow()->getStatistics() + ]); - $this->assign('lang', Lang::$main); - $this->assign('mysql', DB::Aowow()->getStatistics()); - - $this->display('404.tpl'); + $this->display('text-page-generic.tpl'); exit(); } public function error() { - $this->assign('lang', array_merge(Lang::$main, Lang::$error)); - $this->assign('mysql', DB::Aowow()->getStatistics()); + $this->assign([ + 'type' => -99, // get error-article + 'typeId' => 0, + 'title' => Lang::$main['errPageTitle'], + 'name' => Lang::$main['errPageTitle'], + 'lang' => Lang::$main, + 'mysql' => DB::Aowow()->getStatistics() + ]); - $this->display('error.tpl'); + $this->display('text-page-generic.tpl'); exit(); } public function brb() { - $this->assign('lang', array_merge(Lang::$main, Lang::$error)); - $this->display('brb.tpl'); exit(); } @@ -353,26 +357,21 @@ class Util ITEM_MOD_HEALTH_REGEN, ITEM_MOD_SPELL_PENETRATION, ITEM_MOD_BLOCK_VALUE ); - public static $questClasses = array( // taken from old aowow: 0,1,2,3,8,10 may point to pointless mini-areas + public static $questClasses = array( // taken from old aowow: 2 & 3 partially point to pointless mini-areas in front of dungeons -2 => [ 0], - 0 => [ 1, 3, 4, 8, 10, 11, 12, 25, 28, 33, 36, 38, 40, 41, 44, 45, 46, 47, 51, 85, 130, 139, 267, 279, 1497, 1519, 1537, 2257, 3430, 3433, 3487, 4080], + 0 => [ 1, 3, 4, 8, 10, 11, 12, 25, 28, 33, 36, 38, 40, 41, 44, 45, 46, 47, 51, 85, 130, 139, 267, 279, 1497, 1519, 1537, 2257, 3430, 3433, 3487, 4080, 4298], 1 => [ 14, 15, 16, 17, 141, 148, 215, 331, 357, 361, 400, 405, 406, 440, 490, 493, 618, 1216, 1377, 1637, 1638, 1657, 3524, 3525, 3557], - 2 => [ 133, 206, 209, 491, 717, 718, 719, 722, 796, 978, 1196, 1337, 1417, 1581, 1583, 1584, 1941, 2017, 2057, 2100, 2366, 2367, 2437, 2557, 3477, 3562, 3713, 3714, 3715, 3716, 3717, 3789, 3790, 3791, 3792, 3845, 3846, 3847, 3849, 3905, 4095, 4100, 4120, 4196, 4228, 4264, 4272, 4375, 4415, 4494, 4723], - 3 => [ 19, 2159, 2562, 2677, 2717, 3428, 3429, 3456, 3606, 3805, 3836, 3840, 3842, 4273, 4500, 4722, 4812], +/*todo*/ 2 => [ 133, 206, 209, 491, 717, 718, 719, 722, 796, 978, 1196, 1337, 1417, 1581, 1583, 1584, 1941, 2017, 2057, 2100, 2366, 2367, 2437, 2557, 3477, 3562, 3713, 3714, 3715, 3716, 3717, 3789, 3790, 3791, 3792, 3845, 3846, 3847, 3849, 3905, 4095, 4100, 4120, 4196, 4228, 4264, 4272, 4375, 4415, 4494, 4723], +/*todo*/ 3 => [ 1977, 2159, 2562, 2677, 2717, 3428, 3429, 3456, 3606, 3805, 3836, 3840, 3842, 4273, 4500, 4722, 4812], 4 => [ -372, -263, -262, -261, -162, -161, -141, -82, -81, -61], 5 => [ -373, -371, -324, -304, -264, -201, -182, -181, -121, -101, -24], 6 => [ -25, 2597, 3277, 3358, 3820, 4384, 4710], - 7 => [ -368, -367, -365, -344, -241, -1], - 8 => [ 3483, 3518, 3519, 3520, 3521, 3522, 3523, 3679, 3703], - 9 => [-1008, -1007, -1006, -1005, -1004, -1003, -1002, -1001, -375, -374, -370, -369, -366, -364, -284, -41, -22], - 10 => [ 65, 66, 67, 210, 394, 495, 3537, 3711, 4024, 4197, 4395] + 7 => [-1010, -368, -367, -365, -344, -241, -1], + 8 => [ 3483, 3518, 3519, 3520, 3521, 3522, 3523, 3679, 3703], // Skettis is no parent + 9 => [-1006, -1005, -1003, -1002, -1001, -376, -375, -374, -370, -369, -366, -364, -284, -41, -22], // 22: seasonal, 284: special => not in the actual menu + 10 => [ 65, 66, 67, 210, 394, 495, 3537, 3711, 4024, 4197, 4395, 4742] // Coldara is no parent ); - public static $questFactionReward = array( // from QuestFactionReward.dbc - 0, 10, 25, 75, 150, 250, 350, 500, 1000, 5 - ); - - /* why: Because petSkills (and ranged weapon skills) are the only ones with more than two skillLines attached. Because Left Joining ?_spell with ?_skillLineAbility causes more trouble than it has uses. Because this is more or less the only reaonable way to fit all that information into one database field, so.. @@ -1207,7 +1206,8 @@ class Util '/\|c(\w{6})\w{2}([^\|]+)\|r/ui', // color |c|r '/\$g\s*([^:;]+)\s*:\s*([^:;]+)\s*(:?[^:;]*);/ui',// directed gender-reference $g::: '/\$t([^;]+);/ui', // nonesense, that the client apparently ignores - '/\|\d\-?\d?\((\$\w)\)/ui' // and another modifier for something russian |3-6($r) + '/\|\d\-?\d?\((\$\w)\)/ui', // and another modifier for something russian |3-6($r) + '/<([^\"=\/>]+\s[^\"=\/>]+)>/ui' // emotes (workaround: at least one whitespace and never " oder = between brackets) ); $to = array( @@ -1215,7 +1215,8 @@ class Util '\2', '<\1/\2>', '', - '\1' + '\1', + '<\1>' ); $text = preg_replace($from, $to, $text); @@ -1704,7 +1705,7 @@ class Util @$groupChances[$entry['groupid']] += $entry['ChanceOrQuestChance']; $set['groupChance'] = abs($entry['ChanceOrQuestChance']); } - else // shouldn't happened + else // shouldn't have happened { Util::$pageTemplate->internalNotice(U_GROUP_EMPLOYEE, 'Loot by LootId: unhandled case in calculating chance for item '.$entry['item'].'!'); continue; @@ -1757,7 +1758,7 @@ class Util return $lv; $items = new ItemList(array(['i.id', $struct[1]], CFG_SQL_LIMIT_NONE)); - $items->addGlobalsToJscript(Util::$pageTemplate, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $items->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); $foo = $items->getListviewData(); // assign listview LV rows to loot rows, not the other way round! The same item may be contained multiple times @@ -2047,16 +2048,16 @@ class Util } break; case LOOT_MAIL: - $conditions = array(['RewardChoiceItemId1', $itemId], ['RewardChoiceItemId2', $itemId], ['RewardChoiceItemId3', $itemId], ['RewardChoiceItemId4', $itemId], ['RewardChoiceItemId5', $itemId], - ['RewardChoiceItemId6', $itemId], ['RewardItemId1', $itemId], ['RewardItemId2', $itemId], ['RewardItemId3', $itemId], ['RewardItemId4', $itemId], + $conditions = array(['rewardChoiceItemId1', $itemId], ['rewardChoiceItemId2', $itemId], ['rewardChoiceItemId3', $itemId], ['rewardChoiceItemId4', $itemId], ['rewardChoiceItemId5', $itemId], + ['rewardChoiceItemId6', $itemId], ['rewardItemId1', $itemId], ['rewardItemId2', $itemId], ['rewardItemId3', $itemId], ['rewardItemId4', $itemId], 'OR'); if ($ids) - $conditions[] = ['qt.RewardMailTemplateId', $ids]; + $conditions[] = ['rewardMailTemplateId', $ids]; $srcObj = new QuestList($conditions); if (!$srcObj->error) { - $srcObj->addGlobalsToJscript(self::$pageTemplate, GLOBALINFO_SELF | GLOBALINFO_REWARDS); + $srcObj->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_REWARDS); $srcData = $srcObj->getListviewData(); foreach ($srcObj->iterate() as $_) @@ -2077,7 +2078,7 @@ class Util $srcObj = new SpellList($conditions); if (!$srcObj->error) { - $srcObj->addGlobalsToJscript(self::$pageTemplate, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $srcObj->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); $srcData = $srcObj->getListviewData(); if (!empty($result)) @@ -2104,7 +2105,7 @@ class Util $srcObj = new $oName(array([$field, $ids])); if (!$srcObj->error) { - $srcObj->addGlobalsToJscript(self::$pageTemplate, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $srcObj->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); $srcData = $srcObj->getListviewData(); foreach ($srcObj->iterate() as $curTpl) diff --git a/index.php b/index.php index 066aeab7..2b5303da 100644 --- a/index.php +++ b/index.php @@ -104,7 +104,9 @@ switch ($pageCall) break; case 'contactus': - die("not yet implemented:\n".print_r($_POST)); // 0:ok; 1:captchaInvalid; 2:tooLong; 3:noReasonGiven; 7:alreadyReported; other:prints String + print_r($_POST); + print_r($_GET); + die("not yet implemented!"); // 0:ok; 1:captchaInvalid; 2:tooLong; 3:noReasonGiven; 7:alreadyReported; other:prints String case 'comment': if ($pageParam == 'rating') die('{"success":true,"error":"","up":7,"down":9}'); diff --git a/localization/lang.class.php b/localization/lang.class.php index 44fe00c6..b50d9bae 100644 --- a/localization/lang.class.php +++ b/localization/lang.class.php @@ -6,7 +6,6 @@ class Lang public static $main; public static $account; public static $game; - public static $error; public static $search; public static $profiler; @@ -133,8 +132,14 @@ class Lang return self::$game['rep'][REP_HONORED]; else if ($pts >= 2999) return self::$game['rep'][REP_FRIENDLY]; - else /* if ($pts >= 1) */ + else if ($pts >= 0) return self::$game['rep'][REP_NEUTRAL]; + else if ($pts >= -3000) + return self::$game['rep'][REP_UNFRIENDLY]; + else if ($pts >= -6000) + return self::$game['rep'][REP_HOSTILE]; + else + return self::$game['rep'][REP_HATED]; } public static function getRequiredItems($class, $mask, $short = true) @@ -213,30 +218,36 @@ class Lang return implode(', ', $tmp); } - public static function getClassString($classMask) + public static function getClassString($classMask, $asHTML = true, &$n = 0) { $classMask &= CLASS_MASK_ALL; // clamp to available classes.. if ($classMask == CLASS_MASK_ALL) // available to all classes return false; - $tmp = []; - $i = 1; + $tmp = []; + $i = 1; + $base = $asHTML ? '%2$s' : '[class=%d]'; + $br = $asHTML ? '' : '\n'; while ($classMask) { if ($classMask & (1 << ($i - 1))) { - $tmp[] = ''.self::$game['cl'][$i].''; + $tmp[] = (!fMod(count($tmp) + 1, 3) ? $br : null).sprintf($base, $i, self::$game['cl'][$i]); $classMask &= ~(1 << ($i - 1)); + + if (!$asHTML) + Util::$pageTemplate->extendGlobalIds(TYPE_CLASS, $i); } $i++; } + $n = count($tmp); return implode(', ', $tmp); } - public static function getRaceString($raceMask) + public static function getRaceString($raceMask, &$side = 0, $asHTML = true, &$n = 0) { $raceMask &= RACE_MASK_ALL; // clamp to available races.. @@ -244,17 +255,15 @@ class Lang return false; $tmp = []; - $side = 0; $i = 1; + $base = $asHTML ? '%s' : '[race=%d]'; + $br = $asHTML ? '' : '\n'; if (!$raceMask) - return array('side' => SIDE_BOTH, 'name' => self::$game['ra'][0]); - - if ($raceMask == RACE_MASK_HORDE) - return array('side' => SIDE_HORDE, 'name' => self::$game['ra'][-2]); - - if ($raceMask == RACE_MASK_ALLIANCE) - return array('side' => SIDE_ALLIANCE, 'name' => self::$game['ra'][-1]); + { + $side |= SIDE_BOTH; + return self::$game['ra'][0]; + } if ($raceMask & RACE_MASK_HORDE) $side |= SIDE_HORDE; @@ -262,17 +271,27 @@ class Lang if ($raceMask & RACE_MASK_ALLIANCE) $side |= SIDE_ALLIANCE; + if ($raceMask == RACE_MASK_HORDE) + return self::$game['ra'][-2]; + + if ($raceMask == RACE_MASK_ALLIANCE) + return self::$game['ra'][-1]; + while ($raceMask) { if ($raceMask & (1 << ($i - 1))) { - $tmp[] = ''.self::$game['ra'][$i].''; + $tmp[] = (!fMod(count($tmp) + 1, 3) ? $br : null).sprintf($base, $i, self::$game['ra'][$i]); $raceMask &= ~(1 << ($i - 1)); + + if (!$asHTML) + Util::$pageTemplate->extendGlobalIds(TYPE_RACE, $i); } $i++; } - return array ('side' => $side, 'name' => implode(', ', $tmp)); + $n = count($tmp); + return implode(', ', $tmp); } } diff --git a/localization/locale_dede.php b/localization/locale_dede.php index fa60e606..e532a3fb 100644 --- a/localization/locale_dede.php +++ b/localization/locale_dede.php @@ -26,11 +26,11 @@ $lang = array( 'feedback' => "Rückmeldung", 'numSQL' => "Anzahl an MySQL-Queries", 'timeSQL' => "Zeit für MySQL-Queries", - 'noJScript' => "Diese Seite macht ausgiebigen Gebrauch von JavaScript.
Bitte aktiviert JavaScript in Eurem Browser.", + 'noJScript' => 'Diese Seite macht ausgiebigen Gebrauch von JavaScript.
Bitte aktiviert JavaScript in Eurem Browser.', 'userProfiles' => "Deine Charaktere", 'pageNotFound' => "Diese|Dieser|Dieses %s existiert nicht.", // todo: dämliche Fälle... 'gender' => "Geschlecht", - 'sex' => [null, 'Mann', 'Frau'], + 'sex' => [null, "Mann", "Frau"], 'players' => "Spieler", 'quickFacts' => "Kurzübersicht", 'screenshots' => "Screenshots", @@ -63,7 +63,7 @@ $lang = array( 'oneFilter' => "Mindestens einer", 'applyFilter' => "Filter anwenden", 'resetForm' => "Formular zurücksetzen", - 'refineSearch' => "Tipp: Präzisiere deine Suche mit Durchsuchen einer Unterkategorie.", + 'refineSearch' => 'Tipp: Präzisiere deine Suche mit Durchsuchen einer Unterkategorie.', 'clear' => "leeren", 'exactMatch' => "Exakt passend", '_reqLevel' => "Mindeststufe", @@ -73,7 +73,7 @@ $lang = array( 'disabled' => "Deaktiviert", 'disabledHint' => "Kann nicht erhalten oder abgeschlossen werden.", 'serverside' => "Serverseitig", - 'serversideHint' => "Diese Informationen sind nicht im Client enthalten und wurden gesnifft und/oder erraten.", + 'serversideHint'=> "Diese Informationen sind nicht im Client enthalten und wurden gesnifft und/oder erraten.", // red buttons 'links' => "Links", @@ -82,6 +82,8 @@ $lang = array( 'findUpgrades' => "Bessere Gegenstände finden...", // miscTools + 'errPageTitle' => "Seite nicht gefunden", + 'nfPageTitle' => "Fehler", 'subscribe' => "Abonnieren", 'mostComments' => ["Gestern", "Vergangene %d Tage"], 'utilities' => array( @@ -100,7 +102,7 @@ $lang = array( 'cappedHint' => 'Tipp: Entfernt Gewichtungen für gedeckte Werte wie Trefferwertung.', 'groupBy' => "Ordnen nach", 'gb' => array( - ['Nichts', 'none'], ['Platz', 'slot'], ['Stufe', 'level'], ['Quelle', 'source'] + ["Nichts", "none"], ["Platz", "slot"], ["Stufe", "level"], ["Quelle", "source"] ), 'compareTool' => "Gegenstandsvergleichswerkzeug", 'talentCalc' => "Talentrechner", @@ -176,33 +178,35 @@ $lang = array( 'zone' => "Zone", 'zones' => "Gebiete", + 'honorPoints' => "Ehrenpunkte", + 'arenaPoints' => "Arenapunkte", 'heroClass' => "Heldenklasse", 'resource' => "Ressource", 'resources' => "Ressourcen", 'role' => "Rolle", 'roles' => "Rollen", 'specs' => "Spezialisierungen", - '_roles' => ['Heiler', 'Nahkampf-DPS', 'Distanz-DPS', 'Tank'], + '_roles' => ["Heiler", "Nahkampf-DPS", "Distanz-DPS", "Tank"], - 'modes' => ['Normal / Normal 10', 'Heroisch / Normal 25', 'Heroisch 10', 'Heroisch 25'], - 'expansions' => array("Classic", "The Burning Crusade", "Wrath of the Lich King"), - 'stats' => array("Stärke", "Beweglichkeit", "Ausdauer", "Intelligenz", "Willenskraft"), + 'modes' => ["Normal / Normal 10", "Heroisch / Normal 25", "Heroisch 10", "Heroisch 25"], + 'expansions' => ["Classic", "The Burning Crusade", "Wrath of the Lich King"], + 'stats' => ["Stärke", "Beweglichkeit", "Ausdauer", "Intelligenz", "Willenskraft"], 'sources' => array( null, "Hergestellt", "Drop", "PvP", "Quest", "Händler", "Lehrer", "Entdeckung", "Einlösung", "Talent", "Startausrüstung", "Ereignis", "Erfolg" ), 'languages' => array( - 1 => "Orcisch", 2 => "Darnassisch", 3 => "Taurisch", 6 => "Zwergisch", 7 => "Gemeinsprache", 8 => "Dämonisch", 9 => "Titanisch", 10 => "Thalassisch", + 1 => "Orcisch", 2 => "Darnassisch", 3 => "Taurisch", 6 => "Zwergisch", 7 => "Gemeinsprache", 8 => "Dämonisch", 9 => "Titanisch", 10 => "Thalassisch", 11 => "Drachisch", 12 => "Kalimagisch", 13 => "Gnomisch", 14 => "Trollisch", 33 => "Gossensprache", 35 => "Draeneiisch", 36 => "Zombie", 37 => "Gnomenbinär", 38 => "Goblinbinär" ), - 'gl' => array(null, "Erhebliche", "Geringe"), - 'si' => array(1 => "Allianz", -1 => "Nur für Allianz", 2 => "Horde", -2 => "Nur für Horde", 3 => "Beide"), - 'resistances' => array(null, 'Heiligwiderstand', 'Feuerwiderstand', 'Naturwiderstand', 'Frostwiderstand', 'Schattenwiderstand', 'Arkanwiderstand'), - 'sc' => array("Körperlich", "Heilig", "Feuer", "Natur", "Frost", "Schatten", "Arkan"), - 'dt' => array(null, "Magie", "Fluch", "Krankheit", "Gift", "Verstohlenheit", "Unsichtbarkeit", null, null, "Wut"), - 'cl' => array(null, "Krieger", "Paladin", "Jäger", "Schurke", "Priester", "Todesritter", "Schamane", "Magier", "Hexenmeister", null, "Druide"), - 'ra' => array(-2 => "Horde", -1 => "Allianz", "Beide", "Mensch", "Orc", "Zwerg", "Nachtelf", "Untoter", "Taure", "Gnom", "Troll", null, "Blutelf", "Draenei"), - 'rep' => array("Hasserfüllt", "Feindselig", "Unfreundlich", "Neutral", "Freundlich", "Wohlwollend", "Respektvoll", "Ehrfürchtig"), + 'gl' => [null, "Erhebliche", "Geringe"], + 'si' => [1 => "Allianz", -1 => "Nur für Allianz", 2 => "Horde", -2 => "Nur für Horde", 3 => "Beide"], + 'resistances' => [null, 'Heiligwiderstand', 'Feuerwiderstand', 'Naturwiderstand', 'Frostwiderstand', 'Schattenwiderstand', 'Arkanwiderstand'], + 'sc' => ["Körperlich", "Heilig", "Feuer", "Natur", "Frost", "Schatten", "Arkan"], + 'dt' => [null, "Magie", "Fluch", "Krankheit", "Gift", "Verstohlenheit", "Unsichtbarkeit", null, null, "Wut"], + 'cl' => [null, "Krieger", "Paladin", "Jäger", "Schurke", "Priester", "Todesritter", "Schamane", "Magier", "Hexenmeister", null, "Druide"], + 'ra' => [-2 => "Horde", -1 => "Allianz", "Beide", "Mensch", "Orc", "Zwerg", "Nachtelf", "Untoter", "Taure", "Gnom", "Troll", null, "Blutelf", "Draenei"], + 'rep' => ["Hasserfüllt", "Feindselig", "Unfreundlich", "Neutral", "Freundlich", "Wohlwollend", "Respektvoll", "Ehrfürchtig"], 'st' => array( "Vorgabe", "Katzengestalt", "Baum des Lebens", "Reisegestalt", "Wassergestalt", "Bärengestalt", null, null, "Terrorbärengestalt", null, @@ -223,8 +227,8 @@ $lang = array( "Tier", "Mechanisch", "Nicht spezifiziert", "Totem", "Haustier", "Gaswolke" ), 'fa' => array( - 1 => "Wolf", 2 => "Katze", 3 => "Spinne", 4 => "Bär", 5 => "Eber", 6 => "Krokilisk", 7 => "Aasvogel", 8 => "Krebs", - 9 => "Gorilla", 11 => "Raptor", 12 => "Weitschreiter", 20 => "Skorpid", 21 => "Schildkröte", 24 => "Fledermaus", 25 => "Hyäne", 26 => "Raubvogel", + 1 => "Wolf", 2 => "Katze", 3 => "Spinne", 4 => "Bär", 5 => "Eber", 6 => "Krokilisk", 7 => "Aasvogel", 8 => "Krebs", + 9 => "Gorilla", 11 => "Raptor", 12 => "Weitschreiter", 20 => "Skorpid", 21 => "Schildkröte", 24 => "Fledermaus", 25 => "Hyäne", 26 => "Raubvogel", 27 => "Windnatter", 30 => "Drachenfalke", 31 => "Felshetzer", 32 => "Sphärenjäger", 33 => "Sporensegler", 34 => "Netherrochen", 35 => "Schlange", 37 => "Motte", 38 => "Schimäre", 39 => "Teufelssaurier", 41 => "Silithid", 42 => "Wurm", 43 => "Rhinozeros", 44 => "Wespe", 45 => "Kernhund", 46 => "Geisterbestie" ), @@ -236,12 +240,6 @@ $lang = array( "Marschall / Kriegsherr", "Feldmarschall / Kriegsfürst", "Großmarschall / Oberster Kriegsfürst" ), ), - 'error' => array( - 'errNotFound' => "Seite nicht gefunden", - 'errPage' => "Was? Wie hast du... vergesst es!\n
\n
\nAnscheinend konnte die von Euch angeforderte Seite nicht gefunden werden. Wenigstens nicht in dieser Dimension.\n
\n
\nVielleicht lassen einige Justierungen an der\n\n[WH-799 Großkonfabulierungsmaschine]\n\ndie Seite plötzlich wieder auftauchen!\n
\n
\nOder, Ihr könnt es auch \nuns melden\n- die Stabilität des WH-799 ist umstritten, und wir möchten gern noch so ein Problem vermeiden...", - 'goStart' => "Zur Titelseite zurückkehren", - 'goForum' => "Forum für Rückmeldungen", - ), 'account' => array( 'doSignIn' => "Mit Eurem AoWoW-Konto anmelden", 'user' => "Benutzername", @@ -253,7 +251,7 @@ $lang = array( 'userNotFound' => "Ein Konto mit diesem Namen existiert nicht", 'userBanned' => "Dieses Konto wurde geschlossen", 'passMismatch' => "Die eingegebenen Passwörter stimmen nicht überein", - 'loginsExceeded' => "Die maximale Anzahl an Login-Versuchen von dieser IP wurde überschritten. Bitte versuchen Sie es in %s Minuten noch einmal.", + 'loginsExceeded'=> "Die maximale Anzahl an Login-Versuchen von dieser IP wurde überschritten. Bitte versuchen Sie es in %s Minuten noch einmal.", 'nameInUse' => "Es existiert bereits ein Konto mit diesem Namen", 'email' => "E-Mail-Adresse", 'unkError' => "Unbekannter Fehler bei der Accounterstellung", @@ -275,7 +273,7 @@ $lang = array( 'myAccount' => "Mein Account", 'editAccount' => "Benutze die folgenden Formulare um deine Account-Informationen zu aktualisieren", 'publicDesc' => "Öffentliche Beschreibung", - 'viewPubDesc' => "Die Beschreibung in deinem öffentlichen Profil ansehen", + 'viewPubDesc' => 'Die Beschreibung in deinem öffentlichen Profil ansehen', ), 'gameObject' => array( 'cat' => [0 => "Anderes", 9 => "Bücher", 3 => "Behälter", -5 => "Truhen", 25 => "Fischschwärme", -3 => "Kräuter", -4 => "Erzadern", -2 => "Quest", -6 => "Werkzeuge"], @@ -286,7 +284,8 @@ $lang = array( 'focusDesc' => "Zauber, die diesen Fokus benötigen, können an diesem Objekt gewirkt werden.", 'trap' => "Falle", 'triggeredBy' => "Ausgelöst durch", - 'capturePoint' => "Eroberungspunkt" + 'capturePoint' => "Eroberungspunkt", + 'foundIn' => "Dieses Objekt befindet sich in" ), 'npc' => array( 'classification'=> "Einstufung", @@ -304,6 +303,7 @@ $lang = array( 'melee' => "Nahkampf", 'ranged' => "Fernkampf", 'armor' => "Rüstung", + 'foundIn' => "Dieser NPC befindet sich in", 'rank' => [0 => "Normal", 1 => "Elite", 4 => "Rar", 2 => "Rar Elite", 3 => "Boss"], 'textTypes' => [null, "schreit", "sagt", "flüstert"], 'modes' => array( @@ -320,7 +320,7 @@ $lang = array( 'end' => "Ende", 'interval' => "Intervall", 'inProgress' => "Ereignis findet gerade statt", - 'category' => array("Nicht kategorisiert", "Feiertage", "Wiederkehrend", "Spieler vs. Spieler") + 'category' => ["Nicht kategorisiert", "Feiertage", "Wiederkehrend", "Spieler vs. Spieler"] ), 'achievement' => array( 'criteria' => "Kriterien", @@ -328,8 +328,8 @@ $lang = array( 'series' => "Reihe", 'outOf' => "von", 'criteriaType' => "Criterium Typ-Id:", - 'itemReward' => "Ihr bekommt:", - 'titleReward' => "Euch wird der Titel \"%s\" verliehen", + 'itemReward' => "Ihr bekommt", + 'titleReward' => 'Euch wird der Titel "%s" verliehen', 'slain' => "getötet", 'reqNumCrt' => "Benötigt" ), @@ -353,6 +353,7 @@ $lang = array( 'Miscellaneous' => "Diverse", 'Azeroth' => "Azeroth", 'CosmicMap' => "Kosmische Karte", + 'selectorLink' => " und ", ), 'zone' => array( // 'zone' => "Zone", @@ -363,23 +364,75 @@ $lang = array( ) ), 'quest' => array( - 'questLevel' => 'Stufe %s', + 'questLevel' => "Stufe %s", + 'requirements' => "Anforderungen", + 'reqMoney' => "Benötigtes Geld", + 'money' => "Geld", + 'additionalReq' => "Zusätzliche Anforderungen um das Quest zu erhalten", + 'reqRepWith' => 'Eure Reputation mit %s %s %s sein', + 'reqRepMin' => "muss mindestens", + 'reqRepMax' => "darf höchstens", + 'progress' => "Fortschritt", + 'provided' => "Bereitgestellt", + 'providedItem' => "Bereitgestellter Gegenstand", + 'completion' => "Abschluss", + 'description' => "Beschreibung", + 'playerSlain' => "Spieler getötet", + 'profession' => "Beruf", + 'timer' => "Zeitbegrenzung", + 'loremaster' => "Meister der Lehren", + 'suggestedPl' => "Empfohlene Spielerzahl", + 'keepsPvpFlag' => "Hält Euch im PvP", 'daily' => 'Täglich', - 'requirements' => 'Anforderungen', + 'weekly' => "Wöchentlich", + 'monthly' => "Monatlich", + 'sharable' => "Teilbar", + 'notSharable' => "Nicht teilbar", + 'repeatable' => "Wiederholbar", + 'reqQ' => "Benötigt", + 'reqQDesc' => "Um diese Quest zu erhalten, müsst ihr alle der nachfolgenden Quests abschließen", + 'reqOneQ' => "Benötigt eins von", + 'reqOneQDesc' => "Um diese Quest zu erhalten, müsst ihr eines der nachfolgenden Quests abschließen", + 'opensQ' => "Öffnet Quests", + 'opensQDesc' => "Es ist notwendig, diese Quest zu beenden, um die nachfolgenden Quests zu erhalten", + 'closesQ' => "Schließt Quests", + 'closesQDesc' => "Wenn ihr diese Quest beendet, sind die nachfolgenden Quests nicht mehr verfügbar", + 'enablesQ' => "Aktiviert", + 'enablesQDesc' => "Wenn diese Quest aktiv ist, sind die nachfolgenden Quests ebenfalls verfügbar", + 'enabledByQ' => "Aktiviert durch", + 'enabledByQDesc'=> "Ihr könnt diese Quest nur annehmen, wenn eins der nachfolgenden Quests aktiv ist", + 'gainsDesc' => "Bei Abschluss dieser Quest erhaltet Ihr", + 'theTitle' => 'den Titel "%s"', + 'mailDelivery' => "Ihr werdet diesen Brief %serhalten", + 'mailIn' => "nach %s ", + 'unavailable' => "Diese Quest wurde als nicht genutzt markiert und kann weder erhalten noch vollendet werden.", + 'experience' => "Erfahrung", + 'expConvert' => "(oder %s, wenn auf Stufe %d vollendet)", + 'expConvert2' => "%s, wenn auf Stufe %d vollendet", + 'chooseItems' => "Auf Euch wartet eine dieser Belohnungen", + 'receiveItems' => "Ihr bekommt", + 'receiveAlso' => "Ihr bekommt außerdem", + 'spellCast' => "Der folgende Zauber wird auf Euch gewirkt", + 'spellLearn' => "Ihr erlernt", + 'bonusTalents' => "Talentpunkte", + 'spellDisplayed'=> ' (%s wird angezeigt)', 'questInfo' => array( - 0 => 'Normal', 1 => 'Gruppe', 21 => 'Leben', 41 => 'PvP', 62 => 'Schlachtzug', 81 => 'Dungeon', 82 => 'Weltereignis', - 83 => 'Legendär', 84 => 'Eskorte', 85 => 'Heroisch', 88 => 'Schlachtzug (10)', 89 => 'Schlachtzug (25)' + 0 => "Normal", 1 => "Gruppe", 21 => "Leben", 41 => "PvP", 62 => "Schlachtzug", 81 => "Dungeon", 82 => "Weltereignis", + 83 => "Legendär", 84 => "Eskorte", 85 => "Heroisch", 88 => "Schlachtzug (10)", 89 => "Schlachtzug (25)" + ), + 'cat' => array( + // todo: after zones ) ), 'title' => array( 'cat' => array( - 'Allgemein', 'Spieler gegen Spieler', 'Ruf', 'Dungeon & Schlachtzug', 'Quests', 'Berufe', 'Weltereignisse' + "Allgemein", "Spieler gegen Spieler", "Ruf", "Dungeon & Schlachtzug", "Quests", "Berufe", "Weltereignisse" ) ), 'skill' => array( 'cat' => array( - -6 => 'Haustiere', -5 => 'Reittiere', -4 => 'Völkerfertigkeiten', 5 => 'Attribute', 6 => 'Waffenfertigkeiten', 7 => 'Klassenfertigkeiten', 8 => 'Rüstungssachverstand', - 9 => 'Nebenberufe', 10 => 'Sprachen', 11 => 'Berufe' + -6 => "Haustiere", -5 => "Reittiere", -4 => "Völkerfertigkeiten", 5 => "Attribute", 6 => "Waffenfertigkeiten", 7 => "Klassenfertigkeiten", 8 => "Rüstungssachverstand", + 9 => "Nebenberufe", 10 => "Sprachen", 11 => "Berufe" ) ), 'currency' => array( @@ -480,16 +533,16 @@ $lang = array( 'AMMOSLOT' => "Munition", 'STEAM' => "Dampfdruck", 'WRATH' => "Zorn", 'PYRITE' => "Pyrit", 'HEAT' => "Hitze", 'OOZE' => "Schlamm", 'BLOOD_POWER' => "Blutmacht" ), - 'relItems' => array ( + 'relItems' => array( 'base' => "%s im Zusammenhang mit %s anzeigen", 'link' => " oder ", - 'recipes' => "Rezeptgegenstände", - 'crafted' => "Hergestellte Gegenstände" + 'recipes' => 'Rezeptgegenstände', + 'crafted' => 'Hergestellte Gegenstände' ), 'cat' => array( 7 => "Klassenfertigkeiten", -13 => "Glyphen", - -11 => array("Sachverstand", 8 => "Rüstung", 6 => "Waffen", 10 => "Sprachen"), + -11 => ["Sachverstand", 8 => "Rüstung", 6 => "Waffen", 10 => "Sprachen"], -4 => "Völkerfertigkeiten", -2 => "Talente", -6 => "Haustiere", @@ -502,22 +555,22 @@ $lang = array( 765 => "Sporensegler", 781 => "Teufelssaurier", 218 => "Weitschreiter", 785 => "Wespe", 656 => "Windnatter", 208 => "Wolf", 784 => "Wurm", 204 => "Leerwandler", 205 => "Sukkubus", 189 => "Teufelsjäger", 761 => "Teufelswache", 188 => "Wichtel", ), - -7 => array("Begleitertalente", 410 => "Gerissenheit", 411 => "Wildheit", 409 => "Hartnäckigkeit"), + -7 => ["Begleitertalente", 410 => "Gerissenheit", 411 => "Wildheit", 409 => "Hartnäckigkeit"], 11 => array( "Berufe", 171 => "Alchemie", - 164 => array("Schmiedekunst", 9788 => "Rüstungsschmied", 9787 => "Waffenschmied", 17041 => "Axtschmiedemeister", 17040 => "Hammerschmiedemeister", 17039 => "Schwertschmiedemeister"), + 164 => ["Schmiedekunst", 9788 => "Rüstungsschmied", 9787 => "Waffenschmied", 17041 => "Axtschmiedemeister", 17040 => "Hammerschmiedemeister", 17039 => "Schwertschmiedemeister"], 333 => "Verzauberkunst", - 202 => array("Ingenieurskunst", 20219 => "Gnomeningenieurskunst", 20222 => "Gobliningenieurskunst"), + 202 => ["Ingenieurskunst", 20219 => "Gnomeningenieurskunst", 20222 => "Gobliningenieurskunst"], 182 => "Kräuterkunde", 773 => "Inschriftenkunde", 755 => "Juwelenschleifen", - 165 => array("Lederverarbeitung", 10656 => "Drachenschuppenlederverarbeitung", 10658 => "Elementarlederverarbeitung", 10660 => "Stammeslederverarbeitung"), + 165 => ["Lederverarbeitung", 10656 => "Drachenschuppenlederverarbeitung", 10658 => "Elementarlederverarbeitung", 10660 => "Stammeslederverarbeitung"], 186 => "Bergbau", 393 => "Kürschnerei", - 197 => array("Schneiderei", 26798 => "Mondstoffschneiderei", 26801 => "Schattenstoffschneiderei", 26797 => "Zauberfeuerschneiderei"), + 197 => ["Schneiderei", 26798 => "Mondstoffschneiderei", 26801 => "Schattenstoffschneiderei", 26797 => "Zauberfeuerschneiderei"], ), - 9 => array("Nebenberufe", 185 => "Kochkunst", 129 => "Erste Hilfe", 356 => "Angeln", 762 => "Reiten"), + 9 => ["Nebenberufe", 185 => "Kochkunst", 129 => "Erste Hilfe", 356 => "Angeln", 762 => "Reiten"], -8 => "NPC-Fähigkeiten", -9 => "GM-Fähigkeiten", 0 => "Nicht kategorisiert" @@ -534,7 +587,7 @@ $lang = array( 20 => "Angelruten", 14 => "Diverse" ), 'subClassMasks' => array( - 0x02A5F3 => 'Nahkampfwaffe', 0x0060 => 'Schild', 0x04000C => 'Distanzwaffe', 0xA091 => 'Einhandnahkampfwaffe' + 0x02A5F3 => "Nahkampfwaffe", 0x0060 => "Schild", 0x04000C => "Distanzwaffe", 0xA091 => "Einhandnahkampfwaffe" ), 'traitShort' => array( 'atkpwr' => "Angr", 'rgdatkpwr' => "DAngr", 'splpwr' => "ZMacht", 'arcsplpwr' => "ArkM", 'firsplpwr' => "FeuM", diff --git a/localization/locale_enus.php b/localization/locale_enus.php index f9ff87fe..97ca859a 100644 --- a/localization/locale_enus.php +++ b/localization/locale_enus.php @@ -21,11 +21,11 @@ $lang = array( 'feedback' => "Feedback", 'numSQL' => "Number of MySQL queries", 'timeSQL' => "Time of MySQL queries", - 'noJScript' => "This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.", + 'noJScript' => 'This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.', 'userProfiles' => "My Profiles", 'pageNotFound' => "This %s doesn't exist.", 'gender' => "Gender", - 'sex' => [null, 'Male', 'Female'], + 'sex' => [null, "Male", "Female"], 'players' => "Players", 'quickFacts' => "Quick Facts", 'screenshots' => "Screenshots", @@ -50,7 +50,7 @@ $lang = array( 'oneFilter' => "At least one", 'applyFilter' => "Apply filter", 'resetForm' => "Reset Form", - 'refineSearch' => "Tip: Refine your search by browsing a subcategory.", + 'refineSearch' => 'Tip: Refine your search by browsing a subcategory.', 'clear' => "clear", 'exactMatch' => "Exact match", '_reqLevel' => "Required level", @@ -69,6 +69,8 @@ $lang = array( 'findUpgrades' => "Find upgrades...", // misc Tools + 'errPageTitle' => "Page not found", + 'nfPageTitle' => "Error", 'subscribe' => "Subscribe", 'mostComments' => ["Yesterday", "Past %d Days"], 'utilities' => array( @@ -87,7 +89,7 @@ $lang = array( 'cappedHint' => 'Tip: Remove weights for capped statistics such as Hit rating.', 'groupBy' => "Group By", 'gb' => array( - ['None', 'none'], ['Slot', 'slot'], ['Level', 'level'], ['Source', 'source'] + ["None", "none"], ["Slot", "slot"], ["Level", "level"], ["Source", "source"] ), 'compareTool' => "Item Comparison Tool", 'talentCalc' => "Talent Calculator", @@ -163,17 +165,19 @@ $lang = array( 'zone' => "zone", 'zones' => "Zones", + 'honorPoints' => "Honor Points", // tooltip_honorpoints + 'arenaPoints' => "Arena Points", // tooltip_arenapoints 'heroClass' => "Hero class", 'resource' => "Resource", 'resources' => "Resources", 'role' => "Role", 'roles' => "Roles", 'specs' => "Specs", - '_roles' => ['Healer', 'Melee DPS', 'Ranged DPS', 'Tank'], + '_roles' => ["Healer", "Melee DPS", "Ranged DPS", "Tank"], - 'modes' => ['Normal / Normal 10', 'Heroic / Normal 25', 'Heroic 10', 'Heroic 25'], - 'expansions' => array("Classic", "The Burning Crusade", "Wrath of the Lich King"), - 'stats' => array("Strength", "Agility", "Stamina", "Intellect", "Spirit"), + 'modes' => ["Normal / Normal 10", "Heroic / Normal 25", "Heroic 10", "Heroic 25"], + 'expansions' => ["Classic", "The Burning Crusade", "Wrath of the Lich King"], + 'stats' => ["Strength", "Agility", "Stamina", "Intellect", "Spirit"], 'sources' => array( null, "Crafted", "Drop", "PvP", "Quest", "Vendor", "Trainer", "Discovery", "Redemption", "Talent", "Starter", "Event", "Achievement" @@ -182,14 +186,14 @@ $lang = array( 1 => "Orcish", 2 => "Darnassian", 3 => "Taurahe", 6 => "Dwarvish", 7 => "Common", 8 => "Demonic", 9 => "Titan", 10 => "Thalassian", 11 => "Draconic", 12 => "Kalimag", 13 => "Gnomish", 14 => "Troll", 33 => "Gutterspeak", 35 => "Draenei", 36 => "Zombie", 37 => "Gnomish Binary", 38 => "Goblin Binary" ), - 'gl' => array(null, "Major", "Minor"), - 'si' => array(1 => "Alliance", -1 => "Alliance only", 2 => "Horde", -2 => "Horde only", 3 => "Both"), - 'resistances' => array(null, 'Holy Resistance', 'Fire Resistance', 'Nature Resistance', 'Frost Resistance', 'Shadow Resistance', 'Arcane Resistance'), - 'dt' => array(null, "Magic", "Curse", "Disease", "Poison", "Stealth", "Invisibility", null, null, "Enrage"), - 'sc' => array("Physical", "Holy", "Fire", "Nature", "Frost", "Shadow", "Arcane"), - 'cl' => array(null, "Warrior", "Paladin", "Hunter", "Rogue", "Priest", "Death Knight", "Shaman", "Mage", "Warlock", null, "Druid"), - 'ra' => array(-2 => "Horde", -1 => "Alliance", "Both", "Human", "Orc", "Dwarf", "Night Elf", "Undead", "Tauren", "Gnome", "Troll", null, "Blood Elf", "Draenei"), - 'rep' => array("Hated", "Hostile", "Unfriendly", "Neutral", "Friendly", "Honored", "Revered", "Exalted"), + 'gl' => [null, "Major", "Minor"], + 'si' => [1 => "Alliance", -1 => "Alliance only", 2 => "Horde", -2 => "Horde only", 3 => "Both"], + 'resistances' => [null, 'Holy Resistance', 'Fire Resistance', 'Nature Resistance', 'Frost Resistance', 'Shadow Resistance', 'Arcane Resistance'], + 'dt' => [null, "Magic", "Curse", "Disease", "Poison", "Stealth", "Invisibility", null, null, "Enrage"], + 'sc' => ["Physical", "Holy", "Fire", "Nature", "Frost", "Shadow", "Arcane"], + 'cl' => [null, "Warrior", "Paladin", "Hunter", "Rogue", "Priest", "Death Knight", "Shaman", "Mage", "Warlock", null, "Druid"], + 'ra' => [-2 => "Horde", -1 => "Alliance", "Both", "Human", "Orc", "Dwarf", "Night Elf", "Undead", "Tauren", "Gnome", "Troll", null, "Blood Elf", "Draenei"], + 'rep' => ["Hated", "Hostile", "Unfriendly", "Neutral", "Friendly", "Honored", "Revered", "Exalted"], 'st' => array( "Default", "Cat Form", "Tree of Life", "Travel Form", "Aquatic Form", "Bear From", null, null, "Dire Bear Form", null, @@ -223,12 +227,6 @@ $lang = array( "Marshal / General", "Field Marshal / Warlord", "Grand Marshal / High Warlord" ), ), - 'error' => array( - 'errNotFound' => "Page not found", - 'errPage' => "What? How did you... nevermind that!\n
\n
\nIt appears that the page you have requested cannot be found. At least, not in this dimension.\n
\n
\nPerhaps a few tweaks to the [WH-799 Major Confabulation Engine] may result in the page suddenly making an appearance!\n
\n
\nOr, you can try \ncontacting us\n- the stability of the WH-799 is debatable, and we wouldn't want another accident...", - 'goStart' => "Return to the homepage", - 'goForum' => "Feedback forum", - ), 'account' => array( 'doSignIn' => "Log in to your AoWoW Account", 'user' => "Username", @@ -240,7 +238,7 @@ $lang = array( 'userNotFound' => "Such user does not exists", 'userBanned' => "This Account was closed", 'passMismatch' => "Entered passwords does not match", - 'loginsExceeded' => "The maximum number of logins from this IP has been exceeded. Please try again in %s minutes.", + 'loginsExceeded'=> "The maximum number of logins from this IP has been exceeded. Please try again in %s minutes.", 'nameInUse' => "Such user already exists", 'email' => "Email address", 'unkError' => "Unknown error on account create", @@ -262,7 +260,7 @@ $lang = array( 'myAccount' => "My Account", 'editAccount' => "Simply use the forms below to update your account information", 'publicDesc' => "Public Description", - 'viewPubDesc' => "View your Public Description in your Profile Page", + 'viewPubDesc' => 'View your Public Description in your Profile Page', ), 'gameObject' => array( 'cat' => [0 => "Other", 9 => "Books", 3 => "Containers", -5 => "Chests", 25 => "Fishing Pools", -3 => "Herbs", -4 => "Mineral Veins", -2 => "Quest", -6 => "Tools"], @@ -309,7 +307,7 @@ $lang = array( 'end' => "End", 'interval' => "Interval", 'inProgress' => "Event is currently in progress", - 'category' => array("Uncategorized", "Holidays", "Recurring", "Player vs. Player") + 'category' => ["Uncategorized", "Holidays", "Recurring", "Player vs. Player"] ), 'achievement' => array( 'criteria' => "Criteria", @@ -317,8 +315,8 @@ $lang = array( 'series' => "Series", 'outOf' => "out of", 'criteriaType' => "Criterium Type-Id:", - 'itemReward' => "You will receive:", - 'titleReward' => "You shall be granted the title \"%s\"", + 'itemReward' => "You will receive", + 'titleReward' => 'You shall be granted the title "%s"', 'slain' => "slain", 'reqNumCrt' => "Requires" ), @@ -353,23 +351,75 @@ $lang = array( ) ), 'quest' => array( - 'questLevel' => 'Level %s', - 'daily' => 'Daily', - 'requirements' => 'Requirements', + 'questLevel' => "Level %s", + 'requirements' => "Requirements", + 'reqMoney' => "Required money", + 'money' => "Money", + 'additionalReq' => "Additional requirements to obtain this quest", + 'reqRepWith' => 'Your reputation with %s must be %s %s', + 'reqRepMin' => "at least", + 'reqRepMax' => "lower than", + 'progress' => "Progress", + 'provided' => "Provided", + 'providedItem' => "Provided item", + 'completion' => "Completion", + 'description' => "Description", + 'playerSlain' => "Players slain", + 'profession' => "Profession", + 'timer' => "Timer", + 'loremaster' => "Loremaster", + 'suggestedPl' => "Suggested players", + 'keepsPvpFlag' => "Keeps you PvP flagged", + 'daily' => "Daily", + 'weekly' => "Weekly", + 'monthly' => "Monthly", + 'sharable' => "Sharable", + 'notSharable' => "Not sharable", + 'repeatable' => "Repeatable", + 'reqQ' => "Requires", + 'reqQDesc' => "To take this quest, you must complete all these quests", + 'reqOneQ' => "Requires one of", + 'reqOneQDesc' => "To take this quest, you must complete one of the following quests", + 'opensQ' => "Opens Quests", + 'opensQDesc' => "Completing this quest is requires to take this quests", + 'closesQ' => "Closes Quests", + 'closesQDesc' => "After completing this quest, you will not be able to take these quests", + 'enablesQ' => "Enables", + 'enablesQDesc' => "When this quest is active, these quests are also available", + 'enabledByQ' => "Enabled by", + 'enabledByQDesc'=> "This quest is available only, when one of these quests are active", + 'gainsDesc' => "Upon completion of this quest you will gain", + 'theTitle' => 'the title "%s"', + 'mailDelivery' => "You will receive this letter %s", + 'mailIn' => "after %s", + 'unavailable' => "This quest was marked obsolete and cannot be obtained or completed.", + 'experience' => "experience", + 'expConvert' => "(or %s if completed at level %d)", + 'expConvert2' => "%s if completed at level %d", + 'chooseItems' => "You will be able to choose one of these rewards", + 'receiveItems' => "You will receive", + 'receiveAlso' => "You will also receive", + 'spellCast' => "The following spell will be cast on you", + 'spellLearn' => "You will learn", + 'bonusTalents' => "talent points", + 'spellDisplayed'=> ' (%s is displayed)', 'questInfo' => array( - 0 => 'Normal', 1 => 'Group', 21 => 'Life', 41 => 'PvP', 62 => 'Raid', 81 => 'Dungeon', 82 => 'World Event', - 83 => 'Legendary', 84 => 'Escort', 85 => 'Heroic', 88 => 'Raid (10)', 89 => 'Raid (25)' + 0 => "Normal", 1 => "Group", 21 => "Life", 41 => "PvP", 62 => "Raid", 81 => "Dungeon", 82 => "World Event", + 83 => "Legendary", 84 => "Escort", 85 => "Heroic", 88 => "Raid (10)", 89 => "Raid (25)" + ), + 'cat' => array( + // todo: after zones ) ), 'title' => array( 'cat' => array( - 'General', 'Player vs. Player', 'Reputation', 'Dungeons & Raids', 'Quests', 'Professions', 'World Events' + "General", "Player vs. Player", "Reputation", "Dungeons & Raids", "Quests", "Professions", "World Events" ) ), 'skill' => array( 'cat' => array( - -6 => 'Companions', -5 => 'Mounts', -4 => 'Racial Traits', 5 => 'Attributes', 6 => 'Weapon Skills', 7 => 'Class Skills', 8 => 'Armor Proficiencies', - 9 => 'Secondary Skills', 10 => 'Languages', 11 => 'Professions' + -6 => "Companions", -5 => "Mounts", -4 => "Racial Traits", 5 => "Attributes", 6 => "Weapon Skills", 7 => "Class Skills", 8 => "Armor Proficiencies", + 9 => "Secondary Skills", 10 => "Languages", 11 => "Professions" ) ), 'currency' => array( @@ -473,8 +523,8 @@ $lang = array( 'relItems' => array ( 'base' => "Show %s related to %s", 'link' => " or ", - 'recipes' => "recipe items", - 'crafted' => "crafted items" + 'recipes' => 'recipe items', + 'crafted' => 'crafted items' ), 'cat' => array( 7 => "Class Skills", // classList @@ -492,22 +542,22 @@ $lang = array( 218 => "Tallstrider", 251 => "Turtle", 766 => "Warp Stalker", 785 => "Wasp", 656 => "Wind Serpent", 208 => "Wolf", 784 => "Worm", 761 => "Felguard", 189 => "Felhunter", 188 => "Imp", 205 => "Succubus", 204 => "Voidwalker" ), - -7 => array("Pet Talents", 410 => "Cunning", 411 => "Ferocity", 409 => "Tenacity"), + -7 => ["Pet Talents", 410 => "Cunning", 411 => "Ferocity", 409 => "Tenacity"], 11 => array( "Professions", 171 => "Alchemy", - 164 => array("Blacksmithing", 9788 => "Armorsmithing", 9787 => "Weaponsmithing", 17041 => "Master Axesmithing", 17040 => "Master Hammersmithing", 17039 => "Master Swordsmithing"), + 164 => ["Blacksmithing", 9788 => "Armorsmithing", 9787 => "Weaponsmithing", 17041 => "Master Axesmithing", 17040 => "Master Hammersmithing", 17039 => "Master Swordsmithing"], 333 => "Enchanting", - 202 => array("Engineering", 20219 => "Gnomish Engineering", 20222 => "Goblin Engineering"), + 202 => ["Engineering", 20219 => "Gnomish Engineering", 20222 => "Goblin Engineering"], 182 => "Herbalism", 773 => "Inscription", 755 => "Jewelcrafting", - 165 => array("Leatherworking", 10656 => "Dragonscale Leatherworking", 10658 => "Elemental Leatherworking", 10660 => "Tribal Leatherworking"), + 165 => ["Leatherworking", 10656 => "Dragonscale Leatherworking", 10658 => "Elemental Leatherworking", 10660 => "Tribal Leatherworking"], 186 => "Mining", 393 => "Skinning", - 197 => array("Tailoring", 26798 => "Mooncloth Tailoring", 26801 => "Shadoweave Tailoring", 26797 => "Spellfire Tailoring"), + 197 => ["Tailoring", 26798 => "Mooncloth Tailoring", 26801 => "Shadoweave Tailoring", 26797 => "Spellfire Tailoring"], ), - 9 => array ("Secondary Skills", 185 => "Cooking", 129 => "First Aid", 356 => "Fishing", 762 => "Riding"), + 9 => ["Secondary Skills", 185 => "Cooking", 129 => "First Aid", 356 => "Fishing", 762 => "Riding"], -8 => "NPC Abilities", -9 => "GM Abilities", 0 => "Uncategorized" @@ -524,7 +574,7 @@ $lang = array( 20 => "Fishing Poles", 14 => "Miscellaneous" ), 'subClassMasks' => array( - 0x02A5F3 => 'Melee Weapon', 0x0060 => 'Shield', 0x04000C => 'Ranged Weapon', 0xA091 => 'One-Handed Melee Weapon' + 0x02A5F3 => "Melee Weapon", 0x0060 => "Shield", 0x04000C => "Ranged Weapon", 0xA091 => "One-Handed Melee Weapon" ), 'traitShort' => array( 'atkpwr' => "AP", 'rgdatkpwr' => "RAP", 'splpwr' => "SP", 'arcsplpwr' => "ArcP", 'firsplpwr' => "FireP", @@ -662,7 +712,7 @@ $lang = array( null, null, "Arrow", "Bullet", null ), 'elixirType' => [null, "Battle", "Guardian"], - 'cat' => array( // ordered by content firts, then alphabeticaly + 'cat' => array( // ordered by content first, then alphabeticaly 2 => "Weapons", // self::$spell['weaponSubClass'] 4 => array("Armor", array( 1 => "Cloth Armor", 2 => "Leather Armor", 3 => "Mail Armor", 4 => "Plate Armor", 6 => "Shields", 7 => "Librams", diff --git a/localization/locale_eses.php b/localization/locale_eses.php index 786829d0..8f2939db 100644 --- a/localization/locale_eses.php +++ b/localization/locale_eses.php @@ -26,11 +26,11 @@ $lang = array( 'feedback' => "Feedback", 'numSQL' => "Número de consultas de MySQL", 'timeSQL' => "El tiempo para las consultas de MySQL", - 'noJScript' => "Este sitio hace uso intenso de JavaScript.
Por favor habilita JavaScript en tu navegador.", + 'noJScript' => 'Este sitio hace uso intenso de JavaScript.
Por favor habilita JavaScript en tu navegador.', 'userProfiles' => "Tus personajes", // translate.google :x 'pageNotFound' => "Este %s no existe.", 'gender' => "Género", - 'sex' => [null, 'Hombre', 'Mujer'], + 'sex' => [null, "Hombre", "Mujer"], 'players' => "Jugadores", 'quickFacts' => "Notas rápidas", 'screenshots' => "Capturas de pantalla", @@ -55,7 +55,7 @@ $lang = array( 'oneFilter' => "Por lo menos uno", 'applyFilter' => "Aplicar filtro", 'resetForm' => "Reiniciar formulario", - 'refineSearch' => "Sugerencia: Refina tu búsqueda llendo a una subcategoría.", + 'refineSearch' => 'Sugerencia: Refina tu búsqueda llendo a una subcategoría.', 'clear' => "borrar", 'exactMatch' => "Coincidencia exacta", '_reqLevel' => "Nivel requerido", @@ -65,7 +65,7 @@ $lang = array( 'disabled' => "[Disabled]", 'disabledHint' => "[Cannot be attained or completed]", 'serverside' => "[Serverside]", - 'serversideHint' => "[These informations are not in the Client and have been provided by sniffing and/or guessing.]", + 'serversideHint'=> "[These informations are not in the Client and have been provided by sniffing and/or guessing.]", // red buttons 'links' => "Enlaces", @@ -74,6 +74,8 @@ $lang = array( 'findUpgrades' => "Buscar mejoras...", // misc Tools + 'errPageTitle' => "Página no encontrada", + 'nfPageTitle' => "Error", 'subscribe' => "Suscribirme", 'mostComments' => ["Ayer", "Pasados %d días"], 'utilities' => array( @@ -92,7 +94,7 @@ $lang = array( 'cappedHint' => 'Consejo: Elimina escalas para atributos al máximo como el Índice de Golpe.', 'groupBy' => "Agrupar por", 'gb' => array( - ['Ninguno', 'none'], ['Casilla', 'slot'], ['Nivel', 'level'], ['Fuente', 'source'] + ["Ninguno", "none"], ["Casilla", "slot"], ["Nivel", "level"], ["Fuente", "source"] ), 'compareTool' => "Herramienta de comparación de objetos", 'talentCalc' => "Calculadora de talentos", @@ -168,17 +170,19 @@ $lang = array( 'zone' => "zona", 'zones' => "Zonas", + 'honorPoints' => "Puntos de Honor", + 'arenaPoints' => "Puntos de arena", 'heroClass' => "Clase héroe", 'resource' => "Recurso", 'resources' => "Recursos", 'role' => "Rol", 'roles' => "Roles", 'specs' => "Especializaciones", - '_roles' => ['Sanador', 'DPS cuerpo', 'DPS a distancia', 'Tanque'], + '_roles' => ["Sanador", "DPS cuerpo", "DPS a distancia", "Tanque"], - 'modes' => ['Normal / Normal 10', 'Heroico / Normal 25', 'Heróico 10', 'Heróico 25'], - 'expansions' => array("World of Warcraft", "The Burning Crusade", "Wrath of the Lich King"), - 'stats' => array("Fuerza", "Agilidad", "Aguante", "Intelecto", "Espíritu"), + 'modes' => ["Normal / Normal 10", "Heroico / Normal 25", "Heróico 10", "Heróico 25"], + 'expansions' => ["World of Warcraft", "The Burning Crusade", "Wrath of the Lich King"], + 'stats' => ["Fuerza", "Agilidad", "Aguante", "Intelecto", "Espíritu"], 'sources' => array( null, "Creado", "Encontrado", "JcJ", "Misión", "Vendedor", "Entrenador", "Descubierto", "Redención", "Talento", "Habilidad Inicial", "Evento", "Logro" @@ -187,14 +191,14 @@ $lang = array( 1 => "Orco", 2 => "Darnassiano", 3 => "Taurahe", 6 => "Enánico", 7 => "Lengua común", 8 => "Demoníaco", 9 => "Titánico", 10 => "Thalassiano", 11 => "Dracónico", 12 => "Kalimag", 13 => "Gnomótico", 14 => "Trol", 33 => "Viscerálico", 35 => "Draenei", 36 => "Zombie", 37 => "Binario gnomo", 38 => "Binario goblin" ), - 'gl' => array(null, "Sublime", "Menor"), - 'si' => array(1 => "Alianza", -1 => "Alianza solamente", 2 => "Horda", -2 => "Horda solamente", 3 => "Ambos"), - 'resistances' => array(null, 'Resistencia a lo Sagrado', 'v', 'Resistencia a la Naturaleza', 'Resistencia a la Escarcha', 'Resistencia a las Sombras', 'Resistencia a lo Arcano'), - 'sc' => array("Física", "Sagrado", "Fuego", "Naturaleza", "Escarcha", "Sombras", "Arcano"), - 'dt' => array(null, "Magia", "Maldición", "Enfermedad", "Veneno", "Sigilo", "Invisibilidad", null, null, "Enfurecer"), - 'cl' => array(null, "Guerrero", "Paladín", "Cazador", "Pícaro", "Sacerdote", "Caballero de la Muerte", "Chamán", "Mago", "Brujo", null, "Druida"), - 'ra' => array(-2 => "Horda", -1 => "Alianza", "Ambos", "Humano", "Orco", "Enano", "Elfo de la noche", "No-muerto", "Tauren", "Gnomo", "Trol ", null, "Blood Elf", "Elfo de sangre"), - 'rep' => array("Odiado", "Hostil", "Adverso", "Neutral", "Amistoso", "Honorable", "Reverenciado", "Exaltado"), + 'gl' => [null, "Sublime", "Menor"], + 'si' => [1 => "Alianza", -1 => "Alianza solamente", 2 => "Horda", -2 => "Horda solamente", 3 => "Ambos"], + 'resistances' => [null, 'Resistencia a lo Sagrado', 'v', 'Resistencia a la Naturaleza', 'Resistencia a la Escarcha', 'Resistencia a las Sombras', 'Resistencia a lo Arcano'], + 'sc' => ["Física", "Sagrado", "Fuego", "Naturaleza", "Escarcha", "Sombras", "Arcano"], + 'dt' => [null, "Magia", "Maldición", "Enfermedad", "Veneno", "Sigilo", "Invisibilidad", null, null, "Enfurecer"], + 'cl' => [null, "Guerrero", "Paladín", "Cazador", "Pícaro", "Sacerdote", "Caballero de la Muerte", "Chamán", "Mago", "Brujo", null, "Druida"], + 'ra' => [-2 => "Horda", -1 => "Alianza", "Ambos", "Humano", "Orco", "Enano", "Elfo de la noche", "No-muerto", "Tauren", "Gnomo", "Trol ", null, "Blood Elf", "Elfo de sangre"], + 'rep' => ["Odiado", "Hostil", "Adverso", "Neutral", "Amistoso", "Honorable", "Reverenciado", "Exaltado"], 'st' => array( "Defecto", "Forma felina", "Árbol de vida", "Forma de viaje", "Forma acuática", "Forma de oso", null, null, "Forma de oso temible", null, @@ -215,8 +219,8 @@ $lang = array( "Alimaña", "Mecánico", "Sin especificar", "Tótem", "Mascota mansa", "Nube de gas" ), 'fa' => array( - 1 => "Lobo", 2 => "Felino", 3 => "Araña", 4 => "Oso", 5 => "Jabalí", 6 => "Crocolisco", 7 => "Carroñero", 8 => "Cangrejo", - 9 => "Gorila", 11 => "Raptor", 12 => "Zancaalta", 20 => "Escórpido", 21 => "Tortuga", 24 => "Murciélago", 25 => "Hiena", 26 => "Ave rapaz", + 1 => "Lobo", 2 => "Felino", 3 => "Araña", 4 => "Oso", 5 => "Jabalí", 6 => "Crocolisco", 7 => "Carroñero", 8 => "Cangrejo", + 9 => "Gorila", 11 => "Raptor", 12 => "Zancaalta", 20 => "Escórpido", 21 => "Tortuga", 24 => "Murciélago", 25 => "Hiena", 26 => "Ave rapaz", 27 => "Serpiente alada", 30 => "Dracohalcón", 31 => "Devastador", 32 => "Acechador deformado",33 => "Esporiélago", 34 => "Raya abisal", 35 => "Serpiente", 37 => "Palomilla", 38 => "Quimera", 39 => "Demosaurio", 41 => "Silítido", 42 => "Gusano", 43 => "Rinoceronte", 44 => "Avispa", 45 => "Can del Núcleo", 46 => "Bestia espíritu" ), @@ -228,12 +232,6 @@ $lang = array( "Marshal / General", "Field Marshal / Warlord", "Grand Marshal / High Warlord" ), ), - 'error' => array( - 'errNotFound' => "Page not found", - 'errPage' => "What? How did you... nevermind that!\n
\n
\nIt appears that the page you have requested cannot be found. At least, not in this dimension.\n
\n
\nPerhaps a few tweaks to the [WH-799 Major Confabulation Engine] may result in the page suddenly making an appearance!\n
\n
\nOr, you can try \ncontacting us\n- the stability of the WH-799 is debatable, and we wouldn't want another accident...", - 'goStart' => "Return to the homepage", - 'goForum' => "Feedback forum", - ), 'account' => [], 'gameObject' => array( 'cat' => [0 => "Otros", 9 => "Libros", 3 => "Contenedores", -5 => "Cofres", 25 => "[Fishing Pools]", -3 => "Hierbas", -4 => "Venas de minerales", -2 => "Misiones", -6 => "Herramientas"], @@ -278,7 +276,7 @@ $lang = array( 'end' => "Termina", 'interval' => "Intervalo", 'inProgress' => "El evento está en progreso actualmente", - 'category' => array("Sin categoría", "Vacacionales", "Periódicos", "Jugador contra Jugador") + 'category' => ["Sin categoría", "Vacacionales", "Periódicos", "Jugador contra Jugador"] ), 'achievement' => array( 'criteria' => "Requisitos", @@ -286,8 +284,8 @@ $lang = array( 'series' => "Serie", 'outOf' => "de", 'criteriaType' => "Criterium Type-Id:", - 'itemReward' => "Recibirás:", - 'titleReward' => "Deberías obtener el título \"%s\"", + 'itemReward' => "Recibirás", + 'titleReward' => 'Deberías obtener el título "%s"', 'slain' => "matado", 'reqNumCrt' => "Requiere" ), @@ -322,22 +320,74 @@ $lang = array( ), 'quest' => array( 'questLevel' => 'Nivel %s', - 'daily' => 'Diaria', 'requirements' => 'Requisitos', + 'reqMoney' => 'Dinero necesario', + 'money' => 'Dinero', + 'additionalReq' => "[Additional requirements to obtain this quest]", + 'reqRepWith' => 'Tu reputación con %s debe ser %s %s', + 'reqRepMin' => "de al menos", + 'reqRepMax' => "menor que", + 'progress' => "Progreso", + 'provided' => "Provisto", + 'providedItem' => "Objeto provisto", + 'completion' => "Terminación", + 'description' => "Descripción", + 'playerSlain' => "Jugadores derrotados", + 'profession' => "Profesión", + 'timer' => "Tiempo", + 'loremaster' => "Maestro cultural", + 'suggestedPl' => "Jugadores sugeridos", + 'keepsPvpFlag' => "Mantiene el JcJ activado", + 'daily' => 'Diaria', + 'weekly' => "Semanal", + 'monthly' => "Mensual", + 'sharable' => "Compartible", + 'notSharable' => "No se puede compartir", + 'repeatable' => "Repetible", + 'reqQ' => "Requiere", + 'reqQDesc' => "Para aceptar esta misión, debes completar esta(s) mision(es)", + 'reqOneQ' => "Requiere una de", + 'reqOneQDesc' => "Para aceptar esta misión debes haber completado alguna de estas misiones", + 'opensQ' => "Desbloquea", + 'opensQDesc' => "Es necesario completar esta misión para aceptar esa(s) mision(es)", + 'closesQ' => "Bloquea", + 'closesQDesc' => "Si completas esta misión, no podras aceptar esta(s) mision(es)", + 'enablesQ' => "Activa", + 'enablesQDesc' => "Cuando estas realizando esta misión, podras tambien aceptar esta(s) mision(es)", + 'enabledByQ' => "Activada por", + 'enabledByQDesc'=> "Para aceptar esta misión debes haber tener activa alguna de estas misiones", + 'gainsDesc' => "Cuando completes esta misión ganarás", + 'theTitle' => 'el título "%s"', + 'mailDelivery' => "Usted recibirá esta carta %s", + 'mailIn' => "después de %s", + 'unavailable' => "Esta misión fue marcada como obsoleta y no puede ser obtenida o completada.", + 'experience' => "experiencia", + 'expConvert' => "(o %s si se completa al nivel %d)", + 'expConvert2' => "%s si se completa al nivel %d", + 'chooseItems' => "Podrás elegir una de estas recompensas", + 'receiveItems' => "Recibirás", + 'receiveAlso' => "También recibirás", + 'spellCast' => "Te van a lanzar el siguiente hechizo", + 'spellLearn' => "Aprenderás", + 'bonusTalents' => "puntos de talento", + 'spellDisplayed'=> ' (mostrando %s)', 'questInfo' => array( - 0 => 'Normal', 1 => 'Élite', 21 => 'Vida', 41 => 'JcJ', 62 => 'Banda', 81 => 'Mazmorra', 82 => 'Evento del mundo', - 83 => 'Legendaria', 84 => 'Escolta', 85 => 'Heroica', 88 => 'Banda (10)', 89 => 'Banda (25)' + 0 => "Normal", 1 => "Élite", 21 => "Vida", 41 => "JcJ", 62 => "Banda", 81 => "Mazmorra", 82 => "Evento del mundo", + 83 => "Legendaria", 84 => "Escolta", 85 => "Heroica", 88 => "Banda (10)", 89 => "Banda (25)" + ), + 'cat' => array( + // todo: after zones ) ), 'title' => array( 'cat' => array( - 'General', 'Jugador contra Jugador', 'Reputación', 'Mazmorras y bandas', 'Misiones', 'Profesiones', 'Eventos del mundo' + "General", "Jugador contra Jugador", "Reputación", "Mazmorras y bandas", "Misiones", "Profesiones", "Eventos del mundo" ) ), 'skill' => array( 'cat' => array( - -6 => 'Compañeros', -5 => 'Monturas', -4 => 'Habilidades de raza', 5 => 'Atributos', 6 => 'Habilidades con armas', 7 => 'Habilidades de clase', 8 => 'Armaduras disponibles', - 9 => 'Habilidades secundarias', 10 => 'Idiomas', 11 => 'Profesiones' + -6 => "Compañeros", -5 => "Monturas", -4 => "Habilidades de raza", 5 => "Atributos", 6 => "Habilidades con armas", 7 => "Habilidades de clase", 8 => "Armaduras disponibles", + 9 => "Habilidades secundarias", 10 => "Idiomas", 11 => "Profesiones" ) ), 'currency' => array( @@ -441,13 +491,13 @@ $lang = array( 'relItems' => array ( 'base' => "Muestra %s relacionados con %s", 'link' => " u ", - 'recipes' => "objetos de receta", - 'crafted' => "objetos fabricados" + 'recipes' => 'objetos de receta', + 'crafted' => 'objetos fabricados' ), 'cat' => array( 7 => "Habilidades", -13 => "Glifos", - -11 => array("Habilidades", 6 => "Armas", 8 => "Armadura", 10 => "Lenguas"), + -11 => ["Habilidades", 6 => "Armas", 8 => "Armadura", 10 => "Lenguas"], -4 => "Habilidades de raza", -2 => "Talentos", -6 => "Compañeros", @@ -460,22 +510,22 @@ $lang = array( 764 => "Raya abisal", 786 => "Rinoceronte", 768 => "Serpiente", 656 => "Serpiente alada", 783 => "Silítido", 251 => "Tortuga", 218 => "Zancaalta", 761 => "Guardia vil", 189 => "Manáfago", 188 => "Diablillo", 205 => "Súcubo", 204 => "Abisario" ), - -7 => array("Talentos de mascotas", 411 => "Astucia", 410 => "Ferocidad", 409 => "Tenacidad"), + -7 => ["Talentos de mascotas", 411 => "Astucia", 410 => "Ferocidad", 409 => "Tenacidad"], 11 => array( "Profesiones", 171 => "Alquimia", - 164 => array("Herrería", 9788 => "Forjador de armaduras", 9787 => "Forjador de armas", 17041 => "Maestro forjador de hachas", 17040 => "Maestro forjador de mazas", 17039 => "Maestro forjador de espadas"), + 164 => ["Herrería", 9788 => "Forjador de armaduras", 9787 => "Forjador de armas", 17041 => "Maestro forjador de hachas", 17040 => "Maestro forjador de mazas", 17039 => "Maestro forjador de espadas"], 333 => "Encantamiento", - 202 => array("Ingeniería", 20219 => "Ingeniero gnómico", 20222 => "Ingeniero goblin"), + 202 => ["Ingeniería", 20219 => "Ingeniero gnómico", 20222 => "Ingeniero goblin"], 182 => "Herboristería", 773 => "Inscripción", 755 => "Joyería", - 165 => array("Peletería", 10656 => "Peletería de escamas de dragón", 10658 => "Peletería de elemental", 10660 => "Peletería de tribal"), + 165 => ["Peletería", 10656 => "Peletería de escamas de dragón", 10658 => "Peletería de elemental", 10660 => "Peletería de tribal"], 186 => "Minería", 393 => "Desollar", - 197 => array("Sastrería", 26798 => "Sastería de tela lunar primigenia", 26801 => "Sastrería de tejido de sombras", 26797 => "Sastería de fuego de hechizo"), + 197 => ["Sastrería", 26798 => "Sastería de tela lunar primigenia", 26801 => "Sastrería de tejido de sombras", 26797 => "Sastería de fuego de hechizo"], ), - 9 => array("Habilidades secundarias", 185 => "Cocina", 129 => "Primeros auxilios", 356 => "Pesca", 762 => "Equitación"), + 9 => ["Habilidades secundarias", 185 => "Cocina", 129 => "Primeros auxilios", 356 => "Pesca", 762 => "Equitación"], -8 => "Habilidades de PNJ", -9 => "Habilidades de MJ", 0 => "Sin categoría" @@ -492,27 +542,27 @@ $lang = array( 20 => "Cañas de pescar", 14 => "Misceláneo" ), 'subClassMasks' => array( - 0x02A5F3 => 'Arma cuerpo a cuerpo', 0x0060 => 'Escudo', 0x04000C => 'Arma de ataque a distancia',0xA091 => 'Arma cuerpo a cuerpo 1M' + 0x02A5F3 => "Arma cuerpo a cuerpo", 0x0060 => "Escudo", 0x04000C => "Arma de ataque a distancia",0xA091 => "Arma cuerpo a cuerpo 1M" ), 'traitShort' => array( 'atkpwr' => "PA", 'rgdatkpwr' => "PA", 'splpwr' => "PH", 'arcsplpwr' => "PArc", 'firsplpwr' => "PFue", 'frosplpwr' => "PEsc", 'holsplpwr' => "PSag", 'natsplpwr' => "PNat", 'shasplpwr' => "PSom", 'splheal' => "Sana" ), 'spellModOp' => array( - 'DAMAGE', 'DURATION', 'THREAT', 'EFFECT1', 'CHARGES', - 'RANGE', 'RADIUS', 'CRITICAL_CHANCE', 'ALL_EFFECTS', 'NOT_LOSE_CASTING_TIME', - 'CASTING_TIME', 'COOLDOWN', 'EFFECT2', 'IGNORE_ARMOR', 'COST', - 'CRIT_DAMAGE_BONUS', 'RESIST_MISS_CHANCE', 'JUMP_TARGETS', 'CHANCE_OF_SUCCESS', 'ACTIVATION_TIME', - 'DAMAGE_MULTIPLIER', 'GLOBAL_COOLDOWN', 'DOT', 'EFFECT3', 'BONUS_MULTIPLIER', - null, 'PROC_PER_MINUTE', 'VALUE_MULTIPLIER', 'RESIST_DISPEL_CHANCE', 'CRIT_DAMAGE_BONUS_2', - 'SPELL_COST_REFUND_ON_FAIL' + "DAMAGE", "DURATION", "THREAT", "EFFECT1", "CHARGES", + "RANGE", "RADIUS", "CRITICAL_CHANCE", "ALL_EFFECTS", "NOT_LOSE_CASTING_TIME", + "CASTING_TIME", "COOLDOWN", "EFFECT2", "IGNORE_ARMOR", "COST", + "CRIT_DAMAGE_BONUS", "RESIST_MISS_CHANCE", "JUMP_TARGETS", "CHANCE_OF_SUCCESS", "ACTIVATION_TIME", + "DAMAGE_MULTIPLIER", "GLOBAL_COOLDOWN", "DOT", "EFFECT3", "BONUS_MULTIPLIER", + null, "PROC_PER_MINUTE", "VALUE_MULTIPLIER", "RESIST_DISPEL_CHANCE", "CRIT_DAMAGE_BONUS_2", + "SPELL_COST_REFUND_ON_FAIL" ), 'combatRating' => array( - 'WEAPON_SKILL', 'DEFENSE_SKILL', 'DODGE', 'PARRY', 'BLOCK', - 'HIT_MELEE', 'HIT_RANGED', 'HIT_SPELL', 'CRIT_MELEE', 'CRIT_RANGED', - 'CRIT_SPELL', 'HIT_TAKEN_MELEE', 'HIT_TAKEN_RANGED', 'HIT_TAKEN_SPELL', 'CRIT_TAKEN_MELEE', - 'CRIT_TAKEN_RANGED', 'CRIT_TAKEN_SPELL', 'HASTE_MELEE', 'HASTE_RANGED', 'HASTE_SPELL', - 'WEAPON_SKILL_MAINHAND', 'WEAPON_SKILL_OFFHAND', 'WEAPON_SKILL_RANGED', 'EXPERTISE', 'ARMOR_PENETRATION' + "WEAPON_SKILL", "DEFENSE_SKILL", "DODGE", "PARRY", "BLOCK", + "HIT_MELEE", "HIT_RANGED", "HIT_SPELL", "CRIT_MELEE", "CRIT_RANGED", + "CRIT_SPELL", "HIT_TAKEN_MELEE", "HIT_TAKEN_RANGED", "HIT_TAKEN_SPELL", "CRIT_TAKEN_MELEE", + "CRIT_TAKEN_RANGED", "CRIT_TAKEN_SPELL", "HASTE_MELEE", "HASTE_RANGED", "HASTE_SPELL", + "WEAPON_SKILL_MAINHAND", "WEAPON_SKILL_OFFHAND", "WEAPON_SKILL_RANGED", "EXPERTISE", "ARMOR_PENETRATION" ), 'lockType' => array( null, "Forzar cerradura", "Herboristería", "Minería", "Desactivar trampa", @@ -521,8 +571,8 @@ $lang = array( "Gahz'ridian (DND)", "Reventar", "Apertura JcJ", "Cierre JcJ", "Pescar", "Inscripción", "Abrir desde vehículo" ), - 'stealthType' => ['GENERAL', 'TRAP'], - 'invisibilityType' => ['GENERAL', 3 => 'TRAP', 6 => 'DRUNK'] + 'stealthType' => ["GENERAL", "TRAP"], + 'invisibilityType' => ["GENERAL", 3 => "TRAP", 6 => "DRUNK"] ), 'item' => array( 'armor' => "%s armadura", @@ -630,49 +680,49 @@ $lang = array( null, null, "Flecha", "Bala", null ), 'elixirType' => [null, "Batalla", "Guardián"], -'cat' => array( // ordered by content firts, then alphabeticaly - 2 => "Weapons", // self::$spell['weaponSubClass'] - 4 => array("Armor", array( - 1 => "Cloth Armor", 2 => "Leather Armor", 3 => "Mail Armor", 4 => "Plate Armor", 6 => "Shields", 7 => "Librams", - 8 => "Idols", 9 => "Totems", 10 => "Sigils", -6 => "Cloaks", -5 => "Off-hand Frills", -8 => "Shirts", - -7 => "Tabards", -3 => "Amulets", -2 => "Rings", -4 => "Trinkets", 0 => "Miscellaneous (Armor)", + 'cat' => array( + 2 => "Armas", // self::$spell['weaponSubClass'] + 4 => array("Armadura", array( + 1 => "Armaduras de tela", 2 => "Armaduras de cuero", 3 => "Armaduras de malla", 4 => "Armaduras de placas", 6 => "Escudos", 7 => "Tratados", + 8 => "Ídolos", 9 => "Tótems", 10 => "Sigilos", -6 => "Capas", -5 => "Cosillas de la mano izquierda",-8 => "Camisas", + -7 => "Tabardos", -3 => "Amuletos", -2 => "Anillos", -4 => "Abalorios", 0 => "Misceláneo (Armaduras)", )), - 1 => array("Containers", array( - 0 => "Bags", 3 => "Enchanting Bags", 4 => "Engineering Bags", 5 => "Gem Bags", 2 => "Herb Bags", 8 => "Inscription Bags", - 7 => "Leatherworking Bags", 6 => "Mining Bags", 1 => "Soul Bags" + 1 => array("Contenedores", array( + 0 => "Bolsas", 3 => "Bolsas de encantamiento", 4 => "Bolsas de ingeniería", 5 => "Bolsas de gemas", 2 => "Bolsas de hierbas", 8 => "Bolsas de inscripción", + 7 => "Bolsas de peletería", 6 => "Bolsas de minería", 1 => "Bolsas de almas" )), - 0 => array("Consumables", array( - -3 => "Item Enhancements (Temporary)", 6 => "Item Enhancements (Permanent)", 2 => ["Elixirs", [1 => "Battle Elixirs", 2 => "Guardian Elixirs"]], - 1 => "Potions", 4 => "Scrolls", 7 => "Bandages", 0 => "Consumables", 3 => "Flasks", 5 => "Food & Drinks", - 8 => "Other (Consumables)" + 0 => array("Consumibles", array( + -3 => "Mejoras de objetos temporales", 6 => "Mejoras de objetos permanentes", 2 => ["Elixires", [1 => "Elixires de batalla", 2 => "Elixires guardiánes"]], + 1 => "Pociones", 4 => "Pergaminos", 7 => "Vendas", 0 => "Consumibles", 3 => "Frascos", 5 => "Comidas y bebidas", + 8 => "Otro (Consumibles)" )), - 16 => array("Glyphs", array( - 1 => "Warrior Glyphs", 2 => "Paladin Glyphs", 3 => "Hunter Glyphs", 4 => "Rogue Glyphs", 5 => "Priest Glyphs", 6 => "Death Knight Glyphs", - 7 => "Shaman Glyphs", 8 => "Mage Glyphs", 9 => "Warlock Glyphs", 11 => "Druid Glyphs" + 16 => array("Glifos", array( + 1 => "Glifos de guerrero", 2 => "Glifos de paladín", 3 => "Glifos de cazador", 4 => "Glifos de pícaro", 5 => "Glifos de sacerdote", 6 => "Glifos de caballero de la muerte", + 7 => "Glifos de chamán", 8 => "Glifos de mago", 9 => "Glifos de brujo", 11 => "Glifos de druida" )), - 7 => array("Trade Goods", array( - 14 => "Armor Enchantments", 5 => "Cloth", 3 => "Devices", 10 => "Elemental", 12 => "Enchanting", 2 => "Explosives", - 9 => "Herbs", 4 => "Jewelcrafting", 6 => "Leather", 13 => "Materials", 8 => "Meat", 7 => "Metal & Stone", - 1 => "Parts", 15 => "Weapon Enchantments", 11 => "Other (Trade Goods)" + 7 => array("Objetos comerciables", array( + 14 => "Encantamientos de armaduras", 5 => "Tela", 3 => "Instrumentos", 10 => "Elemental", 12 => "Encantamiento", 2 => "Explosivos", + 9 => "Hierbas", 4 => "Joyería", 6 => "Cuero", 13 => "Materiales", 8 => "Carne", 7 => "Metal y piedra", + 1 => "Piezas", 15 => "Encantamientos de armas",11 => "Otro (Objetos comerciables)" )), - 6 => ["Projectiles", [ 2 => "Arrows", 3 => "Bullets" ]], - 11 => ["Quivers", [ 2 => "Quivers", 3 => "Ammo Pouches"]], - 9 => array("Recipes", array( - 0 => "Books", 6 => "Alchemy Recipes", 4 => "Blacksmithing Plans", 5 => "Cooking Recipes", 8 => "Enchanting Formulae", 3 => "Engineering Schematics", - 7 => "First Aid Books", 9 => "Fishing Books", 11 => "Inscription Techniques", 10 => "Jewelcrafting Designs", 1 => "Leatherworking Patterns",12 => "Mining Guides", - 2 => "Tailoring Patterns" + 6 => ["Proyectiles", [ 2 => "Flechas", 3 => "Balas" ]], + 11 => ["Carcajs", [ 2 => "Carcajs", 3 => "Bolsas de munición"]], + 9 => array("Recetas", array( + 0 => "Libros", 6 => "Recetas de alquimia", 4 => "Diseños de herrería", 5 => "Recetas de cocina", 8 => "Fórmulas de encantamiento",3 => "Esquemas de ingeniería", + 7 => "Libros de primeros auxilios", 9 => "Libros de pesca", 11 => "Técnicas de Inscripción",10 => "Bocetos de joyería", 1 => "Patrones de peletería", 12 => "Guías de minería", + 2 => "Patrones de sastrería" )), - 3 => array("Gems", array( - 6 => "Meta Gems", 0 => "Red Gems", 1 => "Blue Gems", 2 => "Yellow Gems", 3 => "Purple Gems", 4 => "Green Gems", - 5 => "Orange Gems", 8 => "Prismatic Gems", 7 => "Simple Gems" + 3 => array("Gemas", array( + 6 => "Gemas meta", 0 => "Gemas rojas", 1 => "Gemas azules", 2 => "Gemas amarillas", 3 => "Gemas moradas", 4 => "Gemas verdes", + 5 => "Gemas naranjas", 8 => "Gemas centelleantes", 7 => "Gemas simples" )), - 15 => array("Miscellaneous", array( - -2 => "Armor Tokens", 3 => "Holiday", 0 => "Junk", 1 => "Reagents", 5 => "Mounts", -7 => "Flying Mounts", - 2 => "Small Pets", 4 => "Other (Miscellaneous)" + 15 => array("Miscelánea", array( + -2 => "Tokens de armadura", 3 => "Fiesta", 0 => "Chatarras", 1 => "Componentes", 5 => "Monturas", -7 => "Monturas voladoras", + 2 => "Compañeros", 4 => "Otro (Misceláneo)" )), - 10 => "Currency", - 12 => "Quest", - 13 => "Keys", + 10 => "Monedas", + 12 => "Misión", + 13 => "Llaves", ), 'statType' => array( "Aumenta tu maná %d p.", diff --git a/localization/locale_frfr.php b/localization/locale_frfr.php index bfdca2b9..04cf42eb 100644 --- a/localization/locale_frfr.php +++ b/localization/locale_frfr.php @@ -30,7 +30,7 @@ $lang = array( 'userProfiles' => "Vos personnages", // translate.google :x 'pageNotFound' => "Ce %s n'existe pas.", 'gender' => "Genre", - 'sex' => [null, 'Homme', 'Femme'], + 'sex' => [null, "Homme", "Femme"], 'players' => "Joueurs", 'quickFacts' => "En bref", 'screenshots' => "Captures d'écran", @@ -65,7 +65,7 @@ $lang = array( 'disabled' => "[Disabled]", 'disabledHint' => "[Cannot be attained or completed]", 'serverside' => "[Serverside]", - 'serversideHint' => "[These informations are not in the Client and have been provided by sniffing and/or guessing.]", + 'serversideHint'=> "[These informations are not in the Client and have been provided by sniffing and/or guessing.]", // red buttons 'links' => "Liens", @@ -74,6 +74,8 @@ $lang = array( 'findUpgrades' => "Trouver des améliorations...", // misc Tools + 'errPageTitle' => "Page non trouvée", + 'nfPageTitle' => "Erreur", 'subscribe' => "S'abonner", 'mostComments' => ["Hier", "Derniers %d jours"], 'utilities' => array( @@ -92,7 +94,7 @@ $lang = array( 'cappedHint' => 'Conseil: Enlever un facteur pour les statistiques au maximum tel que le score de touche.', 'groupBy' => "Groupé par", 'gb' => array( - ['Aucun', 'none'], ['Emplacement', 'slot'], ['Niveau', 'level'], ['Source', 'source'] + ["Aucun", "none"], ["Emplacement", "slot"], ["Niveau", "level"], ["Source", "source"] ), 'compareTool' => "Outil de comparaison d'objets", 'talentCalc' => "Calculateur de Talents", @@ -168,33 +170,35 @@ $lang = array( 'zone' => "zone", 'zones' => "Zones", + 'honorPoints' => "Points d'honneur", + 'arenaPoints' => "Points d'arène", 'heroClass' => "Classe de héros", 'resource' => "Ressource", 'resources' => "Ressources", 'role' => "Role", 'roles' => "Roles", 'specs' => "Specialisations", - '_roles' => ['Soigneur', 'DPS mêlée', 'DPS à distance', 'Tank'], + '_roles' => ["Soigneur", "DPS mêlée", "DPS à distance", "Tank"], - 'modes' => ['Standard / Normal 10', 'Héroïque / Normal 25', '10 héroïque', '25 héroïque'], - 'expansions' => array("Classique", "The Burning Crusade", "Wrath of the Lich King"), - 'stats' => array("Force", "Agilité", "Endurance", "Intelligence", "Esprit"), + 'modes' => ["Standard / Normal 10", "Héroïque / Normal 25", "10 héroïque", "25 héroïque"], + 'expansions' => ["Classique", "The Burning Crusade", "Wrath of the Lich King"], + 'stats' => ["Force", "Agilité", "Endurance", "Intelligence", "Esprit"], 'sources' => array( null, "Fabriqué", "Butin", "JcJ", "Quête", "Vendeur", "Maître", "Découverte", "Échange d'un code", "Talent", "Débutant", "Événement", "Haut fait" ), 'languages' => array( - 1 => "Orc", 2 => "Darnassien", 3 => "Taurahe", 6 => "Nain", 7 => "Commun", 8 => "Démoniaque", 9 => "Titan", 10 => "Thalassien", + 1 => "Orc", 2 => "Darnassien", 3 => "Taurahe", 6 => "Nain", 7 => "Commun", 8 => "Démoniaque", 9 => "Titan", 10 => "Thalassien", 11 => "Draconique", 12 => "Kalimag", 13 => "Gnome", 14 => "Troll", 33 => "Bas-parler", 35 => "Draeneï", 36 => "Zombie", 37 => "Binaire gnome", 38 => "Binaire gobelin" ), - 'gl' => array(null, "Majeur", "Mineur"), - 'si' => array(1 => "Alliance", -1 => "Alliance seulement", 2 => "Horde", -2 => "Horde seulement", 3 => "Les deux"), - 'resistances' => array(null, 'Résistance au Sacré', 'Résistance au Feu', 'Résistance à la Nature', 'Résistance au Givre', 'Résistance à l\'Ombre', 'Résistance aux Arcanes'), - 'dt' => array(null, "Magie", "Malédiction", "Maladie", "Poison", "Camouflage", "Invisibilité", null, null, "Enrager"), - 'sc' => array("Physique", "Sacré", "Feu", "Nature", "Givre", "Ombre", "Arcane"), - 'cl' => array(null, "Guerrier", "Paladin", "Chasseur", "Voleur", "Prêtre", "DeathChevalier de la mort", "Chaman", "Mage", "Démoniste", null, "Druide"), - 'ra' => array(-2 => "Horde", -1 => "Alliance", "Les deux", "Humain", "Orc", "Nain", "Elfe de la nuit", "Mort-vivant", "Tauren", "Gnome", "Troll", null, "Elfe de sang", "Draeneï"), - 'rep' => array("Détesté", "Hostile", "Inamical", "Neutre", "Amical", "Honoré", "Révéré", "Exalté"), + 'gl' => [null, "Majeur", "Mineur"], + 'si' => [1 => "Alliance", -1 => "Alliance seulement", 2 => "Horde", -2 => "Horde seulement", 3 => "Les deux"], + 'resistances' => [null, 'Résistance au Sacré', 'Résistance au Feu', 'Résistance à la Nature', 'Résistance au Givre', 'Résistance à l\'Ombre', 'Résistance aux Arcanes'], + 'dt' => [null, "Magie", "Malédiction", "Maladie", "Poison", "Camouflage", "Invisibilité", null, null, "Enrager"], + 'sc' => ["Physique", "Sacré", "Feu", "Nature", "Givre", "Ombre", "Arcane"], + 'cl' => [null, "Guerrier", "Paladin", "Chasseur", "Voleur", "Prêtre", "DeathChevalier de la mort", "Chaman", "Mage", "Démoniste", null, "Druide"], + 'ra' => [-2 => "Horde", -1 => "Alliance", "Les deux", "Humain", "Orc", "Nain", "Elfe de la nuit", "Mort-vivant", "Tauren", "Gnome", "Troll", null, "Elfe de sang", "Draeneï"], + 'rep' => ["Détesté", "Hostile", "Inamical", "Neutre", "Amical", "Honoré", "Révéré", "Exalté"], 'st' => array( "Défaut", "Forme de félin", "Arbre de vie", "Forme de voyage", "Aquatic Form", "Forme d'ours", null, null, "Forme d'ours redoutable", null, @@ -215,8 +219,8 @@ $lang = array( "Bestiole", "Mécanique", "Non spécifié", "Totem", "Familier pacifique", "Nuage de gaz" ), 'fa' => array( - 1 => "Loup", 2 => "Félin", 3 => "Araignée", 4 => "Ours", 5 => "Sanglier", 6 => "Crocilisque", 7 => "Charognard", 8 => "Crabe", - 9 => "Gorille", 11 => "Raptor", 12 => "Haut-trotteur", 20 => "Scorpide", 21 => "Tortue", 24 => "Chauve-souris", 25 => "Hyène", 26 => "Oiseau de proie", + 1 => "Loup", 2 => "Félin", 3 => "Araignée", 4 => "Ours", 5 => "Sanglier", 6 => "Crocilisque", 7 => "Charognard", 8 => "Crabe", + 9 => "Gorille", 11 => "Raptor", 12 => "Haut-trotteur", 20 => "Scorpide", 21 => "Tortue", 24 => "Chauve-souris", 25 => "Hyène", 26 => "Oiseau de proie", 27 => "Serpent des vents", 30 => "Faucon-dragon", 31 => "Ravageur", 32 => "Traqueur dim.", 33 => "Sporoptère", 34 => "Raie du Néant", 35 => "Serpent", 37 => "Phalène", 38 => "Chimère", 39 => "Diablosaure", 41 => "Silithide", 42 => "Ver", 43 => "Rhinocéros", 44 => "Guêpe", 45 => "Chien du Magma", 46 => "Esprit de bête" ), @@ -228,12 +232,6 @@ $lang = array( "Marshal / General", "Field Marshal / Warlord", "Grand Marshal / High Warlord" ), ), - 'error' => array( - 'errNotFound' => "Page not found", - 'errPage' => "What? How did you... nevermind that!\n
\n
\nIt appears that the page you have requested cannot be found. At least, not in this dimension.\n
\n
\nPerhaps a few tweaks to the [WH-799 Major Confabulation Engine] may result in the page suddenly making an appearance!\n
\n
\nOr, you can try \ncontacting us\n- the stability of the WH-799 is debatable, and we wouldn't want another accident...", - 'goStart' => "Return to the homepage", - 'goForum' => "Feedback forum", - ), 'account' => [], 'gameObject' => array( 'cat' => [0 => "Autre", 9 => "Livres", 3 => "Conteneurs", -5 => "Coffres", 25 => "Bancs de poissons", -3 => "Herbes", -4 => "Filons de minerai", -2 => "Quêtes", -6 => "Outils"], @@ -278,7 +276,7 @@ $lang = array( 'end' => "Fin", 'interval' => "Intervalle", 'inProgress' => "L'évènement est présentement en cours", - 'category' => array("Non classés", "Vacances", "Récurrent", "Joueur ctr. Joueur") + 'category' => ["Non classés", "Vacances", "Récurrent", "Joueur ctr. Joueur"] ), 'achievement' => array( 'criteria' => "Critères", @@ -286,7 +284,7 @@ $lang = array( 'series' => "Série", 'outOf' => "sur", 'criteriaType' => "Criterium Type-Id:", - 'itemReward' => "Vous recevrez :", + 'itemReward' => "Vous recevrez", 'titleReward' => "Vous devriez recevoir le titre \"%s\"", 'slain' => "tué", 'reqNumCrt' => "Nécessite" @@ -321,23 +319,75 @@ $lang = array( ) ), 'quest' => array( - 'questLevel' => 'Niveau %s', - 'daily' => 'Journalière', - 'requirements' => 'Conditions', + 'questLevel' => "Niveau %s", + 'requirements' => "Conditions", + 'reqMoney' => "Argent requis", + 'money' => "Argent", + 'additionalReq' => "Conditions additionnelles requises pour obtenir cette quête", + 'reqRepWith' => 'Votre reputation avec %s doît être %s %s', + 'reqRepMin' => "d'au moins", + 'reqRepMax' => "moins que", + 'progress' => "Progrès", + 'provided' => "Fourni", + 'providedItem' => "Objet fourni", + 'completion' => "Achèvement", + 'description' => "Description", + 'playerSlain' => "Joueurs tués", + 'profession' => "Métier", + 'timer' => "Temps", + 'loremaster' => "Maitre des traditions", + 'suggestedPl' => "Joueurs suggérés", + 'keepsPvpFlag' => "Vous garde en mode JvJ", + 'daily' => "Journalière", + 'weekly' => "Chaque semaine", + 'monthly' => "Mensuel", + 'sharable' => "Partageable", + 'notSharable' => "Non partageable", + 'repeatable' => "Répétable", + 'reqQ' => "Requiert", + 'reqQDesc' => "Pour avoir cette quête, vous devez avoir completé ces quêtes", + 'reqOneQ' => "Requiert", + 'reqOneQDesc' => "Pour avoir accès à cette quête vous devez accomplir une des quêtes suivantes", + 'opensQ' => "Donne accès aux quêtes", + 'opensQDesc' => "Terminer cette quête est requis pour commencer ces quetês", + 'closesQ' => "Empêche l'accès aux quêtes", + 'closesQDesc' => "Terminer cette quête ferme l'accès aux quêtes", + 'enablesQ' => "Autorise", + 'enablesQDesc' => "Quand cette quête est active, vous pouvez obtenir cette quete", + 'enabledByQ' => "Autorisée par", + 'enabledByQDesc'=> "Vous pouvez faire cette quête seulement quand cette quête est active", + 'gainsDesc' => "Lors de l'achèvement de cette quête vous gagnerez", + 'theTitle' => '"%s"', // empty on purpose! + 'mailDelivery' => "Vous recevrez cette lettre %s", + 'mailIn' => "après %s", + 'unavailable' => "Cette quête est marquée comme obsolète et ne peut être obtenue ou accomplie.", + 'experience' => "points d'expérience", + 'expConvert' => "(ou %s si completé au niveau %d)", + 'expConvert2' => "%s si completé au niveau %d", + 'chooseItems' => "Vous pourrez choisir une de ces récompenses", + 'receiveItems' => "Vous recevrez", + 'receiveAlso' => "Vous recevrez également", + 'spellCast' => "Vous allez être la cible du sort suivant", + 'spellLearn' => "Vous apprendrez", + 'bonusTalents' => "points de talent", + 'spellDisplayed'=> ' (%s affichés)', 'questInfo' => array( - 0 => 'Standard', 1 => 'Groupe', 21 => 'Vie', 41 => 'JcJ', 62 => 'Raid', 81 => 'Donjon', 82 => 'Évènement mondial', - 83 => 'Légendaire', 84 => 'Escorte', 85 => 'Héroïque', 88 => 'Raid (10)', 89 => 'Raid (25)' + 0 => "Standard", 1 => "Groupe", 21 => "Vie", 41 => "JcJ", 62 => "Raid", 81 => "Donjon", 82 => "Évènement mondial", + 83 => "Légendaire", 84 => "Escorte", 85 => "Héroïque", 88 => "Raid (10)", 89 => "Raid (25)" + ), + 'cat' => array( + // todo: after zones ) ), 'title' => array( 'cat' => array( - 'Général', 'Joueur ctr. Joueur', 'Réputation', 'Donjons & raids', 'Quêtes', 'Métiers', 'Évènements mondiaux' + "Général", "Joueur ctr. Joueur", "Réputation", "Donjons & raids", "Quêtes", "Métiers", "Évènements mondiaux" ) ), 'skill' => array( 'cat' => array( - -6 => 'Compagnons', -5 => 'Montures', -4 => 'Traits raciaux', 5 => 'Caractéristiques', 6 => "Compétences d'armes", 7 => 'Compétences de classe', 8 => 'Armures utilisables', - 9 => 'Compétences secondaires', 10 => 'Langues', 11 => 'Métiers' + -6 => "Compagnons", -5 => "Montures", -4 => "Traits raciaux", 5 => "Caractéristiques", 6 => "Compétences d'armes", 7 => "Compétences de classe", 8 => "Armures utilisables", + 9 => "Compétences secondaires", 10 => "Langues", 11 => "Métiers" ) ), 'currency' => array( @@ -447,7 +497,7 @@ $lang = array( 'cat' => array( 7 => "Techniques", -13 => "Glyphes", - -11 => array("Compétences", 8 => "Armure", 10 => "Langues", 6 => "Armes"), + -11 => ["Compétences", 8 => "Armure", 10 => "Langues", 6 => "Armes"], -4 => "Traits raciaux", -2 => "Talents", -6 => "Compagnons", @@ -460,22 +510,22 @@ $lang = array( 768 => "Serpent", 656 => "Serpent des vents", 783 => "Silithide", 765 => "Sporoptère", 251 => "Tortue", 766 => "Traqueur dim.", 784 => "Ver", 761 => "Gangregarde", 189 => "Chasseur corrompu", 188 => "Diablotin", 205 => "Succube", 204 => "Marcheur du Vide" ), - -7 => array("Talents de familiers", 411 => "Ruse", 410 => "Férocité", 409 => "Tenacité"), + -7 => ["Talents de familiers", 411 => "Ruse", 410 => "Férocité", 409 => "Tenacité"], 11 => array( "Métiers", 171 => "Alchimie", - 164 => array("Forge", 9788 => "Fabricant d'armures", 9787 => "Fabricant d'armes", 17041 => "Maître fabricant de haches", 17040 => "Maître fabricant de marteaux", 17039 => "Maître fabricant d'épées"), + 164 => ["Forge", 9788 => "Fabricant d'armures", 9787 => "Fabricant d'armes", 17041 => "Maître fabricant de haches", 17040 => "Maître fabricant de marteaux", 17039 => "Maître fabricant d'épées"], 333 => "Enchantement", - 202 => array("Ingénierie", 20219 => "Ingénieur gnome", 20222 => "Ingénieur goblin"), + 202 => ["Ingénierie", 20219 => "Ingénieur gnome", 20222 => "Ingénieur goblin"], 182 => "Herboristerie", 773 => "Calligraphie", 755 => "Joaillerie", - 165 => array("Travail du cuir", 10656 => "Travail du cuir d'écailles de dragon", 10658 => "Travail du cuir élémentaire", 10660 => "Travail du cuir tribal"), + 165 => ["Travail du cuir", 10656 => "Travail du cuir d'écailles de dragon", 10658 => "Travail du cuir élémentaire", 10660 => "Travail du cuir tribal"], 186 => "Minage", 393 => "Dépeçage", - 197 => array("Couture", 26798 => "Couture d'étoffe lunaire", 26801 => "Couture de tisse-ombre", 26797 => "Couture du feu-sorcier"), + 197 => ["Couture", 26798 => "Couture d'étoffe lunaire", 26801 => "Couture de tisse-ombre", 26797 => "Couture du feu-sorcier"], ), - 9 => array("Compétences secondaires", 185 => "Cuisine", 129 => "Secourisme", 356 => "Pêche", 762 => "Monte"), + 9 => ["Compétences secondaires", 185 => "Cuisine", 129 => "Secourisme", 356 => "Pêche", 762 => "Monte"], -9 => "Habilité de MJ", -8 => "Habilité de PNJ", 0 => "Non classés" @@ -492,27 +542,27 @@ $lang = array( 20 => "Cannes à pêche", 14 => "Divers" ), 'subClassMasks' => array( - 0x02A5F3 => 'Arme de mêlée', 0x0060 => 'Bouclier', 0x04000C => 'Arme à distance', 0xA091 => 'Arme de mêlée à une main' + 0x02A5F3 => "Arme de mêlée", 0x0060 => "Bouclier", 0x04000C => "Arme à distance", 0xA091 => "Arme de mêlée à une main" ), 'traitShort' => array( 'atkpwr' => "PA", 'rgdatkpwr' => "PAD", 'splpwr' => "PS", 'arcsplpwr' => "PArc", 'firsplpwr' => "PFeu", 'frosplpwr' => "PGiv", 'holsplpwr' => "PSac", 'natsplpwr' => "PNat", 'shasplpwr' => "POmb", 'splheal' => "Soins" ), 'spellModOp' => array( - 'DAMAGE', 'DURATION', 'THREAT', 'EFFECT1', 'CHARGES', - 'RANGE', 'RADIUS', 'CRITICAL_CHANCE', 'ALL_EFFECTS', 'NOT_LOSE_CASTING_TIME', - 'CASTING_TIME', 'COOLDOWN', 'EFFECT2', 'IGNORE_ARMOR', 'COST', - 'CRIT_DAMAGE_BONUS', 'RESIST_MISS_CHANCE', 'JUMP_TARGETS', 'CHANCE_OF_SUCCESS', 'ACTIVATION_TIME', - 'DAMAGE_MULTIPLIER', 'GLOBAL_COOLDOWN', 'DOT', 'EFFECT3', 'BONUS_MULTIPLIER', - null, 'PROC_PER_MINUTE', 'VALUE_MULTIPLIER', 'RESIST_DISPEL_CHANCE', 'CRIT_DAMAGE_BONUS_2', - 'SPELL_COST_REFUND_ON_FAIL' + "DAMAGE", "DURATION", "THREAT", "EFFECT1", "CHARGES", + "RANGE", "RADIUS", "CRITICAL_CHANCE", "ALL_EFFECTS", "NOT_LOSE_CASTING_TIME", + "CASTING_TIME", "COOLDOWN", "EFFECT2", "IGNORE_ARMOR", "COST", + "CRIT_DAMAGE_BONUS", "RESIST_MISS_CHANCE", "JUMP_TARGETS", "CHANCE_OF_SUCCESS", "ACTIVATION_TIME", + "DAMAGE_MULTIPLIER", "GLOBAL_COOLDOWN", "DOT", "EFFECT3", "BONUS_MULTIPLIER", + null, "PROC_PER_MINUTE", "VALUE_MULTIPLIER", "RESIST_DISPEL_CHANCE", "CRIT_DAMAGE_BONUS_2", + "SPELL_COST_REFUND_ON_FAIL" ), 'combatRating' => array( - 'WEAPON_SKILL', 'DEFENSE_SKILL', 'DODGE', 'PARRY', 'BLOCK', - 'HIT_MELEE', 'HIT_RANGED', 'HIT_SPELL', 'CRIT_MELEE', 'CRIT_RANGED', - 'CRIT_SPELL', 'HIT_TAKEN_MELEE', 'HIT_TAKEN_RANGED', 'HIT_TAKEN_SPELL', 'CRIT_TAKEN_MELEE', - 'CRIT_TAKEN_RANGED', 'CRIT_TAKEN_SPELL', 'HASTE_MELEE', 'HASTE_RANGED', 'HASTE_SPELL', - 'WEAPON_SKILL_MAINHAND', 'WEAPON_SKILL_OFFHAND', 'WEAPON_SKILL_RANGED', 'EXPERTISE', 'ARMOR_PENETRATION' + "WEAPON_SKILL", "DEFENSE_SKILL", "DODGE", "PARRY", "BLOCK", + "HIT_MELEE", "HIT_RANGED", "HIT_SPELL", "CRIT_MELEE", "CRIT_RANGED", + "CRIT_SPELL", "HIT_TAKEN_MELEE", "HIT_TAKEN_RANGED", "HIT_TAKEN_SPELL", "CRIT_TAKEN_MELEE", + "CRIT_TAKEN_RANGED", "CRIT_TAKEN_SPELL", "HASTE_MELEE", "HASTE_RANGED", "HASTE_SPELL", + "WEAPON_SKILL_MAINHAND", "WEAPON_SKILL_OFFHAND", "WEAPON_SKILL_RANGED", "EXPERTISE", "ARMOR_PENETRATION" ), 'lockType' => array( null, "Crochetage", "Herboristerie", "Minage", "Désarmement de piège", @@ -521,8 +571,8 @@ $lang = array( "Gahz'ridienne (DND)", "Explosif", "Ouverture JcJ", "Fermeture JcJ", "Pêche", "Calligraphie", "Ouverture à partir d'un véhicule", ), - 'stealthType' => ['GENERAL', 'TRAP'], - 'invisibilityType' => ['GENERAL', 3 => 'TRAP', 6 => 'DRUNK'] + 'stealthType' => ["GENERAL", "TRAP"], + 'invisibilityType' => ["GENERAL", 3 => "TRAP", 6 => "DRUNK"] ), 'item' => array( 'armor' => "Armure : %s", @@ -630,49 +680,49 @@ $lang = array( null, null, "Flèche", "Balle", null ), 'elixirType' => [null, "De bataille", "De gardien"], -'cat' => array( - 2 => "Weapons", // self::$spell['weaponSubClass'] - 4 => array("Armor", array( - 1 => "Cloth Armor", 2 => "Leather Armor", 3 => "Mail Armor", 4 => "Plate Armor", 6 => "Shields", 7 => "Librams", - 8 => "Idols", 9 => "Totems", 10 => "Sigils", -6 => "Cloaks", -5 => "Off-hand Frills", -8 => "Shirts", - -7 => "Tabards", -3 => "Amulets", -2 => "Rings", -4 => "Trinkets", 0 => "Miscellaneous (Armor)", + 'cat' => array( + 2 => "Armes", // self::$spell['weaponSubClass'] + 4 => array("Armure", array( + 1 => "Armures en tissu", 2 => "Armures en cuir", 3 => "Armures en mailles", 4 => "Armures en plaques", 6 => "Boucliers", 7 => "Librams", + 8 => "Idoles", 9 => "Totems", 10 => "Cachets", -6 => "Capes", -5 => "Accessoires pour main gauche", -8 => "Chemises", + -7 => "Tabards", -3 => "Amulettes", -2 => "Anneaux", -4 => "Bijoux", 0 => "Divers (Armure)", )), - 1 => array("Containers", array( - 0 => "Bags", 3 => "Enchanting Bags", 4 => "Engineering Bags", 5 => "Gem Bags", 2 => "Herb Bags", 8 => "Inscription Bags", - 7 => "Leatherworking Bags", 6 => "Mining Bags", 1 => "Soul Bags" + 1 => array("Conteneurs", array( + 0 => "Sacs", 3 => "Sacs d'enchanteur", 4 => "Sacs d'ingénieur", 5 => "Sacs de gemmes", 2 => "Sacs d'herbes", 8 => "Sacs de calligraphie", + 7 => "Sacs de travailleur du cuir", 6 => "Sacs de mineur", 1 => "Sacs d'âmes" )), - 0 => array("Consumables", array( - -3 => "Item Enhancements (Temporary)", 6 => "Item Enhancements (Permanent)", 2 => ["Elixirs", [1 => "Battle Elixirs", 2 => "Guardian Elixirs"]], - 1 => "Potions", 4 => "Scrolls", 7 => "Bandages", 0 => "Consumables", 3 => "Flasks", 5 => "Food & Drinks", - 8 => "Other (Consumables)" + 0 => array("Consommables", array( + -3 => "Améliorations d'objet temporaires", 6 => "Améliorations d'objet permanentes", 2 => ["Élixirs", [1 => "Élixirs de bataille", 2 => "Élixirs du gardien"]], + 1 => "Potions", 4 => "Parchemins", 7 => "Bandages", 0 => "Consommables", 3 => "Flacons", 5 => "Nourriture et boissons", + 8 => "Autre (Consommables)" )), - 16 => array("Glyphs", array( - 1 => "Warrior Glyphs", 2 => "Paladin Glyphs", 3 => "Hunter Glyphs", 4 => "Rogue Glyphs", 5 => "Priest Glyphs", 6 => "Death Knight Glyphs", - 7 => "Shaman Glyphs", 8 => "Mage Glyphs", 9 => "Warlock Glyphs", 11 => "Druid Glyphs" + 16 => array("Glyphes", array( + 7 => "Glyphes de chaman", 3 => "Glyphes de chasseur", 6 => "Glyphes de chevalier de la mort", 9 => "Glyphes de démoniste", 11 => "Glyphes de druide", + 1 => "Glyphes de guerrier", 8 => "Glyphes de mage", 2 => "Glyphes de paladin", 5 => "Glyphes de prêtre", 4 => "Glyphes de voleur" )), - 7 => array("Trade Goods", array( - 14 => "Armor Enchantments", 5 => "Cloth", 3 => "Devices", 10 => "Elemental", 12 => "Enchanting", 2 => "Explosives", - 9 => "Herbs", 4 => "Jewelcrafting", 6 => "Leather", 13 => "Materials", 8 => "Meat", 7 => "Metal & Stone", - 1 => "Parts", 15 => "Weapon Enchantments", 11 => "Other (Trade Goods)" + 7 => array("Artisanat", array( + 14 => "Enchantements d'armure", 5 => "Tissu", 3 => "Appareils", 10 => "Élémentaire", 12 => "Enchantement", 2 => "Explosifs", + 9 => "Herbes", 4 => "Joaillerie", 6 => "Cuir", 13 => "Matériaux", 8 => "Viande", 7 => "Métal et pierre", + 1 => "Éléments", 15 => "Enchantements d'arme", 11 => "Autre (Artisanat)" )), - 6 => ["Projectiles", [ 2 => "Arrows", 3 => "Bullets" ]], - 11 => ["Quivers", [ 2 => "Quivers", 3 => "Ammo Pouches"]], - 9 => array("Recipes", array( - 0 => "Books", 6 => "Alchemy Recipes", 4 => "Blacksmithing Plans", 5 => "Cooking Recipes", 8 => "Enchanting Formulae", 3 => "Engineering Schematics", - 7 => "First Aid Books", 9 => "Fishing Books", 11 => "Inscription Techniques", 10 => "Jewelcrafting Designs", 1 => "Leatherworking Patterns",12 => "Mining Guides", - 2 => "Tailoring Patterns" + 6 => ["Projectiles", [ 2 => "Flèches", 3 => "Balles" ]], + 11 => ["Carquois", [ 2 => "Carquois", 3 => "Gibernes"]], + 9 => array("Recettes", array( + 0 => "Livres", 6 => "Recettes d'alchimie", 4 => "Plans de forge", 5 => "Recettes de cuisine", 8 => "Formules d'enchantement", 3 => "Schémas d'ingénierie", + 7 => "Livres de premiers soins", 9 => "Livres de pêche", 11 => "Techniques de calligraphie",10 => "Dessins de joaillerie",1 => "Patrons de travail du cuir",12 => "Guides de Minage", + 2 => "Patrons de couture" )), - 3 => array("Gems", array( - 6 => "Meta Gems", 0 => "Red Gems", 1 => "Blue Gems", 2 => "Yellow Gems", 3 => "Purple Gems", 4 => "Green Gems", - 5 => "Orange Gems", 8 => "Prismatic Gems", 7 => "Simple Gems" + 3 => array("Gemmes", array( + 6 => "Méta-gemmes", 0 => "Gemmes rouges", 1 => "Gemmes bleues", 2 => "Gemmes jaunes", 3 => "Gemmes violettes", 4 => "Gemmes vertes", + 5 => "Gemmes oranges", 8 => "Gemmes prismatiques", 7 => "Gemmes simples" )), - 15 => array("Miscellaneous", array( - -2 => "Armor Tokens", 3 => "Holiday", 0 => "Junk", 1 => "Reagents", 5 => "Mounts", -7 => "Flying Mounts", - 2 => "Small Pets", 4 => "Other (Miscellaneous)" + 15 => array("Divers", array( + -2 => "Marques d'armure", 3 => "Évènement", 0 => "Camelote", 1 => "Composants", 5 => "Montures", -7 => "Montures volantes", + 2 => "Compagnons", 4 => "Autre (Divers)" )), - 10 => "Currency", - 12 => "Quest", - 13 => "Keys", + 10 => "Monnaies", + 12 => "Quête", + 13 => "Clés", ), 'statType' => array( "Augmente vos points de mana de %d.", diff --git a/localization/locale_ruru.php b/localization/locale_ruru.php index d2e7283c..f0882d48 100644 --- a/localization/locale_ruru.php +++ b/localization/locale_ruru.php @@ -26,11 +26,11 @@ $lang = array( 'feedback' => "Отзыв", 'numSQL' => "Количество MySQL запросов", 'timeSQL' => "Время выполнения MySQL запросов", - 'noJScript' => "Данный сайт активно использует технологию JavaScript.
Пожалуйста, Включите JavaScript в вашем браузере.", + 'noJScript' => 'Данный сайт активно использует технологию JavaScript.
Пожалуйста, Включите JavaScript в вашем браузере.', 'userProfiles' => "Ваши персонажи", // translate.google :x 'pageNotFound' => "Такое %s не существует.", 'gender' => "Пол", - 'sex' => [null, 'Мужчина', 'Женщина'], + 'sex' => [null, "Мужчина", "Женщина"], 'players' => "Игрокам", 'quickFacts' => "Краткая информация", 'screenshots' => "Изображения", @@ -55,7 +55,7 @@ $lang = array( 'oneFilter' => "Любое совпадение", 'applyFilter' => "Применить фильтр", 'resetForm' => "Очистить форму", - 'refineSearch' => "Совет: Уточните поиск, добавив подкатегорию.", + 'refineSearch' => 'Совет: Уточните поиск, добавив подкатегорию.', 'clear' => "Очистить", 'exactMatch' => "Полное совпадение", '_reqLevel' => "Требуется уровень", @@ -74,6 +74,8 @@ $lang = array( 'findUpgrades' => "Найти лучше...", // misc Tools + 'errPageTitle' => "Страница не найдена", + 'nfPageTitle' => "Ошибка", 'subscribe' => "Подписаться", 'mostComments' => ["Вчера", "Последние %d дней"], 'utilities' => array( @@ -92,7 +94,7 @@ $lang = array( 'cappedHint' => 'Подсказка: Удалите характеристики с капом (например, меткость).', 'groupBy' => "Группировать", 'gb' => array( - ['Нет', 'none'], ['Слот', 'slot'], ['Уровень', 'level'], ['Источник', 'source'] + ['Нет", "none'], ['Слот", "slot'], ['Уровень", "level'], ['Источник", "source'] ), 'compareTool' => "Инструмент сравнения предметов", 'talentCalc' => "Расчёт талантов", @@ -168,15 +170,17 @@ $lang = array( 'zone' => "игровая зона", 'zones' => "Местности", + 'honorPoints' => "Очки Чести", + 'arenaPoints' => "Очки арены", 'heroClass' => "Героический класс", 'resource' => "Ресурс", 'resources' => "Ресурсы", 'role' => "Роль", 'roles' => "Роли", 'specs' => "Ветки талантов", - '_roles' => ['Лекарь', 'Боец ближнего боя', 'Боец дальнего боя', 'Танк'], + '_roles' => ["Лекарь", "Боец ближнего боя", "Боец дальнего боя", "Танк"], - 'modes' => ['Обычный / 10-норм.', 'Героический / 25-норм.', '10-героич', '25-героич'], + 'modes' => ['Обычный / 10-норм.", "Героический / 25-норм.", "10-героич", "25-героич'], 'expansions' => array("World of Warcraft", "The Burning Crusade", "Wrath of the Lich King"), 'stats' => array("к силе", "к ловкости", "к выносливости", "к интеллекту", "к духу"), 'sources' => array( @@ -189,8 +193,8 @@ $lang = array( ), 'gl' => array(null, "Большой", "Малый"), 'si' => array(1 => "Альянс", -1 => "Альянс только", 2 => "Орда", -2 => "Орда только", null, 3 => "Обе"), - 'resistances' => array(null, 'Сопротивление светлой магии', 'Сопротивление огню', 'Сопротивление силам природы', 'Сопротивление магии льда', 'Сопротивление темной магии', 'Сопротивление тайной магии'), - 'dt' => array(null, 'Магия', 'Проклятие', 'Болезнь', 'Яд', 'Незаметность', 'Невидимость', null, null, 'Исступление'), + 'resistances' => array(null, "Сопротивление светлой магии", "Сопротивление огню", "Сопротивление силам природы", "Сопротивление магии льда", "Сопротивление темной магии", "Сопротивление тайной магии"), + 'dt' => array(null, "Магия", "Проклятие", "Болезнь", "Яд", "Незаметность", "Невидимость", null, null, "Исступление"), 'sc' => array("Физический урон", "Свет", "Огонь", "природа", "Лед", "Тьма", "Тайная магия"), 'cl' => array(null, "Воин", "Паладин", "Охотник", "Разбойник", "Жрец", "Рыцарь смерти", "Шаман", "Маг", "Чернокнижник", null, "Друид"), 'ra' => array(-2 => "Орда", -1 => "Альянс", "Обе", "Человек", "Орк", "Дворф", "Ночной эльф", "Нежить", "Таурен", "Гном", "Тролль", null, "Эльф крови", "Дреней"), @@ -228,12 +232,6 @@ $lang = array( "Marshal / General", "Field Marshal / Warlord", "Grand Marshal / High Warlord" ), ), - 'error' => array( - 'errNotFound' => "Page not found", - 'errPage' => "What? How did you... nevermind that!\n
\n
\nIt appears that the page you have requested cannot be found. At least, not in this dimension.\n
\n
\nPerhaps a few tweaks to the [WH-799 Major Confabulation Engine] may result in the page suddenly making an appearance!\n
\n
\nOr, you can try \ncontacting us\n- the stability of the WH-799 is debatable, and we wouldn't want another accident...", - 'goStart' => "Return to the homepage", - 'goForum' => "Feedback forum", - ), 'account' => [], 'gameObject' => array( 'cat' => [0 => "Другое", 9 => "Книги", 3 => "Контейнеры", -5 => "Сундуки", 25 => "[Fishing Pools]", -3 => "Травы", -4 => "Полезные ископаемые", -2 => "Задания", -6 => "Инструменты"], @@ -286,8 +284,8 @@ $lang = array( 'series' => "Серии", 'outOf' => "из", 'criteriaType' => "[Criterium Type-Id]:", - 'itemReward' => "Вы получите:", - 'titleReward' => "Наградное звание: \"%s\"", + 'itemReward' => "Вы получите", + 'titleReward' => 'Наградное звание: "%s"', 'slain' => "убито", 'reqNumCrt' => "Требуется" ), @@ -321,23 +319,75 @@ $lang = array( ) ), 'quest' => array( - 'questLevel' => '%s-го уровня', - 'daily' => 'Ежедневно', - 'requirements' => 'Требования', + 'questLevel' => "%s-го уровня", + 'requirements' => "Требования", + 'reqMoney' => "Требуется денег", + 'money' => "Деньги", + 'additionalReq' => "Дополнительные условия для получения данного задания", + 'reqRepWith' => 'Ваша репутация с %s должна быть %s %s', + 'reqRepMin' => "не менее", + 'reqRepMax' => "меньше чем", + 'progress' => "Прогресс", + 'provided' => "Прилагается", + 'providedItem' => "Прилагается предмет", + 'completion' => "Завершение", + 'description' => "Описание", + 'playerSlain' => "Убито игроков", + 'profession' => "Профессия", + 'timer' => "Таймер", + 'loremaster' => "Хранитель мудрости", + 'suggestedPl' => "Рекомендуемое количество игроков", + 'keepsPvpFlag' => "Включает доступность PvP", + 'daily' => "Ежедневно", + 'weekly' => "Раз в неделю", + 'monthly' => "Ежемесячно", + 'sharable' => "Раздается", + 'notSharable' => "Не раздается", + 'repeatable' => "Повторяемый", + 'reqQ' => "Требует", + 'reqQDesc' => "Чтобы получить это задание, вы должны завершить все указанные задания", + 'reqOneQ' => "Требуется Один из", + 'reqOneQDesc' => "Чтобы получить это задание, необходимо выполнить одно из следующих заданий", + 'opensQ' => "Открывает доступ к заданиям", + 'opensQDesc' => "Выполнение этого задания требует, чтобы эти задания", + 'closesQ' => "Заканчивает задание", + 'closesQDesc' => "Завершив этот квест, вы не сможете выполнять эти квесты", + 'enablesQ' => "Позволяет", + 'enablesQDesc' => "Кода это задание активно, вы сможете выполнять эти задания", + 'enabledByQ' => "Включена по", + 'enabledByQDesc'=> "Вы можете получить это задание, только когда эти задания доступны", + 'gainsDesc' => "По завершении этого задания, вы получите", + 'theTitle' => '"%s"', // empty on purpose! + 'mailDelivery' => "[Вы получите это письмо %s]", + 'mailIn' => "[через %s]", + 'unavailable' => "пометили это задание как устаревшее — его нельзя получить или выполнить.", + 'experience' => "опыта", + 'expConvert' => "(или %s на %d-м уровне)", + 'expConvert2' => "%s на %d-м уровне", + 'chooseItems' => "Вам дадут возможность выбрать одну из следующих наград", + 'receiveItems' => "Вы получите", + 'receiveAlso' => "Вы также получите", + 'spellCast' => "Следующее заклинание будет наложено на вас", + 'spellLearn' => "Вы изучите", + 'bonusTalents' => "очков талантов", + 'spellDisplayed'=> ' (показано: %s)', 'questInfo' => array( - 0 => 'Обычный', 1 => 'Группа', 21 => 'Жизнь', 41 => 'PvP', 62 => 'Рейд', 81 => 'Подземелье', 82 => 'Игровое событие', - 83 => 'Легенда', 84 => 'Сопровождение', 85 => 'Героическое', 88 => 'Рейд (10)', 89 => 'Рейд (25)' + 0 => "Обычный", 1 => "Группа", 21 => "Жизнь", 41 => "PvP", 62 => "Рейд", 81 => "Подземелье", 82 => "Игровое событие", + 83 => "Легенда", 84 => "Сопровождение", 85 => "Героическое", 88 => "Рейд (10)", 89 => "Рейд (25)" + ), + 'cat' => array( + // todo: after zones ) ), 'title' => array( 'cat' => array( - 'Общее', 'PvP', 'Репутация', 'Подземелья и рейды', 'Задания', 'Профессии', 'Игровые события' + 'Общее", "PvP", "Репутация", "Подземелья и рейды", "Задания", "Профессии", "Игровые события' ) ), 'skill' => array( 'cat' => array( - -6 => 'Спутники', -5 => 'Транспорт', -4 => 'Классовые навыки', 5 => 'Характеристики', 6 => 'Оружейные навыки', 7 => 'Классовые навыки', 8 => 'Доспехи', - 9 => 'Вторичные навыки', 10 => 'Языки', 11 => 'Профессии' + -6 => "Спутники", -5 => "Транспорт", -4 => "Классовые навыки", 5 => "Характеристики", 6 => "Оружейные навыки", 7 => "Классовые навыки", 8 => "Доспехи", + 9 => "Вторичные навыки", 10 => "Языки", 11 => "Профессии" ) ), 'currency' => array( @@ -441,8 +491,8 @@ $lang = array( 'relItems' => array ( 'base' => "Показать %s, относящиеся к профессии %s", 'link' => " или ", - 'recipes' => "рецепты", - 'crafted' => "производимые предметы" + 'recipes' => 'рецепты', + 'crafted' => 'производимые предметы' ), 'cat' => array( 7 => "Способности", @@ -492,27 +542,27 @@ $lang = array( 20 => "Удочки", 14 => "Разное" ), 'subClassMasks' => array( - 0x02A5F3 => 'Оружие ближнего боя', 0x0060 => 'Щит', 0x04000C => 'Оружие дальнего боя', 0xA091 => 'Одноручное оружие ближнего боя' + 0x02A5F3 => "Оружие ближнего боя", 0x0060 => "Щит", 0x04000C => "Оружие дальнего боя", 0xA091 => "Одноручное оружие ближнего боя" ), 'traitShort' => array( 'atkpwr' => "СА", 'rgdatkpwr' => "Сил", 'splpwr' => "СЗ", 'arcsplpwr' => "Урон", 'firsplpwr' => "Урон", 'frosplpwr' => "Урон", 'holsplpwr' => "Урон", 'natsplpwr' => "Урон", 'shasplpwr' => "Урон", 'splheal' => "Исцеление" ), 'spellModOp' => array( - 'DAMAGE', 'DURATION', 'THREAT', 'EFFECT1', 'CHARGES', - 'RANGE', 'RADIUS', 'CRITICAL_CHANCE', 'ALL_EFFECTS', 'NOT_LOSE_CASTING_TIME', - 'CASTING_TIME', 'COOLDOWN', 'EFFECT2', 'IGNORE_ARMOR', 'COST', - 'CRIT_DAMAGE_BONUS', 'RESIST_MISS_CHANCE', 'JUMP_TARGETS', 'CHANCE_OF_SUCCESS', 'ACTIVATION_TIME', - 'DAMAGE_MULTIPLIER', 'GLOBAL_COOLDOWN', 'DOT', 'EFFECT3', 'BONUS_MULTIPLIER', - null, 'PROC_PER_MINUTE', 'VALUE_MULTIPLIER', 'RESIST_DISPEL_CHANCE', 'CRIT_DAMAGE_BONUS_2', - 'SPELL_COST_REFUND_ON_FAIL' + "DAMAGE", "DURATION", "THREAT", "EFFECT1", "CHARGES", + "RANGE", "RADIUS", "CRITICAL_CHANCE", "ALL_EFFECTS", "NOT_LOSE_CASTING_TIME", + "CASTING_TIME", "COOLDOWN", "EFFECT2", "IGNORE_ARMOR", "COST", + "CRIT_DAMAGE_BONUS", "RESIST_MISS_CHANCE", "JUMP_TARGETS", "CHANCE_OF_SUCCESS", "ACTIVATION_TIME", + "DAMAGE_MULTIPLIER", "GLOBAL_COOLDOWN", "DOT", "EFFECT3", "BONUS_MULTIPLIER", + null, "PROC_PER_MINUTE", "VALUE_MULTIPLIER", "RESIST_DISPEL_CHANCE", "CRIT_DAMAGE_BONUS_2", + "SPELL_COST_REFUND_ON_FAIL" ), 'combatRating' => array( - 'WEAPON_SKILL', 'DEFENSE_SKILL', 'DODGE', 'PARRY', 'BLOCK', - 'HIT_MELEE', 'HIT_RANGED', 'HIT_SPELL', 'CRIT_MELEE', 'CRIT_RANGED', - 'CRIT_SPELL', 'HIT_TAKEN_MELEE', 'HIT_TAKEN_RANGED', 'HIT_TAKEN_SPELL', 'CRIT_TAKEN_MELEE', - 'CRIT_TAKEN_RANGED', 'CRIT_TAKEN_SPELL', 'HASTE_MELEE', 'HASTE_RANGED', 'HASTE_SPELL', - 'WEAPON_SKILL_MAINHAND', 'WEAPON_SKILL_OFFHAND', 'WEAPON_SKILL_RANGED', 'EXPERTISE', 'ARMOR_PENETRATION' + "WEAPON_SKILL", "DEFENSE_SKILL", "DODGE", "PARRY", "BLOCK", + "HIT_MELEE", "HIT_RANGED", "HIT_SPELL", "CRIT_MELEE", "CRIT_RANGED", + "CRIT_SPELL", "HIT_TAKEN_MELEE", "HIT_TAKEN_RANGED", "HIT_TAKEN_SPELL", "CRIT_TAKEN_MELEE", + "CRIT_TAKEN_RANGED", "CRIT_TAKEN_SPELL", "HASTE_MELEE", "HASTE_RANGED", "HASTE_SPELL", + "WEAPON_SKILL_MAINHAND", "WEAPON_SKILL_OFFHAND", "WEAPON_SKILL_RANGED", "EXPERTISE", "ARMOR_PENETRATION" ), 'lockType' => array( null, "Взлом замков", "Травничество", "Горное дело", "Обезвреживание ловушки", @@ -521,8 +571,8 @@ $lang = array( "Газ'рилльское украшение", "Взрыв", "Медленное открытие (PvP)", "Медленное закрытие (PvP)", "Рыбная ловля (DND)", "Начертание", "Открыть на ходу" ), - 'stealthType' => ['GENERAL', 'TRAP'], - 'invisibilityType' => ['GENERAL', 3 => 'TRAP', 6 => 'DRUNK'] + 'stealthType' => ["GENERAL", "TRAP"], + 'invisibilityType' => ["GENERAL", 3 => "TRAP", 6 => "DRUNK"] ), 'item' => array( 'armor' => "Броня: %s", @@ -563,7 +613,7 @@ $lang = array( 'worth' => "Деньги", 'consumable' => "Расходуется", 'nonConsumable' => "Не расходуется", - 'accountWide' => "[Account-wide]", // 22.10. hm, check with 'source' later + 'accountWide' => "Привязано к учетной записи", 'millable' => "Можно растолочь", 'noEquipCD' => "Нет отката при надевании", 'prospectable' => "Просеиваемое", @@ -640,7 +690,6 @@ $lang = array( 1 => array("Контейнеры", array( 0 => "Сумки", 1 => "Сумки душ", 3 => "Сумки зачаровывателя", 4 => "Сумки инженера", 7 => "Сумки кожевника", 8 => "Сумки начертателя", 2 => "Сумки травника", 6 => "Сумки шахтера", 5 => "Сумки ювелира", - )), 0 => array("Расходуемые", array( 7 => "Бинты", 5 => "Еда и напитки", 1 => "Зелья", 0 => "Расходуемые", 4 => "Свитки", -3 => "Улучшения (временные)", @@ -724,7 +773,7 @@ $lang = array( "Unknown Bonus #%d (%d)", ) ), - 'colon' => ': ', + 'colon' => ": ", 'dateFmtShort' => "Y-m-d", 'dateFmtLong' => "Y-m-d в H:i" ); diff --git a/pages/achievement.php b/pages/achievement.php index 8c7e0bd9..bac8a9f6 100644 --- a/pages/achievement.php +++ b/pages/achievement.php @@ -69,7 +69,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) array_unshift($path, 0, 9); - $acv->addGlobalsToJscript($smarty, GLOBALINFO_REWARDS); + $acv->addGlobalsToJScript(GLOBALINFO_REWARDS); /***********/ /* Infobox */ @@ -141,7 +141,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) 'typeId' => $_id, 'headIcons' => $acv->getField('iconString'), 'infobox' => $infobox ? '[ul][li]'.implode('[/li][li]', $infobox).'[/li][/ul]' : null, - 'series' => $series, + 'series' => $series ? [[$series, null]] : null, 'redButtons' => array( BUTTON_LINKS => ['color' => 'ffffff00', 'linkId' => Util::$typeStrings[TYPE_ACHIEVEMENT].':'.$_id.':"..UnitGUID("player")..":0:0:0:0:0:0:0:0'], BUTTON_WOWHEAD => true @@ -163,11 +163,14 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) if ($foo = $acv->getField('rewards')[TYPE_ITEM]) { $bar = new ItemList(array(['i.id', $foo])); - foreach ($bar->iterate() as $__) + foreach ($bar->iterate() as $id => $__) { - $pageData['page']['itemReward'][$bar->id] = array( - 'name' => $bar->getField('name', true), - 'quality' => $bar->getField('quality') + $pageData['page']['itemReward'][] = array( + 'name' => $bar->getField('name', true), + 'quality' => $bar->getField('quality'), + 'typeStr' => Util::$typeStrings[TYPE_ITEM], + 'id' => $id, + 'globalStr' => 'g_items' ); } } @@ -200,7 +203,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ) ); - $saList->addGlobalsToJscript($smarty); + $saList->addGlobalsToJscript(); // tab: criteria of $refs = DB::Aowow()->SelectCol('SELECT refAchievementId FROM ?_achievementcriteria WHERE Type = ?d AND value1 = ?d', @@ -221,7 +224,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ) ); - $coList->addGlobalsToJscript($smarty); + $coList->addGlobalsToJscript(); } /*****************/ @@ -365,7 +368,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) 'quality' => $crtItm->getField('quality'), 'count' => $qty, ); - $crtItm->addGlobalsToJscript($smarty); + $crtItm->addGlobalsToJscript(); $tmp['icon'] = $iconId; $pageData['page']['icons'][] = array( 'itr' => $iconId++, diff --git a/pages/achievements.php b/pages/achievements.php index 4ce7564f..f7c4902c 100644 --- a/pages/achievements.php +++ b/pages/achievements.php @@ -94,7 +94,7 @@ if (!$smarty->loadCache($cacheKey, $pageData, $filter)) ); // fill g_items, g_titles, g_achievements - $acvList->addGlobalsToJscript($smarty); + $acvList->addGlobalsToJscript(); // if we are have different cats display field if ($acvList->hasDiffFields(['category'])) diff --git a/pages/class.php b/pages/class.php index bc6c9897..2b07805a 100644 --- a/pages/class.php +++ b/pages/class.php @@ -50,7 +50,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) // specs $specList = []; $skills = new SkillList(array(['id', $cl->getField('skills')])); - $skills->addGlobalsToJscript($smarty); + $skills->addGlobalsToJscript(); foreach ($skills->iterate() as $k => $__) $specList[$k] = '[icon name='.$skills->getField('iconString').'][url=?spells=7.'.$_id.'.'.$k.']'.$skills->getField('name', true).'[/url][/icon]'; @@ -112,7 +112,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ); $genSpells = new SpellList($conditions); - $genSpells->addGlobalsToJscript($smarty, GLOBALINFO_SELF); + $genSpells->addGlobalsToJScript(GLOBALINFO_SELF); $pageData['relTabs'][] = array( 'file' => 'spell', @@ -140,7 +140,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ); $items = new ItemList($conditions); - $items->addGlobalsToJscript($smarty); + $items->addGlobalsToJscript(); if (!$items->hasDiffFields(['requiredRace'])) $hidden = "$['side']"; @@ -163,12 +163,12 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) // Tab: Quests $conditions = array( - ['RequiredClasses', $_mask, '&'], - [['RequiredClasses', CLASS_MASK_ALL, '&'], CLASS_MASK_ALL, '!'] + ['reqClassMask', $_mask, '&'], + [['reqClassMask', CLASS_MASK_ALL, '&'], CLASS_MASK_ALL, '!'] ); $quests = new QuestList($conditions); - $quests->addGlobalsToJscript($smarty); + $quests->addGlobalsToJscript(); $pageData['relTabs'][] = array( 'file' => 'quest', @@ -181,7 +181,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) // Tab: Itemsets $sets = new ItemsetList(array(['classMask', $_mask, '&'])); - $sets->addGlobalsToJscript($smarty, GLOBALINFO_SELF); + $sets->addGlobalsToJScript(GLOBALINFO_SELF); $pageData['relTabs'][] = array( 'file' => 'itemset', diff --git a/pages/currencies.php b/pages/currencies.php index af56bbaf..e11ca30c 100644 --- a/pages/currencies.php +++ b/pages/currencies.php @@ -22,7 +22,7 @@ if ($cat) if (!$smarty->loadCache($cacheKey, $pageData)) { $money = new CurrencyList($cat ? array(['category', (int)$cat[0]]) : []); - $money->addGlobalsToJscript($smarty); + $money->addGlobalsToJscript(); // menuId 15: Currency g_initPath() // tabId 0: Database g_initHeader() diff --git a/pages/currency.php b/pages/currency.php index 6fed6319..47ba608a 100644 --- a/pages/currency.php +++ b/pages/currency.php @@ -47,7 +47,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) 'typeId' => $_id, 'infobox' => $infobox, 'name' => $currency->getField('name', true), - 'headIcons' => [$currency->getField('iconString')], + 'headIcons' => $_id == 104 ? ['inv_bannerpvp_02', 'inv_bannerpvp_01'] : [$currency->getField('iconString')], 'redButtons' => array( BUTTON_WOWHEAD => true, BUTTON_LINKS => true @@ -87,7 +87,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $soldBy = new CreatureList(array(['id', array_keys($vendors)])); if (!$soldBy->error) { - $soldBy->addGlobalsToJscript($smarty, GLOBALINFO_SELF); + $soldBy->addGlobalsToJScript(GLOBALINFO_SELF); $sbData = $soldBy->getListviewData(); $extraCols = ['Listview.extraCols.stock', "Listview.funcBox.createSimpleCol('stack', 'stack', '10%', 'stack')", 'Listview.extraCols.cost']; @@ -134,7 +134,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) if ($holidays) { $hObj = new WorldEventList(array(['id', array_keys($holidays)])); - $hObj->addGlobalsToJscript($smarty); + $hObj->addGlobalsToJscript(); foreach ($hObj->iterate() as $id => $tpl) { if ($_ = $tpl['holidayId']) @@ -183,11 +183,20 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) // tab: currency for if ($_id == 103) + { + $n = '?items&filter=cr=145;crs=1;crv=0'; $w = 'iec.reqArenaPoints > 0'; + } else if ($_id == 104) + { + $n = '?items&filter=cr=144;crs=1;crv=0'; $w = 'iec.reqHonorPoints > 0'; + } else + { + $n = in_array($_id, [42, 61, 81, 241, 121, 122, 123, 125, 126, 161, 201, 101, 102, 221, 301, 341]) ? '?items&filter=cr=158;crs='.$currency->getField('itemId').';crv=0' : null; $w = 'iec.reqItemId1 = '.$_itemId.' OR iec.reqItemId2 = '.$_itemId.' OR iec.reqItemId3 = '.$_itemId.' OR iec.reqItemId4 = '.$_itemId.' OR iec.reqItemId5 = '.$_itemId; + } $boughtBy = DB::Aowow()->selectCol(' SELECT item FROM npc_vendor nv JOIN ?_itemExtendedCost iec ON iec.id = nv.extendedCost WHERE '.$w.' @@ -199,7 +208,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $boughtBy = new ItemList(array(['id', $boughtBy])); if (!$boughtBy->error) { - $boughtBy->addGlobalsToJscript($smarty); + $boughtBy->addGlobalsToJscript(); $pageData['relTabs'][] = array( 'file' => 'item', @@ -208,7 +217,8 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) 'tabs' => '$tabsRelated', 'name' => '$LANG.tab_currencyfor', 'id' => 'currency-for', - 'extraCols' => "$[Listview.funcBox.createSimpleCol('stack', 'stack', '10%', 'stack'), Listview.extraCols.cost]" + 'extraCols' => "$[Listview.funcBox.createSimpleCol('stack', 'stack', '10%', 'stack'), Listview.extraCols.cost]", + 'note' => $n ? '$$WH.sprintf(LANG.lvnote_filterresults, \''.$n.'\')' : null ] ); } diff --git a/pages/events.php b/pages/events.php index aa00233e..0abf526b 100644 --- a/pages/events.php +++ b/pages/events.php @@ -30,7 +30,7 @@ if (!$smarty->loadCache($cacheKey, $pageData)) } $events = new WorldEventList($condition); - $events->addGlobalsToJScript($smarty); + $events->addGlobalsToJScript(); $deps = []; foreach ($events->iterate() as $__) diff --git a/pages/faction.php b/pages/faction.php index a797d348..df7847f8 100644 --- a/pages/faction.php +++ b/pages/faction.php @@ -98,7 +98,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $conditions[] = ['parentFactionId', $_id]; // self as parent $spillover = new FactionList($conditions); - $spillover->addGlobalsToJscript(Util::$pageTemplate); + $spillover->addGlobalsToJscript(); $buff = []; foreach ($spillover->iterate() as $spillId => $__) @@ -145,7 +145,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $items = new ItemList(array(['requiredFaction', $_id])); if (!$items->error) { - $items->addGlobalsToJscript($smarty, GLOBALINFO_SELF); + $items->addGlobalsToJScript(GLOBALINFO_SELF); $pageData['relTabs'][] = array( 'file' => 'item', @@ -175,7 +175,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $killCreatures = new CreatureList(array(['id', $cIds])); if (!$killCreatures->error) { - $killCreatures->addGlobalsToJscript($smarty); + $killCreatures->addGlobalsToJscript(); $pageData['relTabs'][] = array( 'file' => 'creature', @@ -199,7 +199,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $killCreatures = new CreatureList($conditions); if (!$killCreatures->error) { - $killCreatures->addGlobalsToJscript($smarty); + $killCreatures->addGlobalsToJscript(); $pageData['relTabs'][] = array( 'file' => 'creature', @@ -215,17 +215,17 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) // tab: quests $conditions = array( - ['AND', ['RewardFactionId1', $_id], ['OR', ['RewardFactionValueId1', 0, '>'], ['RewardFactionValueIdOverride1', 0, '>']]], - ['AND', ['RewardFactionId2', $_id], ['OR', ['RewardFactionValueId2', 0, '>'], ['RewardFactionValueIdOverride2', 0, '>']]], - ['AND', ['RewardFactionId3', $_id], ['OR', ['RewardFactionValueId3', 0, '>'], ['RewardFactionValueIdOverride3', 0, '>']]], - ['AND', ['RewardFactionId4', $_id], ['OR', ['RewardFactionValueId4', 0, '>'], ['RewardFactionValueIdOverride4', 0, '>']]], - ['AND', ['RewardFactionId5', $_id], ['OR', ['RewardFactionValueId5', 0, '>'], ['RewardFactionValueIdOverride5', 0, '>']]], + ['AND', ['rewardFactionId1', $_id], ['OR', ['rewardFactionValueId1', 0, '>'], ['rewardFactionValueIdOverride1', 0, '>']]], + ['AND', ['rewardFactionId2', $_id], ['OR', ['rewardFactionValueId2', 0, '>'], ['rewardFactionValueIdOverride2', 0, '>']]], + ['AND', ['rewardFactionId3', $_id], ['OR', ['rewardFactionValueId3', 0, '>'], ['rewardFactionValueIdOverride3', 0, '>']]], + ['AND', ['rewardFactionId4', $_id], ['OR', ['rewardFactionValueId4', 0, '>'], ['rewardFactionValueIdOverride4', 0, '>']]], + ['AND', ['rewardFactionId5', $_id], ['OR', ['rewardFactionValueId5', 0, '>'], ['rewardFactionValueIdOverride5', 0, '>']]], 'OR' ); $quests = new QuestList($conditions); if (!$quests->error) { - $quests->addGlobalsToJscript($smarty, GLOBALINFO_ANY); + $quests->addGlobalsToJScript(GLOBALINFO_ANY); $pageData['relTabs'][] = array( 'file' => 'quest', @@ -247,7 +247,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $acvs = new AchievementList($conditions); if (!$acvs->error) { - $acvs->addGlobalsToJscript($smarty, GLOBALINFO_ANY); + $acvs->addGlobalsToJScript(GLOBALINFO_ANY); $pageData['relTabs'][] = array( 'file' => 'achievement', diff --git a/pages/item.php b/pages/item.php index adefec08..70208348 100644 --- a/pages/item.php +++ b/pages/item.php @@ -80,7 +80,7 @@ if (isset($_GET['xml'])) if (!$smarty->loadCache($cacheKeyXML, $root)) { $root = new SimpleXML(''); - $cnd = array($_id ? ['i.id', $_id] : ['name_loc'.User::$localeId, $pageParam]); + $cnd = array($_id ? ['i.id', $_id] : ['name_loc'.User::$localeId, urldecode($pageParam)]); $item = new ItemList($cnd); if ($item->error) @@ -222,7 +222,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) if ($item->error) $smarty->notFound(Lang::$game['item'], $_id); - $item->addGlobalsToJscript($smarty, GLOBALINFO_EXTRA | GLOBALINFO_SELF); + $item->addGlobalsToJScript(GLOBALINFO_EXTRA | GLOBALINFO_SELF); $_flags = $item->getField('flags'); $_slot = $item->getField('slot'); @@ -579,14 +579,14 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) { $conditions = array( 'OR', - ['requiredSourceItemId1', $reqIds], ['requiredSourceItemId2', $reqIds], - ['requiredSourceItemId3', $reqIds], ['requiredSourceItemId4', $reqIds], - ['requiredItemId1', $reqIds], ['requiredItemId2', $reqIds], ['requiredItemId3', $reqIds], - ['requiredItemId4', $reqIds], ['requiredItemId5', $reqIds], ['requiredItemId6', $reqIds] + ['reqSourceItemId1', $reqIds], ['reqSourceItemId2', $reqIds], + ['reqSourceItemId3', $reqIds], ['reqSourceItemId4', $reqIds], + ['reqItemId1', $reqIds], ['reqItemId2', $reqIds], ['reqItemId3', $reqIds], + ['reqItemId4', $reqIds], ['reqItemId5', $reqIds], ['reqItemId6', $reqIds] ); $reqQuests = new QuestList($conditions); - $reqQuests->addGlobalsToJscript($smarty); + $reqQuests->addGlobalsToJscript(); foreach ($reqQuests->iterate() as $qId => $__) { @@ -605,7 +605,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $contains = new ItemList(array(['bagFamily', $_bagFamily, '&'], ['slots', 1, '<'], 0)); if (!$contains->error) { - $contains->addGlobalsToJscript($smarty); + $contains->addGlobalsToJscript(); $hCols = ['side']; if (!$contains->hasSetFields(['slot'])) @@ -630,7 +630,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $contains = new ItemList(array(['bagFamily', $_bagFamily, '&'], ['slots', 0, '>'], 0)); if (!$contains->error) { - $contains->addGlobalsToJscript($smarty); + $contains->addGlobalsToJscript(); $pageData['relTabs'][] = array( 'file' => 'item', @@ -654,7 +654,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $criteriaOf = new AchievementList($conditions); if (!$criteriaOf->error) { - $criteriaOf->addGlobalsToJscript($smarty, GLOBALINFO_SELF | GLOBALINFO_REWARDS); + $criteriaOf->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_REWARDS); $hCols = []; if (!$criteriaOf->hasSetFields(['rewardIds'])) @@ -683,7 +683,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $reagent = new SpellList($conditions); if (!$reagent->error) { - $reagent->addGlobalsToJscript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $reagent->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); $pageData['relTabs'][] = array( 'file' => 'spell', @@ -729,7 +729,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $lockedItm = new ItemList(array(['lockId', $lockIds])); if (!$lockedItm->error) { - $lockedItm->addGlobalsToJscript($smarty, GLOBALINFO_SELF); + $lockedItm->addGlobalsToJScript(GLOBALINFO_SELF); $pageData['relTabs'][] = array( 'file' => 'item', @@ -765,7 +765,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $saItems = new ItemList($conditions); if (!$saItems->error) { - $saItems->addGlobalsToJscript($smarty, GLOBALINFO_SELF); + $saItems->addGlobalsToJScript(GLOBALINFO_SELF); $pageData['relTabs'][] = array( 'file' => 'item', @@ -781,10 +781,10 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) // tab: starts (quest) if ($qId = $item->getField('startQuest')) { - $starts = new QuestList(array(['qt.id', $qId])); + $starts = new QuestList(array(['id', $qId])); if (!$starts->error) { - $starts->addGlobalsToJscript($smarty); + $starts->addGlobalsToJscript(); $pageData['relTabs'][] = array( 'file' => 'quest', @@ -801,13 +801,13 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) // tab: objective of (quest) $conditions = array( 'OR', - ['requiredItemId1', $_id], ['requiredItemId2', $_id], ['requiredItemId3', $_id], - ['requiredItemId4', $_id], ['requiredItemId5', $_id], ['requiredItemId6', $_id] + ['reqItemId1', $_id], ['reqItemId2', $_id], ['reqItemId3', $_id], + ['reqItemId4', $_id], ['reqItemId5', $_id], ['reqItemId6', $_id] ); $objective = new QuestList($conditions); if (!$objective->error) { - $objective->addGlobalsToJscript($smarty, GLOBALINFO_SELF | GLOBALINFO_REWARDS); + $objective->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_REWARDS); $pageData['relTabs'][] = array( 'file' => 'quest', @@ -823,13 +823,13 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) // tab: provided for (quest) $conditions = array( 'OR', ['sourceItemId', $_id], - ['requiredSourceItemId1', $_id], ['requiredSourceItemId2', $_id], - ['requiredSourceItemId3', $_id], ['requiredSourceItemId4', $_id] + ['reqSourceItemId1', $_id], ['reqSourceItemId2', $_id], + ['reqSourceItemId3', $_id], ['reqSourceItemId4', $_id] ); $provided = new QuestList($conditions); if (!$provided->error) { - $provided->addGlobalsToJscript($smarty, GLOBALINFO_SELF | GLOBALINFO_REWARDS); + $provided->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_REWARDS); $pageData['relTabs'][] = array( 'file' => 'quest', @@ -849,7 +849,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $sameModel = new ItemList(array(['model', $model], ['id', $_id, '!'], ['slot', $_slot])); if (!$sameModel->error) { - $sameModel->addGlobalsToJscript($smarty, GLOBALINFO_SELF); + $sameModel->addGlobalsToJScript(GLOBALINFO_SELF); $pageData['relTabs'][] = array( 'file' => 'genericmodel', @@ -870,7 +870,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $soldBy = new CreatureList(array(['id', array_keys($vendors)])); if (!$soldBy->error) { - $soldBy->addGlobalsToJscript($smarty, GLOBALINFO_SELF); + $soldBy->addGlobalsToJScript(GLOBALINFO_SELF); $sbData = $soldBy->getListviewData(); $extraCols = ['Listview.extraCols.stock', "Listview.funcBox.createSimpleCol('stack', 'stack', '10%', 'stack')", 'Listview.extraCols.cost']; @@ -957,7 +957,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $boughtBy = new ItemList(array(['id', $boughtBy])); if (!$boughtBy->error) { - $boughtBy->addGlobalsToJscript($smarty); + $boughtBy->addGlobalsToJscript(); $iCur = new CurrencyList(array(['itemId', $_id])); $filter = $iCur->error ? [TYPE_ITEM => $_id] : [TYPE_CURRENCY => $iCur->id]; @@ -1002,7 +1002,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $taughtSpells = new SpellList(array(['id', $ids])); if (!$taughtSpells->error) { - $taughtSpells->addGlobalsToJscript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $taughtSpells->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); $visCols = ['level', 'schools']; if ($taughtSpells->hasSetFields(['reagent1'])) diff --git a/pages/itemset.php b/pages/itemset.php index 2360d77e..847316e8 100644 --- a/pages/itemset.php +++ b/pages/itemset.php @@ -208,7 +208,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) 'relTabs' => [] ); - $iSet->addGlobalsToJscript($smarty); + $iSet->addGlobalsToJscript(); /**************/ /* Extra Tabs */ @@ -262,7 +262,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) if (!$mask) $pageData['related']['params']['hiddenCols'] = "$['classes']"; - $relSets->addGlobalsToJscript($smarty); + $relSets->addGlobalsToJscript(); } } diff --git a/pages/itemsets.php b/pages/itemsets.php index 21f82ebb..91def8b5 100644 --- a/pages/itemsets.php +++ b/pages/itemsets.php @@ -14,7 +14,7 @@ if (!$smarty->loadCache($cacheKey, $pageData, $filter)) $itemsetFilter = new ItemsetListFilter(); $itemsets = new ItemsetList([$itemsetFilter->getConditions()]); - $itemsets->addGlobalsToJscript($smarty); + $itemsets->addGlobalsToJscript(); // recreate form selection $filter = array_merge($itemsetFilter->getForm('form'), $filter); diff --git a/pages/miscTools.php b/pages/miscTools.php index ee250a1d..d5ce31a7 100644 --- a/pages/miscTools.php +++ b/pages/miscTools.php @@ -74,15 +74,10 @@ switch ($pageCall) foreach (Util::$typeClasses as $classStr) { - // temp: as long as we use world.quest_template - if ($classStr == 'QuestList') - continue; - $typeObj = new $classStr($cnd); - if (!$typeObj->error) { - $typeObj->addGlobalsToJscript(Util::$pageTemplate, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $typeObj->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); $lv[] = array( 'file' => (new ReflectionProperty($typeObj, 'brickFile'))->getValue(), diff --git a/pages/npc.php b/pages/npc.php index ec03c488..e61a740d 100644 --- a/pages/npc.php +++ b/pages/npc.php @@ -410,24 +410,24 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) // SMART_SCRIPT_TYPE_CREATURE = 0; SMART_ACTION_CAST = 11; SMART_ACTION_ADD_AURA = 75; SMART_ACTION_INVOKER_CAST = 85; SMART_ACTION_CROSS_CAST = 86 $smartSpells = DB::Aowow()->selectCol('SELECT action_param1 FROM smart_scripts WHERE source_type = 0 AND action_type IN (11, 75, 85, 86) AND entryOrGUID = ?d', $_id); $tplSpells = []; - $conditions = [['id', $smartSpells]]; + $conditions = ['OR']; for ($i = 1; $i < 9; $i++) if ($_ = $npc->getField('spell'.$i)) $tplSpells[] = $_; if ($tplSpells) - { $conditions[] = ['id', $tplSpells]; - $conditions[] = 'OR'; - } + + if ($smartSpells) + $conditions[] = ['id', $smartSpells]; if ($tplSpells || $smartSpells) { $abilities = new SpellList($conditions); if (!$abilities->error) { - $abilities->addGlobalsToJScript(Util::$pageTemplate, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $abilities->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); $normal = $abilities->getListviewData(); $controled = []; @@ -478,7 +478,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $summoned = new SpellList($conditions); if (!$summoned->error) { - $summoned->addGlobalsToJscript(Util::$pageTemplate); + $summoned->addGlobalsToJscript(); $pageData['relTabs'][] = array( 'file' => 'spell', @@ -504,7 +504,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $teaches = new SpellList(array(['id', array_keys($tSpells)])); if (!$teaches->error) { - $teaches->addGlobalsToJscript(Util::$pageTemplate, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $teaches->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); $data = $teaches->getListviewData(); $extra = []; @@ -557,7 +557,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $soldItems = new ItemList(array(['id', $sells])); if (!$soldItems->error) { - $soldItems->addGlobalsToJscript(Util::$pageTemplate); + $soldItems->addGlobalsToJscript(); $pageData['relTabs'][] = array( 'file' => 'item', @@ -653,14 +653,14 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) { $conditions = array( 'OR', - ['requiredSourceItemId1', $reqIds], ['requiredSourceItemId2', $reqIds], - ['requiredSourceItemId3', $reqIds], ['requiredSourceItemId4', $reqIds], - ['requiredItemId1', $reqIds], ['requiredItemId2', $reqIds], ['requiredItemId3', $reqIds], - ['requiredItemId4', $reqIds], ['requiredItemId5', $reqIds], ['requiredItemId6', $reqIds] + ['reqSourceItemId1', $reqIds], ['reqSourceItemId2', $reqIds], + ['reqSourceItemId3', $reqIds], ['reqSourceItemId4', $reqIds], + ['reqItemId1', $reqIds], ['reqItemId2', $reqIds], ['reqItemId3', $reqIds], + ['reqItemId4', $reqIds], ['reqItemId5', $reqIds], ['reqItemId6', $reqIds] ); $reqQuests = new QuestList($conditions); - $reqQuests->addGlobalsToJscript($smarty); + $reqQuests->addGlobalsToJscript(); foreach ($reqQuests->iterate() as $qId => $__) { @@ -674,52 +674,63 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) } // tab: starts quest - $starts = new QuestList(array(['npcStart.id', $_id])); - if (!$starts->error) - { - $starts->addGlobalsToJScript(Util::$pageTemplate); - - $pageData['relTabs'][] = array( - 'file' => 'quest', - 'data' => $starts->getListviewData(), - 'params' => [ - 'tabs' => '$tabsRelated', - 'name' => '$LANG.tab_starts', - 'id' => 'starts' - ] - ); - } - // tab: ends quest - $ends = new QuestList(array(['npcEnd.id', $_id])); - if (!$ends->error) + $startEnd = new QuestList(array(['qse.type', TYPE_NPC], ['qse.typeId', $_id])); + if (!$startEnd->error) { - $ends->addGlobalsToJScript(Util::$pageTemplate); + $startEnd->addGlobalsToJScript(); + $lvData = $startEnd->getListviewData(); + $_ = [[], []]; - $pageData['relTabs'][] = array( - 'file' => 'quest', - 'data' => $ends->getListviewData(), - 'params' => [ - 'tabs' => '$tabsRelated', - 'name' => '$LANG.tab_ends', - 'id' => 'ends' - ] - ); + foreach ($startEnd->iterate() as $id => $__) + { + $m = $startEnd->getField('method'); + if ($m & 0x1) + $_[0][] = $lvData[$id]; + if ($m & 0x2) + $_[1][] = $lvData[$id]; + } + + if ($_[0]) + { + $pageData['relTabs'][] = array( + 'file' => 'quest', + 'data' => $_[0], + 'params' => [ + 'tabs' => '$tabsRelated', + 'name' => '$LANG.tab_starts', + 'id' => 'starts' + ] + ); + } + + if ($_[1]) + { + $pageData['relTabs'][] = array( + 'file' => 'quest', + 'data' => $_[1], + 'params' => [ + 'tabs' => '$tabsRelated', + 'name' => '$LANG.tab_ends', + 'id' => 'ends' + ] + ); + } } // tab: objective of quest $conditions = array( 'OR', - ['AND', ['RequiredNpcOrGo1', $_id], ['RequiredNpcOrGoCount1', 0, '>']], - ['AND', ['RequiredNpcOrGo2', $_id], ['RequiredNpcOrGoCount2', 0, '>']], - ['AND', ['RequiredNpcOrGo3', $_id], ['RequiredNpcOrGoCount3', 0, '>']], - ['AND', ['RequiredNpcOrGo4', $_id], ['RequiredNpcOrGoCount4', 0, '>']], + ['AND', ['reqNpcOrGo1', $_id], ['reqNpcOrGoCount1', 0, '>']], + ['AND', ['reqNpcOrGo2', $_id], ['reqNpcOrGoCount2', 0, '>']], + ['AND', ['reqNpcOrGo3', $_id], ['reqNpcOrGoCount3', 0, '>']], + ['AND', ['reqNpcOrGo4', $_id], ['reqNpcOrGoCount4', 0, '>']], ); $objectiveOf = new QuestList($conditions); if (!$objectiveOf->error) { - $objectiveOf->addGlobalsToJScript(Util::$pageTemplate); + $objectiveOf->addGlobalsToJScript(); $pageData['relTabs'][] = array( 'file' => 'quest', @@ -741,7 +752,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $crtOf = new AchievementList($conditions); if (!$crtOf->error) { - $crtOf->addGlobalsToJScript(Util::$pageTemplate); + $crtOf->addGlobalsToJScript(); $pageData['relTabs'][] = array( 'file' => 'achievement', diff --git a/pages/object.php b/pages/object.php index e67c94b5..8b62446c 100644 --- a/pages/object.php +++ b/pages/object.php @@ -124,7 +124,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $trigger = new GameObjectList(array(['linkedTrap', $_id])); if (!$trigger->error) { - $trigger->addGlobalsToJScript(Util::$pageTemplate); + $trigger->addGlobalsToJScript(); $infobox[] = Lang::$gameObject['triggeredBy'].Lang::$colon.'[object='.$trigger->id.']'; } @@ -281,7 +281,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $summons = new SpellList($conditions); if (!$summons->error) { - $summons->addGlobalsToJScript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $summons->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); $pageData['relTabs'][] = array( 'file' => 'spell', @@ -300,7 +300,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $relSpells = new SpellList(array(['id', $_])); if (!$relSpells->error) { - $relSpells->addGlobalsToJScript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $relSpells->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); $data = $relSpells->getListviewData(); foreach ($data as $relId => $d) @@ -324,7 +324,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $acvs = new AchievementList(array(['ac.type', [ACHIEVEMENT_CRITERIA_TYPE_USE_GAMEOBJECT, ACHIEVEMENT_CRITERIA_TYPE_FISH_IN_GAMEOBJECT]], ['ac.value1', $_id])); if (!$acvs->error) { - $acvs->addGlobalsToJScript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $acvs->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); $pageData['relTabs'][] = array( 'file' => 'achievement', @@ -337,38 +337,49 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ); } - // tab: starts - $started = new QuestList(array(['goStart.id', $_id])); - if (!$started->error) + // tab: starts quest + // tab: ends quest + $startEnd = new QuestList(array(['qse.type', TYPE_OBJECT], ['qse.typeId', $_id])); + if (!$startEnd->error) { - $started->addGlobalsToJScript(Util::$pageTemplate); + $startEnd->addGlobalsToJScript(); + $lvData = $startEnd->getListviewData(); + $_ = [[], []]; - $pageData['relTabs'][] = array( - 'file' => 'quest', - 'data' => $started->getListviewData(), - 'params' => [ - 'tabs' => '$tabsRelated', - 'name' => '$LANG.tab_starts', - 'id' => 'starts' - ] - ); - } + foreach ($startEnd->iterate() as $id => $__) + { + $m = $startEnd->getField('method'); + if ($m & 0x1) + $_[0][] = $lvData[$id]; + if ($m & 0x2) + $_[1][] = $lvData[$id]; + } - // tab: ends - $ends = new QuestList(array(['goEnd.id', $_id])); - if (!$ends->error) - { - $ends->addGlobalsToJScript(Util::$pageTemplate); + if ($_[0]) + { + $pageData['relTabs'][] = array( + 'file' => 'quest', + 'data' => $_[0], + 'params' => [ + 'tabs' => '$tabsRelated', + 'name' => '$LANG.tab_starts', + 'id' => 'starts' + ] + ); + } - $pageData['relTabs'][] = array( - 'file' => 'quest', - 'data' => $ends->getListviewData(), - 'params' => [ - 'tabs' => '$tabsRelated', - 'name' => '$LANG.tab_ends', - 'id' => 'ends' - ] - ); + if ($_[1]) + { + $pageData['relTabs'][] = array( + 'file' => 'quest', + 'data' => $_[1], + 'params' => [ + 'tabs' => '$tabsRelated', + 'name' => '$LANG.tab_ends', + 'id' => 'ends' + ] + ); + } } // tab: related quests @@ -377,7 +388,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $relQuest = new QuestList(array(['id', $_])); if (!$relQuest->error) { - $relQuest->addGlobalsToJScript(Util::$pageTemplate); + $relQuest->addGlobalsToJScript(); $pageData['relTabs'][] = array( 'file' => 'quest', @@ -435,14 +446,14 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) { $conditions = array( 'OR', - ['requiredSourceItemId1', $reqIds], ['requiredSourceItemId2', $reqIds], - ['requiredSourceItemId3', $reqIds], ['requiredSourceItemId4', $reqIds], - ['requiredItemId1', $reqIds], ['requiredItemId2', $reqIds], ['requiredItemId3', $reqIds], - ['requiredItemId4', $reqIds], ['requiredItemId5', $reqIds], ['requiredItemId6', $reqIds] + ['reqSourceItemId1', $reqIds], ['reqSourceItemId2', $reqIds], + ['reqSourceItemId3', $reqIds], ['reqSourceItemId4', $reqIds], + ['reqItemId1', $reqIds], ['reqItemId2', $reqIds], ['reqItemId3', $reqIds], + ['reqItemId4', $reqIds], ['reqItemId5', $reqIds], ['reqItemId6', $reqIds] ); $reqQuests = new QuestList($conditions); - $reqQuests->addGlobalsToJscript($smarty); + $reqQuests->addGlobalsToJscript(); foreach ($reqQuests->iterate() as $qId => $__) { @@ -459,7 +470,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $sameModel = new GameObjectList(array(['displayId', $object->getField('displayId')], ['id', $_id, '!'])); if (!$sameModel->error) { - $sameModel->addGlobalsToJScript(Util::$pageTemplate); + $sameModel->addGlobalsToJScript(); $pageData['relTabs'][] = array( 'file' => 'object', diff --git a/pages/objects.php b/pages/objects.php index 6962f01e..29e6062e 100644 --- a/pages/objects.php +++ b/pages/objects.php @@ -29,7 +29,7 @@ if (!$smarty->loadCache($cacheKey, $pageData, $filter)) if ($_ = $objectFilter->getConditions()) $conditions[] = $_; - $objects = new GameObjectList($conditions, true); + $objects = new GameObjectList($conditions, ['extraOpts' => $objectFilter->extraOpts]); // menuId 5: Object g_initPath() // tabId 0: Database g_initHeader() diff --git a/pages/pet.php b/pages/pet.php index 4ab474c3..6c095f7f 100644 --- a/pages/pet.php +++ b/pages/pet.php @@ -103,7 +103,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $list[] = $i; $food = new ItemList(array(['i.subClass', [5, 8]], ['i.FoodType', $list])); - $food->addGlobalsToJscript($smarty); + $food->addGlobalsToJscript(); $pageData['relTabs'][] = array( 'file' => 'item', @@ -146,7 +146,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ]; $spells = new SpellList($conditions); - $spells->addGlobalsToJscript($smarty, GLOBALINFO_SELF); + $spells->addGlobalsToJScript(GLOBALINFO_SELF); $pageData['relTabs'][] = array( 'file' => 'spell', @@ -177,7 +177,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) } $talents = new SpellList($conditions); - $talents->addGlobalsToJscript($smarty, GLOBALINFO_SELF); + $talents->addGlobalsToJScript(GLOBALINFO_SELF); $pageData['relTabs'][] = array( 'file' => 'spell', diff --git a/pages/pets.php b/pages/pets.php index 3373fc25..8fa9c884 100644 --- a/pages/pets.php +++ b/pages/pets.php @@ -22,7 +22,7 @@ if ($cat) if (!$smarty->loadCache($cacheKey, $pageData)) { $pets = new PetList($cat ? array(['type', (int)$cat[0]]) : []); - $pets->addGlobalsToJscript($smarty, GLOBALINFO_RELATED); + $pets->addGlobalsToJScript(GLOBALINFO_RELATED); $lvPet = array( 'file' => 'pet', diff --git a/pages/quest.php b/pages/quest.php index 6ea32ae5..6f762774 100644 --- a/pages/quest.php +++ b/pages/quest.php @@ -6,7 +6,8 @@ if (!defined('AOWOW_REVISION')) require 'includes/community.class.php'; -$_id = intVal($pageParam); +$_id = intVal($pageParam); +$_path = [0, 3]; $cacheKeyPage = implode('_', [CACHETYPE_PAGE, TYPE_QUEST, $_id, -1, User::$localeId]); $cacheKeyTooltip = implode('_', [CACHETYPE_TOOLTIP, TYPE_QUEST, $_id, -1, User::$localeId]); @@ -20,14 +21,16 @@ if (isset($_GET['power'])) if (!$smarty->loadCache($cacheKeyTooltip, $x)) { - $quest = new QuestList(array(['qt.id', $_id])); + $quest = new QuestList(array(['id', $_id])); if ($quest->error) die('$WowheadPower.registerQuest(\''.$_id.'\', '.User::$localeId.', {})'); $x = '$WowheadPower.registerQuest('.$_id.', '.User::$localeId.", {\n"; - $x .= "\tname_".User::$localeString.": '".Util::jsEscape($quest->getField('Title', true))."',\n"; - $x .= "\ttooltip_".User::$localeString.': \''.$quest->renderTooltip()."'\n"; // daily: 1 ... not used in wowheadPower => omitted here - $x .= "});"; + $x .= "\tname_".User::$localeString.": '".Util::jsEscape($quest->getField('name', true))."',\n"; + $x .= "\ttooltip_".User::$localeString.': \''.$quest->renderTooltip()."'"; + if ($quest->isDaily()) + $x .= ",\n\tdaily: 1"; + $x .= "\n});"; $smarty->saveCache($cacheKeyTooltip, $x); } @@ -38,585 +41,786 @@ if (isset($_GET['power'])) // regular page if (!$smarty->loadCache($cacheKeyPage, $pageData)) { - $quest = new QuestList(array(['qt.id', $_id])); + $quest = new QuestList(array(['id', $_id])); if ($quest->error) $smarty->notFound(Lang::$game['quest'], $_id); + // recreate path + $_path[] = $quest->getField('cat2'); + if ($_ = $quest->getField('cat1')) + $_path[] = $_; + $_name = $quest->getField('name', true); + $_level = $quest->getField('level'); + $_minLevel = $quest->getField('minLevel'); + $_maxLevel = $quest->getField('maxLevel'); + $_flags = $quest->getField('flags'); + $_specialFlags = $quest->getField('specialFlags'); + $_questMoney = $quest->getField('rewardOrReqMoney'); + $_side = Util::sideByRaceMask($quest->getField('reqRaceMask')); - // not yet implemented -> chicken out - $smarty->error(); + /***********/ + /* Infobox */ + /***********/ + $infobox = []; + // event (todo: assign eventData) + if ($_ = $quest->getField('holidayId')) + { + (new WorldEventList(array(['h.id', $_])))->addGlobalsToJscript(); + $infobox[] = Lang::$game['eventShort'].Lang::$colon.'[event='.$_.']'; + } - unset($quest); + // level + if ($_ = $_level) + if ($_ > 0) + $infobox[] = Lang::$game['level'].Lang::$colon.$_; - // Основная инфа - $quest = GetDBQuestInfo($_id, 0xFFFFFF); - $path = [0, 3]; // TODO + // reqlevel + if ($_ = $_minLevel) + { + $lvl = $_; + if ($_ = $_maxLevel) + $lvl .= ' - '.$_; - /* ЦЕПОЧКА КВЕСТОВ */ - // Добавляем сам квест в цепочку - $quest['series'] = array( - array( - 'Id' => $quest['Id'], - 'Title' => $quest['Title'], - 'NextQuestIdChain' => $quest['NextQuestIdChain'] - ) - ); - // Квесты в цепочке до этого квеста - $tmp = $quest['series'][0]; - while($tmp) + $infobox[] = sprintf(Lang::$game['reqLevel'], $lvl); + } + + // loremaster (i dearly hope those flags cover every case...) + if ($quest->getField('zoneOrSort') > 0 && !$quest->isRepeatable()) + { + $conditions = array( + ['ac.type', ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUESTS_IN_ZONE], + ['ac.value1', $quest->getField('zoneOrSort')], + ['a.faction', $_side, '&'] + ); + $loremaster = new AchievementList($conditions); + switch ($loremaster->getMatches()) + { + case 0: + break; + case 1: + $loremaster->addGlobalsToJscript(GLOBALINFO_SELF); + $infobox[] = Lang::$quest['loremaster'].Lang::$colon.'[achievement='.$loremaster->id.']'; + break; + default: + $loremaster->addGlobalsToJscript(GLOBALINFO_SELF); + $lm = Lang::$quest['loremaster'].Lang::$colon.'[ul]'; + foreach($loremaster->iterate() as $id => $__) + $lm .= '[li][achievement='.$id.'][/li]'; + + $infobox[] = $lm.'[/ul]'; + break; + } + } + + // type (maybe expand uppon?) + $_ = []; + if ($_flags & QUEST_FLAG_DAILY) + $_[] = Lang::$quest['daily']; + else if ($_flags & QUEST_FLAG_WEEKLY) + $_[] = Lang::$quest['weekly']; + else if ($_specialFlags & QUEST_FLAG_SPECIAL_MONTHLY) + $_[] = Lang::$quest['monthly']; + + if ($t = $quest->getField('type')) + $_[] = Lang::$quest['questInfo'][$t]; + + if ($_) + $infobox[] = Lang::$game['type'].Lang::$colon.implode(' ', $_); + + // side + $_ = Lang::$main['side'].lang::$colon; + switch ($_side) + { + case 3: $infobox[] = $_.Lang::$game['si'][3]; break; + case 2: $infobox[] = $_.'[span class=icon-horde]'.Lang::$game['si'][2].'[/span]'; break; + case 1: $infobox[] = $_.'[span class=icon-alliance]'.Lang::$game['si'][1].'[/span]'; break; + } + + // races + if ($_ = Lang::getRaceString($quest->getField('reqRaceMask'), $__, false, $n)) + { + if ($n) + { + $t = $n == 1 ? Lang::$game['race'] : Lang::$game['races']; + $infobox[] = Util::ucFirst($t).Lang::$colon.$_; + } + } + + // classes + if ($_ = Lang::getClassString($quest->getField('reqClassMask'), false, $n)) + { + $t = $n == 1 ? Lang::$game['class'] : Lang::$game['classes']; + $infobox[] = Util::ucFirst($t).Lang::$colon.$_; + } + + // profession {profession: [skill=X] (123)} + if ($_ = $quest->getField('reqSkillId')) + { + Util::$pageTemplate->extendGlobalIds(TYPE_SKILL, $_); + $sk = '[skill='.$_.']'; + if ($_ = $quest->getField('reqSkillPoints')) + $sk .= ' ('.$_.')'; + + $infobox[] = Lang::$quest['profession'].Lang::$colon.$sk; + } + + // timer + if ($_ = $quest->getField('timeLimit')) + $infobox[] = Lang::$quest['timer'].Lang::$colon.Util::formatTime($_ * 1000); + + $startEnd = DB::Aowow()->select('SELECT * FROM ?_quests_startend WHERE questId = ?d', $_id); + + // start + $start = '[icon name=quest_start'.($quest->isDaily() ? '_daily' : '').']'.lang::$event['start'].Lang::$colon.'[/icon]'; + $s = []; + foreach ($startEnd as $se) + { + if ($se['method'] & 0x1) + { + Util::$pageTemplate->extendGlobalIds($se['type'], $se['typeId']); + $s[] = ($s ? '[span=invisible]'.$start.'[/span] ' : $start.' ') .'['.Util::$typeStrings[$se['type']].'='.$se['typeId'].']'; + } + } + + if ($s) + $infobox[] = implode('[br]', $s); + + // end + $end = '[icon name=quest_end'.($quest->isDaily() ? '_daily' : '').']'.lang::$event['end'].Lang::$colon.'[/icon]'; + $e = []; + foreach ($startEnd as $se) + { + if ($se['method'] & 0x2) + { + Util::$pageTemplate->extendGlobalIds($se['type'], $se['typeId']); + $e[] = ($e ? '[span=invisible]'.$end.'[/span] ' : $end.' ') . '['.Util::$typeStrings[$se['type']].'='.$se['typeId'].']'; + } + } + + if ($e) + $infobox[] = implode('[br]', $e); + + // Repeatable + if ($_flags & QUEST_FLAG_REPEATABLE || $_specialFlags & QUEST_FLAG_SPECIAL_REPEATABLE) + $infobox[] = Lang::$quest['repeatable']; + + // sharable | not sharable + $infobox[] = $_flags & QUEST_FLAG_SHARABLE ? Lang::$quest['sharable'] : Lang::$quest['notSharable']; + + // Keeps you PvP flagged + if ($quest->isPvPEnabled()) + $infobox[] = Lang::$quest['keepsPvpFlag']; + + // difficulty (todo (low): formula unclear. seems to be [minLevel,] -4, -2, (level), +3, +(9 to 15)) + if ($_level > 0) + { + $_ = []; + if ($_minLevel && $_minLevel < $_level - 4) + $_[] = '[color=q10]'.$_minLevel.'[/color]'; // red + + if (!$_minLevel || $_minLevel < $_level - 2) // orange + $_[] = '[color=r1]'.(!$_ && $_minLevel > $_level - 4 ? $_minLevel : $_level - 4).'[/color]'; + + $_[] = '[color=r2]'.(!$_ && $_minLevel > $_level - 2 ? $_minLevel : $_level - 2).'[/color]'; // yellow + $_[] = '[color=r3]'.($_level + 3).'[/color]'; // green + $_[] = '[color=r4]'.($_level + 3 + ceil(12 * $_level / MAX_LEVEL)).'[/color]'; // grey (is about +/-1 level off) + + if ($_) + $infobox[] = Lang::$game['difficulty'].Lang::$colon.implode('[small]  [/small]', $_); + } + + /**********/ + /* Series */ + /**********/ + + $series = []; + + // Quest Chain (are there cases where quests go in parallel?) + $chain = array( + array( + array( + 'side' => $_side, + 'typeStr' => Util::$typeStrings[TYPE_QUEST], + 'typeId' => $_id, + 'name' => $_name, + '_next' => $quest->getField('nextQuestIdChain') + ) + ) + ); + + $_ = $chain[0][0]; + while ($_) { - $tmp = $DB->selectRow(' - SELECT q.Id, q.Title - {, l.Title_loc?d as Title_loc} - FROM quest_template q - {LEFT JOIN (locales_quest l) ON l.Id=q.Id AND ?d} - WHERE q.NextQuestIdChain=?d - LIMIT 1 - ', - ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP, - ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP, - $quest['series'][0]['Id'] - ); - if($tmp) - { - $tmp['Title'] = localizedName($tmp, 'Title'); - array_unshift($quest['series'], $tmp); - } - } - // Квесты в цепочке после этого квеста - $tmp = end($quest['series']); - while($tmp) - { - $tmp = $DB->selectRow(' - SELECT q.Id, q.Title, q.NextQuestIdChain - {, l.Title_loc?d as Title_loc} - FROM quest_template q - {LEFT JOIN (locales_quest l) ON l.Id=q.Id AND ?} - WHERE q.Id=?d - LIMIT 1 - ', - ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP, - ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP, - $quest['series'][count($quest['series'])-1]['NextQuestIdChain'] - ); - if($tmp) - { - $tmp['Title'] = localizedName($tmp, 'Title'); - array_push($quest['series'], $tmp); - } - } - unset($tmp); - if(count($quest['series'])<=1) - unset($quest['series']); - - - /* ДРУГИЕ КВЕСТЫ */ - // (после их нахождения проверяем их тайтлы на наличие локализации) - - - // Квесты, которые необходимо выполнить, что бы получить этот квест - if(!$quest['req'] = $DB->select(' - SELECT q.Id, q.Title, q.NextQuestIdChain - {, l.Title_loc?d as Title_loc} - FROM quest_template q - {LEFT JOIN (locales_quest l) ON l.Id=q.Id AND ?} - WHERE - (q.NextQuestId=?d AND q.ExclusiveGroup<0) - OR (q.Id=?d AND q.NextQuestIdChain<>?d) - LIMIT 20', - ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP, ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP, - $quest['Id'], $quest['PrevQuestId'], $quest['Id'] - ) - ) - unset($quest['req']); - else - $questItems[] = 'req'; - - // Квесты, которые становятся доступными, только после того как выполнен этот квест (необязательно только он) - if(!$quest['open'] = $DB->select(' - SELECT q.Id, q.Title - {, l.Title_loc?d as Title_loc} - FROM quest_template q - {LEFT JOIN (locales_quest l) ON l.Id=q.Id AND ?} - WHERE - (q.PrevQuestId=?d AND q.Id<>?d) - OR q.Id=?d - LIMIT 20', - ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP, ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP, - $quest['Id'], $quest['NextQuestIdChain'], $quest['NextQuestId'] - ) - ) - unset($quest['open']); - else - $questItems[] = 'open'; - - // Квесты, которые становятся недоступными после выполнения этого квеста - if($quest['ExclusiveGroup']>0) - if(!$quest['closes'] = $DB->select(' - SELECT q.Id, q.Title - {, l.Title_loc?d as Title_loc} - FROM quest_template q - {LEFT JOIN (locales_quest l) ON l.Id=q.Id AND ?} - WHERE - q.ExclusiveGroup=?d AND q.Id<>?d - LIMIT 20 - ', - ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP, ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP, - $quest['ExclusiveGroup'], $quest['Id'] - ) - ) - unset($quest['closes']); - else - $questItems[] = 'closes'; - - // Требует выполнения одного из квестов, на выбор: - if(!$quest['reqone'] = $DB->select(' - SELECT q.Id, q.Title - {, l.Title_loc?d as Title_loc} - FROM quest_template q - {LEFT JOIN (locales_quest l) ON l.Id=q.Id AND ?} - WHERE - q.ExclusiveGroup>0 AND q.NextQuestId=?d - LIMIT 20 - ', - ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP, ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP, - $quest['Id'] - ) - ) - unset($quest['reqone']); - else - $questItems[] = 'reqone'; - - // Квесты, которые доступны, только во время выполнения этого квеста - if(!$quest['enables'] = $DB->select(' - SELECT q.Id, q.Title - {, l.Title_loc?d as Title_loc} - FROM quest_template q - {LEFT JOIN (locales_quest l) ON l.Id=q.Id AND ?} - WHERE q.PrevQuestId=?d - LIMIT 20 - ', - ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP, ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP, - -$quest['Id'] - ) - ) - unset($quest['enables']); - else - $questItems[] = 'enables'; - - // Квесты, во время выполнения которых доступен этот квест - if($quest['PrevQuestId']<0) - if(!$quest['enabledby'] = $DB->select(' - SELECT q.Id, q.Title - {, l.Title_loc?d as Title_loc} - FROM quest_template q - {LEFT JOIN (locales_quest l) ON l.Id=q.Id AND ?} - WHERE q.Id=?d - LIMIT 20 - ', - ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP, ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP, - -$quest['PrevQuestId'] - ) - ) - unset($quest['enabledby']); - else - $questItems[] = 'enabledby'; - - // Теперь локализуем все тайтлы квестов - if($questItems) - foreach($questItems as $item) - foreach($quest[$item] as $i => $x) - $quest[$item][$i]['Title'] = localizedName($quest[$item][$i], 'Title'); - - - - /* НАГРАДЫ И ТРЕБОВАНИЯ */ - - if($quest['RequiredSkillPoints']>0 && $quest['SkillOrClassMask']>0) - { - // Требуемый уровень скилла, что бы получить квест - /* - $skills = array( - -264 => 197, // Tailoring - -182 => 165, // Leatherworking - -24 => 182, // Herbalism - -101 => 356, // Fishing - -324 => 129, // First Aid - -201 => 202, // Engineering - -304 => 185, // Cooking - -121 => 164, // Blacksmithing - -181 => 171 // Alchemy - ); - */ - - // TODO: skill localization - $quest['reqskill'] = array( - 'name' => $DB->selectCell('SELECT name_loc'.$_SESSION['locale'].' FROM ?_skill WHERE skillID=?d LIMIT 1',$quest['SkillOrClassMask']), - 'value' => $quest['RequiredSkillPoints'] - ); - } - elseif($quest['SkillOrClassMask']<0) - { - $s = array(); - foreach($classes as $i => $class) - if (intval(-$quest['SkillOrClassMask'])==$i) - $s[] = $class; - - if (!count($s) == 0) - // Требуемый класс, что бы получить квест - $quest['reqclass'] = implode(", ", $s); - } - - // Требуемые отношения с фракциями, что бы начать квест - if($quest['RequiredMinRepFaction']) - $quest['RequiredMinRep'] = array( - 'name' => $DB->selectCell('SELECT name_loc'.$_SESSION['locale'].' FROM ?_factions WHERE factionID=?d LIMIT 1', $quest['RequiredMinRepFaction']), - 'entry' => $quest['RequiredMinRepFaction'], - 'value' => reputations($quest['RequiredMinRepValue']) - ); - if($quest['RequiredMaxRepFaction']) - $quest['RequiredMaxRep'] = array( - 'name' => $DB->selectCell('SELECT name_loc'.$_SESSION['locale'].' FROM ?_factions WHERE factionID=?d LIMIT 1', $quest['RequiredMaxRepFaction']), - 'entry' => $quest['RequiredMaxRepFaction'], - 'value' => reputations($quest['RequiredMaxRepValue']) - ); - - // Спеллы не требуют локализации, их инфа берется из базы - // Хранить в базе все локализации - задачка на будующее - - // Спелл, кастуемый на игрока в начале квеста - if($quest['SourceSpell']) - { - $tmp = $DB->selectRow(' - SELECT ?#, s.spellname_loc'.$_SESSION['locale'].' - FROM ?_spell s, ?_spellicons si - WHERE - s.spellID=?d - AND si.id=s.spellicon - LIMIT 1', - $spell_cols[0], - $quest['SourceSpell'] - ); - if($tmp) - { - $quest['SourceSpell'] = array( - 'name' => $tmp['spellname_loc'.$_SESSION['locale']], - 'entry' => $tmp['spellID']); - allspellsinfo2($tmp); - } - unset($tmp); - } - - // Итем, выдаваемый игроку в начале квеста - if($quest['SourceItemId']) - { - $quest['SourceItemId'] = iteminfo($quest['SourceItemId']); - $quest['SourceItemId']['SourceItemCount'] = $quest['SourceItemCount']; - } - - // Дополнительная информация о квесте (флаги, повторяемость, скрипты) - $quest['flagsdetails'] = GetFlagsDetails($quest); - if (!$quest['flagsdetails']) - unset($quest['flagsdetails']); - - // Спелл, кастуемый на игрока в награду за выполнение - if($quest['RewardSpellCast']>0 || $quest['RewardSpell']>0) - { - $tmp = $DB->SelectRow(' - SELECT ?#, s.spellname_loc'.$_SESSION['locale'].' - FROM ?_spell s, ?_spellicons si - WHERE - s.spellID=?d - AND si.id=s.spellicon - LIMIT 1', - $spell_cols[0], - $quest['RewardSpell']>0?$quest['RewardSpell']:$quest['RewardSpellCast'] - ); - if($tmp) - { - $quest['spellreward'] = array( - 'name' => $tmp['spellname_loc'.$_SESSION['locale']], - 'entry' => $tmp['spellID'], - 'realentry' => $quest['RewardSpellCast']>0 ? $quest['RewardSpellCast'] : $quest['RewardSpell']); - allspellsinfo2($tmp); - } - unset($tmp); - } - - // Создания, необходимые для квеста - //$quest['creaturereqs'] = array(); - //$quest['objectreqs'] = array(); - $quest['coreqs'] = array(); - for($i=0;$i<=4;++$i) - { - /* - * RequiredSpellCast dropped by TC 29.8.13 - */ - - //echo $quest['ReqCreatureOrGOCount'.$i].'
'; - if($quest['RequiredNpcOrGo'.$i] != 0 && $quest['RequiredNpcOrGoCount'.$i] != 0) - { - if($quest['RequiredNpcOrGo'.$i] > 0) - { - // Необходимо какое-либо взамодействие с созданием - $quest['coreqs'][$i] = array_merge( - creatureinfo($quest['RequiredNpcOrGo'.$i]), - array('req_type' => 'npc') - ); - } - else - { - // необходимо какое-то взаимодействие с объектом - $quest['coreqs'][$i] = array_merge( - objectinfo(-$quest['RequiredNpcOrGo'.$i]), - array('req_type' => 'object') - ); - } - // Количество - $quest['coreqs'][$i]['count'] = $quest['RequiredNpcOrGoCount'.$i]; - // Спелл - if($quest['RequiredSpellCast'.$i]) - $quest['coreqs'][$i]['spell'] = array( - 'name' => $DB->selectCell('SELECT spellname_loc'.$_SESSION['locale'].' FROM ?_spell WHERE spellid=?d LIMIT 1', $quest['RequiredSpellCast'.$i]), - 'entry' => $quest['RequiredSpellCast'.$i] - ); - } - } - if(!$quest['coreqs']) - unset($quest['coreqs']); - - // Вещи, необходимые для квеста - $quest['itemreqs'] = array(); - for($i=0;$i<=4;++$i) - { - if($quest['RequiredItemId'.$i]!=0 && $quest['RequiredItemCount'.$i]!=0) - $quest['itemreqs'][] = array_merge(iteminfo($quest['RequiredItemId'.$i]), array('count' => $quest['RequiredItemCount'.$i])); - } - if(!$quest['itemreqs']) - unset($quest['itemreqs']); - - // Фракции необходимые для квеста - if($quest['RepObjectiveFaction']>0) - { - $quest['factionreq'] = array( - 'name' => $DB->selectCell('SELECT name_loc'.$_SESSION['locale'].' FROM ?_factions WHERE factionID=?d LIMIT 1', $quest['RepObjectiveFaction']), - 'entry' => $quest['RepObjectiveFaction'], - 'value' => reputations($quest['RepObjectiveValue']) - ); - } - - /* КВЕСТГИВЕРЫ И КВЕСТТЕЙКЕРЫ */ - - // КВЕСТГИВЕРЫ - // НПС - $rows = $DB->select(' - SELECT c.entry, c.name, A, H - {, l.name_loc?d AS name_loc} - FROM creature_questrelation q, ?_factiontemplate, creature_template c - {LEFT JOIN (locales_creature l) ON l.entry=c.entry AND ?} - WHERE - q.quest=?d - AND c.entry=q.id - AND factiontemplateID=c.faction_A - ', - ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP, - ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP, - $quest['Id'] - ); - if($rows) - { - foreach($rows as $tmp) - { - $tmp['name'] = localizedName($tmp); - if($tmp['A'] == -1 && $tmp['H'] == 1) - $tmp['side'] = 'horde'; - elseif($tmp['A'] == 1 && $tmp['H'] == -1) - $tmp['side'] = 'alliance'; - $quest['start'][] = array_merge($tmp, array('type' => 'npc')); - } - } - unset($rows); - - // НПС-ивентовые - $rows = event_find(array('quest_id' => $quest['Id'])); - if ($rows) - { - foreach ($rows as $event) - foreach ($event['creatures_quests_id'] as $ids) - if ($ids['quest'] == $quest['Id']) - { - $tmp = creatureinfo($ids['creature']); - if($tmp['react'] == '-1,1') - $tmp['side'] = 'horde'; - elseif($tmp['react'] == '1,-1') - $tmp['side'] = 'alliance'; - $tmp['type'] = 'npc'; - $tmp['event'] = $event['entry']; - $quest['start'][] = $tmp; - } - } - unset($rows); - - // ГО - $rows = $DB->select(' - SELECT g.entry, g.name - {, l.name_loc?d AS name_loc} - FROM gameobject_questrelation q, gameobject_template g - {LEFT JOIN (locales_gameobject l) ON l.entry = g.entry AND ?} - WHERE - q.quest=?d - AND g.entry=q.id - ', - ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP, - ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP, - $quest['Id'] - ); - if($rows) - { - foreach($rows as $tmp) - { - $tmp['name'] = localizedName($tmp); - $quest['start'][] = array_merge($tmp, array('type' => 'object')); - } - } - unset($rows); - - // итем - $rows = $DB->select(' - SELECT i.name, i.entry, i.quality, LOWER(a.iconname) AS iconname - {, l.name_loc?d AS name_loc} - FROM ?_icons a, item_template i - {LEFT JOIN (locales_item l) ON l.entry=i.entry AND ?} - WHERE - startquest = ?d - AND id = displayid - ', - ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP, - ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP, - $quest['Id'] - ); - if($rows) - { - foreach($rows as $tmp) - { - $tmp['name'] = localizedName($tmp); - $quest['start'][] = array_merge($tmp, array('type' => 'item')); - } - } - unset($rows); - - // КВЕСТТЕЙКЕРЫ - // НПС - $rows = $DB->select(' - SELECT c.entry, c.name, A, H - {, l.name_loc?d AS name_loc} - FROM creature_involvedrelation q, ?_factiontemplate, creature_template c - {LEFT JOIN (locales_creature l) ON l.entry=c.entry AND ?} - WHERE - q.quest=?d - AND c.entry=q.id - AND factiontemplateID=c.faction_A - ', - ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP, - ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP, - $quest['Id'] - ); - if($rows) - { - foreach($rows as $tmp) - { - $tmp['name'] = localizedName($tmp); - if($tmp['A'] == -1 && $tmp['H'] == 1) - $tmp['side'] = 'horde'; - elseif($tmp['A'] == 1 && $tmp['H'] == -1) - $tmp['side'] = 'alliance'; - $quest['end'][] = array_merge($tmp, array('type' => 'npc')); - } - } - unset($rows); - - // ГО - $rows = $DB->select(' - SELECT g.entry, g.name - {, l.name_loc?d AS name_loc} - FROM gameobject_involvedrelation q, gameobject_template g - {LEFT JOIN (locales_gameobject l) ON l.entry = g.entry AND ?} - WHERE - q.quest=?d - AND g.entry=q.id - ', - ($_SESSION['locale']>0)? $_SESSION['locale']: DBSIMPLE_SKIP, - ($_SESSION['locale']>0)? 1: DBSIMPLE_SKIP, - $quest['Id'] - ); - if($rows) - { - foreach($rows as $tmp) - { - $tmp['name'] = localizedName($tmp); - $quest['end'][] = array_merge($tmp, array('type' => 'object')); - } - } - unset($rows); - - // Цель критерии - $rows = $DB->select(' - SELECT a.id, a.faction, a.name_loc?d AS name, a.description_loc?d AS description, a.category, a.points, s.iconname, z.areatableID - FROM ?_spellicons s, ?_achievementcriteria c, ?_achievement a - LEFT JOIN (?_zones z) ON a.map != -1 AND a.map = z.mapID - WHERE - a.icon = s.id - AND a.id = c.refAchievement - AND c.type IN (?a) - AND c.value1 = ?d - GROUP BY a.id - ORDER BY a.name_loc?d - ', - $_SESSION['locale'], - $_SESSION['locale'], - array(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST), - $quest['Id'], - $_SESSION['locale'] - ); - if($rows) - { - $quest['criteria_of'] = array(); - foreach($rows as $row) - { - allachievementsinfo2($row['id']); - $quest['criteria_of'][] = achievementinfo2($row); + if ($_ = DB::Aowow()->selectRow('SELECT id AS typeId, name_loc0, name_loc2, name_loc3, name_loc6, name_loc8, reqRaceMask FROM ?_quests WHERE nextQuestIdChain = ?d', $_['typeId'])) + { + $n = Util::localizedString($_, 'name'); + array_unshift($chain, array( + array( + 'side' => Util::sideByRaceMask($_['reqRaceMask']), + 'typeStr' => Util::$typeStrings[TYPE_QUEST], + 'typeId' => $_['typeId'], + 'name' => strlen($n) > 40 ? substr($n, 0, 40).'…' : $n + ) + )); } } - // Награды и благодарности, присылаемые почтой - if ($quest['RewardMailTemplateId']) + $_ = end($chain)[0]; + while($_) { - if(!($quest['mailrewards'] = loot('mail_loot_template', $quest['RewardMailTemplateId']))) - unset ($quest['mailrewards']); + if ($_ = DB::Aowow()->selectRow('SELECT id AS typeId, name_loc0, name_loc2, name_loc3, name_loc6, name_loc8, reqRaceMask, nextQuestIdChain AS _next FROM ?_quests WHERE id = ?d', $_['_next'])) + { + $n = Util::localizedString($_, 'name'); + array_push($chain, array( + array( + 'side' => Util::sideByRaceMask($_['reqRaceMask']), + 'typeStr' => Util::$typeStrings[TYPE_QUEST], + 'typeId' => $_['typeId'], + 'name' => strlen($n) > 40 ? substr($n, 0, 40).'…' : $n, + '_next' => $_['_next'], + ) + )); + } } - if ($quest['RewardMailDelay']) - $quest['maildelay'] = sec_to_time($quest['RewardMailDelay']); + + if (count($chain) > 1) + $series[] = [$chain, null]; + + + // todo (low): sensibly merge te following lists into 'series' + $listGen = function($cnd) + { + $chain = []; + $list = new QuestList($cnd); + if ($list->error) + return null; + + foreach ($list->iterate() as $id => $__) + { + $n = $list->getField('name', true); + $chain[] = array(array( + 'side' => Util::sideByRaceMask($list->getField('reqRaceMask')), + 'typeStr' => Util::$typeStrings[TYPE_QUEST], + 'typeId' => $id, + 'name' => strlen($n) > 40 ? substr($n, 0, 40).'…' : $n + )); + } + + return $chain; + }; + + $extraLists = array( + array( // Requires all of these quests (Quests that you must follow to get this quest) + 'reqQ', + array( + 'OR', + ['AND', ['nextQuestId', $_id], ['exclusiveGroup', 0, '<']], + ['AND', ['id', $quest->getField('prevQuestId')], ['nextQuestIdChain', $_id, '!']] + ) + ), + array( // Requires one of these quests (Requires one of the quests to choose from) + 'reqOneQ', + [['exclusiveGroup', 0, '>'], ['nextQuestId', $_id]] + ), + array( // Opens Quests (Quests that become available only after complete this quest (optionally only one)) + 'opensQ', + array( + 'OR', + ['AND', ['prevQuestId', $_id], ['id', $quest->getField('nextQuestIdChain'), '!']], + ['id', $quest->getField('nextQuestId')] + ) + ), + array( // Closes Quests (Quests that become inaccessible after completing this quest) + 'closesQ', + [['exclusiveGroup', 0, '!'], ['exclusiveGroup', $quest->getField('exclusiveGroup')], ['id', $_id, '!']] + ), + array( // During the quest available these quests (Quests that are available only at run time this quest) + 'enablesQ', + [['prevQuestId', -$_id]] + ), + array( // Requires an active quest (Quests during the execution of which is available on the quest) + 'enabledByQ', + [['id', -$quest->getField('prevQuestId')]] + ) + ); + + foreach ($extraLists as $el) + if ($_ = $listGen($el[1])) + $series[] = [$_, sprintf(Util::$dfnString, Lang::$quest[$el[0].'Desc'], Lang::$quest[$el[0]])]; + + + /*******************/ + /* Objectives List */ + /*******************/ + + $objectiveList = []; + + $srcItemId = $quest->getField('sourceItemId'); + if ($srcItemId) + { + $item = new itemList(array(['id', $srcItemId])); + if (!$item->error) + { + $item->addGlobalsToJscript(); + $objectiveList[] = array( + 'typeStr' => Util::$typeStrings[TYPE_ITEM], + 'id' => $srcItemId, + 'name' => $item->getField('name', true), + 'qty' => $quest->getField('sourceItemCount'), + 'quality' => $item->getField('quality'), + 'extraText' => ' ('.Lang::$quest['provided'].')' + ); + } + } + + if ($_ = $quest->getField('sourceSpellId')) + { + Util::$pageTemplate->extendGlobalIds(TYPE_SPELL, $_); + $objectiveList[] = array( + 'typeStr' => Util::$typeStrings[TYPE_SPELL], + 'id' => $_, + 'name' => SpellList::getName($_), + 'qty' => 0, + 'quality' => '', + 'extraText' => ' ('.Lang::$quest['provided'].')' + ); + } + + for ($i = 1; $i < 5; $i++) + { + $id = $quest->getField('reqNpcOrGo'.$i); + $qty = $quest->getField('reqNpcOrGoCount'.$i); + $altTxt = $quest->getField('objectiveText'.$i, true); + if (!$id || !$qty) + continue; + + if ($id > 0) + { + $proxy = new CreatureList(['OR', ['killCredit1', (int)$id], ['killCredit2', (int)$id]]); + if (!$proxy->error) + { + // todo (low): now do it properly this time! + $proxyList = ''.($altTxt ? $altTxt : CreatureList::getName($id)).''.($qty > 1 ? '  ('.$qty.')' : null); + $proxyList .= "
\n\n"; + foreach ($proxy->iterate() as $pId => $__) + $proxyList .= ' \n"; + + // re-add self + $proxyList .= ' \n"; + + $objectiveList[] = ['text' => $proxyList."
  •  
'.$proxy->getField('name', true)."
  •  
'.CreatureList::getName($id)."
\n
"]; + } + else + { + $objectiveList[] = array( + 'typeStr' => Util::$typeStrings[TYPE_NPC], + 'id' => $id, + 'name' => $altTxt ? $altTxt : CreatureList::getName($id), + 'qty' => $qty, + 'quality' => '', + 'extraText' => (($_specialFlags & QUEST_FLAG_SPECIAL_SPELLCAST) || $altTxt) ? '' : ' '.Lang::$achievement['slain'] + ); + } + } + else + { + $objectiveList[] = array( + 'typeStr' => Util::$typeStrings[TYPE_OBJECT], + 'id' => -$id, + 'name' => $altTxt ? $altTxt : GameObjectList::getName(-$id), + 'qty' => $qty, + 'quality' => '', + 'extraText' => '' + ); + } + } + + for ($i = 1; $i < 7; $i++) + { + $id = $quest->getField('reqItemId'.$i); + $qty = $quest->getField('reqItemCount'.$i); + if (!$id || !$qty || $id == $srcItemId) + continue; + + $item = new itemList(array(['id', $id])); + if (!$item->error) + { + $item->addGlobalsToJscript(); + $objectiveList[] = array( + 'typeStr' => Util::$typeStrings[TYPE_ITEM], + 'id' => $id, + 'name' => $item->getField('name', true), + 'qty' => $qty, + 'quality' => $item->getField('quality'), + 'extraText' => '' + ); + } + } + + for ($i = 1; $i < 3; $i++) + { + $id = $quest->getField('reqFactionId'.$i); + $val = $quest->getField('reqFactionValue'.$i); + if (!$id) + continue; + + $objectiveList[] = array( + 'typeStr' => Util::$typeStrings[TYPE_FACTION], + 'id' => $id, + 'name' => FactionList::getName($id), + 'qty' => '', + 'quality' => '', + 'extraText' => ' ('.sprintf(Util::$dfnString, $val.' '.Lang::$achievement['points'], Lang::getReputationLevelForPoints($val)).')' + ); + } + + if ($_questMoney < 0) + $objectiveList[] = ['text' => Lang::$quest['reqMoney'].Lang::$colon.Util::formatMoney(abs($_questMoney))]; + + if ($_ = $quest->getField('reqPlayerKills')) + $objectiveList[] = ['text' => Lang::$quest['playerSlain'].' ('.$_.')']; + + + /**********/ + /* Mapper */ + /**********/ + + /* + TODO (GODDAMNIT): jeez.. + */ + + // $startend + reqNpcOrGo[1-4] + $map = []; + + /***********/ + /* Rewards */ + /***********/ + + // rewards + $rewards = []; + + $comp = $quest->getField('rewardMoneyMaxLevel'); + $money = ''; + if ($_questMoney > 0) + $money .= Util::formatMoney($_questMoney); + if ($_questMoney > 0 && $comp > 0) + $money .= ' ' . sprintf(Lang::$quest['expConvert'], Util::formatMoney($_questMoney + $comp), MAX_LEVEL); + else if ($_questMoney <= 0 && $_questMoney + $comp > 0) + $money .= sprintf(Lang::$quest['expConvert2'], Util::formatMoney($_questMoney + $comp), MAX_LEVEL); + + $rewards['money'] = $money; + + if ($c = @$quest->choices[$_id][TYPE_ITEM]) + { + $choiceItems = new ItemList(array(['id', array_keys($c)])); + if (!$choiceItems->error) + { + $choiceItems->addGlobalsToJscript(); + foreach ($choiceItems->Iterate() as $id => $__) + { + $rewards['choice'][] = array( + 'typeStr' => Util::$typeStrings[TYPE_ITEM], + 'id' => $id, + 'name' => $choiceItems->getField('name', true), + 'quality' => $choiceItems->getField('quality'), + 'qty' => $c[$id], + 'globalStr' => 'g_items' + ); + } + } + } + + $rewards['items'] = []; // template requires initialization of this var + if ($r = @$quest->rewards[$_id]) + { + if (!empty($r[TYPE_ITEM])) + { + $rewItems = new ItemList(array(['id', array_keys($r[TYPE_ITEM])])); + if (!$rewItems->error) + { + $rewItems->addGlobalsToJscript(); + foreach ($rewItems->Iterate() as $id => $__) + { + $rewards['items'][] = array( + 'typeStr' => Util::$typeStrings[TYPE_ITEM], + 'id' => $id, + 'name' => $rewItems->getField('name', true), + 'quality' => $rewItems->getField('quality'), + 'qty' => $r[TYPE_ITEM][$id], + 'globalStr' => 'g_items' + ); + } + } + } + + if (!empty($r[TYPE_CURRENCY])) + { + $rewCurr = new CurrencyList(array(['id', array_keys($r[TYPE_CURRENCY])])); + if (!$rewCurr->error) + { + $rewCurr->addGlobalsToJscript(); + foreach ($rewCurr->Iterate() as $id => $__) + { + $rewards['items'][] = array( + 'typeStr' => Util::$typeStrings[TYPE_CURRENCY], + 'id' => $id, + 'name' => $rewCurr->getField('name', true), + 'quality' => 1, + 'qty' => $r[TYPE_CURRENCY][$id] * ($_side == 2 ? -1 : 1), // toggles the icon + 'globalStr' => 'g_gatheredcurrencies' + ); + } + } + } + } + + $displ = $quest->getField('rewardSpell'); + $cast = $quest->getField('rewardSpellCast'); + if (!$cast && $displ) + { + $cast = $displ; + $displ = 0; + } + + if ($cast || $displ) + { + $rewSpells = new SpellList(array(['id', [$displ, $cast]])); + $rewSpells->addGlobalsToJscript(); + + if (User::isInGroup(U_GROUP_STAFF)) + { + $extra = null; + if ($_ = $rewSpells->getEntry($displ)) + $extra = sprintf(Lang::$quest['spellDisplayed'], $displ, Util::localizedString($_, 'name')); + + if ($_ = $rewSpells->getEntry($cast)) + { + $rewards['spells']['extra'] = $extra; + $rewards['spells']['cast'][] = array( + 'typeStr' => Util::$typeStrings[TYPE_SPELL], + 'id' => $cast, + 'name' => Util::localizedString($_, 'name'), + 'globalStr' => 'g_spells' + ); + } + } + else // check if we have a learn spell + { + $teach = []; + foreach ($rewSpells->iterate() as $id => $__) + if ($_ = $rewSpells->canTeachSpell()) + foreach ($_ as $idx) + $teach[$rewSpells->getField('effect'.$idx.'TriggerSpell')] = $id; + + if ($_ = $rewSpells->getEntry($displ)) + { + $rewards['spells']['extra'] = null; + $rewards['spells'][$teach ? 'learn' : 'cast'][] = array( + 'typeStr' => Util::$typeStrings[TYPE_SPELL], + 'id' => $displ, + 'name' => Util::localizedString($_, 'name'), + 'globalStr' => 'g_spells' + ); + } + else if (($_ = $rewSpells->getEntry($cast)) && !$teach) + { + $rewards['spells']['extra'] = null; + $rewards['spells']['cast'][] = array( + 'typeStr' => Util::$typeStrings[TYPE_SPELL], + 'id' => $cast, + 'name' => Util::localizedString($_, 'name'), + 'globalStr' => 'g_spells' + ); + } + else + { + $taught = new SpellList(array(['id', array_keys($teach)])); + if (!$taught->error) + { + $taught->addGlobalsToJscript(); + $rewards['spells']['extra'] = null; + foreach ($taught->iterate() as $id => $__) + { + $rewards['spells']['learn'][] = array( + 'typeStr' => Util::$typeStrings[TYPE_SPELL], + 'id' => $id, + 'name' => $taught->getField('name', true), + 'globalStr' => 'g_spells' + ); + } + } + } + } + } + + // gains + $gains = []; + + if ($_ = $quest->getField('rewardXP')) + $gains['xp'] = $_; + + if ($_ = $quest->getField('rewardTalents')) + $gains['tp'] = $_; + + + for ($i = 1; $i < 6; $i++) + { + $fac = $quest->getField('rewardFactionId'.$i); + $qty = $quest->getField('rewardFactionValue'.$i); + if (!$fac || !$qty) + continue; + + $gains['rep'][] = array( + 'qty' => $qty, + 'id' => $fac, + 'name' => FactionList::getName($fac) + ); + } + + if ($_ = (new TitleList(array(['id', $quest->getField('rewardTitleId')])))->getHtmlizedName()) + $gains['title'] = sprintf(Lang::$quest['theTitle'], $_); + + // reward mail + $mail = []; + $relTabs = []; + if ($_ = $quest->getField('rewardMailTemplateId')) + { + $delay = $quest->getField('rewardMailDelay'); + $letter = DB::Aowow()->selectRow('SELECT * FROM ?_mailTemplate WHERE id = ?d', $_); + + $mail = array( + 'delay' => $delay ? sprintf(Lang::$quest['mailIn'], Util::formatTime($delay * 1000)) : null, + 'text' => $letter ? Util::parseHtmlText(Util::localizedString($letter, 'text')) : null, + 'subject' => Util::parseHtmlText(Util::localizedString($letter, 'subject')) + ); + + $extraCols = ['Listview.extraCols.percent']; + if ($loot = Util::handleLoot(LOOT_MAIL, $_, User::isInGroup(U_GROUP_STAFF), $extraCols)) + { + $relTabs[] = array( + 'file' => 'item', + 'data' => $loot, + 'params' => [ + 'tabs' => '$tabsRelated', + 'name' => '[Mail Attachments]', + 'id' => 'mail-attachments', + 'extraCols' => "$[".implode(', ', array_unique($extraCols))."]", + 'hiddenCols' => "$".json_encode(['side', 'slot', 'reqlevel']) + ] + ); + } + } + + /****************/ + /* Main Content */ + /****************/ + + // menuId 3: Quest g_initPath() + // tabId 0: Database g_initHeader() + $pageData = array( + 'page' => array( + 'title' => $_name.' - '.Util::ucFirst(Lang::$game['quest']), + 'name' => $_name, + 'path' => json_encode($_path, JSON_NUMERIC_CHECK), + 'tab' => 0, + 'type' => TYPE_QUEST, + 'typeId' => $_id, + 'objectives' => $quest->parseText('objectives', false), + 'details' => $quest->parseText('details', false), + 'offerReward' => $quest->parseText('offerReward', false), + 'requestItems' => $quest->parseText('requestItems', false), + 'completed' => $quest->parseText('completed', false), + 'end' => $quest->parseText('end', false), + 'suggestedPl' => $quest->getField('suggestedPlayers'), + 'infobox' => '[ul][li]'.implode('[/li][li]', $infobox).'[/li][/ul]', + 'series' => $series, + 'objectiveList' => $objectiveList, + 'rewards' => $rewards, + 'gains' => $gains, + 'mail' => $mail, + // 'map' => array( + // 'data' => ['zone' => $_id], + // 'som' => json_encode($som, JSON_NUMERIC_CHECK) + // ), + 'reqJS' => array( + // $map ? 'static/js/Mapper.js' : null + ), + 'reqCSS' => array( + ['path' => 'static/css/Book.css'], + // $map ? ['path' => 'static/css/Mapper.css'] : null, + // $map ? ['path' => 'static/css/Mapper_ie6.css', 'ieCond' => 'lte IE 6'] : null + ), + 'redButtons' => array( + BUTTON_LINKS => ['color' => 'ffffff00', 'linkId' => 'quest:'.$_id.':'.$_level.''], + BUTTON_WOWHEAD => true + ) + ), + 'relTabs' => $relTabs + ); + + if ($_flags & QUEST_FLAG_UNAVAILABLE || $quest->getField('cuFlags') & CUSTOM_EXCLUDE_FOR_LISTVIEW) + $pageData['page']['unavailable'] = true; + + if ($_ = $quest->getField('reqMinRepFaction')) + { + $val = $quest->getField('reqMinRepValue'); + $pageData['page']['reqMinRep'] = sprintf(Lang::$quest['reqRepWith'], $_, FactionList::getName($_), Lang::$quest['reqRepMin'], sprintf(Util::$dfnString, $val.' '.Lang::$achievement['points'], Lang::getReputationLevelForPoints($val))); + } + + if ($_ = $quest->getField('reqMaxRepFaction')) + { + $val = $quest->getField('reqMaxRepValue'); + $pageData['page']['reqMaxRep'] = sprintf(Lang::$quest['reqRepWith'], $_, FactionList::getName($_), Lang::$quest['reqRepMax'], sprintf(Util::$dfnString, $val.' '.Lang::$achievement['points'], Lang::getReputationLevelForPoints($val))); + } + + + /**************/ + /* Extra Tabs */ + /**************/ + + // tab: see also + $seeAlso = new QuestList(array(['name_loc'.User::$localeId, '%'.$_name.'%'], ['id', $_id, '!'])); + if (!$seeAlso->error) + { + $seeAlso->addGlobalsToJScript(); + $pageData['relTabs'][] = array( + 'file' => 'quest', + 'data' => $seeAlso->getListviewData(), + 'params' => [ + 'tabs' => '$tabsRelated', + 'name' => '$LANG.tab_seealso', + 'id' => 'see-also' + ] + ); + } + + // tab: criteria of + $criteriaOf = new AchievementList(array(['ac.type', ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST], ['ac.value1', $_id])); + if (!$criteriaOf->error) + { + $criteriaOf->addGlobalsToJScript(); + $pageData['relTabs'][] = array( + 'file' => 'achievement', + 'data' => $criteriaOf->getListviewData(), + 'params' => [ + 'tabs' => '$tabsRelated', + 'name' => '$LANG.tab_criteriaof', + 'id' => 'criteria-of' + ] + ); + } $smarty->saveCache($cacheKeyPage, $pageData); } -// menuId 3: Quest g_initPath() -// tabId 0: Database g_initHeader() -$smarty->updatePageVars(array( - 'title' => implode(" - ", $pageData['title']), - 'path' => json_encode($pageData['path'], JSON_NUMERIC_CHECK), - 'tab' => 0, - 'type' => TYPE_QUEST, - 'typeId' => $_id -)); - +$smarty->updatePageVars($pageData['page']); $smarty->assign('community', CommunityContent::getAll(TYPE_QUEST, $_id)); // comments, screenshots, videos -$smarty->assign('lang', array_merge(Lang::$main, Lang::$game, Lang::$quest, ['colon' => Lang::$colon])); -$smarty->assign('lvData', $pageData); +$smarty->assign('lang', array_merge(Lang::$main, Lang::$game, Lang::$item, Lang::$achievement, Lang::$npc, Lang::$quest, ['colon' => Lang::$colon])); +$smarty->assign('lvData', $pageData['relTabs']); // load the page $smarty->display('quest.tpl'); diff --git a/pages/quests.php b/pages/quests.php new file mode 100644 index 00000000..01505a7c --- /dev/null +++ b/pages/quests.php @@ -0,0 +1,98 @@ +error(); + +if (!$smarty->loadCache($cacheKey, $pageData, $filter)) +{ + $conditions = []; + + if ($cat) + { + // path + for ($i = 0; $i < count($cat); $i++) + $path[] = $cat[$i]; + + // title + + // cnd + if (isset($cat[1])) + $conditions[] = ['zoneOrSort', $cat[1]]; + else if (isset($cat[0])) + $conditions[] = ['zoneOrSort', $validCats[$cat[0]]]; + } + + $questFilter = new QuestListFilter(); + + if ($_ = $questFilter->getConditions()) + $conditions[] = $_; + + $quests = new QuestList($conditions, ['extraOpts' => $questFilter->extraOpts]); + + $quests->addGlobalsToJscript(); + + // recreate form selection + $filter = array_merge($questFilter->getForm('form'), $filter); + $filter['query'] = isset($_GET['filter']) ? $_GET['filter'] : NULL; + $filter['fi'] = $questFilter->getForm(); + + $lv = array( + 'file' => 'quest', + 'data' => $quests->getListviewData(), + 'params' => [] + ); + + if (!empty($filter['fi']['extraCols'])) + $lv['params']['extraCols'] = '$fi_getExtraCols(fi_extraCols, 0, 0)'; + + // create note if search limit was exceeded + if ($quests->getMatches() > CFG_SQL_LIMIT_DEFAULT) + { + $lv['params']['note'] = sprintf(Util::$tryFilteringString, 'LANG.lvnote_questsfound', $quests->getMatches(), CFG_SQL_LIMIT_DEFAULT); + $lv['params']['_truncated'] = 1; + } + else if (isset($cat[1]) && $cat[1] > 0) + $lv['params']['note'] = '$$WH.sprintf(LANG.lvnote_questgivers, '.$cat[1].', g_zones['.$cat[1].'], '.$cat[1].')'; + + if ($questFilter->error) + $lv['params']['_errors'] = '$1'; + + + // menuId 3: Quest g_initPath() + // tabId 0: Database g_initHeader() + $pageData = array( + 'page' => array( + 'title' => implode(' - ', $title), + 'path' => json_encode($path, JSON_NUMERIC_CHECK), + 'tab' => 0, + 'subCat' => $pageParam ? '='.$pageParam : '', + 'reqJS' => array( + 'static/js/filters.js' + ) + ), + 'lv' => $lv + ); + + $smarty->saveCache($cacheKey, $pageData, $filter); +} + + +$smarty->updatePageVars($pageData['page']); +$smarty->assign('filter', $filter); +$smarty->assign('lang', array_merge(Lang::$main, Lang::$game, Lang::$quest, ['colon' => Lang::$colon])); +$smarty->assign('lvData', $pageData['lv']); + +// load the page +$smarty->display('quests.tpl'); + +?> diff --git a/pages/race.php b/pages/race.php index 127f6656..4ad8718d 100644 --- a/pages/race.php +++ b/pages/race.php @@ -98,7 +98,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) // Classes $classes = new CharClassList(array(['racemask', $_mask, '&'])); - $classes->addGlobalsToJscript($smarty); + $classes->addGlobalsToJscript(); $pageData['relTabs'][] = array( 'file' => 'class', @@ -115,7 +115,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ); $tongues = new SpellList($conditions); - $tongues->addGlobalsToJscript($smarty); + $tongues->addGlobalsToJscript(); $pageData['relTabs'][] = array( 'file' => 'spell', @@ -135,7 +135,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ); $racials = new SpellList($conditions); - $racials->addGlobalsToJscript($smarty); + $racials->addGlobalsToJscript(); $pageData['relTabs'][] = array( 'file' => 'spell', @@ -150,14 +150,13 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) // Quests $conditions = array( - ['RequiredRaces', $_mask, '&'], - [['RequiredRaces', RACE_MASK_ALL, '&'], RACE_MASK_ALL, '!'], - [['RequiredRaces', RACE_MASK_HORDE, '&'], RACE_MASK_HORDE, '!'], - [['RequiredRaces', RACE_MASK_ALLIANCE, '&'], RACE_MASK_ALLIANCE, '!'] + ['reqRaceMask', $_mask, '&'], + [['reqRaceMask', RACE_MASK_HORDE, '&'], RACE_MASK_HORDE, '!'], + [['reqRaceMask', RACE_MASK_ALLIANCE, '&'], RACE_MASK_ALLIANCE, '!'] ); $quests = new QuestList($conditions); - $quests->addGlobalsToJscript($smarty); + $quests->addGlobalsToJscript(); $pageData['relTabs'][] = array( 'file' => 'quest', @@ -178,7 +177,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ); $mounts = new ItemList($conditions); - $mounts->addGlobalsToJscript($smarty); + $mounts->addGlobalsToJscript(); $pageData['relTabs'][] = array( 'file' => 'item', diff --git a/pages/skill.php b/pages/skill.php index ec2b659f..183c5738 100644 --- a/pages/skill.php +++ b/pages/skill.php @@ -60,7 +60,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $recipes = new SpellList($condition); // also relevant for 3 if (!$recipes->error) { - $recipes->addGlobalsToJscript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $recipes->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); $pageData['relTabs'][] = array( 'file' => 'spell', @@ -86,7 +86,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $recipeItems = new ItemList($conditions); if (!$recipeItems->error) { - $recipeItems->addGlobalsToJscript($smarty, GLOBALINFO_SELF); + $recipeItems->addGlobalsToJScript(GLOBALINFO_SELF); if ($_ = array_search($_id, $filterRecipe)) $_ = sprintf(Util::$filterResultString, "?items=9.".$_); @@ -116,7 +116,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $created = new ItemList(array(['i.id', $created], 0)); if (!$created->error) { - $created->addGlobalsToJscript($smarty, GLOBALINFO_SELF); + $created->addGlobalsToJScript(GLOBALINFO_SELF); if ($_ = array_search($_id, $filterItem)) $_ = sprintf(Util::$filterResultString, "?items&filter=cr=86;crs=".$_.";crv=0"); @@ -144,7 +144,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $reqBy = new ItemList($conditions); if (!$reqBy->error) { - $reqBy->addGlobalsToJscript($smarty, GLOBALINFO_SELF); + $reqBy->addGlobalsToJScript(GLOBALINFO_SELF); if ($_ = array_search($_id, $filterItem)) $_ = sprintf(Util::$filterResultString, "?items&filter=cr=99:168;crs=".$_.":2;crv=0:0"); @@ -170,7 +170,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $reqBy = new ItemsetList($conditions); if (!$reqBy->error) { - $reqBy->addGlobalsToJscript($smarty, GLOBALINFO_SELF); + $reqBy->addGlobalsToJScript(GLOBALINFO_SELF); $pageData['relTabs'][] = array( 'file' => 'itemset', @@ -210,7 +210,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $reqRace |= $spells->getField('reqRaceMask'); } - $spells->addGlobalsToJscript($smarty, GLOBALINFO_SELF); + $spells->addGlobalsToJScript(GLOBALINFO_SELF); $pageData['relTabs'][] = array( 'file' => 'spell', @@ -268,7 +268,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) if (!$trainer->error) { - $trainer->addGlobalsToJscript($smarty); + $trainer->addGlobalsToJscript(); $pageData['relTabs'][] = array( 'file' => 'creature', @@ -307,7 +307,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $quests = new QuestList(array(['zoneOrSort', -$sort], 0)); if (!$quests->error) { - $quests->addGlobalsToJScript($smarty); + $quests->addGlobalsToJScript(); $pageData['relTabs'][] = array( 'file' => 'quest', 'data' => $quests->getListviewData(), diff --git a/pages/spell.php b/pages/spell.php index c4f141f1..4c9e15c2 100644 --- a/pages/spell.php +++ b/pages/spell.php @@ -56,7 +56,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) if ($spell->error) $smarty->notFound(Lang::$game['spell'], $_id); - $spell->addGlobalsToJScript($smarty, GLOBALINFO_ANY); + $spell->addGlobalsToJScript(GLOBALINFO_ANY); $_cat = $spell->getField('typeCat'); $l = [null, 'A', 'B', 'C']; @@ -154,26 +154,21 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $infobox[] = '[li]'.(in_array($_cat, [-2, 7, -13]) ? sprintf(Lang::$game['reqLevel'], $_) : Lang::$game['level'].Lang::$colon.$_).'[/li]'; } - if ($mask = $spell->getField('reqRaceMask')) // race + // races + if ($_ = Lang::getRaceString($spell->getField('reqRaceMask'), $__, false, $n)) { - $bar = []; - for ($i = 0; $i < 11; $i++) - if ($mask & (1 << $i)) - $bar[] = (!fMod(count($bar) + 1, 3) ? '\n' : null).'[race='.($i + 1).']'; - - $t = count($bar) == 1 ? Lang::$game['race'] : Lang::$game['races']; - $infobox[] = '[li]'.Util::ucFirst($t).Lang::$colon.implode(', ', $bar).'[/li]'; + if ($_ != Lang::$game['ra'][0]) // omit: "both" + { + $t = $n == 1 ? Lang::$game['race'] : Lang::$game['races']; + $infobox[] = '[li]'.Util::ucFirst($t).Lang::$colon.$_.'[/li]'; + } } - if ($mask = $spell->getField('reqClassMask')) // class + // classes + if ($_ = Lang::getClassString($spell->getField('reqClassMask'), false, $n)) { - $bar = []; - for ($i = 0; $i < 11; $i++) - if ($mask & (1 << $i)) - $bar[] = (!fMod(count($bar) + 1, 3) ? '\n' : null).'[class='.($i + 1).']'; - - $t = count($bar) == 1 ? Lang::$game['class'] : Lang::$game['classes']; - $infobox[] = '[li]'.Util::ucFirst($t).Lang::$colon.implode(', ', $bar).'[/li]'; + $t = $n == 1 ? Lang::$game['class'] : Lang::$game['classes']; + $infobox[] = '[li]'.Util::ucFirst($t).Lang::$colon.$_.'[/li]'; } if ($_ = $spell->getField('spellFocusObject')) // spellFocus @@ -191,7 +186,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $rSkill = new SkillList(array(['id', $_])); if (!$rSkill->error) { - $rSkill->addGlobalsToJScript($smarty); + $rSkill->addGlobalsToJScript(); $bar = sprintf(Lang::$game['requires'], '[skill='.$rSkill->id.']'); if ($_ = $spell->getField('learnedAt')) @@ -207,7 +202,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $rSpell = new SpellList(array(['id', $_])); if (!$rSpell->error) { - $rSpell->addGlobalsToJScript($smarty); + $rSpell->addGlobalsToJScript(); $infobox[] = '[li]'.Lang::$game['requires2'].' [spell='.$rSpell->id.'][/li]'; } } @@ -662,7 +657,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) 'count' => 0 ); - $trig->addGlobalsToJScript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $trig->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); } // Effect Name @@ -1142,7 +1137,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ] ); - $modSpells->addGlobalsToJScript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $modSpells->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); } } @@ -1194,7 +1189,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ] ); - $modsSpell->addGlobalsToJScript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $modsSpell->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); } } @@ -1260,7 +1255,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ] ); - $saSpells->addGlobalsToJScript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $saSpells->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); } // tab: used by - itemset @@ -1283,7 +1278,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ] ); - $ubSets->addGlobalsToJScript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $ubSets->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); } // tab: used by - item @@ -1309,7 +1304,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ] ); - $ubItems->addGlobalsToJScript($smarty, GLOBALINFO_SELF); + $ubItems->addGlobalsToJScript(GLOBALINFO_SELF); } // tab: used by - object @@ -1332,7 +1327,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ] ); - $ubObjects->addGlobalsToJScript($smarty); + $ubObjects->addGlobalsToJScript(); } // tab: criteria of @@ -1355,7 +1350,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ] ); - $coAchievemnts->addGlobalsToJScript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $coAchievemnts->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); } // tab: contains @@ -1466,7 +1461,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ] ); - $stacks->addGlobalsToJScript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $stacks->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); } } } @@ -1519,7 +1514,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ] ); - $linked->addGlobalsToJScript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $linked->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); } @@ -1544,17 +1539,18 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ] ); - $trigger->addGlobalsToJScript($smarty, GLOBALINFO_SELF); + $trigger->addGlobalsToJScript(GLOBALINFO_SELF); } // used by - creature // SMART_SCRIPT_TYPE_CREATURE = 0; SMART_ACTION_CAST = 11; SMART_ACTION_ADD_AURA = 75; SMART_ACTION_INVOKER_CAST = 85; SMART_ACTION_CROSS_CAST = 86 - $smart = DB::Aowow()->selectCol('SELECT entryOrGUID FROM smart_scripts WHERE entryorguid > 0 AND source_type = 0 AND action_type IN (11, 75, 85, 86) AND action_param1 = ?d', $_id); $conditions = array( - 'OR', ['id', $smart], + 'OR', ['spell1', $_id], ['spell2', $_id], ['spell3', $_id], ['spell4', $_id], ['spell5', $_id], ['spell6', $_id], ['spell7', $_id], ['spell8', $_id] ); + if ($_ = DB::Aowow()->selectCol('SELECT entryOrGUID FROM smart_scripts WHERE entryorguid > 0 AND source_type = 0 AND action_type IN (11, 75, 85, 86) AND action_param1 = ?d', $_id)) + $conditions[] = ['id', $_]; $ubCreature = new CreatureList($conditions); if (!$ubCreature->error) @@ -1569,12 +1565,12 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ] ); - $ubCreature->addGlobalsToJScript($smarty, GLOBALINFO_SELF); + $ubCreature->addGlobalsToJScript(GLOBALINFO_SELF); } // tab: questreward - $query = 'SELECT qt.id FROM quest_template qt JOIN ?_spell s ON s.id = qt.SourceSpellId OR s.id = qt.RewardSpellCast OR (s.id = qt.RewardSpell AND qt.RewardSpellCast = 0) - WHERE (s.effect1Id IN (36, 57) AND effect1TriggerSpell = ?d) OR (s.effect2Id IN (36, 57) AND effect2TriggerSpell = ?d) OR (s.effect3Id IN (36, 57) AND effect3TriggerSpell = ?d)'; + $query = 'SELECT q.id FROM ?_quests q JOIN ?_spell s ON s.id = sourceSpellId OR s.id = rewardSpellCast OR (s.id = rewardSpell AND rewardSpellCast = 0) + WHERE (effect1Id IN (36, 57) AND effect1TriggerSpell = ?d) OR (effect2Id IN (36, 57) AND effect2TriggerSpell = ?d) OR (effect3Id IN (36, 57) AND effect3TriggerSpell = ?d)'; if ($ids = DB::Aowow()->selectCol($query, $_id, $_id, $_id)) { @@ -1591,7 +1587,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ] ); - $tbQuest->addGlobalsToJScript($smarty); + $tbQuest->addGlobalsToJScript(); } } @@ -1601,7 +1597,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $teaches = new SpellList(array(['id', $ids])); if (!$teaches->error) { - $teaches->addGlobalsToJScript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $teaches->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); $vis = ['level', 'schools']; $hid = []; if (!$teaches->hasSetFields(['skillLines'])) @@ -1670,7 +1666,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) $tbTrainer = new CreatureList(array(0, ['ct.id', $list], ['ct.spawns', 0, '>'], ['ct.npcflag', 0x10, '&'])); if (!$tbTrainer->error) { - $tbTrainer->addGlobalsToJscript($smarty); + $tbTrainer->addGlobalsToJscript(); $pageData['relTabs'][] = array( 'file' => 'creature', 'data' => $tbTrainer->getListviewData(), @@ -1705,7 +1701,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ] ); - $tbSpell->addGlobalsToJScript($smarty, GLOBALINFO_SELF); + $tbSpell->addGlobalsToJScript(GLOBALINFO_SELF); } // tab: taught by item (i'd like to precheck $spell->sources, but there is no source:item only complicated crap like "drop" and "vendor") @@ -1731,7 +1727,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) ] ); - $tbItem->addGlobalsToJScript($smarty, GLOBALINFO_SELF); + $tbItem->addGlobalsToJScript(GLOBALINFO_SELF); } // find associated NPC, Item and merge results diff --git a/pages/spells.php b/pages/spells.php index 4b0b9e64..63336cdc 100644 --- a/pages/spells.php +++ b/pages/spells.php @@ -389,7 +389,7 @@ if (!$smarty->loadCache($cacheKey, $pageData, $filter)) $spells = new SpellList($conditions); - $spells->addGlobalsToJscript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $spells->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); $lv['data'] = $spells->getListviewData(); // recreate form selection diff --git a/pages/title.php b/pages/title.php index 9f17e71a..838c5cb6 100644 --- a/pages/title.php +++ b/pages/title.php @@ -71,7 +71,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) { case 4: $quests = new QuestList(array(['id', $entries])); - $quests->addGlobalsToJscript($smarty, GLOBALINFO_REWARDS); + $quests->addGlobalsToJScript(GLOBALINFO_REWARDS); $pageData['relTabs'][] = array( 'file' => 'quest', @@ -87,7 +87,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData)) break; case 12: $acvs = new AchievementList(array(['id', $entries])); - $acvs->addGlobalsToJscript($smarty); + $acvs->addGlobalsToJscript(); $pageData['relTabs'][] = array( 'file' => 'achievement', diff --git a/search.php b/search.php index d59462c4..6441f55d 100644 --- a/search.php +++ b/search.php @@ -281,7 +281,7 @@ if (!$smarty->loadCache($cacheKey, $found)) if ($data = $wEvents->getListviewData()) { - $wEvents->addGlobalsToJscript($smarty); + $wEvents->addGlobalsToJscript(); foreach ($data as &$d) { @@ -346,7 +346,7 @@ if (!$smarty->loadCache($cacheKey, $found)) if ($data = $sets->getListviewData()) { - $sets->addGlobalsToJscript($smarty, GLOBALINFO_SELF); + $sets->addGlobalsToJScript(GLOBALINFO_SELF); foreach ($sets->iterate() as $__) $data[$sets->id]['param1'] = $sets->getField('quality'); @@ -403,7 +403,7 @@ if (!$smarty->loadCache($cacheKey, $found)) if ($data = $items->getListviewData($searchMask & SEARCH_TYPE_JSON ? (ITEMINFO_SUBITEMS | ITEMINFO_JSON) : 0)) { - $items->addGlobalsToJscript($smarty); + $items->addGlobalsToJscript(); foreach ($items->iterate() as $__) { @@ -444,7 +444,7 @@ if (!$smarty->loadCache($cacheKey, $found)) if ($data = $abilities->getListviewData()) { - $abilities->addGlobalsToJscript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $abilities->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); $vis = ['level', 'singleclass', 'schools']; if ($abilities->hasSetFields(['reagent1'])) @@ -486,7 +486,7 @@ if (!$smarty->loadCache($cacheKey, $found)) if ($data = $talents->getListviewData()) { - $talents->addGlobalsToJscript($smarty); + $talents->addGlobalsToJscript(); $vis = ['level', 'singleclass', 'schools']; if ($abilities->hasSetFields(['reagent1'])) @@ -528,7 +528,7 @@ if (!$smarty->loadCache($cacheKey, $found)) if ($data = $glyphs->getListviewData()) { - $glyphs->addGlobalsToJscript($smarty, GLOBALINFO_SELF); + $glyphs->addGlobalsToJScript(GLOBALINFO_SELF); foreach ($glyphs->iterate() as $__) $data[$glyphs->id]['param1'] = '"'.strToLower($glyphs->getField('iconString')).'"'; @@ -563,7 +563,7 @@ if (!$smarty->loadCache($cacheKey, $found)) if ($data = $prof->getListviewData()) { - $prof->addGlobalsToJscript($smarty, GLOBALINFO_SELF); + $prof->addGlobalsToJScript(GLOBALINFO_SELF); foreach ($prof->iterate() as $__) $data[$prof->id]['param1'] = '"'.strToLower($prof->getField('iconString')).'"'; @@ -598,7 +598,7 @@ if (!$smarty->loadCache($cacheKey, $found)) if ($data = $prof->getListviewData()) { - $prof->addGlobalsToJscript($smarty, GLOBALINFO_SELF | GLOBALINFO_RELATED); + $prof->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_RELATED); foreach ($prof->iterate() as $__) $data[$prof->id]['param1'] = '"'.strToLower($prof->getField('iconString')).'"'; @@ -633,7 +633,7 @@ if (!$smarty->loadCache($cacheKey, $found)) if ($data = $vPets->getListviewData()) { - $vPets->addGlobalsToJscript($smarty); + $vPets->addGlobalsToJscript(); foreach ($vPets->iterate() as $__) $data[$vPets->id]['param1'] = '"'.strToLower($vPets->getField('iconString')).'"'; @@ -668,7 +668,7 @@ if (!$smarty->loadCache($cacheKey, $found)) if ($data = $mounts->getListviewData()) { - $mounts->addGlobalsToJscript($smarty, GLOBALINFO_SELF); + $mounts->addGlobalsToJScript(GLOBALINFO_SELF); foreach ($mounts->iterate() as $__) $data[$mounts->id]['param1'] = '"'.strToLower($mounts->getField('iconString')).'"'; @@ -728,16 +728,12 @@ if (!$smarty->loadCache($cacheKey, $found)) if ($searchMask & 0x0008000) { // [['cuFlags', MASK, '&'], 0], // todo (med): identify disabled quests - // use defined $conditions array when using own table - $cnd = array( - [User::$localeId ? 'lq.Title_loc'.User::$localeId : 'Title', $query], - $maxResults - ); + $cnd = array_merge($cndBase, [$createLookup()]); $quests = new QuestList($cnd); if ($data = $quests->getListviewData()) { - $quests->addGlobalsToJScript($smarty); + $quests->addGlobalsToJScript(); $found['quest'] = array( 'type' => TYPE_QUEST, @@ -764,7 +760,7 @@ if (!$smarty->loadCache($cacheKey, $found)) if ($data = $acvs->getListviewData()) { - $acvs->addGlobalsToJScript($smarty); + $acvs->addGlobalsToJScript(); foreach ($acvs->iterate() as $__) $data[$acvs->id]['param1'] = '"'.strToLower($acvs->getField('iconString')).'"'; @@ -797,7 +793,7 @@ if (!$smarty->loadCache($cacheKey, $found)) if ($data = $stats->getListviewData()) { - $stats->addGlobalsToJScript($smarty, GLOBALINFO_SELF); + $stats->addGlobalsToJScript(GLOBALINFO_SELF); $found['statistic'] = array( 'type' => TYPE_ACHIEVEMENT, @@ -829,7 +825,7 @@ if (!$smarty->loadCache($cacheKey, $found)) if ($data = $zones->getListviewData()) { - $zones->addGlobalsToJScript($smarty); + $zones->addGlobalsToJScript(); $found['zone'] = array( 'type' => TYPE_ZONE, @@ -858,7 +854,7 @@ if (!$smarty->loadCache($cacheKey, $found)) if ($data = $objects->getListviewData()) { - $objects->addGlobalsToJScript($smarty); + $objects->addGlobalsToJScript(); $found['object'] = array( 'type' => TYPE_OBJECT, @@ -972,7 +968,7 @@ if (!$smarty->loadCache($cacheKey, $found)) if ($data = $npcAbilities->getListviewData()) { - $npcAbilities->addGlobalsToJscript($smarty, GLOBALINFO_SELF); + $npcAbilities->addGlobalsToJScript(GLOBALINFO_SELF); foreach ($npcAbilities->iterate() as $__) $data[$npcAbilities->id]['param1'] = '"'.strToLower($npcAbilities->getField('iconString')).'"'; @@ -1008,7 +1004,7 @@ if (!$smarty->loadCache($cacheKey, $found)) if ($data = $misc->getListviewData()) { - $misc->addGlobalsToJscript($smarty, GLOBALINFO_SELF); + $misc->addGlobalsToJScript(GLOBALINFO_SELF); foreach ($misc->iterate() as $__) $data[$misc->id]['param1'] = '"'.strToLower($misc->getField('iconString')).'"'; diff --git a/setup/db_content.rar b/setup/db_content.rar new file mode 100644 index 00000000..47785dc6 Binary files /dev/null and b/setup/db_content.rar differ diff --git a/static/css/global.css b/static/css/global.css index 52924d72..d5b0de7a 100644 --- a/static/css/global.css +++ b/static/css/global.css @@ -17,6 +17,12 @@ form display: inline; } +p +{ + margin: 0px; + padding: 0px; +} + img, iframe { border: 0; @@ -1113,6 +1119,17 @@ span.menu-buttons span.hassubmenu { margin-right: 4px; } +.icontab +{ + border-collapse: collapse; + margin-top: 4px; +} + +.icontab tr +{ + background: none !important; +} + .icontab th, .icontab td { border: 0 !important; @@ -1131,6 +1148,28 @@ span.menu-buttons span.hassubmenu { padding: 0 3px 0 0; } +.icontab-box +{ + margin-top: 0; + border-spacing: 0 6px; + border-collapse: separate; +} + +.icontab-box th +{ + padding: 0 0 0 4px; +} + +.icontab-box td +{ + background-color: #141414; + padding: 0 6px; + + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + .random-enchantments { float: left; @@ -3272,6 +3311,11 @@ div.captcha-center color: #cccccc; } +#description.left, #article-generic.left +{ + clear:left; +} + h1.h1-icon { padding-top: 5px; @@ -3603,13 +3647,13 @@ a:hover, a.open, .infobox li div, .text b border-bottom: 1px solid #404040; } -.iconlist, .icontab +.iconlist { border-collapse: collapse; margin-top: 4px; } -.icontab tr, .listview-mode-tiled td.empty-cell:hover +.listview-mode-tiled td.empty-cell:hover { background: none !important; } diff --git a/static/js/Markup.js b/static/js/Markup.js index f6b08e1f..65709bc6 100644 --- a/static/js/Markup.js +++ b/static/js/Markup.js @@ -828,7 +828,7 @@ var Markup = { var src = ''; if(attr.name) - src = g_staticUrl + '/images/icons/wow/tiny/' + attr.name.toLowerCase() + '.gif'; + src = g_staticUrl + '/images/wow/icons/tiny/' + attr.name.toLowerCase() + '.gif'; else if(attr.preset) src = Markup.tags.icon.presets[attr.preset]; else if(attr.url && Markup._isUrlSafe(attr.url)) diff --git a/static/js/filters.js b/static/js/filters.js index c13e66e7..f7248759 100644 --- a/static/js/filters.js +++ b/static/js/filters.js @@ -287,7 +287,7 @@ var fi_filters = { { id: 11, name: 'suggestedplayers', type: 'num' }, { id: 6, name: 'timer', type: 'num' }, - { id: 1, name: 'sepstaffonly', staffonly: true }, + { id: 999, name: 'sepstaffonly', staffonly: true }, { id: 42, name: 'flags', type: 'flags', staffonly: true }, { id: 13, name: 'sepgainsrewards' }, @@ -311,7 +311,7 @@ var fi_filters = { { id: 18, name: 'hasscreenshots', type: 'yn' }, { id: 36, name: 'hasvideos', type: 'yn' }, - { id: 1, name: 'sepmisc' }, + { id: 9999,name: 'sepmisc' }, { id: 24, name: 'lacksstartend', type: 'yn'} ], diff --git a/static/js/locale_dede.js b/static/js/locale_dede.js index 21d85881..c2c327cf 100644 --- a/static/js/locale_dede.js +++ b/static/js/locale_dede.js @@ -346,7 +346,6 @@ var mn_quests = [ [3522,"Schergrat"], [3703,"Shattrath"], [3679,"Skettis"], - [4095,"Terrasse der Magister"], [3519,"Wälder von Terokkar"], [3521,"Zangarmarschen"] ]], @@ -484,14 +483,14 @@ var mn_quests = [ [-370,"Braufest"], [-1002,"Kinderwoche"], [-364,"Dunkelmond-Jahrmarkt"], - [-1007,"Tag der Toten"], + [-41,"Tag der Toten"], [-1003,"Schlotternächte"], [-1005,"Erntedankfest"], - [-1004,"Liebe liegt in der Luft"], + [-376,"Liebe liegt in der Luft"], [-366,"Mondfest"], [-369,"Sonnenwende"], [-1006,"Neujahr"], - [-1008,"Die Pilgerfreuden"], + [-375,"Die Pilgerfreuden"], [-374,"Nobelgarten"], [-1001,"Winterhauch"] ]], @@ -1491,14 +1490,13 @@ var g_quest_sorts = { 4812: 'Eiskronenzitadelle', 4813: 'Grube von Saron', 4820: 'Hallen der Reflexion', + "-1010": 'Dungeonfinder', "-1001": 'Winterhauch', "-1002": 'Kinderwoche', - "-1003": 'Schlotternächte', - "-1004": 'Liebe liegt in der Luft', + "-1003": 'Schlotternächte', "-1005": 'Erntedankfest', "-1006": 'Neujahr', - "-1007": 'Tag der Toten', - "-1008": 'Die Pilgerfreuden', + "-375": 'Die Pilgerfreuden', "-365": 'Krieg von Ahn\'Qiraj', "-181": 'Alchemie', "-25": 'Schlachtfelder', @@ -1506,7 +1504,7 @@ var g_quest_sorts = { "-370": 'Braufest', "-304": 'Kochkunst', "-364": 'Dunkelmond-Jahrmarkt', - "-41": 'Day of the Dead', + "-41": 'Tag der Toten', "-372": 'Todesritter', "-263": 'Druide', "-201": 'Ingenieurskunst', diff --git a/static/js/locale_enus.js b/static/js/locale_enus.js index a4bc7a34..0114a196 100644 --- a/static/js/locale_enus.js +++ b/static/js/locale_enus.js @@ -341,7 +341,6 @@ var mn_quests = [ [8,"Outland",,[ [3522,"Blade's Edge Mountains"], [3483,"Hellfire Peninsula"], - [4095,"Magisters' Terrace"], [3518,"Nagrand"], [3523,"Netherstorm"], [3520,"Shadowmoon Valley"], @@ -484,21 +483,21 @@ var mn_quests = [ [-370,"Brewfest"], [-1002,"Children's Week"], [-364,"Darkmoon Faire"], - [-1007,"Day of the Dead"], + [-41,"Day of the Dead"], [-1003,"Hallow's End"], [-1005,"Harvest Festival"], - [-1004,"Love is in the Air"], + [-376,"Love is in the Air"], [-366,"Lunar Festival"], [-369,"Midsummer"], [-1006,"New Year's Eve"], - [-1008,"Pilgrim's Bounty"], + [-375,"Pilgrim's Bounty"], [-374,"Noblegarden"], [-1001,"Winter Veil"] ]], [7,"Miscellaneous",,[ [-365,"Ahn'Qiraj War Effort"], [-241,"Argent Tournament"], - [-1010,"Dungeonfinder"], + [-1010,"Dungeon Finder"], [-1,"Epic"], [-344,"Legendary"], [-367,"Reputation"], @@ -1370,14 +1369,13 @@ var g_quest_categories = { }; var g_quest_sorts = { + "-1010": 'Dungeon Finder', "-1001": 'Winter Veil', "-1002": 'Children\'s Week', "-1003": 'Hallow\'s End', - "-1004": 'Love is in the Air', "-1005": 'Harvest Festival', "-1006": 'New Year\'s Eve', - "-1007": 'Day of the Dead', - "-1008": 'Pilgrim\'s Bounty', + "-375": 'Pilgrim\'s Bounty', 1939: 'Abyssal Sands', "-365": 'Ahn\'Qiraj War', 4494: 'Ahn\'kahet: The Old Kingdom', diff --git a/static/js/locale_eses.js b/static/js/locale_eses.js index 367fa810..ef8369fc 100644 --- a/static/js/locale_eses.js +++ b/static/js/locale_eses.js @@ -339,7 +339,6 @@ var mn_quests = [ [331,"Vallefresno"] ]], [8,"Terrallende",,[ - [4095,"Bancal del Magister"], [3519,"Bosque de Terokkar"], [3703,"Ciudad de Shattrath"], [3521,"Marisma de Zangar"], @@ -484,14 +483,14 @@ var mn_quests = [ [-370,"Fiesta de la cerveza"], [-1002,"Los Niños"], [-364,"Feria de la Luna Negra"], - [-1007,"Día de los Muertos"], + [-41,"Día de los Muertos"], [-1003,"Halloween"], [-1005,"Festival de la cosecha"], - [-1004,"Amor en el aire"], + [-376,"Amor en el aire"], [-366,"Festival Lunar"], [-369,"Solsticio"], [-1006,"Año nuevo"], - [-1008,"Generosidad"], + [-375,"Generosidad"], [-374,"Jardín Noble"], [-1001,"Festival de Invierno"] ]], @@ -1324,14 +1323,14 @@ var g_quest_categories = { }; var g_quest_sorts = { + "-1010": 'Buscador de Mazmorras', "-1001": 'Festival de Invierno', "-1002": 'Los Niños', "-1003": 'Halloween', - "-1004": 'Amor en el aire', "-1005": 'Festival de la cosecha', "-1006": 'Año nuevo', - "-1007": 'Día de los Muertos', - "-1008": 'Generosidad', + "-41": 'Día de los Muertos', + "-375": 'Generosidad', 3428: 'Ahn\'Qiraj', 4494: 'Ahn\'kahet: El Antiguo Reino', "-181": 'Alquimia', diff --git a/static/js/locale_frfr.js b/static/js/locale_frfr.js index 01bfe83d..3165666d 100644 --- a/static/js/locale_frfr.js +++ b/static/js/locale_frfr.js @@ -347,7 +347,6 @@ var mn_quests = [ [3523,"Raz-de-Néant"], [3703,"Shattrath"], [3679,"Skettis"], - [4095,"Terrasse des Magistères"], [3520,"Vallée d'Ombrelune"] ]], [10,"Norfendre",,[ @@ -483,14 +482,14 @@ var mn_quests = [ [-370,"Fête des Brasseurs"], [-1002,"Semaine des enfants"], [-364,"Foire de Sombrelune"], - [-1007,"Jour des Morts"], + [-41,"Jour des Morts"], [-1003,"Sanssaint"], [-1005,"Fête des moissons"], - [-1004,"De l'amour dans l'air"], + [-376,"De l'amour dans l'air"], [-366,"Fête lunaire"], [-369,"Solstice d'été"], [-1006,"Nouvel an"], - [-1008,"Bienfaits du pèlerin"], + [-375,"Bienfaits du pèlerin"], [-374,"Jardin des nobles"], [-1001,"Voile d'hiver"] ]], @@ -1324,14 +1323,15 @@ var g_quest_categories = { }; var g_quest_sorts = { + "-1010": 'Chercheur de donjons', "-1001": 'Voile d\'hiver', "-1002": 'Semaine des enfants', "-1003": 'Sanssaint', - "-1004": 'De l\'amour dans l\'air', + "-376": 'De l\'amour dans l\'air', "-1005": 'Fête des moissons', "-1006": 'Nouvel an', - "-1007": 'Jour des Morts', - "-1008": 'Bienfaits du pèlerin', + "-41": 'Jour des Morts', + "-375": 'Bienfaits du pèlerin', 3428: 'Ahn\'Qiraj', 4494: 'Ahn\'kahet : l\'Ancien royaume', "-181": 'Alchimiste', diff --git a/static/js/locale_ruru.js b/static/js/locale_ruru.js index 1c43710e..19592acd 100644 --- a/static/js/locale_ruru.js +++ b/static/js/locale_ruru.js @@ -347,7 +347,6 @@ var mn_quests = [ [3483,"\u041f\u043e\u043b\u0443\u043e\u0441\u0442\u0440\u043e\u0432 \u0410\u0434\u0441\u043a\u043e\u0433\u043e \u041f\u043b\u0430\u043c\u0435\u043d\u0438"], [3523,"\u041f\u0443\u0441\u0442\u043e\u0432\u0435\u0440\u0442\u044c"], [3679,"\u0421\u043a\u0435\u0442\u0442\u0438\u0441"], - [4095,"\u0422\u0435\u0440\u0440\u0430\u0441\u0430 \u041c\u0430\u0433\u0438\u0441\u0442\u0440\u043e\u0432"], [3703,"\u0428\u0430\u0442\u0442\u0440\u0430\u0442"] ]], [10,"Нордскол",,[ @@ -460,7 +459,7 @@ var mn_quests = [ [3428,"\u0410\u043d'\u041a\u0438\u0440\u0430\u0436"], [3606,"\u0412\u0435\u0440\u0448\u0438\u043d\u0430 \u0425\u0438\u0434\u0436\u0430\u043b\u0430"], [3805,"\u0417\u0443\u043b'\u0410\u043c\u0430\u043d"], - [19,"\u0417\u0443\u043b'\u0413\u0443\u0440\u0443\u0431"], + [1977,"\u0417\u0443\u043b'\u0413\u0443\u0440\u0443\u0431"], [4722,"\u0418\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435 \u043a\u0440\u0435\u0441\u0442\u043e\u043d\u043e\u0441\u0446\u0430"], [3457,"\u041a\u0430\u0440\u0430\u0436\u0430\u043d"], [3845,"\u041a\u0440\u0435\u043f\u043e\u0441\u0442\u044c \u0411\u0443\u0440\u044c"], @@ -483,14 +482,14 @@ var mn_quests = [ [-370,"Хмельной фестиваль"], [-1002,"Детская неделя"], [-364,"Ярмарка Новолуния"], - [-1007,"День Мертвых"], + [-41,"День Мертвых"], [-1003,"Тыквовин"], [-1005,"Фестиваль урожая"], - [-1004,"Любовная лихорадка"], + [-376,"Любовная лихорадка"], [-366,"Лунный фестиваль"], [-369,"Огненный солнцеворот"], [-1006,"Новый Год"], - [-1008,"Пиршество странников"], + [-375,"Пиршество странников"], [-374,"Сад чудес"], [-1001,"Зимний Покров"] ]], @@ -1324,14 +1323,15 @@ var g_quest_categories = { }; var g_quest_sorts = { + "-1010": 'Поиск подземелий', "-1001": 'Зимний Покров', "-1002": 'Детская неделя', "-1003": 'Тыквовин', - "-1004": 'Любовная лихорадка', + "-376": 'Любовная лихорадка', "-1005": 'Фестиваль урожая', "-1006": 'Новый Год', - "-1007": 'День Мертвых', - "-1008": 'Пиршество странников', + "-41": 'День Мертвых', + "-375": 'Пиршество странников', 4277: 'Азжол-Неруб', 16: 'Азшара', "-181": 'Алхимия', diff --git a/static/widgets/power.js b/static/widgets/power.js index 3db0ed47..dcaf1b7c 100644 --- a/static/widgets/power.js +++ b/static/widgets/power.js @@ -352,7 +352,7 @@ if (typeof $WowheadPower == "undefined") { if (!document.scripts[i].src) continue; - var dmn = document.scripts[i].src.match(/power\/aowowPower.js\?(lang|locale)=(en|fr|de|es|ru)/i); + var dmn = document.scripts[i].src.match(/widgets\/power.js\?(lang|locale)=(en|fr|de|es|ru)/i); if (dmn) { domain = dmn[2]; locale = $WH.g_getLocaleFromDomain(dmn[2]); diff --git a/template/404.tpl b/template/404.tpl deleted file mode 100644 index 7609b8c4..00000000 --- a/template/404.tpl +++ /dev/null @@ -1,21 +0,0 @@ -{include file='header.tpl'} - -
-
-
-{if !empty($announcements)} - {foreach from=$announcements item=item} - {include file='bricks/announcement.tpl' an=$item} - {/foreach} -{/if} - -
- -
-

{$subject} #{$id}

-
{$notFound}
- -
-
-
-{include file='footer.tpl'} \ No newline at end of file diff --git a/template/achievement.tpl b/template/achievement.tpl index a2c1f6d4..26d36ce1 100644 --- a/template/achievement.tpl +++ b/template/achievement.tpl @@ -70,18 +70,7 @@ {if $itemReward} {* for items *}

{$lang.rewards}

- {$lang.itemReward} - -{foreach from=$itemReward item=i name=item key=id} - -{/foreach} - - -
{$i.name}
+ {include file='bricks/rewards.tpl' rewTitle=$lang.itemReward rewData=$itemReward offset=0} {/if} {if $titleReward} {* for titles *} @@ -92,14 +81,14 @@ {/foreach} {/if} - + {if !$titleReward && !$itemReward && $reward}

{$lang.rewards}

  • {$reward}
{/if} - +

{$lang.related}

diff --git a/template/brb.tpl b/template/brb.tpl index 30ddecf2..e3a0239d 100644 --- a/template/brb.tpl +++ b/template/brb.tpl @@ -5,9 +5,9 @@
-
+

Maintenance

-
+
We will be back soon..ish!
diff --git a/template/bricks/infobox.tpl b/template/bricks/infobox.tpl index 370eae0e..f8509696 100644 --- a/template/bricks/infobox.tpl +++ b/template/bricks/infobox.tpl @@ -4,29 +4,9 @@
{$lang.series}
-
- - {foreach from=$series key='idx' item='itr'} - - - - + {foreach from=$series item=s} + {include file="bricks/series.tpl" list=$s[0] listTitle=$s[1]} {/foreach} -
{$idx+1}.
- {foreach name=itemItr from=$itr item='i'} - {if $i.side == 1}{elseif $i.side == 2}{/if} - {if ($i.typeId == $typeId)} - {$i.name} - {else} - {$i.name} - {/if} - {if $i.side != 3}{/if} - {if $smarty.foreach.itemItr.last}{else}
{/if} - {/foreach} -
-
{$lang.screenshots}
+ + {foreach from=$rewData item=i key=k} + + {if $k%2} + + {/if} + + {/foreach} + {if count($rewData)%2} + + {/if} + +
{$i.name}
+ + +{/if} \ No newline at end of file diff --git a/template/bricks/series.tpl b/template/bricks/series.tpl new file mode 100644 index 00000000..f5093f5b --- /dev/null +++ b/template/bricks/series.tpl @@ -0,0 +1,23 @@ + {if !empty($listTitle)}{$listTitle}{else}{$lang.series}{/if} + +
+ +{foreach from=$list key='idx' item='itr'} + + + + +{/foreach} +
{$idx+1}.
+ {foreach name=itemItr from=$itr item='i'} + {if $i.side == 1}{elseif $i.side == 2}{/if} + {if ($i.typeId == $typeId)} + {$i.name} + {else} + {$i.name} + {/if} + {if $i.side != 3}{/if} + {if $smarty.foreach.itemItr.last}{else}
{/if} + {/foreach} +
+ diff --git a/template/error.tpl b/template/error.tpl deleted file mode 100644 index a561a52b..00000000 --- a/template/error.tpl +++ /dev/null @@ -1,34 +0,0 @@ -{include file='header.tpl'} - -
-
-
-{if !empty($announcements)} - {foreach from=$announcements item=item} - {include file='bricks/announcement.tpl' an=$item} - {/foreach} -{/if} -
-

{$lang.errNotFound}

-
- {$lang.errPage} - -
    -
  • -
    - {$lang.goStart} -
    -
  • -
  • -
    - {$lang.goForum} -
    -
  • -
-
-
-
-
-
- -{include file='footer.tpl'} diff --git a/template/quest.tpl b/template/quest.tpl new file mode 100644 index 00000000..dc2cccaf --- /dev/null +++ b/template/quest.tpl @@ -0,0 +1,189 @@ +{include file='header.tpl'} + +
+
+
+ +{if !empty($announcements)} + {foreach from=$announcements item=item} + {include file='bricks/announcement.tpl' an=$item} + {/foreach} +{/if} + + + +{include file='bricks/infobox.tpl'} + +
+{include file='bricks/redButtons.tpl'} + +

{$name}

+{if isset($unavailable)} +
+ {$lang.unavailable} +{/if} + +{if isset($reqMinRep) || isset($reqMaxRep)} +

{$lang.additionalReq}{$lang.colon}

+
    + {if isset($reqMinRep)}
  • {$reqMinRep}
  • {/if} + {if isset($reqMaxRep)}
  • {$reqMaxRep}
  • {/if} +
    {*shudder*} +
+{/if} + +{if $objectives} + {$objectives} +{elseif $requestItems} +

{$lang.progress}

+ {$requestItems} +{elseif $offerReward} +

{$lang.completion}

+ {$offerReward} +{/if} + +{if $end} + + + {if $suggestedPl} + + {/if} +

 

{$end}

 

{$lang.suggestedPl}{$lang.colon}{$suggestedPl}
+
+{/if} + +{if $objectiveList} + {if $end} + {$lang.providedItem}{$lang.colon} + {/if} + + {foreach from=$objectiveList item=i key=k} + {if isset($i.typeStr) && ($i.typeStr == 'item' || $i.typeStr == 'spell')} + + {elseif !empty($i.typeStr)} + +{* todo: research, when we want plain text as unordered list element *} + {else} + + {/if} + {/foreach} + {if $suggestedPl && !$end} + + {/if} +
{$i.name}{if !$end}{$i.extraText}{/if}{if $i.qty > 1} ({$i.qty}){/if}
  •  
{$i.name}{if !$end}{$i.extraText}{/if}{if $i.qty > 1} ({$i.qty}){/if}

 

{$i.text}

 

{$lang.suggestedPl}{$lang.colon}{$suggestedPl}
+ + +{/if} + +{include file='bricks/mapper.tpl'} + +{* Description *} +{if $details} +

{$lang.description}

+ {$details} +{/if} + +{* Progress (disclosed) *} +{if $requestItems && $objectives} +

{$lang.progress}

+ +{/if} + +{* Completion (disclosed) *} +{if $offerReward && ($requestItems || $objectives)} +

{$lang.completion}

+ +{/if} + +{* Rewards *} +{if !empty($rewards.items) || !empty($rewards.money) || !empty($rewards.spells) || !empty($rewards.choice)} + {assign var='offset' value=0} +

{$lang.rewards}

+ + {if isset($rewards.choice)} + {include file='bricks/rewards.tpl' rewTitle=$lang.chooseItems rewData=$rewards.choice offset=$offset} + {math assign='offset' equation="x + y" x=$offset y=$rewards.choice|@count} + {/if} + + {if isset($rewards.spells)} + {if isset($rewards.choice)} +
+ {/if} + + {if isset($rewards.spells.learn)} + {include file='bricks/rewards.tpl' rewTitle=$lang.spellLearn rewData=$rewards.spells.learn offset=$offset extra=$rewards.spells.extra} + {math assign='offset' equation="x + y" x=$offset y=$rewards.spells.learn|@count} + {else} + {include file='bricks/rewards.tpl' rewTitle=$lang.spellCast rewData=$rewards.spells.cast offset=$offset extra=$rewards.spells.extra} + {math assign='offset' equation="x + y" x=$offset y=$rewards.spells.cast|@count} + {/if} + {/if} + + {if !empty($rewards.items) || !empty($rewards.money)} + {if isset($rewards.choice) || isset($rewards.spells)} +
+ {/if} + + {if isset($rewards.choice)} {* bullshit!! *} + {include file='bricks/rewards.tpl' rewTitle=$lang.receiveAlso rewData=$rewards.items offset=$offset extra=$rewards.money} + {else} + {include file='bricks/rewards.tpl' rewTitle=$lang.receiveItems rewData=$rewards.items offset=$offset extra=$rewards.money} + {/if} + {/if} +{/if} + +{* Gains *} +{if $gains} +

{$lang.gains}

+ {$lang.gainsDesc}{$lang.colon} +
    {strip} + {if isset($gains.xp)} +
  • {$gains.xp|number_format} {$lang.experience}
  • + {/if} + + {if !empty($gains.rep)} + {foreach from=$gains.rep item=i} +
  • {if $i.qty < 0}{$i.qty}{else}{$i.qty}{/if} {$lang.repWith} {$i.name}
  • + {/foreach} + {/if} + + {if isset($gains.title)} +
  • {$gains.title}
  • + {/if} + + {if isset($gains.tp)} +
  • {$gains.tp} {$lang.bonusTalents}
  • + {/if} +
{/strip} +{/if} + +{if $mail} +

{$lang.mailDelivery|sprintf:$mail.delay}

+ {if $mail.subject} +
{$mail.subject}
+ {/if} + {if $mail.text} +
{$mail.text}
+ {/if} +{/if} +

{$lang.related}

+
+ +{include file='bricks/tabsRelated.tpl' tabs=$lvData} + +{include file='bricks/contribute.tpl'} + +
+
+ +{include file='footer.tpl'} diff --git a/template/quests.tpl b/template/quests.tpl new file mode 100644 index 00000000..e699a6ad --- /dev/null +++ b/template/quests.tpl @@ -0,0 +1,98 @@ +{include file='header.tpl'} + +
+
+
+ +{if !empty($announcements)} + {foreach from=$announcements item=item} + {include file='bricks/announcement.tpl' an=$item} + {/foreach} +{/if} + + + +
+
+
+
{$lang.type}{$lang.colon}
{$lang.clear} +
+ +
+ + + + + + + + + + + + + + + +
{$lang.name|ucFirst}{$lang.colon} + + + + +
  
+
{$lang.level}{$lang.colon}  - + + + +
   {$lang._reqLevel}{$lang.colon}  -
+
{$lang.side}{$lang.colon} 
+
+
{$lang.addFilter}
+ +
+
{$lang.refineSearch}
+ {$lang.match}{$lang.colon} +
+ +
+ +
+ + +
+ +
+
+
+ + + +
+ + +
+
+
+ +{include file='footer.tpl'} diff --git a/template/text-page-generic.tpl b/template/text-page-generic.tpl index 0959ee77..4970ca8e 100644 --- a/template/text-page-generic.tpl +++ b/template/text-page-generic.tpl @@ -10,28 +10,37 @@ {/foreach} {/if} +{if isset($notFound)} +
+ +
+

{$typeStr} #{$typeId}

+
{$notFound}
+{else}

{$name}

-{include file='bricks/article.tpl'} + {include file='bricks/article.tpl'} -{if isset($extraText)} -
- + {if isset($extraText)} +
+ -
+
+ {/if} {/if} -