mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Profiler/Prep:
* misc changes from profiler branch. No real changes on its own
This commit is contained in:
@@ -53,10 +53,15 @@ class AjaxHandler
|
||||
return $this->contentType;
|
||||
}
|
||||
|
||||
protected function checkEmptySet($val)
|
||||
{
|
||||
return $val === ''; // parameter is expected to be empty
|
||||
}
|
||||
|
||||
protected function checkLocale($val)
|
||||
{
|
||||
if (preg_match('/^'.implode('|', array_keys(array_filter(Util::$localeStrings))).'$/', $val))
|
||||
return intVal($val);
|
||||
return intval($val);
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -64,9 +69,23 @@ class AjaxHandler
|
||||
protected function checkInt($val)
|
||||
{
|
||||
if (preg_match('/^-?\d+$/', $val))
|
||||
return intVal($val);
|
||||
return intval($val);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
protected function checkIdList($val)
|
||||
{
|
||||
if (preg_match('/^-?\d+(,-?\d+)*$/', $val))
|
||||
return array_map('intval', explode(',', $val));
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
protected function checkFulltext($val)
|
||||
{
|
||||
// trim non-printable chars
|
||||
return preg_replace('/[\p{C}]/ui', '', $val);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -10,7 +10,7 @@ class AjaxAccount extends AjaxHandler
|
||||
// 'groups' => [FILTER_CALLBACK, ['options' => 'AjaxHandler::checkInt']],
|
||||
'save' => [FILTER_SANITIZE_NUMBER_INT, null],
|
||||
'delete' => [FILTER_SANITIZE_NUMBER_INT, null],
|
||||
'id' => [FILTER_CALLBACK, ['options' => 'AjaxHandler::checkInt']],
|
||||
'id' => [FILTER_CALLBACK, ['options' => 'AjaxHandler::checkIdList']],
|
||||
'name' => [FILTER_CALLBACK, ['options' => 'AjaxAccount::checkName']],
|
||||
'scale' => [FILTER_CALLBACK, ['options' => 'AjaxAccount::checkScale']],
|
||||
);
|
||||
@@ -52,7 +52,7 @@ class AjaxAccount extends AjaxHandler
|
||||
|
||||
$id = 0;
|
||||
|
||||
if ($id = $this->_post['id'])
|
||||
if ($this->_post['id'] && ($id = $this->_post['id'][0]))
|
||||
{
|
||||
if (!DB::Aowow()->selectCell('SELECT 1 FROM ?_account_weightscales WHERE userId = ?d AND id = ?d', User::$id, $id))
|
||||
return 0;
|
||||
@@ -81,8 +81,8 @@ class AjaxAccount extends AjaxHandler
|
||||
|
||||
return $id;
|
||||
}
|
||||
else if ($this->_post['delete'] && $this->_post['id'])
|
||||
DB::Aowow()->query('DELETE FROM ?_account_weightscales WHERE id = ?d AND userId = ?d', $this->_post['id'], User::$id);
|
||||
else if ($this->_post['delete'] && $this->_post['id'] && $this->_post['id'][0])
|
||||
DB::Aowow()->query('DELETE FROM ?_account_weightscales WHERE id = ?d AND userId = ?d', $this->_post['id'][0], User::$id);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ class AjaxData extends AjaxHandler
|
||||
// &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 = $this->_get['catg'] ?: 'null';
|
||||
$catg = isset($this->_get['catg']) ? $this->_get['catg'] : 'null';
|
||||
if ($catg == 'null')
|
||||
$result .= $this->loadProfilerData($set);
|
||||
else if ($this->_get['callback'])
|
||||
@@ -79,7 +79,7 @@ class AjaxData extends AjaxHandler
|
||||
|
||||
break;
|
||||
// locale independant
|
||||
case 'quick-excludes': // generated per character in profiler
|
||||
case 'quick-excludes':
|
||||
case 'zones':
|
||||
case 'weight-presets':
|
||||
case 'item-scaling':
|
||||
@@ -94,6 +94,7 @@ class AjaxData extends AjaxHandler
|
||||
case 'talents':
|
||||
if ($_ = $this->_get['class'])
|
||||
$set .= "-".$_;
|
||||
case 'achievements':
|
||||
case 'pet-talents':
|
||||
case 'glyphs':
|
||||
case 'gems':
|
||||
@@ -113,12 +114,12 @@ class AjaxData extends AjaxHandler
|
||||
return $result;
|
||||
}
|
||||
|
||||
private function checkSkill($val)
|
||||
protected function checkSkill($val)
|
||||
{
|
||||
return array_intersect([171, 164, 333, 202, 182, 773, 755, 165, 186, 393, 197, 185, 129, 356], explode(',', $val));
|
||||
}
|
||||
|
||||
private function checkCallback($val)
|
||||
protected function checkCallback($val)
|
||||
{
|
||||
return substr($val, 0, 29) == '$WowheadProfiler.loadOnDemand';
|
||||
}
|
||||
|
||||
@@ -97,6 +97,7 @@ class Game
|
||||
'meta', 'red', 'yellow', 'blue'
|
||||
);
|
||||
|
||||
// 'replicates' $WH.g_statToJson
|
||||
public static $itemMods = array( // zero-indexed; "mastrtng": unused mastery; _[a-z] => taken mods..
|
||||
'dmg', 'mana', 'health', 'agi', 'str', 'int', 'spi',
|
||||
'sta', 'energy', 'rage', 'focus', 'runicpwr', 'defrtng', 'dodgertng',
|
||||
@@ -119,9 +120,12 @@ class Game
|
||||
if (($mask & 0x1C000) == 0x1C000) // special case resilience
|
||||
return ITEM_MOD_RESILIENCE_RATING;
|
||||
|
||||
if (($mask & 0x00E0) == 0x00E0) // special case hit rating
|
||||
if (($mask & 0x00E0) == 0x00E0) // hit rating - all subcats (mle, rgd, spl)
|
||||
return ITEM_MOD_HIT_RATING;
|
||||
|
||||
if (($mask & 0x0700) == 0x0700) // crit rating - all subcats (mle, rgd, spl)
|
||||
return ITEM_MOD_CRIT_RATING;
|
||||
|
||||
for ($j = 0; $j < count(self::$combatRatingToItemMod); $j++)
|
||||
{
|
||||
if (!self::$combatRatingToItemMod[$j])
|
||||
|
||||
@@ -133,7 +133,7 @@ class ClassPage extends GenericPage
|
||||
$genSpells = new SpellList($conditions);
|
||||
if (!$genSpells->error)
|
||||
{
|
||||
$this->extendGlobalData($genSpells->getJSGlobals(GLOBALINFO_SELF));
|
||||
$this->extendGlobalData($genSpells->getJSGlobals(GLOBALINFO_SELF | GLOBALINFO_RELATED));
|
||||
|
||||
$this->lvTabs[] = ['spell', array(
|
||||
'data' => array_values($genSpells->getListviewData()),
|
||||
|
||||
@@ -32,7 +32,6 @@ trait DetailPage
|
||||
return implode('_', $key);
|
||||
}
|
||||
|
||||
|
||||
protected function applyCCErrors()
|
||||
{
|
||||
if (!empty($_SESSION['error']['co']))
|
||||
@@ -253,7 +252,7 @@ class GenericPage
|
||||
/* Prepare Page */
|
||||
/****************/
|
||||
|
||||
private function prepareContent() // get from cache ?: run generators
|
||||
protected function prepareContent() // get from cache ?: run generators
|
||||
{
|
||||
if (!$this->loadCache())
|
||||
{
|
||||
@@ -415,8 +414,8 @@ class GenericPage
|
||||
'mode' => 1,
|
||||
'status' => 1,
|
||||
'name' => 'internal error',
|
||||
'style' => 'padding-left: 40px; background-image: url('.STATIC_URL.'/images/announcements/warn-small.png); background-size: 15px 15px; background-position: 12px center; border: dashed 2px #C03030;',
|
||||
'text' => '[span id=inputbox-error]'.implode("[br]", $_).'[/span]',
|
||||
'style' => 'color: #ff3333; font-weight: bold; font-size: 14px; padding-left: 40px; background-image: url('.STATIC_URL.'/images/announcements/warn-small.png); background-size: 15px 15px; background-position: 12px center; border: dashed 2px #C03030;',
|
||||
'text' => '[span]'.implode("[br]", $_).'[/span]'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,11 +21,6 @@ if (!defined('AOWOW_REVISION'))
|
||||
]
|
||||
else
|
||||
=> listviews
|
||||
|
||||
todo 26: Listview - template: 'profile', id: 'characters', name: LANG.tab_characters, visibleCols: ['race','classs','level','talents','gearscore','achievementpoints'],
|
||||
27: Profiles..?
|
||||
28: Guilds..?
|
||||
29: Arena Teams..?
|
||||
*/
|
||||
|
||||
|
||||
@@ -1379,11 +1374,6 @@ class SearchPage extends GenericPage
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// private function _searchCharacter($cndBase) { } // 28 Characters $searchMask & 0x10000000
|
||||
// private function _searchGuild($cndBase) { } // 29 Guilds $searchMask & 0x20000000
|
||||
// private function _searchArenaTeam($cndBase) { } // 30 Arena Teams $searchMask & 0x40000000
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -1466,7 +1466,7 @@ class SpellPage extends GenericPage
|
||||
$subClass = $this->subject->getField('equippedItemSubClassMask');
|
||||
$invType = $this->subject->getField('equippedItemInventoryTypeMask');
|
||||
|
||||
if ($class <= 0 || $subClass <= 0)
|
||||
if ($class <= 0)
|
||||
return;
|
||||
|
||||
$title = ['Class: '.$class, 'SubClass: '.Util::asHex($subClass)];
|
||||
@@ -1478,13 +1478,13 @@ class SpellPage extends GenericPage
|
||||
if ($invType & (1 << INVTYPE_ROBE)) // Robe => Chest
|
||||
{
|
||||
$invType &= ~(1 << INVTYPE_ROBE);
|
||||
$invType &= (1 << INVTYPE_CHEST);
|
||||
$invType |= (1 << INVTYPE_CHEST);
|
||||
}
|
||||
|
||||
if ($invType & (1 << INVTYPE_RANGEDRIGHT)) // Ranged2 => Ranged
|
||||
{
|
||||
$invType &= ~(1 << INVTYPE_RANGEDRIGHT);
|
||||
$invType &= (1 << INVTYPE_RANGED);
|
||||
$invType |= (1 << INVTYPE_RANGED);
|
||||
}
|
||||
|
||||
$_ = [];
|
||||
@@ -1539,6 +1539,7 @@ class SpellPage extends GenericPage
|
||||
|
||||
$effId = (int)$this->subject->getField('effect'.$i.'Id');
|
||||
$effMV = (int)$this->subject->getField('effect'.$i.'MiscValue');
|
||||
$effMVB = (int)$this->subject->getField('effect'.$i.'MiscValueB');
|
||||
$effBP = (int)$this->subject->getField('effect'.$i.'BasePoints');
|
||||
$effDS = (int)$this->subject->getField('effect'.$i.'DieSides');
|
||||
$effRPPL = $this->subject->getField('effect'.$i.'RealPointsPerLevel');
|
||||
@@ -1642,7 +1643,7 @@ class SpellPage extends GenericPage
|
||||
case 137: // Energize Pct
|
||||
$_ = Lang::spell('powerTypes', $effMV);
|
||||
if ($_ && User::isInGroup(U_GROUP_EMPLOYEE))
|
||||
$_ = sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_);
|
||||
$_ = sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, $_);
|
||||
else if (!$_)
|
||||
$_ = $effMV;
|
||||
|
||||
@@ -1672,7 +1673,7 @@ class SpellPage extends GenericPage
|
||||
case 33: // Open Lock
|
||||
$_ = $effMV ? Lang::spell('lockType', $effMV) : $effMV;
|
||||
if ($_ && User::isInGroup(U_GROUP_EMPLOYEE))
|
||||
$_ = sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_);
|
||||
$_ = sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, $_);
|
||||
else if (!$_)
|
||||
$_ = $effMV;
|
||||
|
||||
@@ -1691,7 +1692,7 @@ class SpellPage extends GenericPage
|
||||
case 126: // Steal Aura
|
||||
$_ = Lang::game('dt', $effMV);
|
||||
if ($_ && User::isInGroup(U_GROUP_EMPLOYEE))
|
||||
$_ = sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_);
|
||||
$_ = sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, $_);
|
||||
else if (!$_)
|
||||
$_ = $effMV;
|
||||
|
||||
@@ -1700,7 +1701,7 @@ class SpellPage extends GenericPage
|
||||
case 39: // Learn Language
|
||||
$_ = Lang::game('languages', $effMV);
|
||||
if ($_ && User::isInGroup(U_GROUP_EMPLOYEE))
|
||||
$_ = sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_);
|
||||
$_ = sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, $_);
|
||||
else if (!$_)
|
||||
$_ = $effMV;
|
||||
|
||||
@@ -1743,7 +1744,7 @@ class SpellPage extends GenericPage
|
||||
default; $_ = '';
|
||||
}
|
||||
if (User::isInGroup(U_GROUP_EMPLOYEE))
|
||||
$_ = sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_);
|
||||
$_ = sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, $_);
|
||||
else
|
||||
$_ = $effMV;
|
||||
|
||||
@@ -1752,7 +1753,7 @@ class SpellPage extends GenericPage
|
||||
case 108: // Dispel Mechanic
|
||||
$_ = Lang::game('me', $effMV);
|
||||
if ($_ && User::isInGroup(U_GROUP_EMPLOYEE))
|
||||
$_ = sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_);
|
||||
$_ = sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, $_);
|
||||
else if (!$_)
|
||||
$_ = $effMV;
|
||||
|
||||
@@ -1767,7 +1768,7 @@ class SpellPage extends GenericPage
|
||||
case 146: // Activate Rune
|
||||
$_ = Lang::spell('powerRunes', $effMV);
|
||||
if ($_ && User::isInGroup(U_GROUP_EMPLOYEE))
|
||||
$_ = sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_);
|
||||
$_ = sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, $_);
|
||||
else if (!$_)
|
||||
$_ = $effMV;
|
||||
|
||||
@@ -1816,12 +1817,12 @@ class SpellPage extends GenericPage
|
||||
{
|
||||
case 17: // Mod Stealth Detection
|
||||
if ($_ = Lang::spell('stealthType', $effMV))
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, $_) : $_;
|
||||
|
||||
break;
|
||||
case 19: // Mod Invisibility Detection
|
||||
if ($_ = Lang::spell('invisibilityType', $effMV))
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, $_) : $_;
|
||||
|
||||
break;
|
||||
case 24: // Periodic Energize
|
||||
@@ -1830,7 +1831,7 @@ class SpellPage extends GenericPage
|
||||
case 85: // Mod Power Regeneration
|
||||
case 110: // Mod Power Regeneration Pct
|
||||
if ($_ = Lang::spell('powerTypes', $effMV))
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, $_) : $_;
|
||||
|
||||
break;
|
||||
case 29: // Mod Stat
|
||||
@@ -1847,7 +1848,7 @@ class SpellPage extends GenericPage
|
||||
$_[] = Lang::game('stats', $j);
|
||||
|
||||
if ($_ = implode(', ', $_));
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, $_) : $_;
|
||||
|
||||
break;
|
||||
case 36: // Shapeshift
|
||||
@@ -1862,39 +1863,39 @@ class SpellPage extends GenericPage
|
||||
$infobox[] = Lang::game('type').Lang::main('colon').Lang::game('ct', $st['creatureType']);
|
||||
|
||||
if ($_ = $st['displayName'])
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, $_) : $_;
|
||||
}
|
||||
break;
|
||||
case 37: // Effect immunity
|
||||
if ($_ = Lang::spell('effects', $effMV))
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, $_) : $_;
|
||||
|
||||
break;
|
||||
case 38: // Aura immunity
|
||||
if ($_ = Lang::spell('auras', $effMV))
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, $_) : $_;
|
||||
|
||||
break;
|
||||
case 41: // Dispel Immunity
|
||||
case 178: // Mod Debuff Resistance
|
||||
case 245: // Mod Aura Duration By Dispel
|
||||
if ($_ = Lang::game('dt', $effMV))
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, $_) : $_;
|
||||
|
||||
break;
|
||||
case 44: // Track Creature
|
||||
if ($_ = Lang::game('ct', $effMV))
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, $_) : $_;
|
||||
|
||||
break;
|
||||
case 45: // Track Resource
|
||||
if ($_ = Lang::spell('lockType', $effMV))
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, $_) : $_;
|
||||
|
||||
break;
|
||||
case 75: // Language
|
||||
if ($_ = Lang::game('languages', $effMV))
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, $_) : $_;
|
||||
|
||||
break;
|
||||
case 77: // Mechanic Immunity
|
||||
@@ -1904,7 +1905,7 @@ class SpellPage extends GenericPage
|
||||
case 255: // Mod Mechanic Damage Taken Pct
|
||||
case 276: // Mod Mechanic Damage Done Percent
|
||||
if ($_ = Lang::game('me', $effMV))
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').Util::asHex($effMV), $_) : $_;
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').Util::asHex($effMV), $_) : $_;
|
||||
|
||||
break;
|
||||
case 147: // Mechanic Immunity Mask
|
||||
@@ -1914,7 +1915,7 @@ class SpellPage extends GenericPage
|
||||
$_[] = $str;
|
||||
|
||||
if ($_ = implode(', ', $_))
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').Util::asHex($effMV), $_) : $_;
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').Util::asHex($effMV), $_) : $_;
|
||||
|
||||
break;
|
||||
case 10: // Mod Threat
|
||||
@@ -1954,8 +1955,10 @@ class SpellPage extends GenericPage
|
||||
case 229: // Mod AoE Damage Avoidance
|
||||
case 271: // Mod Damage Percent Taken Form Caster
|
||||
case 310: // Mod Creature AoE Damage Avoidance
|
||||
case 237: // Mod Spell Damage Of Attack Power
|
||||
case 238: // Mod Spell Healing Of Attack Power
|
||||
if ($_ = Lang::getMagicSchools($effMV))
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').Util::asHex($effMV), $_) : $_;
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').Util::asHex($effMV), $_) : $_;
|
||||
|
||||
break;
|
||||
case 30: // Mod Skill
|
||||
@@ -1969,7 +1972,12 @@ class SpellPage extends GenericPage
|
||||
case 107: // Flat Modifier
|
||||
case 108: // Pct Modifier
|
||||
if ($_ = Lang::spell('spellModOp', $effMV))
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, $_) : $_;
|
||||
|
||||
break;
|
||||
case 132: // Mod Increase Energy Percent
|
||||
if ($_ = Lang::spell('powerTypes', $effMV))
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, $_) : $_;
|
||||
|
||||
break;
|
||||
case 189: // Mod Rating
|
||||
@@ -1980,7 +1988,7 @@ class SpellPage extends GenericPage
|
||||
$_[] = $str;
|
||||
|
||||
if ($_ = implode(', ', $_))
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').Util::asHex($effMV), $_) : $_;
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').Util::asHex($effMV), $_) : $_;
|
||||
|
||||
break;
|
||||
case 168: // Mod Damage Done Versus
|
||||
@@ -1994,13 +2002,12 @@ class SpellPage extends GenericPage
|
||||
$_[] = $str;
|
||||
|
||||
if ($_ = implode(', ', $_))
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').Util::asHex($effMV), $_) : $_;
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').Util::asHex($effMV), $_) : $_;
|
||||
|
||||
break;
|
||||
case 249: // Convert Rune
|
||||
$x = $this->subject->getField('effect'.$i.'MiscValueB');
|
||||
if ($_ = Lang::spell('powerRunes', $x))
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$x, $_) : $_;
|
||||
if ($_ = Lang::spell('powerRunes', $effMVB))
|
||||
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'MiscValueB'.Lang::main('colon').$effMVB, $_) : $_;
|
||||
|
||||
break;
|
||||
case 78: // Mounted
|
||||
@@ -2040,9 +2047,9 @@ class SpellPage extends GenericPage
|
||||
$foo['name'] .= strstr($bar, 'href') || strstr($bar, '#') ? $bar : ($bar ? ' ('.$bar.')' : null);
|
||||
|
||||
if (in_array($effAura, [174, 220, 182]))
|
||||
$foo['name'] .= ' ['.sprintf(Util::$dfnString, Lang::game('stats', $this->subject->getField('effect'.$i.'MiscValueB')), $this->subject->getField('effect'.$i.'MiscValueB')).']';
|
||||
else if ($this->subject->getField('effect'.$i.'MiscValueB') > 0)
|
||||
$foo['name'] .= ' ['.$this->subject->getField('effect'.$i.'MiscValueB').']';
|
||||
$foo['name'] .= ' ['.sprintf(Util::$dfnString, 'MiscValueB'.Lang::main('colon').$effMVB, Lang::game('stats', $effMVB)).']';
|
||||
else if ($effMVB > 0)
|
||||
$foo['name'] .= ' ['.$effMVB.']';
|
||||
|
||||
}
|
||||
else if ($effAura > 0)
|
||||
|
||||
@@ -405,15 +405,15 @@ class SpellsPage extends GenericPage
|
||||
$hiddenCols[] = 'skill';
|
||||
if (($mask & 0x4))
|
||||
$visibleCols[] = 'trainingcost';
|
||||
if (($mask & 0x8) && !in_array('singleclass', $visibleCols))
|
||||
if (($mask & 0x8) && !in_array('classes', $visibleCols))
|
||||
$visibleCols[] = 'singleclass';
|
||||
|
||||
|
||||
if ($visibleCols)
|
||||
$tabData['visibleCols'] = $visibleCols;
|
||||
$tabData['visibleCols'] = array_unique($visibleCols);
|
||||
|
||||
if ($hiddenCols)
|
||||
$tabData['hiddenCols'] = $hiddenCols;
|
||||
$tabData['hiddenCols'] = array_unique($hiddenCols);
|
||||
|
||||
$this->lvTabs[] = ['spell', $tabData];
|
||||
|
||||
|
||||
@@ -20,14 +20,13 @@ if (!CLI)
|
||||
|
||||
foreach ($scales as $s)
|
||||
{
|
||||
$weights = DB::Aowow()->selectCol('SELECT field AS ARRAY_KEY, val FROM ?_account_weightscale_data WHERE id = ?d', $s['id']);
|
||||
if (!$weights)
|
||||
if ($weights = DB::Aowow()->selectCol('SELECT field AS ARRAY_KEY, val FROM ?_account_weightscale_data WHERE id = ?d', $s['id']))
|
||||
$wtPresets[$s['class']]['pve'][$s['name']] = array_merge(['__icon' => $s['icon']], $weights);
|
||||
else
|
||||
{
|
||||
CLISetup::log('WeightScale \''.CLISetup::bold($s['name']).'\' has no data set. Skipping...', CLISetup::LOG_WARN);
|
||||
continue;
|
||||
$wtPresets[$s['class']]['pve'][$s['name']] = ['__icon' => $s['icon']];
|
||||
}
|
||||
|
||||
$wtPresets[$s['class']]['pve'][$s['name']] = array_merge(['__icon' => $s['icon']], $weights);
|
||||
}
|
||||
|
||||
$toFile = "var wt_presets = ".Util::toJSON($wtPresets).";";
|
||||
|
||||
@@ -15,10 +15,25 @@ function talents()
|
||||
{
|
||||
// class: 0 => hunter pets
|
||||
for ($i = 1; $i < 6; $i++)
|
||||
DB::Aowow()->query(
|
||||
'REPLACE INTO ?_talents SELECT t.id, IF(tt.classMask <> 0, LOG(2, tt.classMask) + 1, 0), IF(tt.creaturefamilyMask <> 0, LOG(2, tt.creaturefamilyMask), tt.tabNumber), t.row, t.column, t.rank?d, ?d FROM dbc_talenttab tt JOIN dbc_talent t ON tt.id = t.tabId WHERE t.rank?d <> 0',
|
||||
$i, $i, $i
|
||||
);
|
||||
DB::Aowow()->query('
|
||||
REPLACE INTO
|
||||
?_talents
|
||||
SELECT
|
||||
t.id,
|
||||
IF(tt.classMask <> 0, LOG(2, tt.classMask) + 1, 0),
|
||||
tt.creatureFamilyMask,
|
||||
IF(tt.creaturefamilyMask <> 0, LOG(2, tt.creaturefamilyMask), tt.tabNumber),
|
||||
t.row,
|
||||
t.column,
|
||||
t.rank?d,
|
||||
?d
|
||||
FROM
|
||||
dbc_talenttab tt
|
||||
JOIN
|
||||
dbc_talent t ON tt.id = t.tabId
|
||||
WHERE
|
||||
t.rank?d <> 0
|
||||
', $i, $i, $i);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
}
|
||||
else if (node.tagName == 'INPUT') // string or numeric
|
||||
{
|
||||
if (node.value && node.value.search(/[^\d\s\/\*\-\+\.]/i) == -1)
|
||||
if (node.value && node.value.search(/[^\d\s\/\*\-\+\.]/i) == -1 && node.value.split('.').length < 3)
|
||||
node.value = eval(node.value);
|
||||
|
||||
value = node.value;
|
||||
|
||||
Reference in New Issue
Block a user