mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Types:
- added some more lasses for (for now) static use Achievements: - moved setup to separate file (not included yet (and shouldn't have been)) - unified use of the infobox.tpl Items: - Tooltip-layout changes, when used as standalone or incorporated in other tooltips. This can now be considered. Util: - added utf8-safe Util::ucFirst() - added Lang::getRequiredItems() for use with spell - equippedItem[Sub]Class Templates: - minor wording fix (link -> links) Markup: - [class=X], [race=X], [money=X] added (i really shouldn't have done this) - [color=X] now also accepts r1 - r4 as parameter obligatory minor stuff here and there
This commit is contained in:
@@ -259,125 +259,6 @@ class AchievementList extends BaseType
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
// run once .. should this even be here..?
|
||||
public function setupAchievements()
|
||||
{
|
||||
set_time_limit(120);
|
||||
|
||||
// add serverside achievements
|
||||
DB::Aowow()->Query(
|
||||
"INSERT IGNORE INTO
|
||||
?_achievement
|
||||
SELECT
|
||||
ID,
|
||||
requiredFaction,
|
||||
mapID,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
points,
|
||||
0,
|
||||
0,
|
||||
'',
|
||||
flags,
|
||||
count,
|
||||
refAchievement,
|
||||
'',
|
||||
0x10,
|
||||
CONCAT('SERVERSIDE (', ID, ')'),
|
||||
CONCAT('SERVERSIDE (', ID, ')'),
|
||||
CONCAT('SERVERSIDE (', ID, ')'),
|
||||
CONCAT('SERVERSIDE (', ID, ')'),
|
||||
CONCAT('SERVERSIDE (', ID, ')'),
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
''
|
||||
FROM
|
||||
world.achievement_dbc"
|
||||
);
|
||||
|
||||
while ($this->iterate())
|
||||
{
|
||||
// set iconString
|
||||
$icon = DB::Aowow()->SelectCell('SELECT iconname FROM ?_spellicons WHERE id = ?d', $this->curTpl['iconId']);
|
||||
|
||||
// set parentCat
|
||||
$parentCat = DB::Aowow()->SelectCell('SELECT parentCategory FROM ?_achievementcategory WHERE Id = ?d', $this->curTpl['category']);
|
||||
|
||||
// series parent(16) << child(16)
|
||||
$series = $this->curTpl['parent'] << 16;
|
||||
$series |= DB::Aowow()->SelectCell('SELECT Id FROM ?_achievement WHERE parent = ?d', $acv->id);
|
||||
|
||||
// set rewards
|
||||
$rewardIds = [];
|
||||
if ($rStr = $this->curTpl['reward_loc0'])
|
||||
{
|
||||
|
||||
// i can haz title?
|
||||
if (stristr($rStr, 'title reward:') || stristr($rStr, 'title:'))
|
||||
{
|
||||
$rStr = explode(':', $rStr); // head-b-gone
|
||||
$rStr = str_replace('The Grand' ,'Grand', $rStr);
|
||||
$rStr = explode('.', $rStr[1]); // Crusader + Crap
|
||||
$rStr = explode('/', $rStr[0]); // Matron & Patron
|
||||
$rStr = explode(' or ', $rStr[0]); // Alliance & Horde
|
||||
|
||||
$rewardIds[] = DB::Aowow()->SelectCell('SELECT -Id FROM ?_titles WHERE name_loc0 LIKE ?s', '%'.trim($rStr[0]).'%');
|
||||
if (isset($rStr[1]))
|
||||
$rewardIds[] = DB::Aowow()->SelectCell('SELECT -Id FROM ?_titles WHERE name_loc0 LIKE ?s', '%'.trim($rStr[1]).'%');
|
||||
}
|
||||
else if (stristr($rStr, 'reward:')) // i haz item
|
||||
{
|
||||
if (in_array($acv->id, [3656, 3478])) // Pilgrim
|
||||
{
|
||||
$rewardIds[] = -168;
|
||||
$rewardIds[] = 44810;
|
||||
}
|
||||
else if (in_array($acv->id, [1681, 1682])) // Loremaster
|
||||
{
|
||||
$rewardIds[] = -125;
|
||||
$rewardIds[] = 43300;
|
||||
}
|
||||
else
|
||||
{
|
||||
$rStr = explode(':', $rStr)[1]; // head-b-gone
|
||||
$rewardIds[] = DB::Aowow()->SelectCell('SELECT entry FROM item_template WHERE name LIKE ?s', '%'.Util::sqlEscape(trim($rStr)));
|
||||
|
||||
if ($acv->id == 1956) // higher learning
|
||||
$rewardIds[] = 44738; // pet not in description
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
continue;
|
||||
|
||||
DB::Aowow()->Query(
|
||||
'UPDATE
|
||||
?_achievement
|
||||
SET
|
||||
rewardIds = ?s,
|
||||
series = ?s,
|
||||
parentCat = ?d,
|
||||
iconString = ?s
|
||||
WHERE
|
||||
Id = ?d',
|
||||
$series,
|
||||
isset($rewardIds) ? implode(' ', $rewardIds) : '',
|
||||
$parentCat,
|
||||
$icon,
|
||||
$acv->id
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -36,7 +36,8 @@ class CharRaceList extends BaseType
|
||||
if (!isset($refs['gRaces']))
|
||||
$refs['gRaces'] = [];
|
||||
|
||||
$refs['gRaces'][$this->id] = Util::jsEscape($this->getField('name', true));
|
||||
while ($this->iterate())
|
||||
$refs['gRaces'][$this->id] = ['name' => $this->getField('name', true)];
|
||||
}
|
||||
|
||||
public function addRewardsToJScript(&$ref) { }
|
||||
|
||||
38
includes/class.creature.php
Normal file
38
includes/class.creature.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
if (!defined('AOWOW_REVISION'))
|
||||
die('illegal access');
|
||||
|
||||
|
||||
class CreatureList extends BaseType
|
||||
{
|
||||
public static function getName($id)
|
||||
{
|
||||
$n = DB::Aowow()->SelectRow('
|
||||
SELECT
|
||||
name,
|
||||
name_loc2,
|
||||
name_loc3,
|
||||
name_loc6,
|
||||
name_loc8
|
||||
FROM
|
||||
creature_template ct
|
||||
LEFT JOIN
|
||||
locales_creature lc
|
||||
ON
|
||||
lc.entry = ct.entry
|
||||
WHERE
|
||||
ct.entry = ?d',
|
||||
$id
|
||||
);
|
||||
return Util::localizedString($n, 'name');
|
||||
}
|
||||
|
||||
public function getListviewData() { }
|
||||
public function addGlobalsToJScript(&$refs) { }
|
||||
public function addRewardsToJScript(&$refs) { }
|
||||
public function renderTooltip() { }
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
38
includes/class.gameobject.php
Normal file
38
includes/class.gameobject.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
if (!defined('AOWOW_REVISION'))
|
||||
die('illegal access');
|
||||
|
||||
|
||||
class GameObjectList extends BaseType
|
||||
{
|
||||
public static function getName($id)
|
||||
{
|
||||
$n = DB::Aowow()->SelectRow('
|
||||
SELECT
|
||||
name,
|
||||
name_loc2,
|
||||
name_loc3,
|
||||
name_loc6,
|
||||
name_loc8
|
||||
FROM
|
||||
gameobject_template gt
|
||||
LEFT JOIN
|
||||
locales_gameobject lg
|
||||
ON
|
||||
lg.entry = gt.entry
|
||||
WHERE
|
||||
gt.entry = ?d',
|
||||
$id
|
||||
);
|
||||
return Util::localizedString($n, 'name');
|
||||
}
|
||||
|
||||
public function getListviewData() { }
|
||||
public function addGlobalsToJScript(&$refs) { }
|
||||
public function addRewardsToJScript(&$refs) { }
|
||||
public function renderTooltip() { }
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -14,7 +14,7 @@ class ItemList extends BaseType
|
||||
|
||||
private $ssd = [];
|
||||
|
||||
protected $setupQuery = 'SELECT *, i.entry AS ARRAY_KEY FROM item_template i LEFT JOIN ?_item_template_addon iX ON i.entry = iX.id LEFT JOIN locales_item l ON i.entry = l.entry WHERE [filter] [cond] GROUP BY i.entry ORDER BY i.Quality DESC';
|
||||
protected $setupQuery = 'SELECT *, i.entry AS ARRAY_KEY FROM item_template i LEFT JOIN ?_item_template_addon iX ON i.entry = iX.id LEFT JOIN locales_item l ON i.entry = l.entry WHERE [filter] [cond] ORDER BY i.Quality DESC';
|
||||
protected $matchQuery = 'SELECT COUNT(1) FROM item_template i LEFT JOIN ?_item_template_addon iX ON i.entry = iX.id LEFT JOIN locales_item l ON i.entry = l.entry WHERE [filter] [cond]';
|
||||
|
||||
public function __construct($conditions, $pieceToSet = null)
|
||||
@@ -181,8 +181,9 @@ class ItemList extends BaseType
|
||||
gems: array (:-separated itemIds)
|
||||
rand: >0: randomPropId; <0: randomSuffixId
|
||||
interactive (set to place javascript/anchors to manipulate level and ratings or link to filters (static tooltips vs popup tooltip))
|
||||
subT (tabled layout doesn't work if used as sub-tooltip in other item or spell tooltips; use line-break instead)
|
||||
*/
|
||||
public function renderTooltip($enhance = [], $interactive = false)
|
||||
public function renderTooltip($enhance = [], $interactive = false, $subT = false)
|
||||
{
|
||||
if ($this->error)
|
||||
return;
|
||||
@@ -218,9 +219,13 @@ class ItemList extends BaseType
|
||||
$x = '';
|
||||
|
||||
// upper table: stats
|
||||
if (!$subT)
|
||||
$x .= '<table><tr><td>';
|
||||
|
||||
// name; quality
|
||||
if ($subT)
|
||||
$x .= '<span class="q'.$this->curTpl['Quality'].'"><a href="?item='.$this->id.'">'.$name.'</a></span>';
|
||||
else
|
||||
$x .= '<b class="q'.$this->curTpl['Quality'].'">'.$name.'</b>';
|
||||
|
||||
// heroic tag
|
||||
@@ -259,18 +264,18 @@ class ItemList extends BaseType
|
||||
else if ($this->curTpl['ItemLimitCategory'])
|
||||
{
|
||||
$limit = DB::Aowow()->selectRow("SELECT * FROM ?_itemlimitcategory WHERE id = ?", $this->curTpl['ItemLimitCategory']);
|
||||
$x .= '<br />'.($limit['isGem'] ? Lang::$item['uniqueEquipped'] : Lang::$item['unique']).': '.Util::localizedString($limit, 'name').' ('.$limit['count'].')';
|
||||
$x .= '<br />'.($limit['isGem'] ? Lang::$item['uniqueEquipped'] : Lang::$item['unique']).Lang::$colon.Util::localizedString($limit, 'name').' ('.$limit['count'].')';
|
||||
}
|
||||
|
||||
// max duration
|
||||
if ($this->curTpl['duration'] > 0)
|
||||
$x .= "<br />".Lang::$item['duration'] . ' '. Util::formatTime($this->curTpl['duration'] * 1000) . ($this->curTpl['duration'] < 0 ? ' ('.Lang::$game['realTime'].')' : null);
|
||||
$x .= "<br />".Lang::$game['duration'] . ' '. Util::formatTime($this->curTpl['duration'] * 1000) . ($this->curTpl['duration'] < 0 ? ' ('.Lang::$game['realTime'].')' : null);
|
||||
|
||||
// required holiday
|
||||
if ($this->curTpl['HolidayId'])
|
||||
{
|
||||
$hDay = DB::Aowow()->selectRow("SELECT * FROM ?_holidays WHERE id = ?", $this->curTpl['HolidayId']);
|
||||
$x .= '<br />'.Lang::$game['requires'].' <a href="'.$this->curTpl['HolidayId'].'">'.Util::localizedString($hDay, 'name').'</a>';
|
||||
$x .= '<br />'.sprintf(Lang::$game['requires'], '<a href="'.$this->curTpl['HolidayId'].'">'.Util::localizedString($hDay, 'name').'</a>');
|
||||
}
|
||||
|
||||
// maxcount
|
||||
@@ -300,7 +305,7 @@ class ItemList extends BaseType
|
||||
|
||||
// Subclass
|
||||
if ($this->curTpl['class'] == ITEM_CLASS_ARMOR && $this->curTpl['subclass'] > 0)
|
||||
$x .= '<th><!--asc'.$this->curTpl['subclass'].'-->'.Lang::$item['armorSubclass'][$this->curTpl['subclass']].'</th>';
|
||||
$x .= '<th><!--asc'.$this->curTpl['subclass'].'-->'.Lang::$item['armorSubClass'][$this->curTpl['subclass']].'</th>';
|
||||
else if ($this->curTpl['class'] == ITEM_CLASS_WEAPON)
|
||||
$x .= '<th>'.Lang::$item['weaponSubClass'][$this->curTpl['subclass']].'</th>';
|
||||
else if ($this->curTpl['class'] == ITEM_CLASS_AMMUNITION)
|
||||
@@ -469,7 +474,7 @@ class ItemList extends BaseType
|
||||
if ($this->curTpl['socketBonus'])
|
||||
{
|
||||
$sbonus = DB::Aowow()->selectRow('SELECT * FROM ?_itemenchantment WHERE Id = ?d', $this->curTpl['socketBonus']);
|
||||
$x .= '<span class="q'.($hasMatch ? '2' : '0').'">'.Lang::$item['socketBonus'].': '.Util::localizedString($sbonus, 'text').'</span><br />';
|
||||
$x .= '<span class="q'.($hasMatch ? '2' : '0').'">'.Lang::$item['socketBonus'].Lang::$colon.Util::localizedString($sbonus, 'text').'</span><br />';
|
||||
}
|
||||
|
||||
// durability
|
||||
@@ -478,15 +483,15 @@ class ItemList extends BaseType
|
||||
|
||||
// required classes
|
||||
if ($classes = Lang::getClassString($this->curTpl['AllowableClass']))
|
||||
$x .= Lang::$game['classes'].': '.$classes.'<br />';
|
||||
$x .= Lang::$game['classes'].Lang::$colon.$classes.'<br />';
|
||||
|
||||
// required races
|
||||
if ($races = Lang::getRaceString($this->curTpl['AllowableRace']))
|
||||
$x .= Lang::$game['races'].': '.$races['name'].'<br />';
|
||||
$x .= Lang::$game['races'].Lang::$colon.$races['name'].'<br />';
|
||||
|
||||
// required honorRank (not used anymore)
|
||||
if ($this->curTpl['requiredhonorrank'])
|
||||
$x .= Lang::$game['requires'].': '.Lang::$game['pvpRank'][$this->curTpl['requiredhonorrank']].'<br />';
|
||||
$x .= sprintf(Lang::$game['requires'], Lang::$game['pvpRank'][$this->curTpl['requiredhonorrank']]).'<br />';
|
||||
|
||||
// required CityRank..?
|
||||
// what the f..
|
||||
@@ -503,19 +508,20 @@ class ItemList extends BaseType
|
||||
// required skill
|
||||
if ($this->curTpl['RequiredSkill'])
|
||||
{
|
||||
$skillText = DB::Aowow()->selectRow('SELECT * FROM ?_skill WHERE skillID = ?d', $this->curTpl['RequiredSkill']);
|
||||
$x .= '<br />'.Lang::$game['requires'].' <a class="q1" href="?skill='.$this->curTpl['RequiredSkill'].'">'.Util::localizedString($skillText, 'name').'</a>';
|
||||
$_ = '<a class="q1" href="?skill='.$this->curTpl['RequiredSkill'].'">'.SkillList::getName($this->curTpl['RequiredSkill']).'</a>';
|
||||
if ($this->curTpl['RequiredSkillRank'])
|
||||
$x .= ' ('.$this->curTpl['RequiredSkillRank'].')';
|
||||
$_ .= ' ('.$this->curTpl['RequiredSkillRank'].')';
|
||||
|
||||
$x .= '<br />'.sprintf(Lang::$game['requires'], $_);
|
||||
}
|
||||
|
||||
// required spell
|
||||
if ($this->curTpl['requiredspell'])
|
||||
$x .= '<br />'.Lang::$game['requires'].' <a class="q1" href="?spell='.$this->curTpl['requiredspell'].'">'.SpellList::getName($this->curTpl['requiredspell']).'</a>';
|
||||
$x .= '<br />'.Lang::$game['requires2'].' <a class="q1" href="?spell='.$this->curTpl['requiredspell'].'">'.SpellList::getName($this->curTpl['requiredspell']).'</a>';
|
||||
|
||||
// required reputation w/ faction
|
||||
if ($this->curTpl['RequiredReputationFaction'])
|
||||
$x .= '<br />'.Lang::$game['requires'].' <a class="q1" href=?faction="'.$this->curTpl['RequiredReputationFaction'].'">'.Faction::getName($this->curTpl['RequiredReputationFaction']).'</a> - '.Lang::$game['rep'][$this->curTpl['RequiredReputationRank']];
|
||||
$x .= '<br />'.sprintf(Lang::$game['requires'], '<a class="q1" href=?faction="'.$this->curTpl['RequiredReputationFaction'].'">'.Faction::getName($this->curTpl['RequiredReputationFaction']).'</a> - '.Lang::$game['rep'][$this->curTpl['RequiredReputationRank']]);
|
||||
|
||||
// locked
|
||||
if ($this->curTpl['lockid'])
|
||||
@@ -534,13 +540,13 @@ class ItemList extends BaseType
|
||||
{
|
||||
if ($lock['type'.$j] == 1) // opened by item
|
||||
{
|
||||
$l = Lang::$game['requires'].' <a class="q1" href="?item='.$lock['lockproperties'.$j].'">'.Util::getItemName($lock['lockproperties'.$j]).'</a>';
|
||||
$l = sprintf(Lang::$game['requires'], '<a class="q1" href="?item='.$lock['lockproperties'.$j].'">'.Util::getItemName($lock['lockproperties'.$j]).'</a>');
|
||||
break;
|
||||
}
|
||||
else if ($lock['type'.$j] == 2) // opened by skill
|
||||
{
|
||||
$lockText = DB::Aowow()->selectRow('SELECT ?# FROM ?_locktype WHERE id = ?d', $lock['lockproperties'.$j]);
|
||||
$l = Lang::$game['requires'].' '.Util::localizedString($lockText, 'name').' ('.$lock['requiredskill'.$j].')';
|
||||
$l = sprintf(Lang::$game['requires'], Util::localizedString($lockText, 'name').' ('.$lock['requiredskill'.$j].')');
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -548,7 +554,10 @@ class ItemList extends BaseType
|
||||
}
|
||||
|
||||
// upper table: done
|
||||
if (!$subT)
|
||||
$x .= '</td></tr></table>';
|
||||
else
|
||||
$x .= '<br>';
|
||||
|
||||
// spells on item
|
||||
$itemSpellsAndTrigger = [];
|
||||
@@ -561,12 +570,13 @@ class ItemList extends BaseType
|
||||
$itemSpells = new SpellList(array(['s.id', array_keys($itemSpellsAndTrigger)]));
|
||||
while ($itemSpells->iterate())
|
||||
if ($parsed = $itemSpells->parseText('description', $this->curTpl['RequiredLevel']))
|
||||
$green[] = Lang::$item['trigger'][$itemSpellsAndTrigger[$itemSpells->id]].$parsed;
|
||||
$green[] = Lang::$item['trigger'][$itemSpellsAndTrigger[$itemSpells->id]] . ($interactive ? '<a href="?spell='.$itemSpells->id.'">'.$parsed.'</a>' : $parsed);
|
||||
}
|
||||
|
||||
|
||||
// lower table (ratings, spells, ect)
|
||||
if (!$subT)
|
||||
$x .= '<table><tr><td>';
|
||||
|
||||
if (isset($green))
|
||||
foreach ($green as $j => $bonus)
|
||||
if ($bonus)
|
||||
@@ -602,7 +612,7 @@ class ItemList extends BaseType
|
||||
if ($itemset['skillId']) // bonus requires skill to activate
|
||||
{
|
||||
$name = DB::Aowow()->selectRow('SELECT * FROM ?_skill WHERE skillId=?d', $itemset['skillId']);
|
||||
$xSet .= '<br />'.Lang::$game['requires'].' <a href="?skills='.$itemset['skillId'].'" class="q1">'.Util::localizedString($name, 'name').'</a>';
|
||||
$xSet .= '<br />'.sprintf(Lang::$game['requires'], '<a href="?skills='.$itemset['skillId'].'" class="q1">'.Util::localizedString($name, 'name').'</a>');
|
||||
|
||||
if ($itemset['skillLevel'])
|
||||
$xSet .= ' ('.$itemset['skillLevel'].')';
|
||||
@@ -672,9 +682,9 @@ class ItemList extends BaseType
|
||||
$xCraft = '<div><br />'.$craftItem->renderTooltip(null, $interactive).'</div><br />';
|
||||
|
||||
while ($reagents->iterate())
|
||||
$reqReag[] = '<a href="?item='.$reagents->id.'">'.$reagents->names[$reagents->id].'</a> ('.$reagentItems[$reagents->id].')';
|
||||
$reqReag[] = '<a href="?item='.$reagents->id.'">'.$reagents->getField('name', true).'</a> ('.$reagentItems[$reagents->id].')';
|
||||
|
||||
$xCraft .= '<span class="q1">'.Lang::$game['requires']." ".implode(", ", $reqReag).'</span>';
|
||||
$xCraft .= '<span class="q1">'.Lang::$game['requires2']." ".implode(", ", $reqReag).'</span>';
|
||||
|
||||
}
|
||||
|
||||
@@ -698,7 +708,7 @@ class ItemList extends BaseType
|
||||
$xMisc[] = '<span class="q1">'.$this->curTpl['spellcharges_1'].' '.Lang::$item['charges'].'</span>';
|
||||
|
||||
if ($this->curTpl['SellPrice'])
|
||||
$xMisc[] = '<span class="q1">'.Lang::$item['sellPrice'].": ".Util::formatMoney($this->curTpl['SellPrice']).'</span>';
|
||||
$xMisc[] = '<span class="q1">'.Lang::$item['sellPrice'].Lang::$colon.Util::formatMoney($this->curTpl['SellPrice']).'</span>';
|
||||
|
||||
// list required reagents
|
||||
if (isset($xCraft))
|
||||
@@ -707,6 +717,7 @@ class ItemList extends BaseType
|
||||
if ($xMisc)
|
||||
$x .= implode('<br />', $xMisc);
|
||||
|
||||
if (!$subT)
|
||||
$x .= '</td></tr></table>';
|
||||
|
||||
// heirloom tooltip scaling
|
||||
|
||||
34
includes/class.skill.php
Normal file
34
includes/class.skill.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
if (!defined('AOWOW_REVISION'))
|
||||
die('illegal access');
|
||||
|
||||
|
||||
class SkillList extends BaseType
|
||||
{
|
||||
public static function getName($id)
|
||||
{
|
||||
$n = DB::Aowow()->SelectRow('
|
||||
SELECT
|
||||
name_loc0,
|
||||
name_loc2,
|
||||
name_loc3,
|
||||
name_loc6,
|
||||
name_loc8
|
||||
FROM
|
||||
?_skillLine
|
||||
WHERE
|
||||
id = ?d',
|
||||
$id
|
||||
);
|
||||
return Util::localizedString($n, 'name');
|
||||
}
|
||||
|
||||
public function getListviewData() { }
|
||||
public function addGlobalsToJScript(&$refs) { }
|
||||
public function addRewardsToJScript(&$refs) { }
|
||||
public function renderTooltip() { }
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -99,7 +99,6 @@ abstract class BaseType
|
||||
$field = $resolveCondition($c[0], $supLink);
|
||||
else if ($c[0])
|
||||
$field = '`'.implode('`.`', explode('.', Util::sqlEscape($c[0]))).'`';
|
||||
|
||||
if (is_array($c[1]))
|
||||
{
|
||||
$val = implode(',', Util::sqlEscape($c[1]));
|
||||
@@ -366,6 +365,34 @@ class Lang
|
||||
return self::$game['rep'][REP_NEUTRAL];
|
||||
}
|
||||
|
||||
public static function getRequiredItems($class, $mask, $short = true)
|
||||
{
|
||||
// not checking weapon / armor here. It's highly unlikely that they overlap
|
||||
if ($short)
|
||||
{
|
||||
if ($class == 15) // misc - Mounts
|
||||
return '';
|
||||
|
||||
if ($class == 4 && $mask == 0x001E) // all basic armor classes
|
||||
return '';
|
||||
|
||||
foreach(Lang::$spell['subClassMasks'] as $m => $str)
|
||||
if ($mask == $m)
|
||||
return $str;
|
||||
}
|
||||
|
||||
if ($class == 15) // yeah hardcoded.. sue me!
|
||||
return Lang::$spell['cat'][-5];
|
||||
|
||||
$tmp = [];
|
||||
$strs = Lang::$spell[$class == 4 ? 'armorSubClass' : 'weaponSubClass'];
|
||||
foreach ($strs as $k => $str)
|
||||
if ($mask & 1 << $k && $str)
|
||||
$tmp[] = $str;
|
||||
|
||||
return implode(', ', $tmp);
|
||||
}
|
||||
|
||||
public static function getStances($stanceMask)
|
||||
{
|
||||
$stanceMask &= 0xFC27909F; // clamp to available stances/forms..
|
||||
@@ -535,7 +562,7 @@ class SmartyAoWoW extends Smarty
|
||||
public function notFound($subject)
|
||||
{
|
||||
$this->updatePageVars(array(
|
||||
'subject' => ucfirst($subject),
|
||||
'subject' => Util::ucFirst($subject),
|
||||
'id' => intVal($this->_tpl_vars['query'][1]),
|
||||
'notFound' => sprintf(Lang::$main['pageNotFound'], $subject),
|
||||
));
|
||||
@@ -682,10 +709,17 @@ class Util
|
||||
public static $narrowResultString = 'sprintf(%s, %s, %s) + LANG.dash + LANG.lvnote_trynarrowing';
|
||||
public static $setCriteriaString = "fi_setCriteria(%s, %s, %s);\n";
|
||||
|
||||
public static $dfnString = '<dfn title="%s" class="w">%s</dfn>';
|
||||
|
||||
public static $expansionString = array( // 3 & 4 unused .. obviously
|
||||
null, 'bc', 'wotlk', 'cata', 'mop'
|
||||
);
|
||||
|
||||
public static $class2SpellFamily = array(
|
||||
// null Warrior Paladin Hunter Rogue Priest DK Shaman Mage Warlock null Druid
|
||||
null, 4, 10, 9, 8, 6, 15, 11, 3, 5, null, 7
|
||||
);
|
||||
|
||||
// todo: translate and move to Lang
|
||||
public static $spellModOp = array(
|
||||
0 => 'DAMAGE',
|
||||
@@ -940,7 +974,7 @@ class Util
|
||||
152 => 'Unknown Effect',
|
||||
153 => 'Create Tamed Pet',
|
||||
154 => 'Discover Taxi',
|
||||
155 => 'Titan Grip',
|
||||
155 => 'Dual Wield 2H Weapons',
|
||||
156 => 'Enchant Item Prismatic',
|
||||
157 => 'Create Item 2',
|
||||
158 => 'Milling',
|
||||
@@ -1662,6 +1696,16 @@ class Util
|
||||
return false;
|
||||
}
|
||||
|
||||
// default ucFirst doesn't convert UTF-8 chars
|
||||
public static function ucFirst($str)
|
||||
{
|
||||
$len = mb_strlen($str, 'UTF-8') - 1;
|
||||
$first = mb_substr($str, 0, 1, 'UTF-8');
|
||||
$rest = mb_substr($str, 1, $len, 'UTF-8');
|
||||
|
||||
return mb_strtoupper($first, 'UTF-8') . $rest;
|
||||
}
|
||||
|
||||
// BaseType::_construct craaap!
|
||||
// todo: unify indizes
|
||||
public static function getIdFieldName($tpl)
|
||||
|
||||
@@ -57,7 +57,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
$smarty->notFound(Lang::$achievement['achievement']);
|
||||
|
||||
$pageData['path'] = [];
|
||||
$pageData['title'] = [ucfirst(Lang::$achievement['achievement'])];
|
||||
$pageData['title'] = [Util::ucfirst(Lang::$achievement['achievement'])];
|
||||
|
||||
// create page title and path
|
||||
$curCat = $acv->getField('category');
|
||||
@@ -80,18 +80,18 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
switch ($acv->getField('faction'))
|
||||
{
|
||||
case 0:
|
||||
$pageData['page']['infoBox'][] = Lang::$main['side'].': <span class="alliance-icon">'.Lang::$game['si'][SIDE_ALLIANCE].'</span>';
|
||||
$pageData['infoBox'][] = Lang::$main['side'].': <span class="alliance-icon">'.Lang::$game['si'][SIDE_ALLIANCE].'</span>';
|
||||
break;
|
||||
case 1:
|
||||
$pageData['page']['infoBox'][] = Lang::$main['side'].': <span class="horde-icon">'.Lang::$game['si'][SIDE_HORDE].'</span>';
|
||||
$pageData['infoBox'][] = Lang::$main['side'].': <span class="horde-icon">'.Lang::$game['si'][SIDE_HORDE].'</span>';
|
||||
break;
|
||||
default: // case 3
|
||||
$pageData['page']['infoBox'][] = Lang::$main['side'].': '.Lang::$game['si'][SIDE_BOTH];
|
||||
$pageData['infoBox'][] = Lang::$main['side'].': '.Lang::$game['si'][SIDE_BOTH];
|
||||
}
|
||||
|
||||
// todo: crosslink with charactersDB to check if realmFirsts are still available
|
||||
|
||||
$pageData['page']['infoBox'] = array_merge($pageData['page']['infoBox'], Lang::getInfoBoxForFlags($acv->getField('cuFlags')));
|
||||
$pageData['infoBox'] = array_merge($pageData['infoBox'], Lang::getInfoBoxForFlags($acv->getField('cuFlags')));
|
||||
|
||||
// listview: "see also"
|
||||
$conditions = array(
|
||||
@@ -256,12 +256,12 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
case ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL:
|
||||
case ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2:
|
||||
$crtSpl = new SpellList(array(['s.id', $obj]));
|
||||
$crtSpl->addGlobalsToJscript($pageData);
|
||||
$text = $crtName ? $crtName : $crtSpl->getField('name', true);
|
||||
$text = !empty($crtName) ? $crtName : $crtSpl->getField('name', true);
|
||||
$tmp['link'] = array(
|
||||
'href' => '?spell='.$obj,
|
||||
'text' => $text
|
||||
);
|
||||
$crtSpl->addGlobalsToJscript($pageData);
|
||||
$tmp['icon'] = $iconId;
|
||||
$pageData['page']['icons'][] = array(
|
||||
'itr' => $iconId++,
|
||||
@@ -275,7 +275,6 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
case ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM:
|
||||
case ACHIEVEMENT_CRITERIA_TYPE_EQUIP_ITEM:
|
||||
$crtItm = new ItemList(array(['id', $obj]));
|
||||
$crtItm->addGlobalsToJscript($pageData);
|
||||
$text = $crtName ? $crtName : $crtItm->getField('name', true);
|
||||
$tmp['link'] = array(
|
||||
'href' => '?item='.$obj,
|
||||
@@ -283,6 +282,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
'quality' => $crtItm->getField('Quality'),
|
||||
'count' => $qty,
|
||||
);
|
||||
$crtItm->addGlobalsToJscript($pageData);
|
||||
$tmp['icon'] = $iconId;
|
||||
$pageData['page']['icons'][] = array(
|
||||
'itr' => $iconId++,
|
||||
|
||||
@@ -39,12 +39,11 @@ $validCats = array(
|
||||
if (!Util::isValidPage($validCats, $cats))
|
||||
$smarty->error();
|
||||
|
||||
if (!$smarty->loadCache($cacheKey, $pageData))
|
||||
if (!$smarty->loadCache($cacheKey, $pageData, $filter))
|
||||
{
|
||||
// include child categories if current category is empty
|
||||
$condition = !$cats[0] ? null : (int)end($cats);
|
||||
$acvList = new AchievementList($condition ? [['category', $condition]] : [], true);
|
||||
|
||||
if (!$acvList->getMatches())
|
||||
{
|
||||
$curCats = $catList = [$condition ? $condition : 0];
|
||||
@@ -73,7 +72,7 @@ if (!$smarty->loadCache($cacheKey, $pageData))
|
||||
$path[] = $cat['id'];
|
||||
$title[] = Util::localizedString($cat, 'name');
|
||||
}
|
||||
array_unshift($title, ucFirst(Lang::$achievement['achievements']));
|
||||
array_unshift($title, Util::ucFirst(Lang::$achievement['achievements']));
|
||||
}
|
||||
|
||||
// fill g_items, g_titles, g_achievements
|
||||
@@ -98,10 +97,9 @@ if (!$smarty->loadCache($cacheKey, $pageData))
|
||||
if ($acvList->filterGetError())
|
||||
$pageData['params']['_errors'] = '$1';
|
||||
|
||||
$smarty->saveCache($cacheKey, $pageData);
|
||||
$smarty->saveCache($cacheKey, $pageData, $filter);
|
||||
}
|
||||
|
||||
|
||||
$page = array(
|
||||
'tab' => 0, // for g_initHeader($tab)
|
||||
'subCat' => $pageParam ? '='.$pageParam : '',
|
||||
|
||||
@@ -24,7 +24,7 @@ if (!$smarty->loadCache($cacheKey, $pageData))
|
||||
|
||||
$page = array(
|
||||
'tab' => 0, // for g_initHeader($tab)
|
||||
'title' => ucFirst(Lang::$game['classes']),
|
||||
'title' => Util::ucFirst(Lang::$game['classes']),
|
||||
'path' => "[0, 12]",
|
||||
);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ if (!defined('AOWOW_REVISION'))
|
||||
$cat = Util::extractURLParams($pageParam)[0];
|
||||
$path = [0, 15];
|
||||
$validCats = [1, 2, 3, 22];
|
||||
$title = [ucFirst(Lang::$game['currencies'])];
|
||||
$title = [Util::ucFirst(Lang::$game['currencies'])];
|
||||
$cacheKey = implode('_', [CACHETYPE_PAGE, TYPE_CURRENCY, -1, isset($cat) ? $cat : -1, User::$localeId]);
|
||||
|
||||
if ($cat !== null && !in_array($cat, $validCats))
|
||||
|
||||
@@ -46,7 +46,7 @@ if (!$smarty->loadCache($cacheKey, $pageData))
|
||||
$page = array(
|
||||
'tab' => 0, // for g_initHeader($tab)
|
||||
'subCat' => $pageParam ? '='.$pageParam : '',
|
||||
'title' => ucFirst(Lang::$game['itemsets']),
|
||||
'title' => Util::ucFirst(Lang::$game['itemsets']),
|
||||
'path' => json_encode($path, JSON_NUMERIC_CHECK),
|
||||
'reqJS' => array(
|
||||
array('path' => 'template/js/filters.js', 'conditional' => false),
|
||||
|
||||
@@ -7,7 +7,7 @@ if (!defined('AOWOW_REVISION'))
|
||||
$cat = Util::extractURLParams($pageParam)[0];
|
||||
$path = [0, 8];
|
||||
$validCats = [0, 1, 2];
|
||||
$title = [ucFirst(Lang::$game['pets'])];
|
||||
$title = [Util::ucFirst(Lang::$game['pets'])];
|
||||
$cacheKey = implode('_', [CACHETYPE_PAGE, TYPE_PET, -1, isset($cat) ? $cat : -1, User::$localeId]);
|
||||
|
||||
if (!in_array($cat, $validCats))
|
||||
|
||||
@@ -24,7 +24,7 @@ if (!$smarty->loadCache($cacheKey, $pageData))
|
||||
|
||||
$page = array(
|
||||
'tab' => 0, // for g_initHeader($tab)
|
||||
'title' => ucFirst(Lang::$game['races']),
|
||||
'title' => Util::ucFirst(Lang::$game['races']),
|
||||
'path' => "[0, 13]",
|
||||
);
|
||||
|
||||
|
||||
@@ -20,20 +20,19 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
$title->reset();
|
||||
|
||||
$infobox = [];
|
||||
$colon = User::$localeId == LOCALE_FR ? ' : ' : ': '; // Je suis un prick! <_<
|
||||
|
||||
if ($title->getField('side') == SIDE_ALLIANCE)
|
||||
$infobox[] = Lang::$main['side'].$colon.'[span class=alliance-icon]'.Lang::$game['si'][SIDE_ALLIANCE].'[/span]';
|
||||
$infobox[] = Lang::$main['side'].Lang::$colon.'[span class=alliance-icon]'.Lang::$game['si'][SIDE_ALLIANCE].'[/span]';
|
||||
else if ($title->getField('side') == SIDE_HORDE)
|
||||
$infobox[] = Lang::$main['side'].$colon.'[span class=horde-icon]'.Lang::$game['si'][SIDE_HORDE].'[/span]';
|
||||
$infobox[] = Lang::$main['side'].Lang::$colon.'[span class=horde-icon]'.Lang::$game['si'][SIDE_HORDE].'[/span]';
|
||||
else
|
||||
$infobox[] = Lang::$main['side'].$colon.Lang::$game['si'][SIDE_BOTH];
|
||||
$infobox[] = Lang::$main['side'].Lang::$colon.Lang::$game['si'][SIDE_BOTH];
|
||||
|
||||
if ($g = $title->getField('gender'))
|
||||
$infobox[] = Lang::$main['gender'].$colon.'[span class='.($g == 2 ? 'female' : 'male').'-icon]'.Lang::$main['sex'][$g].'[/span]';
|
||||
$infobox[] = Lang::$main['gender'].Lang::$colon.'[span class='.($g == 2 ? 'female' : 'male').'-icon]'.Lang::$main['sex'][$g].'[/span]';
|
||||
|
||||
if ($e = $title->getField('eventId'))
|
||||
$infobox[] = Lang::$game['eventShort'].$colon.'[url=?event='.$e.']'.WorldEvent::getName($e).'[/url]';
|
||||
$infobox[] = Lang::$game['eventShort'].Lang::$colon.'[url=?event='.$e.']'.WorldEvent::getName($e).'[/url]';
|
||||
|
||||
$pageData = array(
|
||||
'page' => array(
|
||||
@@ -41,7 +40,7 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
'id' => $id,
|
||||
'expansion' => Util::$expansionString[$title->getField('expansion')]
|
||||
),
|
||||
'infobox' => '[li][ul]'.implode('[/ul][ul]', $infobox).'[/ul][/li]',
|
||||
'infobox' => '[ul][li]'.implode('[/li][li]', $infobox).'[/li][/ul]',
|
||||
);
|
||||
|
||||
if (!empty($title->sources[$id]))
|
||||
@@ -81,14 +80,14 @@ if (!$smarty->loadCache($cacheKeyPage, $pageData))
|
||||
}
|
||||
}
|
||||
|
||||
$pageData['title'] = ucFirst(trim(str_replace('%s', '', str_replace(',', '', $title->getField('male', true)))));
|
||||
$pageData['title'] = Util::ucFirst(trim(str_replace('%s', '', str_replace(',', '', $title->getField('male', true)))));
|
||||
$pageData['path'] = '[0, 10, '.$title->getField('category').']';
|
||||
|
||||
$smarty->saveCache($cacheKeyPage, $pageData);
|
||||
}
|
||||
|
||||
$smarty->updatePageVars(array(
|
||||
'title' => $pageData['title']." - ".ucfirst(Lang::$game['title']),
|
||||
'title' => $pageData['title']." - ".Util::ucfirst(Lang::$game['title']),
|
||||
'path' => $pageData['path'],
|
||||
'tab' => 0, // for g_initHeader($tab)
|
||||
'type' => TYPE_TITLE, // 11:Titles
|
||||
|
||||
@@ -7,7 +7,7 @@ if (!defined('AOWOW_REVISION'))
|
||||
$cat = Util::extractURLParams($pageParam)[0];
|
||||
$path = [0, 10];
|
||||
$validCats = [0, 1, 2, 3, 4, 5, 6];
|
||||
$title = [ucFirst(Lang::$game['titles'])];
|
||||
$title = [Util::ucFirst(Lang::$game['titles'])];
|
||||
$cacheKey = implode('_', [CACHETYPE_PAGE, TYPE_TITLE, -1, isset($cat) ? $cat : -1, User::$localeId]);
|
||||
|
||||
if (!in_array($cat, $validCats))
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<tr><td><div class="infobox-spacer"></div>
|
||||
<ul>
|
||||
{if $lvData.page.points}<li><div>{$lang.points}: <span class="moneyachievement tip" onmouseover="Listview.funcBox.moneyAchievementOver(event)" onmousemove="Tooltip.cursorUpdate(event)" onmouseout="Tooltip.hide()">{$lvData.page.points}</span></div></li>{/if}
|
||||
{foreach from=$lvData.page.infoBox item=info}
|
||||
{foreach from=$lvData.infoBox item=info}
|
||||
<li><div>{$info}</div></li>
|
||||
{/foreach}
|
||||
{*<li><div>Location: {$lvData.page.location}</div></li> todo: need to be parsed first *}
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
<a href="javascript:;" id="open-links-button" class="button-red" onclick="this.blur();
|
||||
Links.show({ldelim} type: 10, typeId: {$lvData.page.id}, linkColor: 'ffffff00', linkId: '{$lvData.page.id}:"..UnitGUID("player")..":0:0:0:0:0:0:0:0', linkName: '{$lvData.page.name|escape:'javascript'}' {rdelim});">
|
||||
<em><b><i>{$lang.link}</i></b><span>{$lang.link}</span></em></a>
|
||||
<em><b><i>{$lang.links}</i></b><span>{$lang.links}</span></em></a>
|
||||
<a href="http://old.wowhead.com/?{$query[0]}={$query[1]}" class="button-red"><em><b><i>Wowhead</i></b><span>Wowhead</span></em></a>
|
||||
<h1 class="h1-icon">{$lvData.page.name}</h1>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
g_initPath({$page.path}, {if empty($filter.query)} 0 {else} 1 {/if});
|
||||
{if isset($filter.query)}Menu.append(mn_database[1], '&filter={$filter.query}'); // todo: menu order varies per locale{/if}
|
||||
{if isset($filter.query)}Menu.append(mn_database[1], '&filter={$filter.query|escape:'quotes'}'); // todo: menu order varies per locale{/if}
|
||||
</script>
|
||||
|
||||
<div id="fi" style="display:{if empty($filter.query)}none{else}block{/if};">
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<table class="infobox">
|
||||
{if !empty($lvData.infobox)}
|
||||
<tr><th id="infobox-quick-facts">{$lang.quickFacts}</th></tr>
|
||||
<tr><td><div class="infobox-spacer"></div><div id="infobox-contents0"></div></td></tr>
|
||||
{/if}
|
||||
<tr><th id="infobox-screenshots">{$lang.screenshots}</th></tr>
|
||||
<tr><td><div class="infobox-spacer"></div><div id="infobox-sticky-ss"></div></td></tr>
|
||||
{if $user.id > 0}
|
||||
@@ -9,7 +11,11 @@
|
||||
{/if}
|
||||
</table>
|
||||
<script type="text/javascript">ss_appendSticky()</script>
|
||||
{if $user.id > 0} <script type="text/javascript">vi_appendSticky()</script>{/if}
|
||||
{if $user.id > 0}
|
||||
<script type="text/javascript">vi_appendSticky()</script>
|
||||
{/if}
|
||||
{if !empty($lvData.infobox)}
|
||||
<script type="text/javascript">
|
||||
Markup.printHtml("{$lvData.infobox}", "infobox-contents0", {ldelim}mode:Markup.MODE_QUICKFACTS{rdelim});
|
||||
</script>
|
||||
{/if}
|
||||
@@ -965,7 +965,6 @@ a#toptabs-menu-language
|
||||
a.icontiny
|
||||
{
|
||||
text-decoration: none;
|
||||
padding-left: 19px;
|
||||
}
|
||||
|
||||
span.icontiny
|
||||
@@ -985,6 +984,12 @@ span.icontiny
|
||||
background: right center no-repeat;
|
||||
}
|
||||
|
||||
span.icontiny, a.tinyspecial
|
||||
{
|
||||
padding-left:18px !important;
|
||||
background:left center no-repeat;
|
||||
}
|
||||
|
||||
.iconsmall, .iconmedium, .iconlarge
|
||||
{
|
||||
position: relative;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
g_initPath({$page.path}, {if empty($filter.query)} 0 {else} 1 {/if});
|
||||
{if isset($filter.query)}Menu.append(mn_database[6], '&filter={$filter.query}'); // todo: menu order varies per locale{/if}
|
||||
{if isset($filter.query)}Menu.append(mn_database[6], '&filter={$filter.query|escape:'quotes'}'); // todo: menu order varies per locale{/if}
|
||||
</script>
|
||||
|
||||
<div id="fi" style="display:{if empty($filter.query)}none{else}block{/if};">
|
||||
|
||||
@@ -9,10 +9,12 @@ var Markup = {
|
||||
item: 1,
|
||||
spell: 1,
|
||||
achievement: 1,
|
||||
money: 1,
|
||||
npc: 1,
|
||||
skill: 1,
|
||||
pet: 1,
|
||||
'class': 1
|
||||
'class': 1,
|
||||
race : 1
|
||||
},
|
||||
_prepare: function(D, C) {
|
||||
Markup.tags = [];
|
||||
@@ -100,7 +102,7 @@ var Markup = {
|
||||
B += "|h3|minibox";
|
||||
A += "|h3|minibox|toggler|div|map|pin";
|
||||
case Markup.MODE_QUICKFACTS:
|
||||
D = D.replace(/(.)?\[color\s*[\s+=:]\s*(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|purple|red|silver|teal|white|yellow|c[0-9]{2}|q[0-8]?|#[a-f0-9]{6})\]/gi,
|
||||
D = D.replace(/(.)?\[color\s*[\s+=:]\s*(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|purple|red|silver|teal|white|yellow|c[0-9]{2}|r[1-4]?|q[0-8]?|#[a-f0-9]{6})\]/gi,
|
||||
function(F, E, G) {
|
||||
if (E == "\\") {
|
||||
return F.substr(1)
|
||||
@@ -113,7 +115,7 @@ var Markup = {
|
||||
return (E || "") + "<t" + (Markup.nTags++) + ">"
|
||||
}
|
||||
});
|
||||
D = D.replace(/(.)?\[(item|spell|achievement|class|npc|skill|pet)\s*[\s+=:]\s*(\d+?)\]/gi,
|
||||
D = D.replace(/(.)?\[(item|spell|achievement|class|race|npc|skill|pet|money)\s*[\s+=:]\s*(\d+?)\]/gi,
|
||||
function(F, E, I, H) {
|
||||
if (E == "\\") {
|
||||
return F.substr(1)
|
||||
@@ -409,7 +411,7 @@ var Markup = {
|
||||
G += '<div class="pad">' + Markup._htmlmize(B[D][1]) + "</div>";
|
||||
break;
|
||||
case "color":
|
||||
G += "<span " + ((B[D][2].charAt(0) == "q" || B[D][2].charAt(0) == "c") ? 'class="': 'style="color: ') + B[D][2] + '">' + Markup._htmlmize(B[D][1]) + "</span>";
|
||||
G += "<span " + ((B[D][2].charAt(0) == "q" || B[D][2].charAt(0) == "c" || B[D][2].charAt(0) == "r") ? 'class="': 'style="color: ') + B[D][2] + '">' + Markup._htmlmize(B[D][1]) + "</span>";
|
||||
break;
|
||||
case "toggler":
|
||||
var F = B[D][2];
|
||||
@@ -472,6 +474,14 @@ var Markup = {
|
||||
else
|
||||
G += '<a href="?achievement=' + B[D][2] + '">(Achievement #' + B[D][2] + ")</a>";
|
||||
break;
|
||||
case "money":
|
||||
if (_ = Math.floor(B[D][2] / 10000))
|
||||
G += '<span class="moneygold">' + _ + "</span> ";
|
||||
if (_ = Math.floor((B[D][2] % 10000) / 100))
|
||||
G += '<span class="moneysilver">' + _ + "</span> ";
|
||||
if (_ = Math.floor(B[D][2]) % 100)
|
||||
G += '<span class="moneycopper">' + _ + "</span>";
|
||||
break;
|
||||
case "class":
|
||||
if (g_classes[B[D][2]]) {
|
||||
G += "<a href=\"?class=" + B[D][2] + "\" class=\"icontiny c" + B[D][2] + "\">";
|
||||
@@ -481,6 +491,15 @@ var Markup = {
|
||||
else
|
||||
G += '<a href="?class=' + B[D][2] + '">(Class #' + B[D][2] + ")</a>";
|
||||
break;
|
||||
case "race":
|
||||
if (g_races[B[D][2]]) {
|
||||
G += "<a href=\"?race=" + B[D][2] + "\" class=\"icontiny\">";
|
||||
G += "<img src=\"images/icons/tiny/race_" + g_file_races[B[D][2]] + "_male.gif\" align=\"absmiddle\"> ";
|
||||
G += "<span>" + g_races[B[D][2]]["name_" + g_locale.name] + "</span></a>";
|
||||
}
|
||||
else
|
||||
G += '<a href="?race=' + B[D][2] + '">(Race #' + B[D][2] + ")</a>";
|
||||
break;
|
||||
case "npc":
|
||||
if (g_npcs[B[D][2]]) {
|
||||
G += "<a href=\"?npc=" + B[D][2] + "\" class=\"icontiny\">";
|
||||
@@ -580,6 +599,9 @@ var Markup = {
|
||||
case "class":
|
||||
E += "(Class #" + B[C][2] + ")";
|
||||
break;
|
||||
case "race":
|
||||
E += "(Race #" + B[C][2] + ")";
|
||||
break;
|
||||
case "skill":
|
||||
E += "(Skill #" + B[C][2] + ")";
|
||||
break;
|
||||
|
||||
@@ -24,7 +24,7 @@ function TalentCalc() {
|
||||
_filteredGlyphs = false,
|
||||
_locked = false,
|
||||
_mode,
|
||||
_nTrees, // _nTrees (conflicts with some width-parameters)
|
||||
_nTrees,
|
||||
_nTiers,
|
||||
_nGlyphs,
|
||||
_glyphSlots,
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
<div class="text">
|
||||
<a href="javascript:;" id="open-links-button" class="button-red" onclick="this.blur(); Links.show({ldelim} type: 11, typeId: {$lvData.page.id} {rdelim});">
|
||||
<em><b><i>{$lang.link}</i></b><span>{$lang.link}</span></em>
|
||||
<em><b><i>{$lang.links}</i></b><span>{$lang.links}</span></em>
|
||||
</a>
|
||||
<a href="http://old.wowhead.com/?{$query[0]}={$query[1]}" class="button-red"><em><b><i>Wowhead</i></b><span>Wowhead</span></em></a>
|
||||
<h1 class="h1-icon">{if isset($lvData.page.expansion)}<span class="{$lvData.page.expansion}-icon-right">{$lvData.page.name}</span>{else}{$lvData.page.name}{/if}</h1>
|
||||
|
||||
Reference in New Issue
Block a user