Profiler/Frontend

* add pages and templates to display arena teams, guilds and chars
This commit is contained in:
Sarjuuk
2018-03-22 17:38:44 +01:00
parent 3fd25ca889
commit 0ff0e5b59e
35 changed files with 1570 additions and 486 deletions

View File

@@ -51,7 +51,7 @@ function Profiler() {
_tdRaidCompletion,
_tdRaidGearMeter,
_divStatistics,
_divAuras,
// _divAuras,
_divTalents,
_divPets,
_divReputation,
@@ -94,10 +94,24 @@ function Profiler() {
},
_progress = [ /* some example data */
{ level: 150, instance: 2, name: LANG.pr_dungeons, icon: 'spell_holy_championsbond', achievs: [477,478,479,480,481,482,483,484,485,486,487,488,3778,4296,4516,4517,4518], kills: [[1232, 29120], [1235, 31134], [1236, 29306], [1233, 29311], [1242, 23980], [1231, 26723], [1240, 26861], [1239, 27656], [1238, 28923], ] }, // some lvl 80 Dungeons normal
{ level: 187, instance: 2, heroic: 1, name: LANG.pr_dungeons, icon: 'ability_rogue_feigndeath', achievs: [489,490,491,492,493,494,495,496,497,498,499,500,4297,4298,4519,4520,4521], kills: [[1506, 29120], [1509, 31134], [1510, 29306], [1507, 29311], [1504, 23980], [1505, 26723], [1514, 26861], [1513, 27656], [1512, 28923], ] }, // some lvl 80 Dungeons heroic
{ level: 200, instance: 7, zone: 3456, icon: 'achievement_zone_firelands', achievs: [574], kills: [[1377, 15991]] }, // 10-man naxxramas
{ level: 213, instance: 7, heroic: 1, zone: 3456, icon: 'achievement_zone_firelands', achievs: [575], kills: [[1390, 15991]] } // 25-man naxxramas
// { level: 150, instance: 2, name: LANG.pr_dungeons, icon: 'spell_holy_championsbond', achievs: [477,478,479,480,481,482,483,484,485,486,487,488,3778,4296,4516,4517,4518], kills: [[1232, 29120], [1235, 31134], [1236, 29306], [1233, 29311], [1242, 23980], [1231, 26723], [1240, 26861], [1239, 27656], [1238, 28923], ] }, // some lvl 80 Dungeons normal
// { level: 187, instance: 2, heroic: 1, name: LANG.pr_dungeons, icon: 'ability_rogue_feigndeath', achievs: [489,490,491,492,493,494,495,496,497,498,499,500,4297,4298,4519,4520,4521], kills: [[1506, 29120], [1509, 31134], [1510, 29306], [1507, 29311], [1504, 23980], [1505, 26723], [1514, 26861], [1513, 27656], [1512, 28923], ] }, // some lvl 80 Dungeons heroic
// { level: 200, instance: 7, zone: 3456, icon: 'achievement_dungeon_naxxramas_normal', achievs: [576], kills: [[1377, 15990]] }, // 10-man naxxramas
// { level: 213, instance: 7, heroic: 1, zone: 3456, icon: 'achievement_dungeon_naxxramas_10man', achievs: [577], kills: [[1390, 15990]] } // 25-man naxxramas
{ level: 245, instance: 5, zone: 2159, icon: 'achievement_boss_onyxia', achievs: [4397], kills: [[1756, 10184]] }, // Onyxia's Lair 25
{ level: 232, instance: 3, zone: 2159, icon: 'achievement_boss_onyxia', achievs: [4396], kills: [[1098, 10184]] }, // Onyxia's Lair 10
{ level: 258, instance: 5, heroic: 1, zone: 4722, icon: 'achievement_reputation_argentchampion', achievs: [3812], kills: [[4031, 200001], [4034, 34780], [4038, 200002], [4042, 200003], [4046, 34564]] }, // Trial of the Crusader 25 hc
{ level: 245, instance: 5, zone: 4722, icon: 'achievement_reputation_argentchampion', achievs: [3916], kills: [[4029, 200001], [4035, 34780], [4039, 200002], [4043, 200003], [4047, 34564]] }, // Trial of the Crusader 25 nh
{ level: 245, instance: 3, heroic: 1, zone: 4722, icon: 'achievement_reputation_argentchampion', achievs: [3918], kills: [[4030, 200001], [4033, 34780], [4037, 200002], [4041, 200003], [4045, 34564]] }, // Trial of the Crusader 10 hc
{ level: 232, instance: 3, zone: 4722, icon: 'achievement_reputation_argentchampion', achievs: [3917], kills: [[4028, 200001], [4032, 34780], [4036, 200002], [4040, 200003], [4044, 34564]] }, // Trial of the Crusader 10 nh
{ level: 277, instance: 5, heroic: 1, zone: 4812, icon: 'achievement_dungeon_icecrown_frostmourne', achievs: [4637], kills: [[4673, 37970], [4682, 37955], [4664, 37813], [4667, 36626], [4661, 100001], [4656, 36855], [4642, 36612], [4679, 36678], [4670, 36627], [4685, 36853], [4676, 36789], [4688, 36597]] }, // Icecrown Citadel 25 hc
{ level: 264, instance: 5, zone: 4812, icon: 'achievement_dungeon_icecrown_frostmourne', achievs: [4608], kills: [[4672, 37970], [4681, 37955], [4663, 37813], [4666, 36626], [4660, 100001], [4655, 36855], [4641, 36612], [4678, 36678], [4669, 36627], [4683, 36853], [4675, 36789], [4687, 36597]] }, // Icecrown Citadel 25 nh
{ level: 264, instance: 3, heroic: 1, zone: 4812, icon: 'achievement_dungeon_icecrown_frostmourne', achievs: [4636], kills: [[4671, 37970], [4680, 37955], [4662, 37813], [4665, 36626], [4659, 100001], [4654, 36855], [4640, 36612], [4677, 36678], [4668, 36627], [4684, 36853], [4674, 36789], [4686, 36597]] }, // Icecrown Citadel 10 hc
{ level: 251, instance: 3, zone: 4812, icon: 'achievement_dungeon_icecrown_frostmourne', achievs: [4532], kills: [[4648, 37970], [4651, 37955], [4645, 37813], [4646, 36626], [4644, 100001], [4643, 36855], [4639, 36612], [4650, 36678], [4647, 36627], [4652, 36853], [4649, 36789], [4653, 36597]] }, // Icecrown Citadel 10 nh
{ level: 284, instance: 5, heroic: 1, zone: 4987, icon: 'spell_shadow_twilight', achievs: [4816], kills: [[4823, 39863]] }, // Ruby Sanctum 25 hc
{ level: 271, instance: 5, zone: 4987, icon: 'spell_shadow_twilight', achievs: [4815], kills: [[4820, 39863]] }, // Ruby Sanctum 25 nh
{ level: 271, instance: 3, heroic: 1, zone: 4987, icon: 'spell_shadow_twilight', achievs: [4818], kills: [[4822, 39863]] }, // Ruby Sanctum 10 hc
{ level: 258, instance: 3, zone: 4987, icon: 'spell_shadow_twilight', achievs: [4817], kills: [[4821, 39863]] } // Ruby Sanctum 10 nh
];
@@ -630,23 +644,23 @@ function Profiler() {
/* custom auras */
var tbl = $WH.ce('table');
// var tbl = $WH.ce('table');
_divAuras = $WH.ce('div');
_divAuras.id = 'aura-container';
_divAuras.style.cssFloat = 'left';
_divAuras.style.marginLeft = '390px';
_divAuras.style.width = '325px';
_divAuras.style.display = 'none';
// _divAuras = $WH.ce('div');
// _divAuras.id = 'aura-container';
// _divAuras.style.cssFloat = 'left';
// _divAuras.style.marginLeft = '390px';
// _divAuras.style.width = '325px';
// _divAuras.style.display = 'none';
_ = $WH.ce('h3');
$WH.ae(_, $WH.ct('[Auras]'));
$WH.ae(_divAuras, _);
// _ = $WH.ce('h3');
// $WH.ae(_, $WH.ct('[Auras]'));
// $WH.ae(_divAuras, _);
tbl.className = 'iconlist';
// tbl.className = 'iconlist';
$WH.ae(_divAuras, tbl);
$WH.aef(_divInventory, _divAuras);
// $WH.ae(_divAuras, tbl);
// $WH.aef(_divInventory, _divAuras);
/* end custom */
@@ -885,7 +899,9 @@ function Profiler() {
}
function _updateDefaultIcon() {
var icon = $WH.g_getProfileIcon(_profile.race, _profile.classs, _profile.gender, _profile.level, _profile.source, 'large');
var icon = $WH.g_getProfileIcon(_profile.race, _profile.classs, _profile.gender, _profile.level, 0, 'large');
// aowow - and another bugged icon request
// var icon = $WH.g_getProfileIcon(_profile.race, _profile.classs, _profile.gender, _profile.level, _profile.source, 'large');
if (!_profile.icon) {
_profile.icon = icon;
@@ -1081,6 +1097,7 @@ function Profiler() {
}
}
/* Aowow custom
function _updateAuras() {
var
show = false,
@@ -1148,7 +1165,7 @@ function Profiler() {
_divAuras.style.display = show ? 'block' : 'none';
}
*/
function _showCharacterMenu(e) {
if (!_isArmoryProfile()) {
return;
@@ -1453,6 +1470,8 @@ function Profiler() {
$WH.ae(li, div);
$WH.ae(_ulQuickFacts, li);
_updateGearScore();
// Spec
li = $WH.ce('li');
_divSpec = div = $WH.ce('div');
@@ -1830,7 +1849,7 @@ function Profiler() {
for (var i in g_spells) {
_fixJson(g_spells[i].modifier || 0);
}
_updateAuras();
// _updateAuras();
_statistics.updateModifiers();
@@ -2531,7 +2550,8 @@ function ProfilerStatistics(_parent) {
},
agi: {
tooltipModifiers: ['mleatkpwr', 'mlecritstrkpct', 'armor'],
// tooltipModifiers: ['mleatkpwr', 'mlecritstrkpct', 'armor'], - aowow replacement
tooltipModifiers: ['mleatkpwr', 'mlecritstrkpct', 'fullarmor'],
addModifiers: function () {
var
raceData = g_statistics.race[_profile.race],
@@ -2543,7 +2563,8 @@ function ProfilerStatistics(_parent) {
rgdatkpwr: [classData[1][2], 'percentOf', ['agi', (classData[1][2] ? (classData[1][0] / (classData[1][1] ? 2 : 1)) : 0)]],
mlecritstrkpct: [levelData[7], 'percentOf', ['agi', classData[2][0]]],
rgdcritstrkpct: [levelData[7], 'percentOf', ['agi', classData[2][0]]],
armor: [2, 'percentOf', 'agi'],
// armor: [2, 'percentOf', 'agi'], - aowow replacement
fullarmor: [2, 'percentOf', 'agi'],
dodgepct: [levelData[9], 'percentOf', ['agi', -levelData[9] * ((raceData ? raceData[1] : 0) + levelData[1])]]
};
}
@@ -2753,7 +2774,8 @@ function ProfilerStatistics(_parent) {
manargn: {
addModifiers: function () {
return {
oocmanargn: [1, 'percentOf', 'manargn']
oocmanargn: [1, 'percentOf', 'manargn'],
icmanargn: [1, 'percentOf', 'manargn']
};
}
},
@@ -2768,12 +2790,17 @@ function ProfilerStatistics(_parent) {
oocmanargn: {
tooltipCompute: function (total) {
return [total, _statistics.manargn.total];
// return [total, _statistics.manargn.total]; // aowow -- everything with icmanargn is custom. was apparently not handled before
return [total, _statistics.icmanargn.total];
}
},
icmanargn: {},
// ********* Defenses ********
armor: {
// armor: { - aowow replacement
fullarmor: {
label: 'pr_stats_armor', // - aowow added
getTooltip: function () {
return LANG['pr_statstt_armor' + (_profile.classs == 3 || _profile.classs == 9 ? 2 : '')];
},
@@ -2789,7 +2816,16 @@ function ProfilerStatistics(_parent) {
},
addModifiers: function () {
return {
petarmor: [0.35, 'percentOf', 'armor']
// petarmor: [0.35, 'percentOf', 'armor'] - aowow replacement
petarmor: [0.35, 'percentOf', 'fullarmor']
}
}
},
armor: { // aowow - added this so we can correctly calc talents that only modify equipped armor values
addModifiers: function () {
return {
fullarmor: [1, 'percentOf', 'armor']
}
}
},
@@ -3046,7 +3082,8 @@ function ProfilerStatistics(_parent) {
// Defenses
[
{id: 'defenses', type: 'title' },
{ id: 'armor' },
// { id: 'armor' }, // - aowow replacement
{ id: 'fullarmor' },
{ id: 'def' },
{ id: 'dodgepct' },
{ id: 'parrypct' },
@@ -3368,7 +3405,7 @@ function ProfilerStatistics(_parent) {
health: levelData[5],
mleatkpwr: [classData[0][3], 'percentOf', 'level'],
rgdatkpwr: [classData[1][3], 'percentOf', 'level'],
dodgepct: classData[4] + levelData[9] * ((raceData ? raceData[1] : 0) + levelData[1]), // may need to add http://www.wowhead.com/spell=13789 here (there are also 2 druid talents but they require bear/cat form so that's not a problem
dodgepct: classData[4] + levelData[9] * ((raceData ? raceData[1] : 0) + levelData[1]),
parrypct: classData[6],
blockpct: classData[8],
def: _profile.level * 5
@@ -3802,6 +3839,8 @@ function ProfilerStatistics(_parent) {
$WH.st(boxStat.bar.firstChild.firstChild, _getStatBoxLabel(statId) + ' ' + value);
boxStat.bar.style.display = (value > 0 ? '' : 'none');
}
else
boxStat.bar.style.display = 'none';
break;
case 'resist':
@@ -4049,16 +4088,16 @@ function ProfilerInventory(_parent) {
];
_proficiencies = {
1: { 2: [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 13, 15, 16, 18], 4: [6, 1, 2, 3, 4] },
2: { 2: [0, 1, 4, 5, 6, 7, 8], 4: [6, 7, 1, 2, 3, 4] },
3: { 2: [0, 1, 2, 3, 6, 7, 8, 10, 13, 15, 16, 18], 4: [1, 2, 3] },
4: { 2: [2, 3, 4, 7, 13, 15, 16, 18], 4: [1, 2] },
5: { 2: [4, 10, 15, 19], 4: [1] },
6: { 2: [0, 1, 4, 5, 6, 7, 8], 4: [10, 1, 2, 3, 4] },
7: { 2: [0, 1, 4, 5, 10, 13, 15], 4: [6, 9, 1, 2, 3] },
8: { 2: [7, 10, 15, 19], 4: [1] },
9: { 2: [7, 10, 15, 19], 4: [1] },
11: { 2: [4, 5, 6, 10, 13, 15], 4: [8, 1, 2] }
1: { 2: [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 13, 15, 16, 18], 4: [6, 1, 2, 3, 4] },
2: { 2: [0, 1, 4, 5, 6, 7, 8], 4: [6, 7, 1, 2, 3, 4] },
3: { 2: [0, 1, 2, 3, 6, 7, 8, 10, 13, 15, 16, 18], 4: [1, 2, 3] },
4: { 2: [2, 3, 4, 7, 13, 15, 16, 18], 4: [1, 2] },
5: { 2: [4, 10, 15, 19], 4: [1] },
6: { 2: [0, 1, 4, 5, 6, 7, 8], 4: [10, 1, 2, 3, 4] },
7: { 2: [0, 1, 4, 5, 10, 13, 15], 4: [6, 9, 1, 2, 3] },
8: { 2: [7, 10, 15, 19], 4: [1] },
9: { 2: [7, 10, 15, 19], 4: [1] },
11: { 2: [4, 5, 6, 10, 13, 15], 4: [8, 1, 2] }
},
jsonEquipCopy = {
@@ -4342,7 +4381,8 @@ function ProfilerInventory(_parent) {
if (item[2] && g_enchants[item[2]]) {
gearscore[i].ench += bonus;
}
else {
// else { // aowow - adds 20 even if the slot is empty .. what?
else if (item[0]) {
gearscore[i].item += bonus;
}
@@ -4612,7 +4652,7 @@ 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(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;
@@ -7453,7 +7493,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=' + Locale.getId() + '&t=' + g_dataKey + '&callback=$WowheadProfiler.loadOnDemand&' + (new Date().getTime()));
_imgLoading.style.display = 'block';
_divTipQuests.style.display = 'none';
_loading = this;
@@ -8380,7 +8420,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=' + Locale.getId() + '&catg=' + _category + '&t=' + g_dataKey + '&callback=$WowheadProfiler.loadOnDemand&' + (new Date().getTime()));
_imgLoading.style.display = 'block';
_divTipQuests.style.display = 'none';
_loading = this;
@@ -9030,6 +9070,7 @@ Listview.templates.itempicker = {
}
return (
-$WH.strcmp(a.gearscore, b.gearscore) ||
-$WH.strcmp(a.level, b.level) ||
-$WH.strcmp(a.quality, b.quality) ||
$WH.strcmp(a.name, b.name)
@@ -9316,6 +9357,7 @@ Listview.templates.gempicker = {
}
return (
-$WH.strcmp(a.gearscore, b.gearscore) ||
-$WH.strcmp(a.quality, b.quality) ||
$WH.strcmp(a.colors, b.colors) ||
$WH.strcmp(a.icon, b.icon) ||
@@ -9485,7 +9527,10 @@ Listview.templates.enchantpicker = {
return 1;
}
return $WH.strcmp(a.name, b.name);
return (
-$WH.strcmp(a.gearscore, b.gearscore) ||
$WH.strcmp(a.name, b.name)
);
}
},
{
@@ -10057,4 +10102,4 @@ Dialog.templates.quickexclude = {
this.template.fields[1].__tr.style.display = (ngroups ? '' : 'none');
this.template.fields[2].__tr.style.display = (ngroups ? 'none' : '');
}
};
};

View File

@@ -543,6 +543,10 @@ function TalentCalc() {
_setPoints(-1, _pointsFromBonus);
};
this.getBonusPoints = function (bonusPoints) {
return _bonusPoints;
};
this.setClass = function (classId) {
return _setClass(classId);
};

View File

@@ -369,17 +369,17 @@ var fi_filters = {
{ id: 23, name: 'completedachievement', type: 'str-small' },
{ id: 24, name: 'sepprofession' },
{ id: 25, name: 'alchemy', type: 'str-small' },
{ id: 26, name: 'blacksmithing', type: 'str-small' },
{ id: 27, name: 'enchanting', type: 'str-small' },
{ id: 28, name: 'engineering', type: 'str-small' },
{ id: 29, name: 'herbalism', type: 'str-small' },
{ id: 30, name: 'inscription', type: 'str-small' },
{ id: 31, name: 'jewelcrafting', type: 'str-small' },
{ id: 32, name: 'leatherworking', type: 'str-small' },
{ id: 33, name: 'mining', type: 'str-small' },
{ id: 34, name: 'skinning', type: 'str-small' },
{ id: 35, name: 'tailoring', type: 'str-small' },
{ id: 25, name: 'alchemy', type: 'num' },
{ id: 26, name: 'blacksmithing', type: 'num' },
{ id: 27, name: 'enchanting', type: 'num' },
{ id: 28, name: 'engineering', type: 'num' },
{ id: 29, name: 'herbalism', type: 'num' },
{ id: 30, name: 'inscription', type: 'num' },
{ id: 31, name: 'jewelcrafting', type: 'num' },
{ id: 32, name: 'leatherworking', type: 'num' },
{ id: 33, name: 'mining', type: 'num' },
{ id: 34, name: 'skinning', type: 'num' },
{ id: 35, name: 'tailoring', type: 'num' },
{ id: 4, name: 'septalent' },
{ id: 5, name: 'talenttree1', type: 'num' },

View File

@@ -586,7 +586,9 @@ var PageTemplate = new function()
var menuItem = [character.id, character.name, g_getProfileUrl(character), null,
{
className: (character.pinned ? 'icon-star-right ' : '') + 'c' + character.classs,
tinyIcon: $WH.g_getProfileIcon(character.race, character.classs, character.gender, character.level, character.id, 'tiny')
// tinyIcon: $WH.g_getProfileIcon(character.race, character.classs, character.gender, character.level, character.id, 'tiny')
// aowow: profileId should not be nessecary here
tinyIcon: $WH.g_getProfileIcon(character.race, character.classs, character.gender, character.level, 0, 'tiny')
}];
submenu.push(menuItem);
@@ -15445,7 +15447,16 @@ Listview.templates = {
i.style.padding = '0';
i.style.borderRight = 'none';
$WH.ae(i, Icon.create($WH.g_getProfileIcon(profile.race, profile.classs, profile.gender, profile.level, profile.icon ? profile.icon : profile.id, 'medium'), 1, null, this.getItemLink(profile)));
// $WH.ae(i, Icon.create($WH.g_getProfileIcon(profile.race, profile.classs, profile.gender, profile.level, profile.icon ? profile.icon : profile.id, 'medium'), 1, null, this.getItemLink(profile)));
// aowow . i dont know .. i dont know... char icon requests are strange
var ic = Icon.create($WH.g_getProfileIcon(profile.race, profile.classs, profile.gender, profile.level, profile.icon ? profile.icon : 0, 'medium'), 1, null, this.getItemLink(profile));
// aowow - custom
if (profile.captain) {
tr.className = 'mergerow';
ic.className += ' ' + ic.className + '-gold';
}
$WH.ae(i, ic);
$WH.ae(tr, i);
td.style.borderLeft = 'none';
@@ -15731,6 +15742,18 @@ Listview.templates = {
compute: function(profile, td) {
return profile.games - profile.wins;
},
sortFunc: function(a, b, col) {
var
lossA = a.games - a.wins,
lossB = b.games - b.wins;
if (lossA > lossB)
return 1;
if (lossA < lossB)
return -1;
return 0;
},
hidden: 1
},
{
@@ -15738,7 +15761,15 @@ Listview.templates = {
name: LANG.guildrank,
value: 'guildrank',
compute: function(profile, td) {
if (profile.guildrank > 0) {
// >>> aowow - real rank names >>>
if (typeof guild_ranks !== "undefined" && guild_ranks[profile.guildrank]) {
var sp = $WH.ce('span', null, $WH.ct(guild_ranks[profile.guildrank]));
g_addTooltip(sp, $WH.sprintf(LANG.rankno, profile.guildrank));
$WH.ae(td, sp);
}
// if (profile.guildrank > 0) {
// <<< aowow - real rank names <<<
else if (profile.guildrank > 0) {
return $WH.sprintf(LANG.rankno, profile.guildrank);
}
else if (profile.guildrank == 0) {
@@ -15764,20 +15795,6 @@ Listview.templates = {
id: 'rating',
name: LANG.rating,
value: 'rating',
compute: function(profile, td) {
if (profile.roster) {
return profile.arenateam[profile.roster].rating;
}
return profile.rating;
},
sortFunc: function(a, b, col) {
if (a.roster && b.roster) {
return $WH.strcmp(a.arenateam[a.roster].rating, b.arenateam[b.roster].rating);
}
return $WH.strcmp(a.rating, b.rating);
},
hidden: 1
},
{
@@ -15856,6 +15873,9 @@ Listview.templates = {
a.href = '?guild=' + profile.region + '.' + profile.realm + '.' + g_urlize(profile.guild);
$WH.ae(a, $WH.ct(profile.guild));
$WH.ae(td, a);
},
sortFunc: function(a, b, col) {
return $WH.strcmp(a.guild, b.guild);
}
}
],

View File

@@ -232,7 +232,7 @@ function pr_updateStatus(page, div, id, request, tryAgain)
div.innerHTML += ' ' + LANG.pr_queue_noprocess;
}
div.innerHTML += '<a id="close-profiler-notification" class="announcement-close" href="javascript:;" onclick="$(\'.profiler-message\').remove(); return false;">';
div.innerHTML += '<a id="close-profiler-notification" class="announcement-close" href="javascript:;" onclick="$(\'.profiler-message\').hide(); return false;">';
div.innerHTML += '<br />' + (status < 3 && !refresh && !nresyncs ? LANG.pr_queue_addqueue : (status > 2 ? $WH.sprintf(LANG['pr_queue_status' + status], LANG['pr_error_armory' + errcode], profile) : $WH.sprintf(LANG['pr_queue_status' + status], count, duration, profile)));
div.style.backgroundImage = '';
@@ -245,6 +245,7 @@ function pr_updateStatus(page, div, id, request, tryAgain)
if (status == 4) {
$('a', div).click(tryAgain);
}
else if (refresh && !action) {
setTimeout(pr_updateStatus.bind(null, page, div, id, request, tryAgain), refresh);
working = true;
@@ -262,7 +263,8 @@ function pr_updateStatus(page, div, id, request, tryAgain)
}
if (a.length > 2) { // Multiple status returned
div.innerHTML = LANG.pr_queue_resyncreq + (!processes ? ' ' + LANG.pr_queue_noprocess : '') + '<br />' + $WH.sprintf(LANG['pr_queue_batch'], statusTotal[1], statusTotal[2], statusTotal[3], statusTotal[4]);
div.innerHTML = '<a id="close-profiler-notification" class="announcement-close" href="javascript:;" onclick="$(\'.profiler-message\').hide(); return false;">';
div.innerHTML += LANG.pr_queue_resyncreq + (!processes ? ' ' + LANG.pr_queue_noprocess : '') + '<br />' + $WH.sprintf(LANG['pr_queue_batch'], statusTotal[1], statusTotal[2], statusTotal[3], statusTotal[4]);
}
}
});
@@ -277,7 +279,7 @@ function pr_resyncRoster(id, mode)
div.style.display = '';
new Ajax(
'/' + mode + '=resync&id=' + id + '&profile',
'?' + mode + '=resync&id=' + id + '&profile',
{
method: 'POST',
onSuccess: function(xhr, opt)
@@ -302,28 +304,46 @@ function pr_initRosterListview() {
this.mode = 1;
this.createCbControls = function (c, b) {
if (!b && this.data.length < 15) {
return
return;
}
var a = $WH.ce("input");
a.type = "button";
a.value = LANG.button_resync;
a.onclick = (function () {
var e = this.getCheckedRows();
if (!e.length) {
alert(LANG.message_nocharacterselected)
} else {
var d = "";
$WH.array_walk(e, function (f) {
d += f.id + ","
var
iSelectAll = $WH.ce('input'),
iDeselect = $WH.ce('input'),
iResync = $WH.ce('input');
iSelectAll.type = iDeselect.type = iResync.type = 'button';
iSelectAll.value = LANG.button_selectall;
iDeselect.value = LANG.button_deselect;
iResync.value = LANG.button_resync;
iSelectAll.onclick = Listview.cbSelect.bind(this, true);
iDeselect.onclick = Listview.cbSelect.bind(this, false);
iResync.onclick = (function () {
var rows = this.getCheckedRows();
if (!rows.length) {
alert(LANG.message_nocharacterselected);
}
else {
var buff = '';
$WH.array_walk(rows, function (x) {
buff += x.id + ',';
});
d = $WH.rtrim(d, ",");
if (d != "") {
new Ajax("?profile=resync&id=" + d)
} (Listview.cbSelect.bind(this, false))();
alert(LANG.message_characterresync)
buff = $WH.rtrim(buff, ',');
if (buff != '') {
new Ajax('?profile=resync&id=' + buff);
}
(Listview.cbSelect.bind(this, false))();
alert(LANG.message_characterresync);
}
}).bind(this);
$WH.ae(c, a)
$WH.ae(c, iSelectAll);
$WH.ae(c, iDeselect);
$WH.ae(c, iResync);
}
}
}
@@ -391,18 +411,13 @@ function pr_getGearScoreQuality(level, gearScore, relics, slotId, use2h)
totalMod *= 2;
}
if(level > 80)
baseScore = ((level - 80) * 12) + 293;
else if(level > 70)
baseScore = ((level - 70) * 6) + 140;
if(level > 70)
baseScore = ((level - 70) * 9.5) + 105;
else if(level > 60)
baseScore = ((level - 60) * 4) + 80;
baseScore = ((level - 60) * 4.5) + 60;
else
baseScore = level + 5;
if(level <= 80)
baseScore *= 1.2;
if(gearScore >= baseScore * totalMod * 1.25)
quality = 5; // Legendary
else
@@ -627,7 +642,8 @@ function pr_onBreadcrumbUpdate() // Add character lookup textbox to the breadcru
function pr_DirectLookup(form, browse)
{
var region = $('*[name="rg"]', form),
var
region = $('*[name="rg"]', form),
server = $('*[name="sv"]', form),
name = $('*[name="na"]', form),
usePath;
@@ -638,7 +654,7 @@ function pr_DirectLookup(form, browse)
if(browse)
{
if(region.val() || server.val() || name.val())
location.href = '?profiles' + (region.val() ? '=' + region.val() + (server.val() ? '.' + g_urlize(server.val(), false, true) : '') : '') + (name.val() ? '?filter=na=' + name.val() + ';ex=on' : '');
location.href = '?profiles' + (region.val() ? '=' + region.val() + (server.val() ? '.' + g_urlize(server.val(), false, true) : '') : '') + (name.val() ? '&filter=na=' + name.val() + ';ex=on' : '');
return false;
}