mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
- removed fixed fields in lv-bricks; title sources and achievement rewards thus are working again
- moved search to /pages - moved g_dataKey to header.tpl and apply it on nessecary pages (restores TalentCalc) - Events: fixed relTabs with arbitrary data, when holidayId was 0 - CharClass: get heroClass-status through flags; dropped related DB-field - Achievements: fixed some criteria not being displayed in tooltips - Community: applied long forgotten changes to tplVars and use of uppercase ids - Titles: * exclude unused titles from listview * restored 'links'-button on detail-page - Quests: * added 'slain' fro proxy-npcs * use more wflags (&1 needs more research) - Factions: * fixed order of categories * fixed params to QuestList for relTabs - Profiler: * enabled 'profiles that have this char as source' in Profiler * removed the exampelChar from project * further documented more expected variables; includes/excludes-handling still not entirely clear * created datasets for reference data (create with ?build=profiler) - Localzation: * localized profiler for loc3 * corrected some single words * localized custom reward rate - table in factions - AjaxHandler: * new handler for ajax-requests *duh* * dropped data.php (index.php now calls to AjaxHandler for these cases) - moved reading of static files to own function Util::loadStaticFile()
This commit is contained in:
176
data.php
176
data.php
@@ -1,176 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (!defined('AOWOW_REVISION'))
|
||||
die('illegal access');
|
||||
|
||||
|
||||
// requires valid token to hinder automated access
|
||||
// todo (low): research, when to use the token
|
||||
if ($_GET['data'] != 'item-scaling')
|
||||
{
|
||||
if (empty($_GET['t']) || empty($_SESSION['dataKey']))
|
||||
die();
|
||||
|
||||
if ($_GET['t'] != $_SESSION['dataKey'])
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
header('Content-type: application/x-javascript');
|
||||
|
||||
// different data can be strung together
|
||||
$datasets = array_unique(explode('.', $_GET['data']));
|
||||
$params = '';
|
||||
|
||||
|
||||
// great, we can set our locale .. just .. what for..?
|
||||
if (isset($_GET['locale']) && is_numeric($_GET['locale']))
|
||||
User::useLocale($_GET['locale']);
|
||||
|
||||
foreach ($datasets as $data)
|
||||
{
|
||||
switch ($data)
|
||||
{
|
||||
// Profiler (this .. _COULD_ be static . it's basicly just "ALL" available data of one type)
|
||||
case 'factions':
|
||||
case 'quests':
|
||||
case 'companions':
|
||||
case 'recipes':
|
||||
case 'mounts':
|
||||
if (empty($_GET['callback']))
|
||||
break;
|
||||
|
||||
$catg = 'null'; // hm, looks like its just for preselection..
|
||||
$skill = [];
|
||||
$callback = $_GET['callback'];
|
||||
|
||||
if (!empty($_GET['skill']))
|
||||
{
|
||||
$skill = explode(',', $_GET['skill']);
|
||||
array_walk($skill, function(&$v, $k) {
|
||||
$v = intVal($v);
|
||||
});
|
||||
}
|
||||
|
||||
if (substr($callback, 0, 17) != '$WowheadProfiler.')
|
||||
break;
|
||||
|
||||
if ($data == 'factions')
|
||||
{
|
||||
$cnd = null;
|
||||
$obj = 'FactionList';
|
||||
$glob = 'g_factions';
|
||||
|
||||
echo "g_faction_order = [0, 469, 891, 1037, 1118, 67, 1052, 892, 936, 1117, 169, 980, 1097];\n\n";
|
||||
}
|
||||
else if ($data == 'quests')
|
||||
{
|
||||
// may have &partial set .. what to do .. what to do..
|
||||
|
||||
$cnd = null;
|
||||
$obj = 'QuestList';
|
||||
$glob = 'g_quests';
|
||||
|
||||
echo "g_quest_catorder = [];\n\n";
|
||||
}
|
||||
else if ($data == 'companions')
|
||||
{
|
||||
$cnd = ['typeCat', -6];
|
||||
$obj = 'SpellList';
|
||||
$glob = 'g_spells';
|
||||
$catg = 778;
|
||||
}
|
||||
else if ($data == 'recipes')
|
||||
{
|
||||
$cnd = ['OR', ['typeCat', 9], ['typeCat', 11]];
|
||||
if ($skill)
|
||||
$cnd = ['AND', ['skillLine1', $skill], $cnd];
|
||||
|
||||
$obj = 'SpellList';
|
||||
$glob = 'g_spells';
|
||||
// $catg = 185;
|
||||
|
||||
echo "g_skill_order = [171, 164, 333, 202, 182, 773, 755, 165, 186, 393, 197, 185, 129, 356, 762];\n\n";
|
||||
}
|
||||
else if ($data == 'mounts')
|
||||
{
|
||||
$cnd = ['typeCat', -5];
|
||||
$obj = 'SpellList';
|
||||
$glob = 'g_spells';
|
||||
$catg = 777;
|
||||
}
|
||||
|
||||
$cnd = [[['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW], 0], $cnd, CFG_SQL_LIMIT_NONE];
|
||||
$list = new $obj($cnd);
|
||||
$dataz = $list->getListviewData(ITEMINFO_MODEL);
|
||||
foreach ($dataz as $i => $d)
|
||||
{
|
||||
if (isset($d['quality'])) // whoever thought of prepending quality to the name may burn in hell!
|
||||
{
|
||||
$d['name'] = $d['quality'].$d['name'];
|
||||
unset($d['quality']);
|
||||
}
|
||||
|
||||
echo $glob.'['.$i.'] = '.json_encode($d, JSON_NUMERIC_CHECK).";\n";
|
||||
}
|
||||
|
||||
if ($data == 'recipes') // todo: skip adding reagents
|
||||
foreach ($list->relItems->iterate() as $iId => $tpl)
|
||||
echo "g_items.add(".$iId.", {'icon':'".$tpl['iconString']."'});\n";
|
||||
|
||||
/* issue:
|
||||
when we load onDemand, the jScript tries to generate the catg-tree before the it is initialized
|
||||
it cant be initialized, without loading the data as empty catg are omitted
|
||||
loading the data triggers the generation of the catg-tree
|
||||
|
||||
obviously only, if we have no initial data set
|
||||
|
||||
yay .. either way, we loose
|
||||
*/
|
||||
|
||||
echo "\n\$WowheadProfiler.loadOnDemand('".$data."', ".$catg.");\n";
|
||||
|
||||
break;
|
||||
// locale independant
|
||||
case 'zones':
|
||||
case 'weight-presets':
|
||||
case 'item-scaling':
|
||||
case 'realms':
|
||||
case 'statistics':
|
||||
if (file_exists('datasets/'.$data))
|
||||
echo file_get_contents('datasets/'.$data);
|
||||
else if (CFG_DEBUG)
|
||||
echo "alert('could not fetch static data: ".$data."');";
|
||||
echo "\n\n";
|
||||
break;
|
||||
case 'user':
|
||||
// todo (high): structure probably lost; probably sent basic char stats
|
||||
// g_user = { id: 0, name: '', roles: 0, permissions: 0, ads: true, cookies: {} };
|
||||
break;
|
||||
// localized
|
||||
case 'talents':
|
||||
if (isset($_GET['class']))
|
||||
$params .= "-".intVal($_GET['class']);
|
||||
case 'pet-talents':
|
||||
case 'glyphs':
|
||||
case 'gems':
|
||||
case 'enchants':
|
||||
case 'itemsets':
|
||||
case 'pets':
|
||||
if (file_exists('datasets/'.User::$localeString.'/'.$data.$params))
|
||||
echo file_get_contents('datasets/'.User::$localeString.'/'.$data.$params);
|
||||
else if (file_exists('datasets/enus/'.$data.$params))
|
||||
echo file_get_contents('datasets/enus/'.$data.$params);
|
||||
else if (file_exists('datasets/'.$data.$params))
|
||||
echo file_get_contents('datasets/'.$data.$params);
|
||||
else if (CFG_DEBUG)
|
||||
echo "alert('could not fetch static data: ".$data.$params." for locale: ".User::$localeString."');";
|
||||
echo "\n\n";
|
||||
break;
|
||||
case 'quick-excludes': // generated per character in profiler
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
261
includes/ajaxHandler.class.php
Normal file
261
includes/ajaxHandler.class.php
Normal file
@@ -0,0 +1,261 @@
|
||||
<?php
|
||||
|
||||
if (!defined('AOWOW_REVISION'))
|
||||
die('invalid access');
|
||||
|
||||
|
||||
class AjaxHandler
|
||||
{
|
||||
private $params;
|
||||
private $get;
|
||||
private $post;
|
||||
|
||||
public function __construct($params)
|
||||
{
|
||||
$this->params = explode('.', $params);
|
||||
|
||||
foreach ($_POST as $k => $v)
|
||||
{
|
||||
Util::checkNumeric($v);
|
||||
$this->post[$k] = $v;
|
||||
}
|
||||
|
||||
foreach ($_GET as $k => $v)
|
||||
$this->get[$k] = Util::checkNumeric($v) ? $v : is_string($v) ? trim(urldecode($v)) : $v;
|
||||
}
|
||||
|
||||
public function handle($what)
|
||||
{
|
||||
$f = 'handle'.ucFirst($what);
|
||||
if (!method_exists($this, $f))
|
||||
return null;
|
||||
|
||||
return $this->$f();
|
||||
}
|
||||
|
||||
private function isLoadOnDemand()
|
||||
{
|
||||
return substr(@$this->get['callback'], 0, 29) == '$WowheadProfiler.loadOnDemand';
|
||||
}
|
||||
|
||||
private function loadProfilerData($file, $catg = 'null')
|
||||
{
|
||||
$result = '';
|
||||
if ($this->isLoadOnDemand())
|
||||
if (Util::loadStaticFile('p-'.$file, $result, true))
|
||||
$result .= "\n\$WowheadProfiler.loadOnDemand('".$file."', ".$catg.");\n";
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/* responses
|
||||
<string>
|
||||
*/
|
||||
private function handleData()
|
||||
{
|
||||
if (isset($this->get['locale']) && is_numeric($this->get['locale']))
|
||||
User::useLocale($this->get['locale']);
|
||||
|
||||
$result = '';
|
||||
|
||||
// different data can be strung together
|
||||
foreach ($this->params as $set)
|
||||
{
|
||||
// requires valid token to hinder automated access
|
||||
if ($set != 'item-scaling')
|
||||
if (empty($this->get['t']) || empty($_SESSION['dataKey']) || $this->get['t'] != $_SESSION['dataKey'])
|
||||
continue;
|
||||
|
||||
switch ($set)
|
||||
{
|
||||
/* issue on no initial data:
|
||||
when we loadOnDemand, the jScript tries to generate the catg-tree before it is initialized
|
||||
it cant be initialized, without loading the data as empty catg are omitted
|
||||
loading the data triggers the generation of the catg-tree
|
||||
*/
|
||||
case 'factions':
|
||||
$result .= $this->loadProfilerData($set);
|
||||
break;
|
||||
case 'companions':
|
||||
$result .= $this->loadProfilerData($set, '778');
|
||||
break;
|
||||
case 'mounts':
|
||||
$result .= $this->loadProfilerData($set, '777');
|
||||
break;
|
||||
case 'quests':
|
||||
// &partial: im not doing this right
|
||||
// it expects a full quest dump on first lookup but will query subCats again if clicked..?
|
||||
// for now omiting the detail clicks with empty results and just set catg update
|
||||
$catg = isset($this->get['catg']) ? $this->get['catg'] : 'null';
|
||||
if ($catg == 'null')
|
||||
$result .= $this->loadProfilerData($set);
|
||||
else if ($this->isLoadOnDemand())
|
||||
$result .= "\n\$WowheadProfiler.loadOnDemand('quests', ".$catg.");\n";
|
||||
|
||||
break;
|
||||
case 'recipes':
|
||||
if (!$this->isLoadOnDemand() || empty($this->get['skill']))
|
||||
break;
|
||||
|
||||
$skills = array_intersect(explode(',', $this->get['skill']), [171, 164, 333, 202, 182, 773, 755, 165, 186, 393, 197, 185, 129, 356]);
|
||||
if (!$skills)
|
||||
break;
|
||||
|
||||
foreach ($skills as $s)
|
||||
Util::loadStaticFile('p-recipes-'.$s, $result, true);
|
||||
|
||||
Util::loadStaticFile('p-recipes-sec', $result, true);
|
||||
$result .= "\n\$WowheadProfiler.loadOnDemand('recipes', null);\n";
|
||||
|
||||
break;
|
||||
// locale independant
|
||||
case 'quick-excludes': // generated per character in profiler
|
||||
case 'zones':
|
||||
case 'weight-presets':
|
||||
case 'item-scaling':
|
||||
case 'realms':
|
||||
case 'statistics':
|
||||
if (!Util::loadStaticFile($set, $result) && CFG_DEBUG)
|
||||
$result .= "alert('could not fetch static data: ".$set."');";
|
||||
|
||||
$result .= "\n\n";
|
||||
break;
|
||||
// localized
|
||||
case 'talents':
|
||||
if (isset($this->get['class']))
|
||||
$set .= "-".intVal($this->get['class']);
|
||||
case 'pet-talents':
|
||||
case 'glyphs':
|
||||
case 'gems':
|
||||
case 'enchants':
|
||||
case 'itemsets':
|
||||
case 'pets':
|
||||
if (!Util::loadStaticFile($set, $result, true) && CFG_DEBUG)
|
||||
$result .= "alert('could not fetch static data: ".$set." for locale: ".User::$localeString."');";
|
||||
|
||||
$result .= "\n\n";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/* responses
|
||||
0: success
|
||||
$: silent error
|
||||
*/
|
||||
private function handleCookie()
|
||||
{
|
||||
if (User::$id && $this->params && !empty($this->get[$this->param[0]]))
|
||||
if (DB::Aowow()->query('REPLACE INTO ?_account_cookies VALUES (?d, ?, ?)', User::$id, $this->param[0], $this->get[$this->param[0]]))
|
||||
return 0;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/* responses
|
||||
0: success
|
||||
1: captcha invalid
|
||||
2: description too long
|
||||
3: reason missing
|
||||
7: already reported
|
||||
$: prints response
|
||||
*/
|
||||
private function handleContactus()
|
||||
{
|
||||
$mode = @$this->post['mode'];
|
||||
$rsn = @$this->post['reason'];
|
||||
$ua = @$this->post['ua'];
|
||||
$app = @$this->post['appname'];
|
||||
$url = @$this->post['page'];
|
||||
$desc = @$this->post['desc'];
|
||||
|
||||
$subj = @intVal($this->post['id']);
|
||||
|
||||
$contexts = array(
|
||||
[1, 2, 3, 4, 5, 6, 7, 8],
|
||||
[15, 16, 17, 18, 19, 20],
|
||||
[30, 31, 32, 33, 34, 35, 36, 37],
|
||||
[45, 46, 47, 48],
|
||||
[60, 61],
|
||||
[45, 46, 47, 48],
|
||||
[45, 46, 48]
|
||||
);
|
||||
|
||||
if ($mode === null || $rsn === null || $ua === null || $app === null || $url === null)
|
||||
return 'required field missing';
|
||||
|
||||
if (!isset($contexts[$mode]) || !in_array($rsn, $contexts[$mode]))
|
||||
return 'mode invalid';
|
||||
|
||||
if (!$desc)
|
||||
return 3;
|
||||
|
||||
if (strlen($desc) > 500)
|
||||
return 2;
|
||||
|
||||
// check already reported
|
||||
$field = User::$id ? 'userId' : 'ip';
|
||||
if (DB::Aowow()->selectCell('SELECT 1 FROM ?_reports WHERE `mode` = ?d AND `reason`= ?d AND `subject` = ?d AND ?# = ?', $mode, $rsn, $subj, $field, User::$id ? User::$id : $_SERVER['REMOTE_ADDR']))
|
||||
return 7;
|
||||
|
||||
$update = array(
|
||||
'userId' => User::$id,
|
||||
'mode' => $mode,
|
||||
'reason' => $rsn,
|
||||
'ip' => $_SERVER['REMOTE_ADDR'],
|
||||
'description' => $desc,
|
||||
'userAgent' => $ua,
|
||||
'appName' => $app,
|
||||
'url' => $url
|
||||
);
|
||||
|
||||
if ($subj)
|
||||
$update['subject'] = $subj;
|
||||
|
||||
if ($_ = @$this->post['relatedurl'])
|
||||
$update['relatedurl'] = $_;
|
||||
|
||||
if ($_ = @$this->post['email'])
|
||||
$update['email'] = $_;
|
||||
|
||||
if (DB::Aowow()->query('INSERT INTO ?_reports (?#) VALUES (?a)', array_keys($update), array_values($update)))
|
||||
return 0;
|
||||
|
||||
return 'save to db unsuccessful';
|
||||
}
|
||||
|
||||
/* responses
|
||||
- rate:
|
||||
0: success
|
||||
1: ratingban
|
||||
3: rated too often
|
||||
$: silent error
|
||||
- rating:
|
||||
yet to check
|
||||
*/
|
||||
private function handleComment()
|
||||
{
|
||||
switch ($this->param[0])
|
||||
{
|
||||
case 'rating':
|
||||
return '{"success":true,"error":"","up":7,"down":9}';
|
||||
case 'rate':
|
||||
return 3;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private function handleLocale() // not sure if this should be here..
|
||||
{
|
||||
User::setLocale($this->param[0]);
|
||||
User::writeCookie();
|
||||
header('Location: '.(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '.'));
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -86,7 +86,7 @@ class CommunityContent
|
||||
{
|
||||
return DB::Aowow()->Query("
|
||||
SELECT
|
||||
v.Id,
|
||||
v.id,
|
||||
a.displayName AS user,
|
||||
v.date,
|
||||
v.videoId,
|
||||
@@ -96,7 +96,7 @@ class CommunityContent
|
||||
?_videos v,
|
||||
?_account a
|
||||
WHERE
|
||||
v.type = ? AND v.typeId = ? AND v.status & 0x2",
|
||||
v.type = ? AND v.typeId = ? AND v.status & 0x2 AND v.uploader = a.id",
|
||||
$type,
|
||||
$typeId
|
||||
);
|
||||
@@ -106,7 +106,7 @@ class CommunityContent
|
||||
{
|
||||
return DB::Aowow()->Query("
|
||||
SELECT
|
||||
s.Id,
|
||||
s.id,
|
||||
a.displayName AS user,
|
||||
s.date,
|
||||
s.width,
|
||||
@@ -117,7 +117,7 @@ class CommunityContent
|
||||
?_screenshots s,
|
||||
?_account a
|
||||
WHERE
|
||||
s.type = ? AND s.typeId = ? AND s.status & 0x2",
|
||||
s.type = ? AND s.typeId = ? AND s.status & 0x2 AND s.uploader = a.id",
|
||||
$type,
|
||||
$typeId
|
||||
);
|
||||
|
||||
@@ -174,7 +174,9 @@ define('QUEST_CU_REPEATABLE', 0x01);
|
||||
define('QUEST_CU_DAILY', 0x02);
|
||||
define('QUEST_CU_WEEKLY', 0x04);
|
||||
define('QUEST_CU_SEASONAL', 0x08);
|
||||
define('QUEST_CU_SKIP_LOG', 0x10); // no idea...
|
||||
define('QUEST_CU_SKIP_LOG', 0x10);
|
||||
define('QUEST_CU_AUTO_ACCEPT', 0x20);
|
||||
define('QUEST_CU_PVP_ENABLED', 0x40);
|
||||
|
||||
define('MAX_LEVEL', 80);
|
||||
|
||||
|
||||
@@ -11,9 +11,10 @@ require 'config/config.php';
|
||||
require 'includes/libs/Smarty-2.6.26/libs/Smarty.class.php'; // Libraray: http://www.smarty.net/
|
||||
require 'includes/libs/DbSimple/Generic.php'; // Libraray: http://en.dklab.ru/lib/DbSimple (using mysqli variant: https://bitbucket.org/brainreaver/dbsimple/src)
|
||||
require 'includes/utilities.php';
|
||||
require 'localization/lang.class.php';
|
||||
require 'includes/ajaxHandler.class.php';
|
||||
require 'includes/user.class.php';
|
||||
require 'includes/database.class.php';
|
||||
require 'localization/lang.class.php';
|
||||
|
||||
// autoload List-Classes and Associated Filters
|
||||
spl_autoload_register(function ($class) {
|
||||
@@ -119,4 +120,6 @@ User::assignUserToTemplate($smarty, true);
|
||||
@list($pageCall, $pageParam) = explode('=', $str, 2);
|
||||
$smarty->assign('wowhead', 'http://'.Util::$subDomains[User::$localeId].'.wowhead.com/'.$str);
|
||||
|
||||
$ajax = new AjaxHandler($pageParam);
|
||||
|
||||
?>
|
||||
|
||||
@@ -79,7 +79,7 @@ class AchievementList extends BaseType
|
||||
'name' => $this->getField('name', true),
|
||||
'description' => $this->getField('description', true),
|
||||
'points' => $this->curTpl['points'],
|
||||
'faction' => $this->curTpl['faction'],
|
||||
'side' => $this->curTpl['faction'],
|
||||
'category' => $this->curTpl['category'],
|
||||
'parentcat' => $this->curTpl['parentCat'],
|
||||
);
|
||||
@@ -97,9 +97,9 @@ class AchievementList extends BaseType
|
||||
$rewards[] = [$type, $rId];
|
||||
|
||||
if ($rewards)
|
||||
$data[$this->id]['rewards'] = json_encode($rewards, JSON_NUMERIC_CHECK);
|
||||
else if (!empty($this->curTpl['reward']))
|
||||
$data[$this->id]['reward'] = $this->getField('reward', true);
|
||||
$data[$this->id]['rewards'] = $rewards;
|
||||
else if ($_ = $this->getField('reward', true))
|
||||
$data[$this->id]['reward'] = $_;
|
||||
}
|
||||
|
||||
return $data;
|
||||
@@ -146,6 +146,9 @@ class AchievementList extends BaseType
|
||||
$i = 0;
|
||||
foreach ($rows as $crt)
|
||||
{
|
||||
$obj = (int)$crt['value1'];
|
||||
$qty = (int)$crt['value2'];
|
||||
|
||||
// we could show them, but the tooltips are cluttered
|
||||
if (($crt['completionFlags'] & ACHIEVEMENT_CRITERIA_FLAG_HIDDEN) && User::$perms <= 0)
|
||||
continue;
|
||||
@@ -153,25 +156,36 @@ class AchievementList extends BaseType
|
||||
$crtName = Util::localizedString($crt, 'name');
|
||||
switch ($crt['type'])
|
||||
{
|
||||
// link to title - todo (low): crosslink
|
||||
case ACHIEVEMENT_CRITERIA_TYPE_EARNED_PVP_TITLE:
|
||||
$crtName = Util::ucFirst(Lang::$game['title']).Lang::$colon.$crtName;
|
||||
break;
|
||||
// link to quest
|
||||
case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST:
|
||||
if (!$crtName)
|
||||
$crtName = QuestList::getName($obj);
|
||||
break;
|
||||
// link to spell (/w icon)
|
||||
case ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET:
|
||||
case ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2:
|
||||
case ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL:
|
||||
case ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL:
|
||||
case ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2:
|
||||
if (!$crtName)
|
||||
$crtName = SpellList::getName($crt['value1']);
|
||||
$crtName = SpellList::getName($obj);
|
||||
break;
|
||||
// link to item (/w icon)
|
||||
case ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM:
|
||||
case ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM:
|
||||
case ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM:
|
||||
case ACHIEVEMENT_CRITERIA_TYPE_EQUIP_ITEM:
|
||||
if (!$crtName)
|
||||
$crtName = ItemList::getName($crt['value1']);
|
||||
$crtName = ItemList::getName($obj);
|
||||
break;
|
||||
// link to faction (/w target reputation)
|
||||
case ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION:
|
||||
if (!$crtName)
|
||||
$crtName = FactionList::getName($crt['value1']);
|
||||
$crtName .= ' ('.Lang::getReputationLevelForPoints($crt['value2']).')';
|
||||
$crtName = FactionList::getName($obj);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,9 @@ class CharClassList extends BaseType
|
||||
'power' => $this->curTpl['powerType'],
|
||||
);
|
||||
|
||||
if ($this->curTpl['flags'] & 0x40)
|
||||
$data[$this->id]['hero'] = 1;
|
||||
|
||||
if ($this->curTpl['expansion'])
|
||||
$data[$this->id]['expansion'] = $this->curTpl['expansion'];
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ class CreatureList extends BaseType
|
||||
public $queryOpts = array(
|
||||
'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'],
|
||||
'clsMin' => ['j' => 'creature_classlevelstats clsMin ON ct.unitClass = clsMin.class AND ct.minLevel = clsMin.level', 's' => ', clsMin.attackpower AS mleAtkPwrMin, clsMin.rangedattackpower AS rngAtkPwrMin, clsMin.baseArmor * ct.armorMod AS armorMin, (CASE ct.exp WHEN 0 THEN clsMin.damage_base WHEN 1 THEN clsMin.damage_exp1 ELSE clsMin.damage_exp2 END) * ct.dmgMultiplier AS dmgMin, (CASE ct.exp WHEN 0 THEN clsMin.basehp0 WHEN 1 THEN clsMin.basehp1 ELSE clsMin.basehp2 END) * ct.healthMod AS healthMin, clsMin.baseMana * ct.manaMod AS manaMin'],
|
||||
'clsMax' => ['j' => 'creature_classlevelstats clsMax ON ct.unitClass = clsMax.class AND ct.maxLevel = clsMax.level', 's' => ', clsMax.attackpower AS mleAtkPwrMax, clsMax.rangedattackpower AS rngAtkPwrMax, clsMax.baseArmor * ct.armorMod AS armorMax, (CASE ct.exp WHEN 0 THEN clsMin.damage_base WHEN 1 THEN clsMin.damage_exp1 ELSE clsMin.damage_exp2 END) * ct.dmgMultiplier AS dmgMax, (CASE ct.exp WHEN 0 THEN clsMax.basehp0 WHEN 1 THEN clsMax.basehp1 ELSE clsMax.basehp2 END) * ct.healthMod AS healthMax, clsMax.baseMana * ct.manaMod AS manaMax'],
|
||||
'qse' => ['j' => ['?_quests_startend qse ON qse.type = 1 AND qse.typeId = ct.id', true], 's' => ', IF(min(qse.method) = 1 OR max(qse.method) = 3, 1, 0) AS startsQuests, IF(min(qse.method) = 2 OR max(qse.method) = 3, 1, 0) AS endsQuests', 'g' => 'ct.id'],
|
||||
'qt' => ['j' => '?_quests qt ON qse.questId = qt.id'],
|
||||
'rep' => ['j' => ['creature_onkill_reputation rep ON rep.creature_id = ct.id', true]]
|
||||
|
||||
@@ -9,10 +9,10 @@ class FactionList extends BaseType
|
||||
public static $type = TYPE_FACTION;
|
||||
public static $brickFile = 'faction';
|
||||
|
||||
protected $queryBase = 'SELECT f.*, f.parentFactionId AS cat, f.id AS ARRAY_KEY FROM ?_factions f';
|
||||
protected $queryBase = 'SELECT f.*, f.parentFactionId AS cat2, f.id AS ARRAY_KEY FROM ?_factions f';
|
||||
protected $queryOpts = array(
|
||||
'f' => [['f2']],
|
||||
'f2' => ['j' => ['?_factions f2 ON f.parentFactionId = f2.id', true], 's' => ', IFNULL(f2.parentFactionId, 0) AS cat2']
|
||||
'f2' => ['j' => ['?_factions f2 ON f.parentFactionId = f2.id', true], 's' => ', IFNULL(f2.parentFactionId, 0) AS cat']
|
||||
);
|
||||
|
||||
public function __construct($conditions = [])
|
||||
|
||||
@@ -1080,7 +1080,7 @@ class ItemList extends BaseType
|
||||
{
|
||||
$mod = $this->curTpl['statType'.$h];
|
||||
$val = $this->curTpl['statValue'.$h];
|
||||
if (!$mod ||!$val)
|
||||
if (!$mod || !$val)
|
||||
continue;
|
||||
|
||||
@$this->itemMods[$this->id][$mod] += $val;
|
||||
@@ -1124,10 +1124,7 @@ class ItemList extends BaseType
|
||||
{
|
||||
$gemStats = Util::parseItemEnchantment($geId);
|
||||
foreach ($gemStats as $mod => $qty)
|
||||
{
|
||||
@$this->json[$this->id][$mod] += $qty;
|
||||
@$this->itemMods[$this->id][$mId] += $qty;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($this->json[$this->id] as $k => $v)
|
||||
@@ -1202,10 +1199,11 @@ class ItemList extends BaseType
|
||||
|
||||
switch ($type)
|
||||
{
|
||||
case 'stats': $mask &= 0x04001F; break;
|
||||
case 'armor': $mask &= 0xF001E0; break;
|
||||
case 'dps' : $mask &= 0x007E00; break;
|
||||
case 'spell': $mask &= 0x008000; break;
|
||||
case 'stats': $mask &= 0x04001F; break;
|
||||
case 'armor': $mask &= 0xF001E0; break;
|
||||
case 'dps' : $mask &= 0x007E00; break;
|
||||
case 'spell': $mask &= 0x008000; break;
|
||||
case 'fap' : $mask &= 0x010000; break; // unused
|
||||
default: $mask &= 0x0;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,6 @@ class ItemsetList extends BaseType
|
||||
'maxlevel' => $this->curTpl['maxLevel'],
|
||||
'note' => $this->curTpl['contentGroup'],
|
||||
'type' => $this->curTpl['type'],
|
||||
'heroic' => $this->curTpl['heroic'] == 1, // we want to be bool
|
||||
'reqclass' => $this->curTpl['classMask'],
|
||||
'classes' => $this->curTpl['classes'],
|
||||
'pieces' => $this->curTpl['pieces'],
|
||||
|
||||
@@ -40,8 +40,6 @@ class PetList extends BaseType
|
||||
for ($i = 1; $i <= 4; $i++)
|
||||
if ($this->curTpl['spellId'.$i] > 0)
|
||||
$data[$this->id]['spells'][] = $this->curTpl['spellId'.$i];
|
||||
|
||||
$data[$this->id]['spells'] = json_encode($data[$this->id]['spells'], JSON_NUMERIC_CHECK);
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
||||
@@ -134,6 +134,12 @@ class QuestList extends BaseType
|
||||
return $this->curTpl['reqPlayerKills'] || $this->curTpl['rewardHonorPoints'] || $this->curTpl['rewardArenaPoints'];
|
||||
}
|
||||
|
||||
// by TC definition
|
||||
public function isSeasonal()
|
||||
{
|
||||
return in_array($this->getField('zoneOrSortBak'), [-22, -284, -366, -369, -370, -376, -374]) && !$this->isRepeatable();
|
||||
}
|
||||
|
||||
public function getSourceData()
|
||||
{
|
||||
$data = [];
|
||||
@@ -199,25 +205,36 @@ class QuestList extends BaseType
|
||||
if ($_ > 0)
|
||||
$data[$this->id]['money'] = $_;
|
||||
|
||||
if ($this->curTpl['flags'] & QUEST_FLAG_DAILY)
|
||||
$data[$this->id]['daily'] = true;
|
||||
|
||||
if ($this->curTpl['flags'] & QUEST_FLAG_WEEKLY)
|
||||
$data[$this->id]['weekly'] = true;
|
||||
|
||||
// wflags: &1: disabled/historical; &32: AutoAccept; &64: Hostile(?)
|
||||
// todo (med): also get disables
|
||||
if ($this->curTpl['flags'] & QUEST_FLAG_UNAVAILABLE)
|
||||
$data[$this->id]['historical'] = true;
|
||||
|
||||
// if ($this->isRepeatable()) // dafuque..? says repeatable and is used as 'disabled'..?
|
||||
// $data[$this->id]['wflags'] |= QUEST_CU_REPEATABLE;
|
||||
|
||||
if ($this->curTpl['flags'] & QUEST_FLAG_DAILY)
|
||||
{
|
||||
$data[$this->id]['historical'] = true; // post 5.0
|
||||
$data[$this->id]['wflags'] |= 0x1; // pre 5.0
|
||||
$data[$this->id]['wflags'] |= QUEST_CU_DAILY;
|
||||
$data[$this->id]['daily'] = true;
|
||||
}
|
||||
|
||||
if ($this->curTpl['flags'] & QUEST_FLAG_AUTO_ACCEPT)
|
||||
$data[$this->id]['wflags'] |= 0x20;
|
||||
if ($this->curTpl['flags'] & QUEST_FLAG_WEEKLY)
|
||||
{
|
||||
$data[$this->id]['wflags'] |= QUEST_CU_WEEKLY;
|
||||
$data[$this->id]['weekly'] = true;
|
||||
}
|
||||
|
||||
if ($this->isPvPEnabled())
|
||||
$data[$this->id]['wflags'] |= 0x60; // not sure why this flag also requires auto-accept to be set
|
||||
if ($this->isSeasonal())
|
||||
$data[$this->id]['wflags'] |= QUEST_CU_SEASONAL;
|
||||
|
||||
if ($this->curTpl['flags'] & QUEST_FLAG_AUTO_REWARDED) // not shown in log
|
||||
$data[$this->id]['wflags'] |= QUEST_CU_SKIP_LOG;
|
||||
|
||||
if ($this->curTpl['flags'] & QUEST_FLAG_AUTO_ACCEPT) // self-explanatory
|
||||
$data[$this->id]['wflags'] |= QUEST_CU_AUTO_ACCEPT;
|
||||
|
||||
if ($this->isPvPEnabled()) // not sure why this flag also requires auto-accept to be set
|
||||
$data[$this->id]['wflags'] |= (QUEST_CU_AUTO_ACCEPT | QUEST_CU_PVP_ENABLED);
|
||||
|
||||
$data[$this->id]['reprewards'] = [];
|
||||
for ($i = 1; $i < 6; $i++)
|
||||
|
||||
@@ -20,19 +20,19 @@ class TitleList extends BaseType
|
||||
parent::__construct($conditions);
|
||||
|
||||
// post processing
|
||||
foreach ($this->iterate() as $__)
|
||||
foreach ($this->iterate() as $id => &$_curTpl)
|
||||
{
|
||||
// preparse sources
|
||||
if (!empty($this->curTpl['source']))
|
||||
if (!empty($_curTpl['source']))
|
||||
{
|
||||
$sources = explode(' ', $this->curTpl['source']);
|
||||
$sources = explode(' ', $_curTpl['source']);
|
||||
foreach ($sources as $src)
|
||||
{
|
||||
if (!$src) // rogue whitespace slipped through
|
||||
continue;
|
||||
|
||||
$src = explode(':', $src);
|
||||
$this->sources[$this->id][$src[0]][] = $src[1];
|
||||
$this->sources[$id][$src[0]][] = $src[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,21 +46,19 @@ class TitleList extends BaseType
|
||||
foreach ($this->iterate() as $__)
|
||||
{
|
||||
$data[$this->id] = array(
|
||||
'id' => $this->id,
|
||||
'name' => $this->getField('male', true),
|
||||
'side' => $this->curTpl['side'],
|
||||
'gender' => $this->curTpl['gender'],
|
||||
'expansion' => $this->curTpl['expansion'],
|
||||
'category' => $this->curTpl['category']
|
||||
'id' => $this->id,
|
||||
'name' => $this->getField('male', true),
|
||||
'namefemale' => $this->getField('namefemale', true),
|
||||
'side' => $this->curTpl['side'],
|
||||
'gender' => $this->curTpl['gender'],
|
||||
'expansion' => $this->curTpl['expansion'],
|
||||
'category' => $this->curTpl['category']
|
||||
);
|
||||
|
||||
if (!empty($this->curTpl['source']))
|
||||
$data[$this->id]['source'] = $this->curTpl['source'];
|
||||
}
|
||||
|
||||
if ($_ = $this->getField('female', true))
|
||||
$data[$this->id]['namefemale'] = $_;
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
@@ -70,7 +68,7 @@ class TitleList extends BaseType
|
||||
|
||||
foreach ($this->iterate() as $__)
|
||||
{
|
||||
$data[$this->id]['name'] = Util::jsEscape($this->getField('male', true));
|
||||
$data[$this->id]['name'] = $this->getField('male', true);
|
||||
|
||||
if ($_ = $this->getField('female', true))
|
||||
$data[$this->id]['namefemale'] = $_;
|
||||
@@ -139,7 +137,7 @@ class TitleList extends BaseType
|
||||
if (isset($src[13]))
|
||||
$tmp[13] = [Util::localizedString($sources[13][$this->sources[$Id][13][0]], 'source')];
|
||||
|
||||
$this->templates[$Id]['source'] = json_encode($tmp);
|
||||
$this->templates[$Id]['source'] = $tmp;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,7 +154,7 @@ class TitleList extends BaseType
|
||||
if ($faction == 2) // Horde
|
||||
$faction = 0;
|
||||
else if ($faction != 1) // Alliance
|
||||
$faction = 3; // Both
|
||||
$faction = -1; // Both
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -328,17 +328,25 @@ class User
|
||||
if (empty(self::$characters))
|
||||
{
|
||||
// todo: do after profiler
|
||||
// existing chars on realm(s)
|
||||
if ($asJSON)
|
||||
$chars = '[{"name":"ExampleChar", "realmname":"Example Realm", "region":"eu", "realm":"exrealm", icon:"inv_axe_04", "race":4, "gender":0, "classs":11, "level":80, "pinned":1}]';
|
||||
else
|
||||
$chars = array(
|
||||
array("name" => "ExampleChar", "realmname" => "Example Realm", "region" => "eu", "realm" => "exrealm", "icon" => "inv_axe_04", "race" => 4, "gender" => 0, "classs" => 11, "level" => 80, "pinned" => 1)
|
||||
);
|
||||
@include('datasets/ProfilerExampleChar');
|
||||
|
||||
self::$characters = $chars;
|
||||
// existing chars on realm(s)
|
||||
self::$characters = array(
|
||||
array(
|
||||
'name' => $character['name'],
|
||||
'realmname' => $character['realm'][1],
|
||||
'region' => $character['region'][0],
|
||||
'realm' => $character['realm'][0],
|
||||
'race' => $character['race'],
|
||||
'classs' => $character['classs'],
|
||||
'level' => $character['level'],
|
||||
'gender' => $character['gender'],
|
||||
'pinned' => $character['pinned']
|
||||
)
|
||||
);
|
||||
}
|
||||
return self::$characters;
|
||||
|
||||
return $asJSON ? json_encode(self::$characters, JSON_NUMERIC_CHECK) : self::$characters;
|
||||
}
|
||||
|
||||
public static function getProfiles($asJSON = true)
|
||||
@@ -347,17 +355,13 @@ class User
|
||||
{
|
||||
// todo => do after profiler
|
||||
// chars build in profiler
|
||||
if ($asJSON)
|
||||
$profiles = '[{"id":21, "name":"Example Profile 1", "race":4, "gender":1, "classs":5, "level":72, icon:"inv_axe_04"},{"id":23, "name":"Example Profile 2", "race":11, "gender":0, "classs":3, "level":17}]';
|
||||
else
|
||||
$profiles = array(
|
||||
array("id" => 21, "name" => "Example Profile 1", "race" => 4, "gender" => 1, "classs" => 5, "level" => 72, "icon" => "inv_axe_04"),
|
||||
array("id" => 23, "name" => "Example Profile 2", "race" => 11, "gender" => 0, "classs" => 3, "level" => 17)
|
||||
);
|
||||
|
||||
self::$profiles = $profiles;
|
||||
self::$profiles = array(
|
||||
array('id' => 21, 'name' => 'Example Profile 1', 'race' => 4, 'classs' => 5, 'level' => 72, 'gender' => 1, 'icon' => 'inv_axe_04'),
|
||||
array('id' => 23, 'name' => 'Example Profile 2', 'race' => 11, 'classs' => 3, 'level' => 17, 'gender' => 0)
|
||||
);
|
||||
}
|
||||
return self::$profiles;
|
||||
|
||||
return $asJSON ? json_encode(self::$profiles, JSON_NUMERIC_CHECK) : self::$profiles;
|
||||
}
|
||||
|
||||
public static function getCookies()
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
if (!defined('AOWOW_REVISION'))
|
||||
die('invalid access');
|
||||
|
||||
|
||||
class SimpleXML extends SimpleXMLElement
|
||||
{
|
||||
public function addCData($str)
|
||||
@@ -74,8 +75,8 @@ class SmartyAoWoW extends Smarty
|
||||
if (isset($tv['type']) && isset($tv['typeId']))
|
||||
{
|
||||
$article = DB::Aowow()->selectRow(
|
||||
'SELECT SQL_CALC_FOUND_ROWS article, quickInfo, locale FROM ?_articles WHERE type = ?d AND typeId = ?d AND locale = ?d UNION ALL '.
|
||||
'SELECT article, quickInfo, locale FROM ?_articles WHERE type = ?d AND typeId = ?d AND locale = 0 AND FOUND_ROWS() = 0',
|
||||
'SELECT article, quickInfo, locale FROM ?_articles WHERE type = ?d AND typeId = ?d AND locale = ?d UNION ALL '.
|
||||
'SELECT article, quickInfo, locale FROM ?_articles WHERE type = ?d AND typeId = ?d AND locale = 0 ORDER BY locale DESC LIMIT 1',
|
||||
$tv['type'], $tv['typeId'], User::$localeId,
|
||||
$tv['type'], $tv['typeId']
|
||||
);
|
||||
@@ -1508,6 +1509,7 @@ class Util
|
||||
return mb_convert_case($str, MB_CASE_TITLE, 'UTF-8');
|
||||
}
|
||||
|
||||
// note: valid integer > 32bit are returned as float
|
||||
public static function checkNumeric(&$data)
|
||||
{
|
||||
if ($data === null)
|
||||
@@ -2128,6 +2130,65 @@ class Util
|
||||
|
||||
return $tabsFinal;
|
||||
}
|
||||
|
||||
public static function urlize($str)
|
||||
{
|
||||
$search = ['<', '>', ' / ', "'", '(', ')'];
|
||||
$replace = ['<', '>', '-', '', '', ''];
|
||||
$str = str_replace($search, $replace, $str);
|
||||
|
||||
$accents = array(
|
||||
"ß" => "ss",
|
||||
"á" => "a", "ä" => "a", "à" => "a", "â" => "a",
|
||||
"è" => "e", "ê" => "e", "é" => "e", "ë" => "e",
|
||||
"í" => "i", "î" => "i", "ì" => "i", "ï" => "i",
|
||||
"ñ" => "n",
|
||||
"ò" => "o", "ó" => "o", "ö" => "o", "ô" => "o",
|
||||
"ú" => "u", "ü" => "u", "û" => "u", "ù" => "u",
|
||||
"œ" => "oe",
|
||||
"Á" => "A", "Ä" => "A", "À" => "A", "Â" => "A",
|
||||
"È" => "E", "Ê" => "E", "É" => "E", "Ë" => "E",
|
||||
"Í" => "I", "Î" => "I", "Ì" => "I", "Ï" => "I",
|
||||
"Ñ" => "N",
|
||||
"Ò" => "O", "Ó" => "O", "Ö" => "O", "Ô" => "O",
|
||||
"Ú" => "U", "Ü" => "U", "Û" => "U", "Ù" => "U",
|
||||
"œ" => "Oe"
|
||||
);
|
||||
$str = strtr($str, $accents);
|
||||
$str = trim($str);
|
||||
$str = preg_replace('/[^a-z0-9]/ig', '-', $str);
|
||||
|
||||
$str = str_replace('--', '-', $str);
|
||||
$str = str_replace('--', '-', $str);
|
||||
|
||||
$str = rtrim($str, '-');
|
||||
$str = strtolower($str);
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
public static function loadStaticFile($file, &$result, $localized = false)
|
||||
{
|
||||
$success = true;
|
||||
if ($localized)
|
||||
{
|
||||
if (file_exists('datasets/'.User::$localeString.'/'.$file))
|
||||
$result .= file_get_contents('datasets/'.User::$localeString.'/'.$file);
|
||||
else if (file_exists('datasets/enus/'.$file))
|
||||
$result .= file_get_contents('datasets/enus/'.$file);
|
||||
else
|
||||
$success = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (file_exists('datasets/'.$file))
|
||||
$result .= file_get_contents('datasets/'.$file);
|
||||
else
|
||||
$success = false;
|
||||
}
|
||||
|
||||
return $success;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
63
index.php
63
index.php
@@ -61,6 +61,7 @@ switch ($pageCall)
|
||||
case 'quests':
|
||||
case 'race':
|
||||
case 'races':
|
||||
case 'search': // tool: searches
|
||||
case 'skill':
|
||||
case 'skills':
|
||||
// case 'sound': // db: sounds for zone, creature, spell, ...
|
||||
@@ -77,6 +78,10 @@ switch ($pageCall)
|
||||
else
|
||||
$smarty->error();
|
||||
break;
|
||||
/* other pages */
|
||||
case '': // no parameter given -> MainPage
|
||||
require 'pages/main.php';
|
||||
break;
|
||||
case 'whats-new':
|
||||
case 'searchplugins':
|
||||
case 'searchbox':
|
||||
@@ -86,47 +91,6 @@ switch ($pageCall)
|
||||
case 'aboutus':
|
||||
require 'pages/more.php';
|
||||
break;
|
||||
case 'petcalc': // tool: pet talent calculator
|
||||
$petCalc = true;
|
||||
case 'talent': // tool: talent calculator
|
||||
require 'pages/talent.php';
|
||||
break;
|
||||
/* called by script */
|
||||
case 'cookie': // lossless cookies and user settings
|
||||
if (User::$id && $pageParam && !empty($_GET[$pageParam]))
|
||||
{
|
||||
// don't panic .. again .... it get's escaped
|
||||
if (DB::Aowow()->query('REPLACE INTO ?_account_cookies VALUES (?d, ?, ?)', User::$id, $pageParam, urldecode($_GET[$pageParam])))
|
||||
die('0'); // 0: success
|
||||
else
|
||||
die();
|
||||
}
|
||||
|
||||
break;
|
||||
case 'contactus':
|
||||
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}');
|
||||
else if ($pageParam == 'rate')
|
||||
die('3'); // 0:success, 1:ratingban, 3:rated too often
|
||||
|
||||
break;
|
||||
case 'locale': // subdomain-workaround, change the language
|
||||
User::setLocale($pageParam);
|
||||
User::writeCookie();
|
||||
header('Location: '.(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '.'));
|
||||
break;
|
||||
case 'data': // tool: dataset-loader
|
||||
case 'search': // tool: searches
|
||||
require $pageCall.'.php';
|
||||
break;
|
||||
/* other */
|
||||
case '': // no parameter given -> MainPage
|
||||
require 'pages/main.php';
|
||||
break;
|
||||
case 'latest-additions':
|
||||
case 'latest-articles':
|
||||
case 'latest-comments':
|
||||
@@ -138,6 +102,23 @@ switch ($pageCall)
|
||||
case 'random':
|
||||
require 'pages/miscTools.php';
|
||||
break;
|
||||
case 'petcalc': // tool: pet talent calculator
|
||||
$petCalc = true;
|
||||
case 'talent': // tool: talent calculator
|
||||
require 'pages/talent.php';
|
||||
break;
|
||||
/* called by script */
|
||||
case 'data': // tool: dataset-loader
|
||||
case 'cookie': // lossless cookies and user settings
|
||||
case 'contactus':
|
||||
case 'comment':
|
||||
case 'locale': // subdomain-workaround, change the language
|
||||
header('Content-type: application/x-javascript; charset=utf-8');
|
||||
if (($_ = $ajax->handle($pageCall)) !== null)
|
||||
die((string)$_);
|
||||
|
||||
break;
|
||||
/* setup */
|
||||
case 'build':
|
||||
if (User::isInGroup(U_GROUP_EMPLOYEE))
|
||||
{
|
||||
|
||||
@@ -205,7 +205,7 @@ $lang = array(
|
||||
'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"],
|
||||
'ra' => [-2 => "Horde", -1 => "Allianz", "Beide", "Mensch", "Orc", "Zwerg", "Nachtelf", "Untoter", "Tauren", "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",
|
||||
|
||||
@@ -234,7 +234,7 @@ $lang = array(
|
||||
),
|
||||
'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"],
|
||||
'cat' => [0 => "Otros", 9 => "Libros", 3 => "Contenedores", -5 => "Cofres", 25 => "Bancos de peces", -3 => "Hierbas", -4 => "Venas de minerales", -2 => "Misiones", -6 => "Herramientas"],
|
||||
'type' => [ 9 => "Libro", 3 => "Contenedore", -5 => "Cofre", 25 => "", -3 => "Hierba", -4 => "Filóne de mineral", -2 => "Misión", -6 => ""],
|
||||
'unkPosition' => "No se conoce la ubicación de esta entidad.",
|
||||
'key' => "Llave",
|
||||
|
||||
@@ -234,7 +234,7 @@ $lang = array(
|
||||
),
|
||||
'account' => [],
|
||||
'gameObject' => array(
|
||||
'cat' => [0 => "Другое", 9 => "Книги", 3 => "Контейнеры", -5 => "Сундуки", 25 => "[Fishing Pools]", -3 => "Травы", -4 => "Полезные ископаемые", -2 => "Задания", -6 => "Инструменты"],
|
||||
'cat' => [0 => "Другое", 9 => "Книги", 3 => "Контейнеры", -5 => "Сундуки", 25 => "Рыболовные лунки",-3 => "Травы", -4 => "Полезные ископаемые", -2 => "Задания", -6 => "Инструменты"],
|
||||
'type' => [ 9 => "Книга", 3 => "Контейнер", -5 => "Сундук", 25 => "", -3 => "Растение", -4 => "Полезное ископаемое", -2 => "Задание", -6 => ""],
|
||||
'unkPosition' => "Местонахождение этого объекта неизвестно.",
|
||||
'key' => "Ключ",
|
||||
|
||||
@@ -26,9 +26,6 @@ enum(array( // UserPropsLimits
|
||||
));
|
||||
*/
|
||||
|
||||
if (!in_array($pageParam, ['dashboard', '', 'signin', 'signup', 'signout', 'signin_do', 'signup_do', 'forgotpassword', 'forgotusername', 'weightscales']))
|
||||
$smarty->error();
|
||||
|
||||
function signin()
|
||||
{
|
||||
if (!isset($_POST['username']) || !isset($_POST['password']))
|
||||
@@ -264,13 +261,19 @@ if (User::$id)
|
||||
{
|
||||
switch ($pageParam)
|
||||
{
|
||||
case 'exclude':
|
||||
// profiler completion exclude handler
|
||||
// $_POST['groups'] = bitMask of excludeGroupIds when using .. excludeGroups .. duh
|
||||
// should probably occur in g_user.excludegroups (dont forget to also set g_users.settings = {})
|
||||
die();
|
||||
break;
|
||||
case 'signout':
|
||||
User::destroy();
|
||||
$next = explode('?', $_SERVER['HTTP_REFERER']);
|
||||
$next = !empty($next[1]) ? '?'.$next[1] : '.';
|
||||
header('Location: '.$next);
|
||||
case 'weightscales':
|
||||
if (isset($_POST['save']) && User::$id)
|
||||
if (isset($_POST['save']))
|
||||
{
|
||||
if (!isset($_POST['id']))
|
||||
{
|
||||
@@ -292,10 +295,12 @@ if (User::$id)
|
||||
die('0');
|
||||
|
||||
break;
|
||||
default;
|
||||
case '';
|
||||
dashboard();
|
||||
$smarty->display('dashboard.tpl');
|
||||
break;
|
||||
default:
|
||||
$smarty->error();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -24,7 +24,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
|
||||
$infobox = [];
|
||||
// hero class
|
||||
if ($cl->getField('hero'))
|
||||
if ($cl->getField('flags') & 0x40)
|
||||
$infobox[] = '[tooltip=tooltip_heroclass]'.Lang::$game['heroClass'].'[/tooltip]';
|
||||
|
||||
// resource
|
||||
@@ -230,7 +230,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
|
||||
$smarty->updatePageVars($pageData['page']);
|
||||
$smarty->assign('community', CommunityContent::getAll(TYPE_CLASS, $_id)); // comments, screenshots, videos
|
||||
$smarty->assign('lang', Lang::$main);
|
||||
$smarty->assign('lang', array_merge(Lang::$main, ['colon' => Lang::$colon]));
|
||||
$smarty->assign('lvData', $pageData['relTabs']);
|
||||
|
||||
// load the page
|
||||
|
||||
@@ -137,22 +137,6 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
}
|
||||
}
|
||||
|
||||
// tab: quests (by table, go & creature)
|
||||
$quests = new QuestList(array(['holidayId', $_hId]));
|
||||
if (!$quests->error)
|
||||
{
|
||||
$quests->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_REWARDS);
|
||||
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => QuestList::$brickFile,
|
||||
'data' => $quests->getListviewData(),
|
||||
'params' => array(
|
||||
'tabs' => '$tabsRelated',
|
||||
'note' => $hasFilter ? sprintf(Util::$filterResultString, '?quests&filter=cr=33;crs='.$_hId.';crv=0') : null
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// tab: achievements
|
||||
if ($_ = $event->getField('achievementCatOrId'))
|
||||
{
|
||||
@@ -174,24 +158,39 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
}
|
||||
}
|
||||
|
||||
// tab: items
|
||||
$conditions = array(
|
||||
'OR',
|
||||
['holidayId', $_hId], // direct requirement on item
|
||||
);
|
||||
|
||||
// items from quests
|
||||
if (!$quests->error)
|
||||
$itemCnd = [];
|
||||
if ($_hId)
|
||||
{
|
||||
$questItems = [];
|
||||
foreach (array_column($quests->rewards, TYPE_ITEM) as $arr)
|
||||
$questItems = array_merge($questItems, $arr);
|
||||
$itemCnd = array(
|
||||
'OR',
|
||||
['holidayId', $_hId], // direct requirement on item
|
||||
);
|
||||
|
||||
foreach (array_column($quests->requires, TYPE_ITEM) as $arr)
|
||||
$questItems = array_merge($questItems, $arr);
|
||||
// tab: quests (by table, go & creature)
|
||||
$quests = new QuestList(array(['holidayId', $_hId]));
|
||||
if (!$quests->error)
|
||||
{
|
||||
$quests->addGlobalsToJScript(GLOBALINFO_SELF | GLOBALINFO_REWARDS);
|
||||
|
||||
if ($questItems)
|
||||
$conditions[] = ['id', $questItems];
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => QuestList::$brickFile,
|
||||
'data' => $quests->getListviewData(),
|
||||
'params' => array(
|
||||
'tabs' => '$tabsRelated',
|
||||
'note' => $hasFilter ? sprintf(Util::$filterResultString, '?quests&filter=cr=33;crs='.$_hId.';crv=0') : null
|
||||
)
|
||||
);
|
||||
|
||||
$questItems = [];
|
||||
foreach (array_column($quests->rewards, TYPE_ITEM) as $arr)
|
||||
$questItems = array_merge($questItems, $arr);
|
||||
|
||||
foreach (array_column($quests->requires, TYPE_ITEM) as $arr)
|
||||
$questItems = array_merge($questItems, $arr);
|
||||
|
||||
if ($questItems)
|
||||
$itemCnd[] = ['id', $questItems];
|
||||
}
|
||||
}
|
||||
|
||||
// items from creature
|
||||
@@ -200,24 +199,27 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
// vendor
|
||||
$cIds = $creatures->getFoundIDs();
|
||||
if ($sells = DB::Aowow()->selectCol('SELECT item FROM npc_vendor nv WHERE entry IN (?a) UNION SELECT item FROM game_event_npc_vendor genv JOIN creature c ON genv.guid = c.guid WHERE c.id IN (?a)', $cIds, $cIds))
|
||||
$conditions[] = ['id', $sells];
|
||||
$itemCnd[] = ['id', $sells];
|
||||
}
|
||||
|
||||
// tab: items
|
||||
// not checking for loot ... cant distinguish between eventLoot and fillerCrapLoot
|
||||
|
||||
$eventItems = new ItemList($conditions);
|
||||
if (!$eventItems->error)
|
||||
if ($itemCnd)
|
||||
{
|
||||
$eventItems->addGlobalsToJScript(GLOBALINFO_SELF);
|
||||
$eventItems = new ItemList($itemCnd);
|
||||
if (!$eventItems->error)
|
||||
{
|
||||
$eventItems->addGlobalsToJScript(GLOBALINFO_SELF);
|
||||
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => ItemList::$brickFile,
|
||||
'data' => $eventItems->getListviewData(),
|
||||
'params' => array(
|
||||
'tabs' => '$tabsRelated',
|
||||
'note' => $hasFilter ? sprintf(Util::$filterResultString, '?items&filter=cr=160;crs='.$_hId.';crv=0') : null
|
||||
)
|
||||
);
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => ItemList::$brickFile,
|
||||
'data' => $eventItems->getListviewData(),
|
||||
'params' => array(
|
||||
'tabs' => '$tabsRelated',
|
||||
'note' => $hasFilter ? sprintf(Util::$filterResultString, '?items&filter=cr=160;crs='.$_hId.';crv=0') : null
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// tab: see also (event conditions)
|
||||
|
||||
@@ -17,11 +17,14 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
if ($faction->error)
|
||||
$smarty->notFound(Lang::$game['faction'], $_id);
|
||||
|
||||
if ($_ = $faction->getField('cat2'))
|
||||
$_path[] = $_;
|
||||
if ($foo = $faction->getField('cat'))
|
||||
{
|
||||
if ($bar = $faction->getField('cat2'))
|
||||
$_path[] = $bar;
|
||||
|
||||
$_path[] = $foo;
|
||||
}
|
||||
|
||||
if ($_ = $faction->getField('cat'))
|
||||
$_path[] = $_;
|
||||
|
||||
/***********/
|
||||
/* Infobox */
|
||||
@@ -112,8 +115,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
// reward rates
|
||||
if ($rates = DB::Aowow()->selectRow('SELECT * FROM reputation_reward_rate WHERE faction = ?d', $_id))
|
||||
{
|
||||
$buff = '[h3 class=clear][Custom Reward Rate][/h3][table width=100px]';
|
||||
|
||||
$buff = '';
|
||||
foreach ($rates as $k => $v)
|
||||
{
|
||||
if ($v == 1)
|
||||
@@ -121,20 +123,19 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
|
||||
switch ($k)
|
||||
{
|
||||
case 'quest_rate': $buff .= '[tr][td]Quests:[/td]'; break;
|
||||
case 'quest_daily_rate': $buff .= '[tr][td]Daily Quests:[/td]'; break;
|
||||
case 'quest_weekly_rate': $buff .= '[tr][td]Weekly Quests:[/td]'; break;
|
||||
case 'quest_monthly_rate': $buff .= '[tr][td]Monthly Quests:[/td]'; break;
|
||||
case 'creature_rate': $buff .= '[tr][td]Creatures:[/td]'; break;
|
||||
case 'spell_rate': $buff .= '[tr][td]Spells:[/td]'; break;
|
||||
case 'quest_rate': $buff .= '[tr][td]'.Lang::$game['quests'].Lang::$colon.'[/td]'; break;
|
||||
case 'quest_daily_rate': $buff .= '[tr][td]'.Lang::$game['quests'].' ('.Lang::$quest['daily'].')'.Lang::$colon.'[/td]'; break;
|
||||
case 'quest_weekly_rate': $buff .= '[tr][td]'.Lang::$game['quests'].' ('.Lang::$quest['weekly'].')'.Lang::$colon.'[/td]'; break;
|
||||
case 'quest_monthly_rate': $buff .= '[tr][td]'.Lang::$game['quests'].' ('.Lang::$quest['monthly'].')'.Lang::$colon.'[/td]'; break;
|
||||
case 'creature_rate': $buff .= '[tr][td]'.Lang::$game['npcs'].Lang::$colon.'[/td]'; break;
|
||||
case 'spell_rate': $buff .= '[tr][td]'.Lang::$game['spells'].Lang::$colon.'[/td]'; break;
|
||||
}
|
||||
|
||||
$buff .= '[td]x'.number_format($v, 1).'[/td][/tr]';
|
||||
$buff .= '[td width=30px align=right]x'.number_format($v, 1).'[/td][/tr]';
|
||||
}
|
||||
|
||||
$buff .= '[/table]';
|
||||
|
||||
$pageData['page']['extraText'] .= $buff;
|
||||
if ($buff)
|
||||
$pageData['page']['extraText'] = '[h3 class=clear][Custom Reward Rate][/h3][table]'.$buff.'[/table]';
|
||||
}
|
||||
|
||||
/**************/
|
||||
@@ -190,36 +191,33 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
}
|
||||
|
||||
// tab: members
|
||||
$conditions = array(
|
||||
['factionA', $faction->getField('templateIds')],
|
||||
['factionH', $faction->getField('templateIds')],
|
||||
'OR'
|
||||
);
|
||||
|
||||
$killCreatures = new CreatureList($conditions);
|
||||
if (!$killCreatures->error)
|
||||
if ($_ = $faction->getField('templateIds'))
|
||||
{
|
||||
$killCreatures->addGlobalsToJscript();
|
||||
$members = new CreatureList(array(['factionA', $_], ['factionH', $_], 'OR'));
|
||||
if (!$members->error)
|
||||
{
|
||||
$members->addGlobalsToJscript();
|
||||
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => 'creature',
|
||||
'data' => $killCreatures->getListviewData(),
|
||||
'showRep' => true,
|
||||
'params' => array(
|
||||
'id' => 'member',
|
||||
'name' => '$LANG.tab_members',
|
||||
'tabs' => '$tabsRelated',
|
||||
)
|
||||
);
|
||||
$pageData['relTabs'][] = array(
|
||||
'file' => 'creature',
|
||||
'data' => $members->getListviewData(),
|
||||
'showRep' => true,
|
||||
'params' => array(
|
||||
'id' => 'member',
|
||||
'name' => '$LANG.tab_members',
|
||||
'tabs' => '$tabsRelated',
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// 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], ['rewardFactionValue1', 0, '>']],
|
||||
['AND', ['rewardFactionId2', $_id], ['rewardFactionValue2', 0, '>']],
|
||||
['AND', ['rewardFactionId3', $_id], ['rewardFactionValue3', 0, '>']],
|
||||
['AND', ['rewardFactionId4', $_id], ['rewardFactionValue4', 0, '>']],
|
||||
['AND', ['rewardFactionId5', $_id], ['rewardFactionValue5', 0, '>']],
|
||||
'OR'
|
||||
);
|
||||
$quests = new QuestList($conditions);
|
||||
|
||||
@@ -22,8 +22,8 @@ if (!$smarty->loadCache($cacheKey, $pageData))
|
||||
{
|
||||
$conditions = [];
|
||||
|
||||
if (!User::isInGroup(U_GROUP_STAFF))
|
||||
$conditions[] = ['reputationIndex', -1, '!']; // unlisted factions
|
||||
if (!User::isInGroup(U_GROUP_STAFF)) // unlisted factions
|
||||
$conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
|
||||
|
||||
if (isset($cats[0]) && empty($cats[1]))
|
||||
{
|
||||
@@ -35,7 +35,7 @@ if (!$smarty->loadCache($cacheKey, $pageData))
|
||||
$conditions[] = ['OR', ['parentFactionId', $subs], ['id', $subs]];
|
||||
}
|
||||
|
||||
$path[] = $cats[0];
|
||||
$path[] = $cats[0];
|
||||
|
||||
$t = Lang::$faction['cat'][$cats[0]];
|
||||
array_unshift($title, is_array($t) ? $t[0] : $t);
|
||||
@@ -54,9 +54,9 @@ if (!$smarty->loadCache($cacheKey, $pageData))
|
||||
// tabId 0: Database g_initHeader()
|
||||
$pageData = array(
|
||||
'page' => array(
|
||||
'title' => implode(' - ', $title),
|
||||
'path' => json_encode($path, JSON_NUMERIC_CHECK),
|
||||
'tab' => 0
|
||||
'title' => implode(' - ', $title),
|
||||
'path' => json_encode($path, JSON_NUMERIC_CHECK),
|
||||
'tab' => 0
|
||||
),
|
||||
'lv' => array(
|
||||
array(
|
||||
|
||||
@@ -76,6 +76,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
$_altNPCs = new CreatureList(array(['id', array_keys($_altIds)]));
|
||||
}
|
||||
|
||||
// hmm, this won't do, if th creature is spawned by event/script
|
||||
$mapType = 0;
|
||||
$maps = DB::Aowow()->selectCol('SELECT DISTINCT map from creature WHERE id = ?d', $_id);
|
||||
if (count($maps) == 1) // should only exist in one instance
|
||||
|
||||
@@ -14,38 +14,43 @@ $_profileId = null;
|
||||
/* Parameter-Handler */
|
||||
/*********************/
|
||||
|
||||
|
||||
function handlePower($custom, $data) // tooltip
|
||||
{
|
||||
header('Content-type: application/x-javascript; charsetUTF-8');
|
||||
|
||||
Util::powerUseLocale(@$_GET['domain']);
|
||||
|
||||
$name = 'Test';
|
||||
@include('datasets/ProfilerExampleChar'); // tmp char data
|
||||
|
||||
$name = $character['name'];
|
||||
$guild = $character['guild'];
|
||||
$gRankName = $character['guildrank'];
|
||||
$lvl = $character['level'];
|
||||
$ra = $character['race'];
|
||||
$cl = $character['classs'];
|
||||
$gender = $character['gender'];
|
||||
$desc = $character['description'];
|
||||
$title = (new TitleList(array(['id', $character['title']])))->getField($gender ? 'female' : 'male', true);
|
||||
|
||||
if ($custom)
|
||||
$name .= ' (Custom Profile)';
|
||||
if (false /*hasSelectedTitle*/)
|
||||
else if ($title)
|
||||
$name = sprintf($title, $name);
|
||||
|
||||
$guild = 'Some Guild';
|
||||
$gRankName = 'Officer';
|
||||
|
||||
|
||||
$tt = '<table>';
|
||||
$tt .= '<tr><td><b class="q">'.$name.'</b></td></tr>';
|
||||
if (true /*CharacterHasGuild*/)
|
||||
if ($guild)
|
||||
$tt .= '<tr><td><'.$guild.'> ('.$gRankName.')</td></tr>';
|
||||
else if (true /*ProfileHasDescription*/)
|
||||
else if ($desc)
|
||||
$tt .= '<tr><td>'.$desc.'</td></tr>';
|
||||
|
||||
$tt .= '<tr><td>Level 80 Tauren Druid (Player)</td></tr>';
|
||||
$tt .= '<tr><td>'.Lang::$game['level'].' '.$lvl.' '.Lang::$game['ra'][$ra].' '.Lang::$game['cl'][$cl].'</td></tr>';
|
||||
$tt .= '</table>';
|
||||
|
||||
|
||||
$x = '$WowheadPower.registerProfile('.($custom ? $data : "'".implode('.', $data)."'").', '.User::$localeId.", {\n";
|
||||
$x .= "\tname_".User::$localeString.": '".Util::jsEscape($name)."',\n";
|
||||
$x .= "\ttooltip_".User::$localeString.": '".$tt."',\n";
|
||||
$x .= "\ticon: \$WH.g_getProfileIcon(2, 1, 1, 60, 'class_druid'),\n"; // (race, class, gender, level, iconOrId, 'medium')
|
||||
$x .= "\ticon: \$WH.g_getProfileIcon(".$ra.", ".$cl.", ".$gender.", ".$lvl."),\n"; // (race, class, gender, level, iconOrId, 'medium')
|
||||
$x .= "});";
|
||||
|
||||
die($x);
|
||||
@@ -117,7 +122,7 @@ function handlePrivacyToggle($id, $mode) // ...
|
||||
*/
|
||||
}
|
||||
|
||||
function handleResync($initNew = true) // ...
|
||||
function handleResync($initNew = true) // ...
|
||||
{
|
||||
/* params
|
||||
id: <prId1,prId2,..,prIdN>
|
||||
@@ -206,213 +211,137 @@ function handleLoad()
|
||||
|
||||
// titles, achievements, characterData, talents (, pets)
|
||||
// and some onLoad-hook to .. load it registerProfile($data)
|
||||
// check: equipItem, equipSubitem, socketItem, enchantItem, selectPet, updateMenu
|
||||
// everything ele goes through data.php .. strangely enough
|
||||
// everything else goes through data.php .. strangely enough
|
||||
|
||||
|
||||
$buff = '';
|
||||
$character = array(
|
||||
'id' => 2,
|
||||
'name' => 'CharName',
|
||||
'region' => ['eu', 'Europe'],
|
||||
'battlegroup' => ['pure-pwnage', 'Pure Pwnage'],
|
||||
'realm' => ['dafuque', 'da\'Fuqúe'],
|
||||
|
||||
'level' => 80,
|
||||
'classs' => 11,
|
||||
'race' => 6,
|
||||
'faction' => 1, // 0:alliance; 1:horde?
|
||||
'gender' => 1,
|
||||
'skincolor' => 0, // playerbytes % 256
|
||||
'hairstyle' => 0, // (playerbytes >> 16) % 256
|
||||
'haircolor' => 0, // (playerbytes >> 24) % 256
|
||||
'facetype' => 0, // faceStyle = (playerbytes >> 8) % 256 [maybe features]
|
||||
'features' => 0, // playerBytes2 % 256 [maybe facetype]
|
||||
|
||||
'source' => 2, // source: used if you create a profile from a genuine character. It inherites region, realm and bGroup
|
||||
'sourcename' => 'SourceCharName', // > if these three are false we get a 'genuine' profile [0 for genuine characters..?]
|
||||
'user' => 0, //User::$id, // > 'genuine' is the parameter for _isArmoryProfile(allowCustoms) ['' for genuine characters..?]
|
||||
'username' => '', //User::$displayName, // > also, if 'source' <> 0, the char-icon is requestet via profile.php?avatar
|
||||
'published' => 1, // public / private ?
|
||||
'nomodel' => 0xFFFF, // remove slotIdx form modelvewer (so its a bitmask)
|
||||
'title' => 22, // titleId
|
||||
'guild' => 'Godlike HD',
|
||||
'description' => '', // only in custom profiles
|
||||
|
||||
'bookmarks' => [2], // UNK pinned or claimed profileIds..?
|
||||
'arenateams' => [2 => 'Dead in the water', 3 => 'Hier kommt die Maus', 5 => 'High Five'],
|
||||
'lastupdated' => 1395185741600, // timestamp in ms
|
||||
'faction' => 1, // 0:alliance; 1:horde
|
||||
'gender' => 1, // 0:male, 1:female
|
||||
'skincolor' => 0, // playerbytes % 256
|
||||
'hairstyle' => 0, // (playerbytes >> 16) % 256
|
||||
'haircolor' => 0, // (playerbytes >> 24) % 256
|
||||
'facetype' => 0, // (playerbytes >> 8) % 256 [maybe features]
|
||||
'features' => 0, // playerBytes2 % 256 [maybe facetype]
|
||||
'source' => 2, // source: used if you create a profile from a genuine character. It inherites region, realm and bGroup
|
||||
'sourcename' => 'SourceCharName', // > if these three are false we get a 'genuine' profile [0 for genuine characters..?]
|
||||
'user' => 1, // > 'genuine' is the parameter for _isArmoryProfile(allowCustoms) ['' for genuine characters..?]
|
||||
'username' => 'TestUser', // > also, if 'source' <> 0, the char-icon is requestet via profile.php?avatar
|
||||
'published' => 1, // public / private
|
||||
'pinned' => 1, // usable for some utility funcs on site
|
||||
'nomodel' => 0x0, // unchecks DisplayOnCharacter by (1 << slotId - 1)
|
||||
'title' => 0, // titleId currently in use or null
|
||||
'guild' => 'GuildName', // only on chars; id or null
|
||||
'description' => 'this is a profile', // only on custom profiles
|
||||
'arenateams' => [], // [size(2|3|5) => DisplayName]; DisplayName gets urlized to use as link
|
||||
'playedtime' => 0, // exact to the day
|
||||
'lastupdated' => 0, // timestamp in ms
|
||||
'achievementpoints' => 0, // max you have
|
||||
'talents' => array(
|
||||
'builds' => array(
|
||||
['talents' => '55322331200212', 'glyphs' => '45623:45625'],
|
||||
['talents' => '51213102410', 'glyphs' => '45623:45625']
|
||||
['talents' => '', 'glyphs' => ''], // talents:string of 0-5 points; glyphs: itemIds.join(':')
|
||||
),
|
||||
'active' => 0
|
||||
'active' => 1 // 1|2
|
||||
),
|
||||
'pets' => array( // UNK
|
||||
[/*oneArrayPerPet*/],
|
||||
'customs' => [], // custom profiles created from this char; profileId => [name, ownerId, iconString(optional)]
|
||||
'skills' => [], // skillId => [curVal, maxVal]; can contain anything, should be limited to prim/sec professions
|
||||
'inventory' => [], // slotId => [itemId, subItemId, permEnchantId, tempEnchantId, gemItemId1, gemItemId2, gemItemId3, gemItemId4]
|
||||
'auras' => [], // custom list of buffs, debuffs [spellId]
|
||||
|
||||
// completion lists: [subjectId => amount/timestamp/1]
|
||||
'reputation' => [], // factionId => amount
|
||||
'titles' => [], // titleId => 1
|
||||
'spells' => [], // spellId => 1; recipes, pets, mounts
|
||||
'achievements' => [], // achievementId => timestamp
|
||||
'quests' => [], // questId => 1
|
||||
|
||||
// UNKNOWN
|
||||
'bookmarks' => [2], // UNK pinned or claimed userId => profileIds..?
|
||||
'statistics' => [], // UNK all statistics? [achievementId => killCount]
|
||||
'activity' => [], // UNK recent achievements? [achievementId => killCount]
|
||||
'glyphs' => [], // not really used .. i guess..?
|
||||
'pets' => array( // UNK
|
||||
[], // one array per pet, structure UNK
|
||||
),
|
||||
'skills' => [333 => [150, 450]], // can contain anything, should be limited to prim/sec professions
|
||||
'reputation' => [70 => 42500],
|
||||
'achievements' => [],
|
||||
'achievementpoints' => 9001, // max you have
|
||||
'titles' => [111 => 1, 144 => 1],
|
||||
'quests' => [],
|
||||
'spells' => [67527 => 1, 41252 => 1, 25659 => 1, 27984 => 1],
|
||||
// 'glyphs' => [], // not really used .. i guess..?
|
||||
'inventory' => [],
|
||||
'playedtime' => 1 * YEAR + 10 * MONTH + 21 * DAY, // exact to the day
|
||||
'auras' => [770, 24858, 48470, 48560] // custom list of buffs, debuffs
|
||||
);
|
||||
|
||||
$inventory = array(
|
||||
1 => [46161, 0, 3817, 0, 41398, 40112 ],
|
||||
2 => [44664, 0, 0, 0, 40112, 0 ],
|
||||
3 => [46157, 0, 3808, 0, 40112, 0 ],
|
||||
5 => [46159, 0, 3832, 0, 40112, 40112 ],
|
||||
9 => [40186, 0, 3756, 0, 0, 0 ],
|
||||
7 => [46160, 0, 3328, 0, 40112, 40112 ],
|
||||
8 => [45232, 0, 983, 0, 40112, 0 ],
|
||||
6 => [45547, 0, 0, 0, 40112, 0 ],
|
||||
10 => [46158, 0, 3222, 0, 40112, 0 ],
|
||||
11 => [43993, 0, 3839, 0, 49110, 0 ],
|
||||
12 => [45157, 0, 3839, 0, 0, 0 ],
|
||||
13 => [44253, 0, 0, 0, 0, 0 ],
|
||||
14 => [40256, 0, 0, 0, 0, 0 ],
|
||||
15 => [40403, 0, 1099, 0, 0, 0 ],
|
||||
16 => [45498, 0, 3789, 0, 0, 0 ],
|
||||
18 => [39757, 0, 0, 0, 0, 0 ],
|
||||
19 => [40643, 0, 0, 0, 0, 0 ]
|
||||
);
|
||||
@include('datasets/ProfilerExampleChar'); // tmp char data
|
||||
|
||||
$character['achievements'] = array(
|
||||
13 => 1226439600,
|
||||
12 => 1226439600,
|
||||
11 => 1226439600,
|
||||
10 => 1226439600,
|
||||
9 => 1226439600,
|
||||
883 => 1226439600,
|
||||
7 => 1226439600,
|
||||
1563 => 1226439600,
|
||||
705 => 1226439600,
|
||||
16 => 1226439600,
|
||||
546 => 1226439600,
|
||||
23980 => 1216439600,
|
||||
575 => 1216439600
|
||||
);
|
||||
|
||||
$character['statistics'] = array( // UNK all statistics? [id => killCount]
|
||||
1377 => 1,
|
||||
23980 => 5,
|
||||
575 => 20
|
||||
);
|
||||
|
||||
$character['activity'] = array( // UNK recent achievements? [id => killCount]
|
||||
1377 => 1,
|
||||
23980 => 1,
|
||||
575 => 1
|
||||
);
|
||||
|
||||
foreach ($inventory as &$iv)
|
||||
while (count($iv) < 8)
|
||||
$iv[] = 0;
|
||||
|
||||
$character['inventory'] = $inventory;
|
||||
|
||||
$itemz = new ItemList(array(['id', array_column($inventory, 0)]));
|
||||
$data = $itemz->getListviewData(ITEMINFO_JSON | ITEMINFO_SUBITEMS);
|
||||
foreach ($itemz->iterate() as $iId => $__)
|
||||
{
|
||||
if (empty($data[$iId]))
|
||||
continue;
|
||||
|
||||
$buff .= "\ng_items.add(".$iId.', {name_'.User::$localeString.':"'.Util::jsEscape($itemz->getField('name', true)).'", quality:'.$itemz->getField('quality').', icon:"'.$itemz->getField('iconString').'", jsonequip:'.json_encode($data[$iId], JSON_NUMERIC_CHECK).'})';
|
||||
}
|
||||
|
||||
/* CUSTOM AURAS */
|
||||
$buff = '';
|
||||
$itemz = new ItemList(array(['id', array_column($character ['inventory'], 0)]));
|
||||
$data = $itemz->getListviewData(ITEMINFO_JSON | ITEMINFO_SUBITEMS);
|
||||
|
||||
$auraz = new SpellList(array(['id', $character['auras']]));
|
||||
$dataz = $auraz->getListviewData();
|
||||
$modz = $auraz->getProfilerMods();
|
||||
|
||||
// get and apply inventory
|
||||
foreach ($itemz->iterate() as $iId => $__)
|
||||
$buff .= 'g_items.add('.$iId.', {name_'.User::$localeString.":'".Util::jsEscape($itemz->getField('name', true))."', quality:".$itemz->getField('quality').", icon:'".$itemz->getField('iconString')."', jsonequip:".json_encode($data[$iId], JSON_NUMERIC_CHECK)."});\n";
|
||||
|
||||
$buff .= "\n";
|
||||
|
||||
// get and apply aura-mods
|
||||
foreach ($dataz as $id => $data)
|
||||
{
|
||||
$mods = [];
|
||||
if (!empty($modz[$id]))
|
||||
{
|
||||
$mods = [];
|
||||
foreach ($modz[$id] as $k => $v)
|
||||
if ($str = @Util::$itemMods[$k])
|
||||
{
|
||||
if (is_array($v))
|
||||
$mods[] = $v;
|
||||
else if ($str = @Util::$itemMods[$k])
|
||||
$mods[$str] = $v;
|
||||
else
|
||||
$mods[$k] = $v;
|
||||
|
||||
$data['modifier'] = $mods;
|
||||
}
|
||||
}
|
||||
|
||||
$json = preg_replace('/"\$([^$"]+)"/', '\1', json_encode($data, JSON_NUMERIC_CHECK));
|
||||
$buff .= "\ng_spells.add(".$id.', '.$json.');';
|
||||
$buff .= 'g_spells.add('.$id.", {id:".$id.", name:'".Util::jsEscape($data['name'])."', icon:'".$data['icon']."', modifier:".json_encode($mods, JSON_NUMERIC_CHECK)."});\n";
|
||||
}
|
||||
$buff .= "\n";
|
||||
|
||||
/* END CUSTOM */
|
||||
// load available titles
|
||||
Util::loadStaticFile('p-titles-'.$character['gender'], $buff, true);
|
||||
|
||||
$mountz = new SpellList(array(['typeCat', -5]));
|
||||
$dataz = $mountz->getListviewData();
|
||||
foreach ($dataz as $id => $data)
|
||||
echo "\ng_spells.add(".$id.', '.json_encode($data, JSON_NUMERIC_CHECK).');';
|
||||
|
||||
|
||||
|
||||
|
||||
/*** STATIC DATA ***/
|
||||
/*** CACHE THIS! ***/
|
||||
// by locale and faction
|
||||
|
||||
// buffer title
|
||||
$titlez = new TitleList(array(CFG_SQL_LIMIT_NONE, [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0])); // all available
|
||||
$dataz = $titlez->getListviewData();
|
||||
|
||||
$buff .= "\n\nvar _ = g_titles;";
|
||||
foreach ($dataz as $id => $data)
|
||||
// load available achievements
|
||||
if (!Util::loadStaticFile('p-achievements', $buff, true))
|
||||
{
|
||||
$s = !empty($data[$id]['source']) ? ', source: '.($data[$id]['source']) : null;
|
||||
$buff .= "\n_[".$id."] = {name:'".Util::jsEscape($character['gender'] && !empty($data['namefemale']) ? $data['namefemale'] : $data['name'])."', gender:".$data['gender'].', category:'.$data['category'].$s.'};';
|
||||
$buff .= "\n\ng_achievement_catorder = [];";
|
||||
$buff .= "\n\ng_achievement_points = [0];";
|
||||
}
|
||||
|
||||
// buffer achievements / statistics
|
||||
$cnd = array(
|
||||
CFG_SQL_LIMIT_NONE,
|
||||
[['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0], // no unachievable
|
||||
[['flags', 1, '&'], 0], // no statistics
|
||||
// [faction matches our faction]
|
||||
);
|
||||
$achievez = new AchievementList($cnd);
|
||||
$dataz = $achievez->getListviewData(ACHIEVEMENTINFO_PROFILE);
|
||||
// excludes; structure UNK type => [maskBit => [typeIds]] ?
|
||||
/*
|
||||
g_user.excludes = [type:[typeIds]]
|
||||
g_user.includes = [type:[typeIds]]
|
||||
g_user.excludegroups = groupMask // requires g_user.settings != null
|
||||
|
||||
$sumPoints = 0;
|
||||
$buff .= "\n\nvar _ = g_achievements;";
|
||||
foreach ($dataz as $id => $data)
|
||||
{
|
||||
$sumPoints += $data['points'];
|
||||
$buff .= "\n_[".$id.'] = '.json_encode($data, JSON_NUMERIC_CHECK).';';
|
||||
}
|
||||
|
||||
// this list below is correct and expected. HOW THE HELL DOES THE SCRIPT GENERATE A TREE FROM THAT?! [ORDER BY parentId, posOrChildCount ASC]
|
||||
$buff .= "\n\ng_achievement_catorder = [92, 96, 97, 95, 168, 169, 201, 155, 81, 1, 130, 141, 128, 122, 133, 14807, 132, 134, 131, 21, 152, 153, 154, 165, 14801, 14802, 14803, 14804, 14881, 14901, 15003, 14861, 14862, 14863, 14777, 14778, 14779, 14780, 123, 124, 125, 126, 127, 135, 136, 137, 140, 145, 147, 191, 178, 173, 160, 187, 159, 163, 161, 162, 158, 14981, 156, 14941, 14808, 14805, 14806, 14921, 14922, 14923, 14961, 14962, 15001, 15002, 15041, 15042, 170, 171, 172, 14864, 14865, 14866, 14821, 14822, 14823, 14963, 15021, 15062]";
|
||||
|
||||
// max achievable achievementpoints come separately .. as array.. with only one element .. seriously?
|
||||
$buff .= "\n\ng_achievement_points = [".$sumPoints."];";
|
||||
|
||||
/*** END STATIC ***/
|
||||
|
||||
// excludes
|
||||
$buff .= "\n\ng_excludes = {};";
|
||||
maskBit are matched against fieldId from excludeGroups
|
||||
id: 1, label: LANG.dialog_notavail
|
||||
id: 2, label: LANG.dialog_tcg
|
||||
id: 4, label: LANG.dialog_collector
|
||||
id: 8, label: LANG.dialog_promo
|
||||
id: 16, label: LANG.dialog_nonus
|
||||
id: 96, label: LANG.dialog_faction
|
||||
id: 896, label: LANG.dialog_profession
|
||||
id: 1024, label: LANG.dialog_noexalted
|
||||
*/
|
||||
// $buff .= "\n\ng_excludes = {};";
|
||||
|
||||
// add profile to buffer
|
||||
$buff .= "\n\n\$WowheadProfiler.registerProfile(".json_encode($character, JSON_PRETTY_PRINT, JSON_NUMERIC_CHECK).");";
|
||||
$buff .= "\n\n\$WowheadProfiler.registerProfile(".json_encode($character).");"; // can't use JSON_NUMERIC_CHECK or the talent-string becomes a float
|
||||
|
||||
return $buff;
|
||||
return $buff."\n";
|
||||
}
|
||||
|
||||
|
||||
/**********/
|
||||
/* HALPer */
|
||||
/**********/
|
||||
@@ -516,11 +445,11 @@ function getModelForForm($form, $char)
|
||||
return DB::Aowow()->selectCell('SELECT IF(?d == 1, IFNULL(displayIdA, displayIdH), IFNULL(displayIdH, displayIdA)) FROM ?_shapeshiftForm WHERE id = ?d AND XXX', Util::sideByRaceMask(1 << ($char['race'] - 1)), $form);
|
||||
}
|
||||
|
||||
|
||||
/******************/
|
||||
/* select handler */
|
||||
/******************/
|
||||
|
||||
|
||||
switch ($pageParam)
|
||||
{
|
||||
case 'link':
|
||||
@@ -572,13 +501,13 @@ switch ($pageParam)
|
||||
handlePower($_custom, $_profile);
|
||||
else if ($_custom) // validate existance of profile
|
||||
$_profileId = 0;
|
||||
else if ($_ = DB::Aowow()->selectCell('SELECT 2')) // some query to validate existence of char
|
||||
else if ($_ = DB::Aowow()->selectCell('SELECT 2161862')) // some query to validate existence of char
|
||||
$_profileId = $_;
|
||||
else
|
||||
Util::$pageTemplate->notFound(Util::ucFirst(Lang::$game['profile']), $pageParam);
|
||||
}
|
||||
|
||||
// required by progress in JScript
|
||||
// required by progress in JScript move to handleLoad()?
|
||||
Util::$pageTemplate->extendGlobalIds(TYPE_NPC, [29120, 31134, 29306, 29311, 23980, 27656, 26861, 26723, 28923, 15991]);
|
||||
|
||||
|
||||
@@ -589,6 +518,8 @@ $pageData = array(
|
||||
'path' => json_encode($_path, JSON_NUMERIC_CHECK),
|
||||
'title' => Util::ucFirst(Lang::$game['profile']), // actual name is set per jScript
|
||||
'tab' => 1,
|
||||
'region' => 'eu',
|
||||
'realm' => 'realm Name',
|
||||
'reqJS' => array(
|
||||
'static/js/filters.js',
|
||||
'static/js/TalentCalc.js',
|
||||
@@ -596,8 +527,7 @@ $pageData = array(
|
||||
'static/js/profile_all.js',
|
||||
'static/js/profile.js',
|
||||
'static/js/Profiler.js',
|
||||
'?data=enchants.gems.glyphs.itemsets.pets.pet-talents.quick-excludes.realms.statistics.weight-presets&locale='.User::$localeId.'&t='.$_SESSION['dataKey'] // quick-excludes?!
|
||||
// ?data=user&1270968639
|
||||
'?data=enchants.gems.glyphs.itemsets.pets.pet-talents.quick-excludes.realms.statistics.weight-presets&locale='.User::$localeId.'&t='.$_SESSION['dataKey']
|
||||
),
|
||||
'reqCSS' => array(
|
||||
['path' => 'static/css/TalentCalc.css'],
|
||||
|
||||
@@ -20,107 +20,48 @@ new Listview({
|
||||
]
|
||||
});
|
||||
*/
|
||||
$lv = array(
|
||||
array(
|
||||
'id' => '0',
|
||||
'name' => 'Helluvah',
|
||||
'acvPts' => '6095',
|
||||
'guildName' => 'Been There Done That',
|
||||
'guildRank' => '-1',
|
||||
'realmInternal' => 'aszune',
|
||||
'realmName' => 'Aszune',
|
||||
'bgInternal' => 'blackout',
|
||||
'bgName' => 'Blackout',
|
||||
'region' => 'eu',
|
||||
'level' => '85',
|
||||
'race' => '1',
|
||||
'gender' => '1',
|
||||
'class' => '2',
|
||||
'faction' => '0',
|
||||
'tree' => [31, 5, 5],
|
||||
'spec' => '1'
|
||||
),
|
||||
array(
|
||||
'id' => '0',
|
||||
'name' => 'Vetzew',
|
||||
'acvPts' => '9830',
|
||||
'guildName' => 'SPQ',
|
||||
'guildRank' => '-1',
|
||||
'realmInternal' => 'aszune',
|
||||
'realmName' => 'Aszune',
|
||||
'bgInternal' => 'blackout',
|
||||
'bgName' => 'Blackout',
|
||||
'region' => 'eu',
|
||||
'level' => '85',
|
||||
'race' => '1',
|
||||
'gender' => '0',
|
||||
'class' => '5',
|
||||
'faction' => '0',
|
||||
'tree' => [9, 32, 0],
|
||||
'spec' => '2'
|
||||
),
|
||||
array(
|
||||
'id' => '0',
|
||||
'name' => 'Winry',
|
||||
'acvPts' => '9065',
|
||||
'guildName' => 'Momentum',
|
||||
'guildRank' => '-1',
|
||||
'realmInternal' => 'aszune',
|
||||
'realmName' => 'Aszune',
|
||||
'bgInternal' => 'blackout',
|
||||
'bgName' => 'Blackout',
|
||||
'region' => 'eu',
|
||||
'level' => '85',
|
||||
'race' => '10',
|
||||
'gender' => '1',
|
||||
'class' => '3',
|
||||
'faction' => '1',
|
||||
'tree' => [1, 31, 9],
|
||||
'spec' => '2'
|
||||
),
|
||||
array(
|
||||
'id' => '0',
|
||||
'name' => 'Enfisk',
|
||||
'acvPts' => '12370',
|
||||
'guildName' => 'Postal',
|
||||
'guildRank' => '-1',
|
||||
'realmInternal' => 'aszune',
|
||||
'realmName' => 'Aszune',
|
||||
'bgInternal' => 'blackout',
|
||||
'bgName' => 'Blackout',
|
||||
'region' => 'eu',
|
||||
'level' => '85',
|
||||
'race' => '3',
|
||||
'gender' => '1',
|
||||
'class' => '5',
|
||||
'faction' => '0',
|
||||
'tree' => [9, 0, 32],
|
||||
'spec' => '3'
|
||||
),
|
||||
array(
|
||||
'id' => '71',
|
||||
'name' => 'Erchenmar',
|
||||
'acvPts' => '10570',
|
||||
'guildName' => 'Psychosomatic Assassins',
|
||||
'guildRank' => '-1',
|
||||
'realmInternal' => 'aszune',
|
||||
'realmName' => 'Aszune',
|
||||
'bgInternal' => 'blackout',
|
||||
'bgName' => 'Blackout',
|
||||
'region' => 'eu',
|
||||
'level' => '85',
|
||||
'race' => '5',
|
||||
'gender' => '0',
|
||||
'class' => '9',
|
||||
'faction' => '0',
|
||||
'tree' => [3, 7, 31],
|
||||
'spec' => '3'
|
||||
)
|
||||
);
|
||||
|
||||
@include('datasets/ProfilerExampleChar'); // tmp char data
|
||||
|
||||
// dont send ID for real chars unless they have some kind of custom avatar
|
||||
// on second thought .. ids are required, but the function that generates the icon is faulty
|
||||
$finalDis = [];
|
||||
$tString = $character['talents']['builds'][$character['talents']['active']]['talents'];
|
||||
$start = 0;
|
||||
$distrib = DB::Aowow()->selectCol('SELECT COUNT(t.id) FROM dbc.talent t JOIN dbc.talenttab tt ON t.tabId = tt.id WHERE tt.classMask & ?d GROUP BY tt.id ORDER BY tt.tabNumber ASC', 1 << ($character['classs'] - 1));
|
||||
foreach ($distrib as $d)
|
||||
{
|
||||
$tSub = substr($tString, $start, $d);
|
||||
$qty = 0;
|
||||
for ($i = 0; $i < strlen($tSub); $i++)
|
||||
$qty += (int)$tSub[$i];
|
||||
|
||||
$finalDis[] = $qty;
|
||||
$start += $d;
|
||||
}
|
||||
|
||||
$lv = array(
|
||||
array(
|
||||
'id' => 0,
|
||||
'name' => $character['name'],
|
||||
'acvPts' => $character['achievementpoints'],
|
||||
'guildName' => $character['guild'],
|
||||
'guildRank' => -1,
|
||||
'realmInternal' => $character['realm'][0],
|
||||
'realmName' => $character['realm'][1],
|
||||
'bgInternal' => $character['battlegroup'][0],
|
||||
'bgName' => $character['battlegroup'][0],
|
||||
'region' => $character['region'][0],
|
||||
'level' => $character['level'],
|
||||
'race' => $character['race'],
|
||||
'gender' => $character['gender'],
|
||||
'class' => $character['classs'],
|
||||
'faction' => $character['faction'],
|
||||
'tree' => $finalDis,
|
||||
'spec' => $character['talents']['active']
|
||||
)
|
||||
);
|
||||
|
||||
// dont send ID for real chars unless they have some kind of custom avatar
|
||||
// on second thought .. ids are required for resync, but the function that generates the icon is faulty
|
||||
|
||||
$pageData = array(
|
||||
'file' => 'class',
|
||||
@@ -130,6 +71,7 @@ $pageData = array(
|
||||
'name' => '$LANG.tab_characters',
|
||||
'hideCount' => 1,
|
||||
'_truncated' => 1,
|
||||
'roster' => 3,
|
||||
'visibleCols' => "$['race','classs','level','talents','achievementpoints']",
|
||||
'note' => '$$WH.sprintf(LANG.lvnote_charactersfound, \'20,592,390\', 200) + LANG.dash + LANG.lvnote_tryfiltering.replace(\'<a>\', \'<a href="javascript:;" onclick="fi_toggle()">\')',
|
||||
'onBeforeCreate' => '$pr_initRosterListview' // $_GET['roster'] = 1|2|3|4 .. 2,3,4 arenateam-size (4 => 5-man), 1 guild .. it puts a resync button on the lv...
|
||||
@@ -140,16 +82,16 @@ $pageData = array(
|
||||
// menuId 5: Profiler g_initPath()
|
||||
// tabId 1: Tools g_initHeader()
|
||||
$smarty->updatePageVars(array(
|
||||
'tab' => 1,
|
||||
'title' => Util::ucFirst(Lang::$game['profiles']),
|
||||
'path' => "[1, 5, 0, 'us', 'pure-pwnage', 'trinity']", // [1,5,'eu','cyclone-wirbelsturm','silvermoon']
|
||||
'tab' => 1,
|
||||
'reqJS' => array(
|
||||
'static/js/filters.js?978',
|
||||
'static/js/profile_all.js?978',
|
||||
'static/js/profile.js?978',
|
||||
'?data=weight-presets.realms&locale='.User::$localeId.'&t='.$_SESSION['dataKey'],
|
||||
// '?data=user&1280640186'
|
||||
'tab' => 1,
|
||||
'title' => Util::ucFirst(Lang::$game['profiles']),
|
||||
'path' => "[1, 5, 0, '".$character['region'][0]."', '".$character['battlegroup'][0]."', '".$character['realm'][0]."']",
|
||||
'realm' => '', // not sure about the use
|
||||
'region' => '', // seconded..
|
||||
'reqJS' => array(
|
||||
'static/js/filters.js',
|
||||
'static/js/profile_all.js',
|
||||
'static/js/profile.js',
|
||||
'?data=weight-presets.realms&locale='.User::$localeId.'&t='.$_SESSION['dataKey']
|
||||
),
|
||||
'reqCSS' => array(
|
||||
['path' => 'static/css/profiler.css']
|
||||
@@ -157,6 +99,7 @@ $smarty->updatePageVars(array(
|
||||
));
|
||||
$smarty->assign('lang', array_merge(Lang::$main, Lang::$game, ['colon' => Lang::$colon]));
|
||||
$smarty->assign('lvData', $pageData);
|
||||
$smarty->assign('filter', ['query' => 1]);
|
||||
|
||||
// load the page
|
||||
$smarty->display('profiles.tpl');
|
||||
|
||||
@@ -156,7 +156,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
$infobox[] = Util::ucFirst($t).Lang::$colon.$_;
|
||||
}
|
||||
|
||||
// profession {profession: [skill=X] (123)}
|
||||
// profession / skill
|
||||
if ($_ = $quest->getField('reqSkillId'))
|
||||
{
|
||||
Util::$pageTemplate->extendGlobalIds(TYPE_SKILL, $_);
|
||||
@@ -403,7 +403,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
if (!$proxy->error)
|
||||
{
|
||||
// todo (low): now do it properly this time!
|
||||
$proxyList = '<a href="javascript:;" onclick="g_disclose($WH.ge(\'npcgroup-'.$id.'\'), this)" class="disclosure-off">'.($altTxt ? $altTxt : CreatureList::getName($id)).'</a>'.($qty > 1 ? ' ('.$qty.')' : null);
|
||||
$proxyList = '<a href="javascript:;" onclick="g_disclose($WH.ge(\'npcgroup-'.$id.'\'), this)" class="disclosure-off">'.($altTxt ? $altTxt : CreatureList::getName($id)).((($_specialFlags & QUEST_FLAG_SPECIAL_SPELLCAST) || $altTxt) ? '' : ' '.Lang::$achievement['slain']).'</a>'.($qty > 1 ? ' ('.$qty.')' : null);
|
||||
$proxyList .= "<div id=\"npcgroup-".$id."\" style=\"display: none\"><div style=\"float: left\">\n<table class=\"iconlist\">\n";
|
||||
foreach ($proxy->iterate() as $pId => $__)
|
||||
$proxyList .= ' <tr><th><ul><li><var> </var></li></ul></th><td><a href="?npc='.$pId.'">'.$proxy->getField('name', true)."</a></td></tr>\n";
|
||||
|
||||
@@ -382,11 +382,12 @@ if (!$smarty->loadCache($cacheKey, $found))
|
||||
}
|
||||
else if (($searchMask & SEARCH_TYPE_JSON) && ($type == TYPE_ITEM || $_slots))
|
||||
{
|
||||
$iCnd = [['i.class', [ITEM_CLASS_WEAPON, ITEM_CLASS_GEM, ITEM_CLASS_ARMOR]], $cndAdd];
|
||||
$cnd = $cndBase;
|
||||
$cnd[] = ['i.class', [ITEM_CLASS_WEAPON, ITEM_CLASS_GEM, ITEM_CLASS_ARMOR]];
|
||||
$cnd[] = $cndAdd;
|
||||
if ($_slots)
|
||||
$iCnd[] = ['slot', $_slots];
|
||||
$cnd[] = ['slot', $_slots];
|
||||
|
||||
$cnd = array_merge($cndBase, [$iCnd]);
|
||||
$wData = ['wt' => $_wt, 'wtv' => $_wtv];
|
||||
|
||||
$itemFilter = new ItemListFilter();
|
||||
@@ -9,9 +9,10 @@ if (!isset($petCalc))
|
||||
|
||||
// tabId 1: Tools g_initHeader()
|
||||
$smarty->updatePageVars(array(
|
||||
'title' => $petCalc ? Lang::$main['petCalc'] : Lang::$main['talentCalc'],
|
||||
'tab' => 1,
|
||||
'reqCSS' => array(
|
||||
'title' => $petCalc ? Lang::$main['petCalc'] : Lang::$main['talentCalc'],
|
||||
'tab' => 1,
|
||||
'dataKey' => $_SESSION['dataKey'],
|
||||
'reqCSS' => array(
|
||||
['path' => 'static/css/TalentCalc.css'],
|
||||
['path' => 'static/css/talent.css'],
|
||||
['path' => 'static/css/TalentCalc_ie6.css', 'ieCond' => 'lte IE 6'],
|
||||
|
||||
@@ -38,11 +38,13 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
/* Main Content */
|
||||
/****************/
|
||||
|
||||
$fixedTitle = Util::ucFirst(trim(strtr($title->getField('male', true), ['%s' => '', ',' => ''])));
|
||||
|
||||
// menuId 10: Title g_initPath()
|
||||
// tabId 0: Database g_initHeader()
|
||||
$pageData = array(
|
||||
'page' => array(
|
||||
'title' => Util::ucFirst(trim(str_replace('%s', '', str_replace(',', '', $title->getField('male', true)))))." - ".Util::ucfirst(Lang::$game['title']),
|
||||
'title' => $fixedTitle." - ".Util::ucfirst(Lang::$game['title']),
|
||||
'path' => '[0, 10, '.$title->getField('category').']',
|
||||
'tab' => 0,
|
||||
'type' => TYPE_TITLE,
|
||||
@@ -52,7 +54,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
'expansion' => Util::$expansionString[$title->getField('expansion')],
|
||||
'redButtons' => array(
|
||||
BUTTON_WOWHEAD => true,
|
||||
BUTTON_LINKS => true
|
||||
BUTTON_LINKS => ['name' => $fixedTitle]
|
||||
),
|
||||
),
|
||||
'relTabs' => []
|
||||
|
||||
@@ -21,7 +21,15 @@ if ($cat)
|
||||
|
||||
if (!$smarty->loadCache($cacheKey, $pageData))
|
||||
{
|
||||
$titles = new TitleList($cat ? array(['category', (int)$cat[0]]) : []);
|
||||
$conditions = [];
|
||||
|
||||
if (!User::isInGroup(U_GROUP_STAFF)) // unlisted factions
|
||||
$conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
|
||||
|
||||
if ($cat)
|
||||
$conditions[] = ['category', $cat[0]];
|
||||
|
||||
$titles = new TitleList($conditions);
|
||||
|
||||
// menuId 10: Title g_initPath()
|
||||
// tabId 0: Database g_initHeader()
|
||||
|
||||
300
setup/tools/dataset/profiler.php
Normal file
300
setup/tools/dataset/profiler.php
Normal file
@@ -0,0 +1,300 @@
|
||||
<?php
|
||||
|
||||
if (!defined('AOWOW_REVISION'))
|
||||
die('illegal access');
|
||||
|
||||
|
||||
// gatheres quasi-static data used in profiler: all available quests, achievements, titles, mounts, companions, factions, recipes
|
||||
// this script requires a fully set up database and is expected to be run last
|
||||
|
||||
$locales = [LOCALE_EN, LOCALE_FR, LOCALE_DE, LOCALE_ES, LOCALE_RU];
|
||||
$sides = [1, 2];
|
||||
|
||||
// check directory-structure
|
||||
foreach (Util::$localeStrings as $dir)
|
||||
if (!is_dir('datasets\\'.$dir))
|
||||
mkdir('datasets\\'.$dir, 0755, true);
|
||||
|
||||
echo "script set up in ".Util::execTime()."<br><br>\n\n";
|
||||
|
||||
/**********/
|
||||
/* Quests */
|
||||
/**********/
|
||||
{
|
||||
$cnd = [
|
||||
CFG_SQL_LIMIT_NONE,
|
||||
'AND',
|
||||
[['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW], 0],
|
||||
[['flags', QUEST_FLAG_DAILY | QUEST_FLAG_WEEKLY | QUEST_FLAG_REPEATABLE | QUEST_FLAG_AUTO_REWARDED, '&'], 0],
|
||||
[['specialFlags', QUEST_FLAG_SPECIAL_REPEATABLE | QUEST_FLAG_SPECIAL_DUNGEON_FINDER | QUEST_FLAG_SPECIAL_MONTHLY, '&'], 0]
|
||||
];
|
||||
$questz = new QuestList($cnd);
|
||||
|
||||
$_ = [];
|
||||
$currencies = array_column($questz->rewards, TYPE_CURRENCY);
|
||||
foreach ($currencies as $curr)
|
||||
foreach ($curr as $cId => $qty)
|
||||
$_[] = $cId;
|
||||
|
||||
$relCurr = new CurrencyList(array(['id', $_]));
|
||||
|
||||
foreach ($locales as $l)
|
||||
{
|
||||
User::useLocale($l);
|
||||
$handle = fOpen('datasets\\'.User::$localeString.'\\p-quests', "w");
|
||||
if (!$handle)
|
||||
die('could not create quests file '.$l);
|
||||
|
||||
$buff = "var _ = g_gatheredcurrencies;\n";
|
||||
foreach($relCurr->getListviewData() as $id => $data)
|
||||
$buff .= '_['.$id.'] = '.json_encode($data, JSON_NUMERIC_CHECK).";\n";
|
||||
|
||||
$buff .= "\n\nvar _ = g_quests;\n";
|
||||
foreach($questz->getListviewData() as $id => $data)
|
||||
$buff .= '_['.$id.'] = '.json_encode($data, JSON_NUMERIC_CHECK).";\n";
|
||||
|
||||
$buff .= "\ng_quest_catorder = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n";
|
||||
|
||||
fWrite($handle, $buff);
|
||||
fClose($handle);
|
||||
|
||||
echo "done quests loc: ".$l." in ".Util::execTime()."<br>\n";
|
||||
}
|
||||
|
||||
echo "<br>\n";
|
||||
}
|
||||
|
||||
/****************/
|
||||
/* Achievements */
|
||||
/****************/
|
||||
{
|
||||
$cnd = array(
|
||||
CFG_SQL_LIMIT_NONE,
|
||||
[['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0],
|
||||
[['flags', 1, '&'], 0], // no statistics
|
||||
);
|
||||
$achievez = new AchievementList($cnd);
|
||||
foreach ($locales as $l)
|
||||
{
|
||||
User::useLocale($l);
|
||||
$handle = fOpen('datasets\\'.User::$localeString.'\\p-achievements', "w");
|
||||
if (!$handle)
|
||||
die('could not create achievements file '.$l);
|
||||
|
||||
$sumPoints = 0;
|
||||
$buff = "var _ = g_achievements;\n";
|
||||
foreach ($achievez->getListviewData(ACHIEVEMENTINFO_PROFILE) as $id => $data)
|
||||
{
|
||||
$sumPoints += $data['points'];
|
||||
$buff .= '_['.$id.'] = '.json_encode($data, JSON_NUMERIC_CHECK).";\n";
|
||||
}
|
||||
|
||||
// categories to sort by
|
||||
$buff .= "\ng_achievement_catorder = [92,14863,97,169,170,171,172,14802,14804,14803,14801,95,161,156,165,14806,14921,96,201,160,14923,14808,14805,14778,14865,14777,14779,155,14862,14861,14864,14866,158,162,14780,168,14881,187,14901,163,14922,159,14941,14961,14962,14981,15003,15002,15001,15041,15042,81]";
|
||||
// sum points
|
||||
$buff .= "\ng_achievement_points = [".$sumPoints."];\n";
|
||||
|
||||
fWrite($handle, $buff);
|
||||
fClose($handle);
|
||||
|
||||
echo "done achievements loc: ".$l." in ".Util::execTime()."<br>\n";
|
||||
}
|
||||
|
||||
echo "<br>\n";
|
||||
}
|
||||
|
||||
/**********/
|
||||
/* Titles */
|
||||
/**********/
|
||||
{
|
||||
$cnd = array(
|
||||
CFG_SQL_LIMIT_NONE,
|
||||
[['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0],
|
||||
);
|
||||
$titlez = new TitleList($cnd);
|
||||
foreach ($locales as $l)
|
||||
{
|
||||
foreach ([0, 1] as $g) // gender
|
||||
{
|
||||
User::useLocale($l);
|
||||
$handle = fOpen('datasets\\'.User::$localeString.'\\p-titles-'.$g, "w");
|
||||
if (!$handle)
|
||||
die('could not create titles file '.$l.' '.$g);
|
||||
|
||||
$buff = "var _ = g_titles;\n";
|
||||
foreach ($titlez->getListviewData() as $id => $data)
|
||||
{
|
||||
$data['name'] = Util::localizedString($titlez->getEntry($id), $g ? 'female' : 'male');
|
||||
unset($data['namefemale']);
|
||||
$buff .= '_['.$id.'] = '.json_encode($data, JSON_NUMERIC_CHECK).";\n";
|
||||
}
|
||||
fWrite($handle, $buff);
|
||||
fClose($handle);
|
||||
|
||||
echo "done titles loc: ".$l.", gender: ".$g." in ".Util::execTime()."<br>\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "<br>\n";
|
||||
}
|
||||
|
||||
/**********/
|
||||
/* Mounts */
|
||||
/**********/
|
||||
{
|
||||
$cnd = array(
|
||||
CFG_SQL_LIMIT_NONE,
|
||||
[['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0],
|
||||
['typeCat', -5]
|
||||
);
|
||||
$mountz = new SpellList($cnd);
|
||||
foreach ($locales as $l)
|
||||
{
|
||||
User::useLocale($l);
|
||||
$handle = fOpen('datasets\\'.User::$localeString.'\\p-mounts', "w");
|
||||
if (!$handle)
|
||||
die('could not create mounts file '.$l);
|
||||
|
||||
$buff = "var _ = g_spells;\n";
|
||||
foreach ($mountz->getListviewData(ITEMINFO_MODEL) as $id => $data)
|
||||
$buff .= '_['.$id.'] = '.json_encode($data, JSON_NUMERIC_CHECK).";\n";
|
||||
|
||||
fWrite($handle, $buff);
|
||||
fClose($handle);
|
||||
|
||||
echo "done mounts loc: ".$l." in ".Util::execTime()."<br>\n";
|
||||
}
|
||||
|
||||
echo "<br>\n";
|
||||
}
|
||||
|
||||
/**************/
|
||||
/* Companions */
|
||||
/**************/
|
||||
{
|
||||
$cnd = array(
|
||||
CFG_SQL_LIMIT_NONE,
|
||||
[['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0],
|
||||
['typeCat', -6]
|
||||
);
|
||||
$companionz = new SpellList($cnd);
|
||||
foreach ($locales as $l)
|
||||
{
|
||||
User::useLocale($l);
|
||||
$handle = fOpen('datasets\\'.User::$localeString.'\\p-companions', "w");
|
||||
if (!$handle)
|
||||
die('could not create companions file '.$l);
|
||||
|
||||
$buff = "var _ = g_spells;\n";
|
||||
foreach ($companionz->getListviewData(ITEMINFO_MODEL) as $id => $data)
|
||||
$buff .= '_['.$id.'] = '.json_encode($data, JSON_NUMERIC_CHECK).";\n";
|
||||
|
||||
fWrite($handle, $buff);
|
||||
fClose($handle);
|
||||
|
||||
echo "done companions loc: ".$l." in ".Util::execTime()."<br>\n";
|
||||
}
|
||||
|
||||
echo "<br>\n";
|
||||
}
|
||||
|
||||
/************/
|
||||
/* Factions */
|
||||
/************/
|
||||
{
|
||||
// todo (med): exclude non-gaining reputation-header
|
||||
$cnd = array(
|
||||
CFG_SQL_LIMIT_NONE,
|
||||
[['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0]
|
||||
);
|
||||
$factionz = new FactionList($cnd);
|
||||
foreach ($locales as $l)
|
||||
{
|
||||
User::useLocale($l);
|
||||
$handle = fOpen('datasets\\'.User::$localeString.'\\p-factions', "w");
|
||||
if (!$handle)
|
||||
die('could not create factions file '.$l);
|
||||
|
||||
$buff = "var _ = g_factions;\n";
|
||||
foreach ($factionz->getListviewData() as $id => $data)
|
||||
$buff .= '_['.$id.'] = '.json_encode($data, JSON_NUMERIC_CHECK).";\n";
|
||||
|
||||
$buff .= "\ng_faction_order = [0, 469, 891, 1037, 1118, 67, 1052, 892, 936, 1117, 169, 980, 1097];\n";
|
||||
|
||||
fWrite($handle, $buff);
|
||||
fClose($handle);
|
||||
|
||||
echo "done factions loc: ".$l." in ".Util::execTime()."<br>\n";
|
||||
}
|
||||
|
||||
echo "<br>\n";
|
||||
}
|
||||
|
||||
/***********/
|
||||
/* Recipes */
|
||||
/***********/
|
||||
{
|
||||
// special case: secondary skills are always requested, so put them in one single file (185, 129, 356); also it contains g_skill_order
|
||||
$skills = [171, 164, 333, 202, 182, 773, 755, 165, 186, 393, 197, [185, 129, 356]];
|
||||
$baseCnd = array(
|
||||
CFG_SQL_LIMIT_NONE,
|
||||
[['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0],
|
||||
['effect1Id', [6, 45, 57, 127, 33, 158, 99, 28, 95], '!'], // aura, tradeSkill, Tracking, Prospecting, Decipher, Milling, Disenchant, Summon (Engineering), Skinning
|
||||
['effect2Id', [118, 60], '!'], // not the skill itself
|
||||
['OR', ['typeCat', 9], ['typeCat', 11]]
|
||||
);
|
||||
foreach ($skills as $s)
|
||||
{
|
||||
$file = is_array($s) ? 'sec' : (string)$s;
|
||||
$cnd = array_merge($baseCnd, [['skillLine1', $s]]);
|
||||
$recipez = new SpellList($cnd);
|
||||
$created = '';
|
||||
foreach ($recipez->iterate() as $__)
|
||||
{
|
||||
foreach ($recipez->canCreateItem() as $idx)
|
||||
{
|
||||
$id = $recipez->getField('effect'.$idx.'CreateItemId');
|
||||
$created .= "g_items.add(".$id.", {'icon':'".$recipez->relItems->getEntry($id)['iconString']."'});\n";
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($locales as $l)
|
||||
{
|
||||
User::useLocale($l);
|
||||
$buff = '';
|
||||
foreach ($recipez->getListviewData() as $id => $data)
|
||||
{
|
||||
$data['name'] = $data['quality'].$data['name'];
|
||||
unset($data['quality']);
|
||||
$buff .= '_['.$id.'] = '.json_encode($data, JSON_NUMERIC_CHECK).";\n";
|
||||
}
|
||||
if (!$buff)
|
||||
{
|
||||
echo " - file: ".$file." has no content => skipping<br>\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
$handle = fOpen('datasets\\'.User::$localeString.'\\p-recipes-'.$file, "w");
|
||||
if (!$handle)
|
||||
die('could not create '.$file.' file '.$l);
|
||||
|
||||
$buff = $created."\nvar _ = g_spells;\n".$buff;
|
||||
|
||||
if (is_array($s))
|
||||
$buff .= "\ng_skill_order = [171, 164, 333, 202, 182, 773, 755, 165, 186, 393, 197, 185, 129, 356];\n";
|
||||
|
||||
fWrite($handle, $buff);
|
||||
fClose($handle);
|
||||
|
||||
echo "done ".$file." loc: ".$l." in ".Util::execTime()."<br>\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "<br>\n";
|
||||
}
|
||||
|
||||
User::useLocale(LOCALE_EN);
|
||||
echo "<br>\nall done";
|
||||
$stats = DB::Aowow()->getStatistics();
|
||||
echo "<br>\n".$stats['count']." queries in: ".Util::formatTime($stats['time'] * 1000);
|
||||
?>
|
||||
@@ -794,10 +794,14 @@ span.breadcrumb-ellipsis {
|
||||
float: right;
|
||||
margin: 0 0 4px 10px;
|
||||
background-color: #141414;
|
||||
border: 1px solid #404040;
|
||||
border: 1px solid #101010;
|
||||
padding: 8px;
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
|
||||
-webkit-border-radius: 6px;
|
||||
-moz-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.minibox-left
|
||||
@@ -807,11 +811,57 @@ span.breadcrumb-ellipsis {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.minibox h3
|
||||
.minibox h2
|
||||
{
|
||||
margin: 0 0 5px;
|
||||
margin: 0 0 5px 0;
|
||||
font-size: 15px;
|
||||
border: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.minibox h2, .minibox h2 b,
|
||||
.minibox h2 a:link, .minibox h2 a:visited {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.minibox h2 a:link, .minibox h2 a:visited {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.minibox h2 a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.minibox h3,
|
||||
.minibox h3 a:link, .minibox h3 a:visited {
|
||||
color: #9d9d9d !important;
|
||||
font-size: 11px;
|
||||
font-weight: normal;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.minibox h3 img {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.minibox h3 a:link, .minibox h3 a:visited {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.minibox h3 a:hover {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
h1 a.header-link, h2 a.header-link
|
||||
{
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
h1 a.header-link:hover, h2 a.header-link:hover
|
||||
{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/********/
|
||||
/* MENU */
|
||||
|
||||
@@ -1139,18 +1139,16 @@ function Profiler() {
|
||||
td.onclick = function (e) {
|
||||
e = $WH.$E(e);
|
||||
if (e.shiftKey || e.ctrlKey) {
|
||||
return false ;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
$WH.ae(tr, td);
|
||||
|
||||
$WH.ae(tbl, tr);
|
||||
show = true;
|
||||
}
|
||||
|
||||
_divAuras.style.display = show ? 'block' : 'none';
|
||||
|
||||
}
|
||||
|
||||
function _showCharacterMenu(e) {
|
||||
@@ -1374,8 +1372,8 @@ function Profiler() {
|
||||
$WH.ae(_ulQuickFacts, li);
|
||||
}
|
||||
|
||||
// Custom profiles - disabled for now
|
||||
/*if (false && _isArmoryProfile() && _profile.customs)
|
||||
// Custom profiles
|
||||
if (_isArmoryProfile() && _profile.customs)
|
||||
{
|
||||
var
|
||||
t = $WH.ce('table'),
|
||||
@@ -1410,6 +1408,8 @@ function Profiler() {
|
||||
td = $WH.ce('td'),
|
||||
a = $WH.ce('a');
|
||||
|
||||
td.style.lineHeight = '1em';
|
||||
|
||||
$WH.ae(th, Icon.create((_profile.customs[i].length == 3 && _profile.customs[i][2] ? _profile.customs[i][2] : 'inv_misc_questionmark'), 0, null, '?profile=' + i));
|
||||
$WH.ae(tr, th);
|
||||
|
||||
@@ -1425,7 +1425,7 @@ function Profiler() {
|
||||
|
||||
if (k > 0)
|
||||
$WH.ae(_ulQuickFacts, li);
|
||||
}*/
|
||||
}
|
||||
|
||||
// Gear Score
|
||||
li = $WH.ce('li');
|
||||
@@ -4597,8 +4597,8 @@ function ProfilerInventory(_parent) {
|
||||
fh: _profile.features,
|
||||
fc: _profile.haircolor,
|
||||
mode: 3,
|
||||
contentPath: 'http://static.wowhead.com/modelviewer/'
|
||||
// contentPath: g_staticUrl + '/modelviewer/'
|
||||
// contentPath: 'http://static.wowhead.com/modelviewer/'
|
||||
contentPath: g_staticUrl + '/modelviewer/'
|
||||
};
|
||||
|
||||
var params = {
|
||||
@@ -4614,8 +4614,8 @@ function ProfilerInventory(_parent) {
|
||||
style: 'outline: none'
|
||||
};
|
||||
|
||||
// swfobject.embedSWF(g_staticUrl + '/modelviewer/ZAMviewerfp11.swf', _swfModel.id, '100%', '100%', '10.0.0', g_staticUrl + '/modelviewer/expressInstall.swf', flashVars, params, attributes);
|
||||
swfobject.embedSWF('http://static.wowhead.com/modelviewer/ZAMviewerfp11.swf', _swfModel.id, '100%', '100%', '10.0.0', 'http://static.wowhead.com/modelviewer/expressInstall.swf', flashVars, params, attributes);
|
||||
swfobject.embedSWF(g_staticUrl + '/modelviewer/ZAMviewerfp11.swf', _swfModel.id, '100%', '100%', '10.0.0', g_staticUrl + '/modelviewer/expressInstall.swf', flashVars, params, attributes);
|
||||
// swfobject.embedSWF('http://static.wowhead.com/modelviewer/ZAMviewerfp11.swf', _swfModel.id, '100%', '100%', '10.0.0', 'http://static.wowhead.com/modelviewer/expressInstall.swf', flashVars, params, attributes);
|
||||
|
||||
_mvInited = true;
|
||||
}
|
||||
@@ -7455,7 +7455,7 @@ function ProfilerCompletion(_parent) {
|
||||
}
|
||||
|
||||
if (_opt.onDemand && !_loading && !_loaded) {
|
||||
$WH.g_ajaxIshRequest(g_host + '?data=' + _opt.onDemand + (_opt.dataArgs ? _opt.dataArgs(_profile) : '') + '&locale=' + Locale.getId() + '&t=' + g_dataKey + '&callback=$WowheadProfiler.loadOnDemand&' + (new Date().getTime()));
|
||||
$WH.g_ajaxIshRequest(g_host + '?data=' + _opt.onDemand + (_opt.dataArgs ? _opt.dataArgs(_profile) : '') + '&locale=' + g_locale.id + '&t=' + g_dataKey + '&callback=$WowheadProfiler.loadOnDemand&' + (new Date().getTime()));
|
||||
_imgLoading.style.display = 'block';
|
||||
_divTipQuests.style.display = 'none';
|
||||
_loading = this;
|
||||
@@ -8382,7 +8382,7 @@ function ProfilerCompletion(_parent) {
|
||||
|
||||
if (_category !== null) {
|
||||
if (_opt.onDemand && _opt.partial && !_loaded[_category] && !_loading) {
|
||||
$WH.g_ajaxIshRequest(g_host + '?data=' + _opt.onDemand + '&locale=' + Locale.getId() + '&catg=' + _category + '&t=' + g_dataKey + '&callback=$WowheadProfiler.loadOnDemand&' + (new Date().getTime()));
|
||||
$WH.g_ajaxIshRequest(g_host + '?data=' + _opt.onDemand + '&locale=' + g_locale.id + '&catg=' + _category + '&t=' + g_dataKey + '&callback=$WowheadProfiler.loadOnDemand&' + (new Date().getTime()));
|
||||
_imgLoading.style.display = 'block';
|
||||
_divTipQuests.style.display = 'none';
|
||||
_loading = this;
|
||||
|
||||
@@ -2691,7 +2691,7 @@ function TalentCalc() {
|
||||
}
|
||||
|
||||
function _updateModel(classId, npcId) {
|
||||
var swfUrl = "http://static.wowhead.com"; // sarjuuk: g_staticUrl
|
||||
var swfUrl = g_staticUrl; // "http://static.wowhead.com"
|
||||
|
||||
if (_mode != MODE_PET){
|
||||
return;
|
||||
|
||||
@@ -7717,7 +7717,7 @@ Listview.funcBox = {
|
||||
}
|
||||
|
||||
var z = $WH.ce("img");
|
||||
z.src = "template/images/pixel.gif";
|
||||
z.src = g_staticUrl + "/images/deprecated/pixel.gif";
|
||||
z.className = "toolbar-" + k.id;
|
||||
$WH.ae(o, z);
|
||||
$WH.ae(e, o)
|
||||
@@ -13284,7 +13284,7 @@ Listview.templates = {
|
||||
|
||||
if (title.expansion) {
|
||||
var i = $WH.ce('span');
|
||||
i.className = (title.expansion == 1 ? 'icon-bc': 'icon-wotlk');
|
||||
i.className = g_GetExpansionClassName(title.expansion);
|
||||
$WH.ae(i, sp);
|
||||
$WH.ae(td, i);
|
||||
}
|
||||
@@ -16473,8 +16473,8 @@ var ModelViewer = new function() {
|
||||
var flashVars = {
|
||||
model: model,
|
||||
modelType: modelType,
|
||||
contentPath: 'http://static.wowhead.com/modelviewer/'
|
||||
// contentPath: g_staticUrl + '/modelviewer/'
|
||||
// contentPath: 'http://static.wowhead.com/modelviewer/'
|
||||
contentPath: g_staticUrl + '/modelviewer/'
|
||||
};
|
||||
|
||||
var params = {
|
||||
@@ -16492,8 +16492,8 @@ var ModelViewer = new function() {
|
||||
flashVars.equipList = equipList.join(',');
|
||||
}
|
||||
|
||||
swfobject.embedSWF('http://static.wowhead.com/modelviewer/ZAMviewerfp11.swf', 'modelviewer-generic', '600', '400', "11.0.0", 'http://static.wowhead.com/modelviewer/expressInstall.swf', flashVars, params, attributes);
|
||||
// swfobject.embedSWF(g_staticUrl + '/modelviewer/ZAMviewerfp11.swf', 'modelviewer-generic', '600', '400', "11.0.0", g_staticUrl + '/modelviewer/expressInstall.swf', flashVars, params, attributes);
|
||||
// swfobject.embedSWF('http://static.wowhead.com/modelviewer/ZAMviewerfp11.swf', 'modelviewer-generic', '600', '400', "11.0.0", 'http://static.wowhead.com/modelviewer/expressInstall.swf', flashVars, params, attributes);
|
||||
swfobject.embedSWF(g_staticUrl + '/modelviewer/ZAMviewerfp11.swf', 'modelviewer-generic', '600', '400', "11.0.0", g_staticUrl + '/modelviewer/expressInstall.swf', flashVars, params, attributes);
|
||||
_w.style.display = '';
|
||||
}
|
||||
var
|
||||
|
||||
@@ -879,7 +879,7 @@ var mn_more = [
|
||||
]],
|
||||
[7,"Was gibt's Neues?","?whats-new"],
|
||||
[,"Tolle Sachen"],
|
||||
[16,"Suchbox","?searchbox"],
|
||||
[16,"Suchbox","?searchbox"],
|
||||
[8,"Such-Plugins","?searchplugins"],
|
||||
[10,"Tooltips","?tooltips"]
|
||||
];
|
||||
@@ -2219,7 +2219,7 @@ var LANG = {
|
||||
category: "Kategorie",
|
||||
classes: "Klassen",
|
||||
classs: "Klasse",
|
||||
close: "Schließen\n",
|
||||
close: "Schließen",
|
||||
completed: "Vollendet",
|
||||
contactus: "Kontaktiert uns",
|
||||
cost: "Kosten",
|
||||
@@ -3730,14 +3730,156 @@ var LANG = {
|
||||
message_nosigbookmarks: "Ihr habt Eurem Benutzerprofil keine Charaktere hinzugefügt. Bitte fügt einige hinzu, um fortzusetzen.",
|
||||
message_bookmarkforsig: "Bitte fügt diesen Charakter zu Eurem Benutzerprofil hinzu, bevor Ihr eine Signatur erstellt.",
|
||||
|
||||
pr_dialog_level: "Stufe: ",
|
||||
confirm_linkcharacter: "Dieser Charakter wird zu Eurer Charakterliste hinzugefügt.\n\nMöchtet Ihr fortsetzen?",
|
||||
confirm_linkedcharacter: "Dieser Charakter wurde Eurer Liste hinzugefügt.\n\nMöchtet Ihr dorthin weitergeleitet werden?",
|
||||
confirm_unlinkcharacter: "Seid Ihr sicher, dass Ihr die ausgewählten Charakter von Eurer Liste entfernen möchtet?",
|
||||
confirm_deleteprofile: "Seid Ihr sicher, dass Ihr die ausgewählten Profile löschen möchtet?",
|
||||
confirm_deleteprofile2: "Seid Ihr sicher, dass Ihr dieses Profil löschen möchtet?",
|
||||
confirm_privateprofile: "Seid Ihr sicher, dass Ihr die ausgewählten Profile privat machen möchtet?",
|
||||
confirm_publicprofile: "Seid Ihr sicher, dass Ihr die ausgewählten Profile öffentlich machen möchtet?",
|
||||
confirm_purgedata: "Seid Ihr sicher, dass Ihr Eure $1 löschen möchtet?",
|
||||
confirm_newprofile: "Möchtet Ihr ein neues Profil erstellen?\n\nIhr werdet nach dem Speichern des Profils weitergeleitet.",
|
||||
confirm_resetexclusions: "Dies wird Eure Ausschließungen zur Vorgabe zurücksetzen. Seid Ihr sicher, dass Ihr fortsetzen möchtet?",
|
||||
confirm_pincharacter: "Dieser Charakter wird als Eurer Primärcharakter auf der Webseite markiert.\n\nMöchtet Ihr fortsetzen?",
|
||||
confirm_unpincharacter: "Ihr werdet keinen markierten Charakter mehr haben.\n\nMöchtet Ihr fortsetzen?",
|
||||
confirm_deletesigimages: "Seid Ihr sicher, dass Ihr diese Signaturhintergründe löschen möchtet?",
|
||||
confirm_deletesignature: "Seid Ihr sicher, dass Ihr die ausgewählten Signaturen löschen möchtet?",
|
||||
|
||||
loremasteryes_tip: "Diese Quest zählt für<br />Meister der Lehren-Erfolge",
|
||||
loremasterno_tip: "Diese Quest zählt nicht für<br />Meister der Lehren-Erfolge",
|
||||
|
||||
prompt_charlookup: "Bitte gebt den Namen des Charakters ein, den Ihr Euch ansehen möchtet:",
|
||||
prompt_nameprofile: "Bitte gebt einen Namen für dieses Profil ein.\n(z.B. Widerstandsausrüstung, PvP-Ausrüstung, Wunschzettel, etc.)\n\nIhr werdet nach dem Speichern des Profils weitergeleitet.",
|
||||
|
||||
dialog_notavail: "Nicht für Spieler verfügbar",
|
||||
dialog_tcg: "Erworben durch TGC-Beuteeinlösung",
|
||||
dialog_collector: "Belohnung von einer Sammlerausgabe",
|
||||
dialog_promo: "Erworben durch Promotion",
|
||||
dialog_nonus: "Nicht erhältlich auf US Realms",
|
||||
dialog_faction: "Wird von der gegnerischen Fraktion bevorzugt",
|
||||
dialog_profession: "Benötigt einen weiteren Beruf",
|
||||
dialog_exclude: "Das Ausschließen von Einträgen erlaubt Euch das Entfernen von Sachen, die Ihr nicht erreichen möchtet bzw. könnt. Einzelne Ein-/Ausschließungen überschreiben die Schnellkategorien unten.<br /><br />Eure Ausschlußeinstellungen werden von allen Charakteren genutzt.",
|
||||
dialog_noexalted: "Ehrfürchtig kann nicht erreicht werden",
|
||||
|
||||
dialog_manageexclusions: "Persönliche Ausschlüsse verwalten",
|
||||
dialog_resetexclusions: "Alle Ausschließungen zurücksetzen",
|
||||
|
||||
tab_arenateams: "Arena-Teams",
|
||||
tab_character: "Charakter",
|
||||
tab_characters: "Charaktere",
|
||||
tab_guilds: "Gilden",
|
||||
tab_reputation: "Ruf",
|
||||
|
||||
lvnote_clicksubcatg: "Klickt unten auf eine Unterkategorie, um schnell zu filtern.",
|
||||
|
||||
button_save: "Speichern",
|
||||
button_saveas: "Speichern als",
|
||||
button_bookmark: "Charakter zum Benutzerprofil hinzufügen",
|
||||
button_pin: "Markieren",
|
||||
button_unpin: "Demarkieren",
|
||||
button_claimchar: "Charakter beanspruchen",
|
||||
button_resync: "Resynchronisieren",
|
||||
button_signature: "Signatur",
|
||||
|
||||
button_customprofile: "Individuelles Profil",
|
||||
button_armorychar: "Charakter verwalten",
|
||||
|
||||
pr_clienttab: '$1<br /><span class="q1">Falls dies Eurer Charakter ist, könnt Ihr den Wowhead Client benutzen, um Eure $2 zu verfolgen!</span><br /><span class="q2">Klickt, um genaueres zu erfahren!</span>',
|
||||
pr_lookup: "Suchen: ",
|
||||
pr_noneitem: "Nichts",
|
||||
pr_nonegem: "Nichts",
|
||||
pr_noneenchant: "Nichts",
|
||||
pr_nonepet: "Nichts",
|
||||
pr_specifyitem: "Gebt einen Gegenstandsnamen ein, nach dem zu suchen ist.",
|
||||
pr_searching: 'Es wird nach Gegenständen mit dem Namen "$1" gesucht...',
|
||||
pr_noresults: 'Keine Ergebnisse für "$1" gefunden!',
|
||||
pr_region: "(Region)",
|
||||
pr_realm: "(Realm)",
|
||||
pr_selectregion: "Wählt eine Region",
|
||||
pr_vendorsin: "Wird verkauft in ",
|
||||
pr_yes: "Ja",
|
||||
pr_dungeons: "Dungeons",
|
||||
|
||||
pr_tt_items: "Gegenstände",
|
||||
pr_tt_enchants: "Verzauberungen",
|
||||
pr_tt_gems: "Edelsteine",
|
||||
pr_tt_normal: "$1 (10-Spieler)",
|
||||
pr_tt_heroic: "$1 (25-Spieler)",
|
||||
pr_tt_earned: "$1 hat $2 von $3 Erfolgen errungen ($4%).",
|
||||
pr_tt_earned2: "$1 hat alle Bosse in dieser Instanz besiegt.",
|
||||
pr_tt_progress: "Fortschritt",
|
||||
pr_tt_obtained: "Gesamte Anzahl erhalten: $1",
|
||||
pr_tt_nodata: "Diese Statistiken sind nicht im Spiel erhältlich<br />und können nicht von Wowhead registriert werden.",
|
||||
pr_tt_enchreq: "Verzauberung benötigt Stufe $1",
|
||||
pr_tt_new: '<b class="q">Neu</b><br />Erstellt ein komplett neues individuelles Profil.',
|
||||
pr_tt_saveas: '<b class="q">Speichern als</b><br />Speichert den aktuellen Charakter als ein individuelles Profil, das an Euer Wowhead-Konto gebunden ist.',
|
||||
pr_tt_resync: '<b class="q">Resynchronisieren</b><br />Resynchronisiert den Charakter<br /> mit der aktuellen Version im Arsenal.',
|
||||
pr_tt_claim: '<b class="q">Charakter in Besitz nehmen</b><br />Fügt diesen Charakter zu eurer Charakterliste hinzu.',
|
||||
pr_tt_include: '<b class="q">Einschließen</b><br />Verschiebt die ausgewählten Einträge aus Eurer Ausschlussliste.',
|
||||
pr_tt_exclude: '<b class="q">Ausschließen</b><br />Verschiebt die ausgewählten Einträge zu Eurer Ausschlussliste.<br />Dies kann nützlich sein, um Sachen auszublenden, die nicht<br />wichtig sind.',
|
||||
pr_tt_noqexcl: '<div class="pad"><span class="q10">Hinweis:</span> Schnellausschließungen für diese Registerkarte können im Moment nicht verwendet werden.',
|
||||
pr_tt_excldone: "Vollständig aber ausgeschlossen",
|
||||
pr_tt_questtip: "Wiederholbare Quests und Quests, die nicht<br />im Questlog erscheinen, werden nicht gezählt.",
|
||||
|
||||
pr_tip_rclkopt: "Tipp: Rechtsklickt Gegenstandsplätze für mehr Optionen.",
|
||||
pr_tip_sclkopt: "Tipp: Shiftklickt Gegenstände für mehr Optionen.",
|
||||
pr_tip_rclkopt2: "Tipp: Rechtsklickt Gegenstände, Edelsteine und Verzauberungen für mehr Optionen.",
|
||||
pr_tip_sclkopt2: "Tipp: Shiftklickt Gegenstände, Edelsteine und Verzauberungen für mehr Optionen.",
|
||||
pr_tip_quests: 'Hinweis: <span class="tip">Bestimmte</span> Quests werden von Blizzards API nicht gezählt.',
|
||||
|
||||
pr_header_noname: "Unbenannt",
|
||||
pr_header_character: 'Stufe $1 <a href="?race=$4">$2</a> <a href="?class$5" class="c$5">$3</a>',
|
||||
pr_header_edit: "Bearbeiten",
|
||||
pr_header_armory: "Arsenal",
|
||||
pr_header_help: "Hilfe",
|
||||
pr_header_print: "Drucken",
|
||||
|
||||
pr_dialog_chardetails: "Charakterdetails",
|
||||
pr_dialog_name: "Name: ",
|
||||
pr_dialog_level: "Stufe: ",
|
||||
pr_dialog_class: "Klasse: ",
|
||||
pr_dialog_race: "Volk: ",
|
||||
pr_dialog_gender: "Geschlecht: ",
|
||||
pr_dialog_icon: "Symbol: ",
|
||||
pr_dialog_iconeg: "z.B. INV_Axe_54",
|
||||
pr_dialog_description: "Beschreibung: ",
|
||||
pr_dialog_public: "Sichtbarkeit: ",
|
||||
|
||||
pr_qf_quickfacts: "Kurzübersicht",
|
||||
pr_qf_progress: "Fortschritt",
|
||||
pr_qf_toc: "Inhaltsverzeichnis",
|
||||
pr_qf_owner: "Besitzer: ",
|
||||
pr_qf_character: "Charakter: ",
|
||||
pr_qf_profiles: "Profile: ",
|
||||
pr_qf_playedtime: "Gespielte Zeit: ",
|
||||
pr_qf_gearscore: "Ausrüstungswertung: ",
|
||||
pr_qf_itemlevel: "Gegenstandsstufe: ",
|
||||
pr_qf_talents: "Talente: ",
|
||||
pr_qf_achievements: "Erfolge: ",
|
||||
pr_qf_xvxteam: "$1v$1 Team: ",
|
||||
pr_qf_updated: "Aktualisiert ",
|
||||
pr_qf_resynced: "Resynchronisiert ",
|
||||
pr_qf_notsaved: "Profil wurde nicht gespeichert!",
|
||||
pr_qf_gearmeter: "Ausr.",
|
||||
pr_qf_raidactivity1: "Gesamte Schlachtzugsaktivität",
|
||||
pr_qf_raidactivity2: "Kürzliche Schlachtzugsaktivität",
|
||||
pr_qf_activitytip1: "Klickt, um kürzliche Schlachtzugsaktivität anzuzeigen",
|
||||
pr_qf_activitytip2: "Klickt, um gesamte Schlachtzugsaktivität anzuzeigen",
|
||||
pr_qf_activitypct1: "$1% der gesamten Aktivität",
|
||||
pr_qf_activitypct2: "$1% der kürzlichen Aktivität",
|
||||
pr_qf_raidcomplete: "$1% abgeschlossen ",
|
||||
|
||||
pr_qf_gear0: "Trivial",
|
||||
pr_qf_gear1: "Leicht",
|
||||
pr_qf_gear2: "Optimal",
|
||||
pr_qf_gear3: "Herausfordernd",
|
||||
pr_qf_gear4: "Schwer",
|
||||
pr_qf_gear5: "Sinnlos",
|
||||
|
||||
menu_charlookup: "Nach Namen suchen...",
|
||||
menu_newprofile: "Neues individuelles Profil",
|
||||
menu_chooseclassspec: "Wählt Eure Klasse/Spezialisierung",
|
||||
|
||||
pr_selectregion: "Wählt eine Region",
|
||||
|
||||
pr_menu_equip: "Anlegen...",
|
||||
pr_menu_replace: "Ersetzen...",
|
||||
pr_menu_add: "Hinzufügen...",
|
||||
@@ -3757,9 +3899,134 @@ var LANG = {
|
||||
pr_menu_upgrades: "Bessere Gegenstände finden",
|
||||
pr_menu_whowears: "Wer trägt dies?",
|
||||
|
||||
pr_noneitem: "Nichts",
|
||||
pr_nonegem: "Nichts",
|
||||
pr_noneenchant: "Nichts",
|
||||
pr_queue_unknown: "Unbekannt",
|
||||
pr_queue_noprocess: "Die Warteschlange ist im Moment nicht aktiv.",
|
||||
pr_queue_resyncreq: "<b>Eine Resynchronisierung wurde angefordert.</b>",
|
||||
pr_queue_addqueue: "Fügt gerade der Arsenal-Warteschlange hinzu...",
|
||||
pr_queue_status1: "Position in Warteschlange: <b>$1</b> – Geschätzte Zeit: <b>$2</b>",
|
||||
pr_queue_status2: "Daten werden jetzt abgerufen...",
|
||||
pr_queue_status3: 'Daten sind bereit! <a href="?$2" rel="np">Zum Anzeigen neu laden</a>.',
|
||||
pr_queue_status4: 'Kann nicht vom Arsenal resynchronisiert werden: $1. Versucht eine neue <a href="javascript:;">Resynchronisierung</a>.',
|
||||
pr_queue_batch: "Warteschlange: <b>$1</b> – Verarbeiten: <b>$2</b> – Bereit: <b>$3</b> – Fehler: <b>$4</b>",
|
||||
|
||||
pr_error_armory0: "Unbekannter Fehler",
|
||||
pr_error_armory1: "Charakter existiert nicht",
|
||||
pr_error_armory2: "Das Arsenal konnte nicht erreicht werden",
|
||||
|
||||
pr_inv_title: "Zusammenfassung der Ausrüstung",
|
||||
pr_inv_missing: "Fehlend: ",
|
||||
pr_inv_lowlevel: "Niedrigstufig: ",
|
||||
pr_inv_metareq: "Metabedingung: ",
|
||||
pr_inv_item: "$1 Gegenstand",
|
||||
pr_inv_items: "$1 Gegenstände",
|
||||
pr_inv_gem: "$1 Edelstein",
|
||||
pr_inv_gems: "$1 Edelsteine",
|
||||
pr_inv_enchant: "$1 Verzauberung",
|
||||
pr_inv_enchants: "$1 Verzauberungen",
|
||||
pr_inv_socket: "$1 Sockel",
|
||||
pr_inv_sockets: "$1 Sockel",
|
||||
|
||||
pr_print_none: "Nichts",
|
||||
pr_print_yes: "Ja",
|
||||
pr_print_no: "Nein",
|
||||
pr_print_normal: "Normal",
|
||||
pr_print_heroic: "Heroisch",
|
||||
|
||||
pr_stats_warning: "Warnung: Einige Statistiken (besonders Ausweichen) wurden vielleicht nicht exakt berechnet.",
|
||||
|
||||
pr_stats_title: "Statistiken",
|
||||
pr_stats_base: "Basis",
|
||||
pr_stats_melee: "Nahkampf",
|
||||
pr_stats_ranged: "Distanz",
|
||||
pr_stats_spell: "Zauber",
|
||||
pr_stats_defenses: "Verteidigung",
|
||||
pr_stats_resistances: "Widerstände",
|
||||
pr_stats_beta: "Beta",
|
||||
|
||||
pr_stats_agi: "Beweglichkeit",
|
||||
pr_stats_arcres: "Arkanwiderstand",
|
||||
pr_stats_armor: "Rüstung",
|
||||
pr_stats_armorpenpct: "Durchschlag",
|
||||
pr_stats_blockpct: "Blocken",
|
||||
pr_stats_def: "Verteidigung",
|
||||
pr_stats_dodgepct: "Ausweichen",
|
||||
pr_stats_energy: "Energie",
|
||||
pr_stats_exp: "Waffenkunde",
|
||||
pr_stats_firres: "Feuerwiderstand",
|
||||
pr_stats_frores: "Frostwiderstand",
|
||||
pr_stats_health: "Gesundheit",
|
||||
pr_stats_holres: "Heiligwiderstand",
|
||||
pr_stats_int: "Intelligenz",
|
||||
pr_stats_mana: "Mana",
|
||||
pr_stats_mleatkpwr: "Kraft",
|
||||
pr_stats_mlecritstrkpct: "Kritisch",
|
||||
pr_stats_mlehastepct: "Tempo",
|
||||
pr_stats_mlehitpct: "Treffer",
|
||||
pr_stats_natres: "Naturwiderstand",
|
||||
pr_stats_oocmanargn: "Manaregeneration",
|
||||
pr_stats_parrypct: "Parieren",
|
||||
pr_stats_rage: "Wut",
|
||||
pr_stats_resipct: "Abhärtung",
|
||||
pr_stats_rgdatkpwr: "Kraft",
|
||||
pr_stats_rgdcritstrkpct: "Kritisch",
|
||||
pr_stats_rgdhastepct: "Tempo",
|
||||
pr_stats_rgdhitpct: "Treffer",
|
||||
pr_stats_runic: "Runenmacht",
|
||||
pr_stats_shares: "Schattenwiderstand",
|
||||
pr_stats_spi: "Willenskraft",
|
||||
pr_stats_splcritstrkpct: "Kritisch",
|
||||
pr_stats_spldmg: "Bonusschaden",
|
||||
pr_stats_splhastepct: "Tempo",
|
||||
pr_stats_splheal: "Bonusheilung",
|
||||
pr_stats_splhitpct: "Treffer",
|
||||
pr_stats_splpen: "Durchschlag",
|
||||
pr_stats_sta: "Ausdauer",
|
||||
pr_stats_str: "Stärke",
|
||||
|
||||
pr_statstt_arc: "Arkan",
|
||||
pr_statstt_fir: "Feuer",
|
||||
pr_statstt_fro: "Frost",
|
||||
pr_statstt_hol: "Heilig",
|
||||
pr_statstt_nat: "Natur",
|
||||
pr_statstt_sha: "Schatten",
|
||||
|
||||
pr_statstt_agi: "Erhöht die Angriffskraft um $1<br />Erhöht die Chance auf einen kritischen Treffer um $2<br />Erhöht die Rüstung um $3",
|
||||
pr_statstt_armor: "Verringert den erlittenen körperlichen Schaden um $2%",
|
||||
pr_statstt_armor2: "Verringert den erlittenen körperlichen Schaden um $2%<br />Erhöht die Rüstung Eures Begleiters um $1",
|
||||
pr_statstt_armorpenpct: '<span class="q2">Rüstungsdurchschlagwert $1 (+$2% Rüstungsdurchschlag)</span><br />Verringert die Rüstung des Gegners um bis zu $3%',
|
||||
pr_statstt_blockpct: '<span class="q2">Blockwertung $1 (+$2% Blocken)</span><br />Erhöht die Blockchance um $4%<br />Euer Blocken verringert den erlittenen Schaden um $3',
|
||||
pr_statstt_def: '<span class="q2">Verteidigungswertung $1 (+$2 Verteidigung)</span><br />Erhöht die Ausweich-, Block- und Parierchance um $3%<br />Verringert die Chance, dass Ihr getroffen oder kritisch getroffen werdet, um $4%',
|
||||
pr_statstt_dodgepct: '<span class="q2">Ausweichwertung $1 (+$2% Ausweichen)</span><br />Erhöht die Ausweichchance um $3%<br /><span class="q0">(Vor abnehmender Wirkung)</span>',
|
||||
pr_statstt_exp: '<span class="q2">Waffenkundewertung $1 (+$2 Waffenkunde)</span><br />Verringert die Chance, dass Feinde Euren Angriffen ausweichen oder sie parieren, um $3%',
|
||||
pr_statstt_int: "Erhöht das Mana um $1<br />Erhöht die Chance auf einen kritischen Zaubertreffer um $2%",
|
||||
pr_statstt_int2: "Erhöht das Mana um $1<br />Erhöht die Chance auf einen kritischen Zaubertreffer um $2%<br />Erhöht die Intelligenz Eures Begleiters um $3",
|
||||
pr_statstt_mleatkpwr: "Erhöht die Schadenswirkung mit Nahkampfwaffen um $1 pro Sekunde",
|
||||
pr_statstt_mlecritstrkpct: '<span class="q2">Kritische Trefferwertung $1 (+$2% Chance auf kritischen Treffer)</span><br />Erhöht die Chance auf einen kritischen Treffer um $3%',
|
||||
pr_statstt_mlehastepct: '<span class="q2">Tempowertung $1 (+$2% Hast)</span><br />Erhöht Nahkampftempo um $3%',
|
||||
pr_statstt_mlehitpct: '<span class="q2">Trefferwertung $1 (+2% Chance auf einen Treffer)</span><br />Erhöht die Nahkampftrefferchance, ein Ziel mit Stufe $4 zu treffen, um $3%',
|
||||
pr_statstt_oocmanargn: "Regeneriert alle 5 Sekunden $1 Mana, wenn kein Zauber gewirkt wird<br />Regeneriert alle 5 Sekunden $2 Mana, während ein Zauber gewirkt wird",
|
||||
pr_statstt_parrypct: '<span class="q2">Parierwertung $1 (+$2% Parieren)</span><br />Erhöht die Parierchance um $3%<br /><span class="q0">(Vor abnehmender Wirkung)</span>',
|
||||
pr_statstt_resipct: '<span class="q2">Abhärtungswertung $1 (+$2% Abhärtung)</span><br />Verringert die Chance, einen kritischen Treffer zu erleiden, um $3%<br />Verringert die Wirksamkeit von Manaentzügen und den Schaden kritischer Treffer um $4%<br />Gewährt für jeglichen von Spielern sowie ihren Begleitern oder Dienern verursachten Schaden eine zusätzliche Schadensverringerung von $5%',
|
||||
pr_statstt_resist: "Erhöht den Widerstand gegen $1-basierten Angriffen, Zaubern und Fähigkeiten.<br />Widerstand gegen Stufe $3: $1%",
|
||||
pr_statstt_rgdatkpwr: "Erhöht die Schadenswirkung mit Distanzwaffen um $1 pro Sekunde",
|
||||
pr_statstt_rgdatkpwr2: "Erhöht die Schadenswirkung mit Distanzwaffen um $1 pro Sekunde<br />Erhöht die Angriffskraft Eures Begleiters um $2<br />Erhöht den Zauberschaden Eures Begleiters um $3",
|
||||
pr_statstt_rgdcritstrkpct: '<span class="q2">Kritische Trefferwertung $1 (+$2% Chance auf kritischen Treffer)</span><br />Erhöht die Chance auf einen kritischen Treffer um $3%',
|
||||
pr_statstt_rgdhastepct: '<span class="q2">Tempowertung $1 (+2% Hast)</span><br />Erhöht Distanztempo um $3%',
|
||||
pr_statstt_rgdhitpct: '<span class="q2">Trefferwertung $1 (+2% Chance auf einen Treffer)</span><br />Erhöht die Distanztrefferchance, ein Ziel mit Stufe $4 zu treffen, um $3%',
|
||||
pr_statstt_spi: "Regeneriert außerhalb des Kampfes alle 5 Sekunden $1 Gesundheit<br />Regeneriert alle 5 Sekunden $2 Mana, wenn kein Zauber gewirkt wird.",
|
||||
pr_statstt_splcritstrkpct: '<span class="q2">Kritische Trefferwertung $2 (+$3% Chance auf kritischen Treffer)</span><br />$1',
|
||||
pr_statstt_spldmg: "$1",
|
||||
pr_statstt_spldmg2: "$1<br />Erhöht die Angriffskraft Eures Begleiters um $3<br />Erhöht den Zauberschaden Eures Begleiters um $4",
|
||||
pr_statstt_splhastepct: '<span class="q2">Tempowertung $1 (+2% Hast)</span><br />Erhöht Zaubertempo um $3%',
|
||||
pr_statstt_splheal: "Erhöht die Heilung um bis zu $1",
|
||||
pr_statstt_splhitpct: '<span class="q2">Trefferwertung $1 (+2% Chance auf einen Treffer)</span><br />Erhöht die Zaubertrefferchance, ein Ziel mit Stufe $4 zu treffen, um $3%',
|
||||
pr_statstt_splpen: "Verringert Widerstandsarten des Gegners um $1",
|
||||
pr_statstt_sta: "Erhöht die Gesundheit um $1",
|
||||
pr_statstt_sta2: "Erhöht die Gesundheit um $1<br />Erhöht die Ausdauer Eures Begleiters um $2",
|
||||
pr_statstt_str: "Erhöht die Angriffskraft um $1",
|
||||
pr_statstt_str2: "Erhöht die Angriffskraft um $1<br />Erhöht den Blockwert um $2",
|
||||
|
||||
pr_ach_overall: "Gesamter Fortschritt",
|
||||
|
||||
pr_note_color: "Farbe: ",
|
||||
pr_note_source: "Quelle: ",
|
||||
@@ -3787,6 +4054,8 @@ var LANG = {
|
||||
pr_note_missing: "Fehlend",
|
||||
pr_note_normal: "Normal",
|
||||
pr_note_exotic: "Exotisch",
|
||||
pr_note_gearscore: "Ausrüstungswertung",
|
||||
pr_note_weighted: "Gewogen",
|
||||
|
||||
su_note_stats: "Werte",
|
||||
su_note_other: "Anderes",
|
||||
|
||||
@@ -3897,8 +3897,8 @@ var LANG = {
|
||||
pr_qf_character: "Character: ",
|
||||
pr_qf_profiles: "Profiles: ",
|
||||
pr_qf_playedtime: "Played time: ",
|
||||
pr_qf_itemlevel: "Item Level: ",
|
||||
pr_qf_gearscore: "Gear score: ",
|
||||
pr_qf_itemlevel: "Item Level: ",
|
||||
pr_qf_talents: "Talents: ",
|
||||
pr_qf_achievements: "Achievements: ",
|
||||
pr_qf_xvxteam: "$1v$1 team: ",
|
||||
|
||||
@@ -35,8 +35,8 @@ var lv_screenshots = [
|
||||
date:'{$sc.date|date_format:"%Y/%m/%d %H:%M:%S"}',
|
||||
width:{$sc.width},
|
||||
height:{$sc.height},
|
||||
type:{$page.type},
|
||||
typeId:{$page.typeId},
|
||||
type:{$type},
|
||||
typeId:{$typeId},
|
||||
{if isset($sc.sticky)}
|
||||
sticky:{$sc.sticky},
|
||||
{/if}
|
||||
@@ -55,8 +55,8 @@ var lv_videos = [
|
||||
date:'{$vi.date|date_format:"%Y/%m/%d %H:%M:%S"}',
|
||||
videoType:1, {* there is only youtube *}
|
||||
videoId:'{$vi.videoId}',
|
||||
type:{$page.type},
|
||||
typeId:{$page.typeId},
|
||||
type:{$type},
|
||||
typeId:{$typeId},
|
||||
{if isset($vi.sticky)}
|
||||
sticky:{$vi.sticky},
|
||||
{/if}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
{if isset($redButtons[$smarty.const.BUTTON_LINKS])}
|
||||
{assign var='b' value=$redButtons[$smarty.const.BUTTON_LINKS]}
|
||||
{if $b}
|
||||
<a href="javascript:;" id="open-links-button" class="button-red" onclick="this.blur(); Links.show({ldelim} {if isset($b.color)}linkColor: '{$b.color}', {/if}{if isset($b.linkId)}linkId: '{$b.linkId}', {/if}{if isset($name)}linkName: '{$name|escape:"javascript"}', {/if}type: {$type}, typeId: {$typeId} {rdelim});"><em><b><i>{$lang.links}</i></b><span>{$lang.links}</span></em></a>
|
||||
<a href="javascript:;" id="open-links-button" class="button-red" onclick="this.blur(); Links.show({ldelim} {if isset($b.color)}linkColor: '{$b.color}', {/if}{if isset($b.linkId)}linkId: '{$b.linkId}', {/if}linkName: '{if isset($b.name)}{$b.name|escape:"javascript"}{else}{$name|escape:"javascript"}{/if}', type: {$type}, typeId: {$typeId} {rdelim});"><em><b><i>{$lang.links}</i></b><span>{$lang.links}</span></em></a>
|
||||
{else}
|
||||
<a href="javascript:;" id="open-links-button" class="button-red button-red-disabled"><em><b><i>{$lang.links}</i></b><span>{$lang.links}</span></em></a>
|
||||
{/if}
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
var g_serverTime = new Date('{$smarty.now|date_format:"%Y/%m/%d %H:%M:%S"}');
|
||||
var g_staticUrl = "{$smarty.const.STATIC_URL}";
|
||||
var g_host = "{$smarty.const.HOST_URL}";
|
||||
{if isset($dataKey)}
|
||||
var g_dataKey = '{$dataKey}';
|
||||
{/if}
|
||||
</script>
|
||||
<script src="static/js/jquery-1.4.2.min.js" type="text/javascript"></script>
|
||||
<script src="static/js/basic.js?{$AOWOW_REVISION}" type="text/javascript"></script>
|
||||
|
||||
@@ -14,16 +14,12 @@
|
||||
data:[
|
||||
{foreach name=i from=$data item=curr}
|
||||
{ldelim}
|
||||
id:{$curr.id},
|
||||
name:'{$curr.name|escape:"javascript"}',
|
||||
description:'{$curr.description|escape:"javascript"}',
|
||||
side:{$curr.faction},
|
||||
points:{$curr.points},
|
||||
category:{$curr.category},
|
||||
parentcat:{$curr.parentcat}
|
||||
{if isset($curr.type)}, type:{$curr.type}{/if}
|
||||
{if isset($curr.rewards)}, rewards:{$curr.rewards}{/if}
|
||||
{if isset($curr.reward)}, reward:'{$curr.reward|escape:"javascript"}'{/if}
|
||||
{foreach from=$curr key='name' item=val}
|
||||
{if $name != 'id'}
|
||||
{$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK},
|
||||
{/if}
|
||||
{/foreach}
|
||||
id:{$curr.id}
|
||||
{rdelim}
|
||||
{if $smarty.foreach.i.last}{else},{/if}
|
||||
{/foreach}
|
||||
|
||||
@@ -14,14 +14,12 @@
|
||||
data:[
|
||||
{foreach name=i from=$data item=curr}
|
||||
{ldelim}
|
||||
{if $curr.rec}
|
||||
rec:{$curr.rec},
|
||||
{/if}
|
||||
category:{$curr.category},
|
||||
id:{$curr.id},
|
||||
name:'{$curr.name|escape:"javascript"}',
|
||||
startDate:'{$curr.startDate}',
|
||||
endDate:'{$curr.endDate}'
|
||||
{foreach from=$curr key='name' item=val}
|
||||
{if $name != 'id'}
|
||||
{$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK},
|
||||
{/if}
|
||||
{/foreach}
|
||||
id:{$curr.id}
|
||||
{rdelim}
|
||||
{if $smarty.foreach.i.last}{else},{/if}
|
||||
{/foreach}
|
||||
|
||||
@@ -14,19 +14,12 @@
|
||||
data:[
|
||||
{foreach name=i from=$data item=curr}
|
||||
{ldelim}
|
||||
id:{$curr.id},
|
||||
name:'{$curr.name|escape:"javascript"}',
|
||||
races:{$curr.races},
|
||||
roles:{$curr.roles},
|
||||
power:{$curr.power},
|
||||
weapon:{$curr.weapon},
|
||||
armor:{$curr.armor}
|
||||
{if isset($curr.hero)}
|
||||
,hero:1
|
||||
{/if}
|
||||
{if isset($curr.expansion)}
|
||||
,expansion:{$curr.expansion}
|
||||
{/if}
|
||||
{foreach from=$curr key='name' item=val}
|
||||
{if $name != 'id'}
|
||||
{$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK},
|
||||
{/if}
|
||||
{/foreach}
|
||||
id:{$curr.id}
|
||||
{rdelim}
|
||||
{if $smarty.foreach.i.last}{else},{/if}
|
||||
{/foreach}
|
||||
|
||||
@@ -14,10 +14,12 @@
|
||||
data:[
|
||||
{foreach name=i from=$data item=curr}
|
||||
{ldelim}
|
||||
id:{$curr.id},
|
||||
category:{$curr.category},
|
||||
name:'{$curr.name|escape:"javascript"}',
|
||||
icon:'{$curr.icon}'
|
||||
{foreach from=$curr key='name' item=val}
|
||||
{if $name != 'id'}
|
||||
{$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK},
|
||||
{/if}
|
||||
{/foreach}
|
||||
id:{$curr.id}
|
||||
{rdelim}
|
||||
{if $smarty.foreach.i.last}{else},{/if}
|
||||
{/foreach}
|
||||
|
||||
@@ -16,11 +16,10 @@
|
||||
{foreach name=i from=$data item=curr}
|
||||
{ldelim}
|
||||
{foreach from=$curr key='name' item=val}
|
||||
{if $name != 'id' && $name != 'name'}
|
||||
{if $name != 'id'}
|
||||
{$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK},
|
||||
{/if}
|
||||
{/foreach}
|
||||
name:'{$curr.name|escape:"quotes"}',
|
||||
id:{$curr.id}
|
||||
{rdelim}
|
||||
{if $smarty.foreach.i.last}{else},{/if}
|
||||
|
||||
@@ -36,11 +36,10 @@ var _ = [
|
||||
{foreach name=i from=$data item=curr}
|
||||
{ldelim}
|
||||
{foreach from=$curr key='name' item=val}
|
||||
{if $name != 'id' && $name != 'name'}
|
||||
{if $name != 'id'}
|
||||
{$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK},
|
||||
{/if}
|
||||
{/foreach}
|
||||
name:'{$curr.name|escape:"quotes"}',
|
||||
id:{$curr.id}
|
||||
{rdelim}
|
||||
{if $smarty.foreach.i.last}{else},{/if}
|
||||
|
||||
@@ -14,15 +14,12 @@
|
||||
data:[
|
||||
{foreach name=i from=$data item=curr}
|
||||
{ldelim}
|
||||
{foreach from=$curr key='name' item=val}
|
||||
{if $name != 'id' && $name != 'name' && $name != 'quality'}
|
||||
{$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK},
|
||||
{/if}
|
||||
{/foreach}
|
||||
name:'{$curr.quality}{$curr.name|escape:"quotes"}',
|
||||
{if $curr.minlevel}minlevel:{$curr.minlevel},{/if}
|
||||
{if $curr.maxlevel}maxlevel:{$curr.maxlevel},{/if}
|
||||
{if $curr.classes}classes:[{section name=j loop=$curr.classes}{$curr.classes[j]}{if $smarty.section.j.last}{else},{/if}{/section}],{/if}
|
||||
{if $curr.reqclass}reqclass:{$curr.reqclass},{/if}
|
||||
{if $curr.note}note:{$curr.note},{/if}
|
||||
{if $curr.pieces}pieces:[{section name=j loop=$curr.pieces}{$curr.pieces[j]}{if $smarty.section.j.last}{else},{/if}{/section}],{/if}
|
||||
{if isset($curr.type)}type:{$curr.type},{/if}
|
||||
heroic:{if isset($curr.heroic) && $curr.heroic == 1}true{else}false{/if},
|
||||
id:{$curr.id}
|
||||
{rdelim}
|
||||
{if $smarty.foreach.i.last}{else},{/if}
|
||||
|
||||
@@ -14,13 +14,12 @@
|
||||
data:[
|
||||
{foreach name=i from=$data item=curr}
|
||||
{ldelim}
|
||||
family:{$curr.family},
|
||||
modelId:{$curr.modelId},
|
||||
displayId:{$curr.displayId},
|
||||
skin:'{$curr.skin|escape:"javascript"}',
|
||||
count:{$curr.count},
|
||||
minLevel:{$curr.minlevel},
|
||||
maxLevel:{$curr.maxlevel}
|
||||
{foreach from=$curr key='name' item=val}
|
||||
{if $name != 'count'}
|
||||
{$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK},
|
||||
{/if}
|
||||
{/foreach}
|
||||
count:{$curr.count}
|
||||
{rdelim}
|
||||
{if $smarty.foreach.i.last}{else},{/if}
|
||||
{/foreach}
|
||||
|
||||
@@ -15,11 +15,10 @@
|
||||
{foreach name=i from=$data item=curr}
|
||||
{ldelim}
|
||||
{foreach from=$curr key='name' item=val}
|
||||
{if $name != 'id' && $name != 'name'}
|
||||
{if $name != 'id'}
|
||||
{$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK},
|
||||
{/if}
|
||||
{/foreach}
|
||||
name:'{$curr.name|escape:"quotes"}',
|
||||
id:{$curr.id}
|
||||
{rdelim}
|
||||
{if $smarty.foreach.i.last}{else},{/if}
|
||||
|
||||
@@ -32,23 +32,12 @@ var _ = function(family)
|
||||
data:[
|
||||
{foreach name=i from=$data item=curr}
|
||||
{ldelim}
|
||||
id:{$curr.id},
|
||||
name:'{$curr.name|escape:"javascript"}',
|
||||
icon:'{$curr.icon|escape:"javascript"}',
|
||||
minlevel:{$curr.minlevel},
|
||||
maxlevel:{$curr.maxlevel},
|
||||
type:{$curr.type},
|
||||
diet:{$curr.diet},
|
||||
armor:{$curr.armor},
|
||||
damage:{$curr.damage},
|
||||
health:{$curr.health},
|
||||
spells:{$curr.spells}
|
||||
{if isset($curr.expansion)}
|
||||
,expansion:{$curr.expansion}
|
||||
{/if}
|
||||
{if isset($curr.exotic)}
|
||||
,exotic:{$curr.exotic}
|
||||
{/if}
|
||||
{foreach from=$curr key='name' item=val}
|
||||
{if $name != 'id'}
|
||||
{$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK},
|
||||
{/if}
|
||||
{/foreach}
|
||||
id:{$curr.id}
|
||||
{rdelim}
|
||||
{if $smarty.foreach.i.last}{else},{/if}
|
||||
{/foreach}
|
||||
|
||||
@@ -14,16 +14,12 @@
|
||||
data:[
|
||||
{foreach name=i from=$data item=curr}
|
||||
{ldelim}
|
||||
id:{$curr.id},
|
||||
name:'{$curr.name|escape:"javascript"}',
|
||||
classes:{$curr.classes},
|
||||
faction:{$curr.faction},
|
||||
leader:{$curr.leader},
|
||||
zone:{$curr.zone},
|
||||
side:{$curr.side}
|
||||
{if isset($curr.expansion)}
|
||||
,expansion:{$curr.expansion}
|
||||
{/if}
|
||||
{foreach from=$curr key='name' item=val}
|
||||
{if $name != 'id'}
|
||||
{$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK},
|
||||
{/if}
|
||||
{/foreach}
|
||||
id:{$curr.id}
|
||||
{rdelim}
|
||||
{if $smarty.foreach.i.last}{else},{/if}
|
||||
{/foreach}
|
||||
|
||||
@@ -14,14 +14,12 @@
|
||||
data:[
|
||||
{foreach name=i from=$data item=curr}
|
||||
{ldelim}
|
||||
category:{$curr.category},
|
||||
categorybak:{$curr.categorybak},
|
||||
id:{$curr.id},
|
||||
name:'{$curr.name|escape:"javascript"}',
|
||||
profession:{$curr.profession},
|
||||
recipeSubclass:{$curr.recipeSubclass},
|
||||
specializations:{$curr.specializations},
|
||||
icon:'{$curr.icon|escape:"javascript"}'
|
||||
{foreach from=$curr key='name' item=val}
|
||||
{if $name != 'id'}
|
||||
{$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK},
|
||||
{/if}
|
||||
{/foreach}
|
||||
id:{$curr.id}
|
||||
{rdelim}
|
||||
{if $smarty.foreach.i.last}{else},{/if}
|
||||
{/foreach}
|
||||
|
||||
@@ -14,18 +14,12 @@
|
||||
data:[
|
||||
{foreach name=i from=$data item=curr}
|
||||
{ldelim}
|
||||
id:{$curr.id},
|
||||
name:'{$curr.name|escape:"javascript"}',
|
||||
category:{$curr.category},
|
||||
expansion:{$curr.expansion},
|
||||
gender:{$curr.gender},
|
||||
side:{$curr.side}
|
||||
{if isset($curr.namefemale)}
|
||||
, namefemale:'{$curr.namefemale|escape:"javascript"}'
|
||||
{/if}
|
||||
{if isset($curr.source)}
|
||||
, source:{$curr.source}
|
||||
{/if}
|
||||
{foreach from=$curr key='name' item=val}
|
||||
{if $name != 'id'}
|
||||
{$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK},
|
||||
{/if}
|
||||
{/foreach}
|
||||
id:{$curr.id}
|
||||
{rdelim}
|
||||
{if $smarty.foreach.i.last}{else},{/if}
|
||||
{/foreach}
|
||||
|
||||
@@ -14,20 +14,12 @@
|
||||
data:[
|
||||
{foreach name=i from=$data item=curr}
|
||||
{ldelim}
|
||||
id:{$curr.id},
|
||||
category:{$curr.category},
|
||||
territory:{$curr.territory},
|
||||
minlevel:{$curr.minlevel},
|
||||
maxlevel:{$curr.maxlevel},
|
||||
name:'{$curr.name|escape:"quotes"}'
|
||||
{if isset($curr.expansion)},expansion:{$curr.expansion}{/if}
|
||||
{if isset($curr.instance)},instance:{$curr.instance}{/if}
|
||||
{if isset($curr.nplayers)},nplayers:{$curr.nplayers}{/if}
|
||||
{if isset($curr.reqlevel)},reqlevel:{$curr.reqlevel}{/if}
|
||||
{if isset($curr.lfgReqLevel)},lfgReqLevel:{$curr.lfgReqLevel}{/if}
|
||||
{if isset($curr.heroicLevel)},heroicLevel:{$curr.heroicLevel}{/if}
|
||||
{if isset($curr.percent)},percent:{$curr.percent}{/if}
|
||||
{if isset($curr.count)},count:{$curr.count}{/if}
|
||||
{foreach from=$curr key='name' item=val}
|
||||
{if $name != 'id'}
|
||||
{$name}:{$val|@json_encode:$smarty.const.JSON_NUMERIC_CHECK},
|
||||
{/if}
|
||||
{/foreach}
|
||||
id:{$curr.id}
|
||||
{rdelim}
|
||||
{if $smarty.foreach.i.last}{else},{/if}
|
||||
{/foreach}
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
g_initPath({$path});
|
||||
var g_dataKey = '{$dataKey}';
|
||||
var temp_path = {$path}; {*kill with pageTemplate*}
|
||||
{*
|
||||
PageTemplate.set({pageName: 'profile', activeTab: 1, breadcrumb: [1,5,0,'eu']});
|
||||
@@ -30,7 +29,7 @@ var g_pageValue = '';
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
var profilah = new Profiler();
|
||||
profilah.initialize('profilah-generic', {ldelim} id: {$profileId} {rdelim});
|
||||
pr_setRegionRealm($WH.gE($WH.ge('topbar'), 'form')[0], '', '');
|
||||
pr_setRegionRealm($WH.gE($WH.ge('topbar'), 'form')[0], '{$region}', '{$realm}');
|
||||
//]]></script>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
@@ -96,7 +96,7 @@ PageTemplate.init();
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
pr_setRegionRealm($WH.ge('fi').firstChild, 'us', '');
|
||||
pr_setRegionRealm($WH.ge('fi').firstChild, '{$region}', '{$realm}');
|
||||
pr_onChangeRace();
|
||||
fi_init('profiles');
|
||||
{if isset($filter.setCr)}{$filter.setCr}{/if}
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
</div>
|
||||
<div id="{$tcType}-itself"></div>
|
||||
<script type="text/javascript">
|
||||
var g_dataKey = '{$dataKey}';
|
||||
{$tcType}_init();
|
||||
</script>
|
||||
<div class="clear"></div>
|
||||
|
||||
Reference in New Issue
Block a user