bulk replacement: accesing locale strings by function

This commit is contained in:
Sarjuuk
2015-03-29 00:46:46 +01:00
parent d47fa93806
commit 27bc09f136
95 changed files with 1000 additions and 992 deletions

View File

@@ -394,7 +394,7 @@ class AjaxHandler
case 'vote': // up, down and remove case 'vote': // up, down and remove
if (!User::$id || empty($this->get['id']) || empty($this->get['rating'])) if (!User::$id || empty($this->get['id']) || empty($this->get['rating']))
{ {
$result = ['error' => 1, 'message' => Lang::$main['genericError']]; $result = ['error' => 1, 'message' => Lang::main('genericError')];
break; break;
} }
@@ -404,13 +404,13 @@ class AjaxHandler
$val *= -1; $val *= -1;
if (User::getCurDailyVotes() <= 0) if (User::getCurDailyVotes() <= 0)
$result = ['error' => 1, 'message' => Lang::$main['tooManyVotes']]; $result = ['error' => 1, 'message' => Lang::main('tooManyVotes')];
else if (!$target || $val != $this->get['rating']) else if (!$target || $val != $this->get['rating'])
$result = ['error' => 1, 'message' => Lang::$main['genericError']]; $result = ['error' => 1, 'message' => Lang::main('genericError')];
else if (($val > 0 && !User::canUpvote()) || ($val < 0 && !User::canDownvote())) else if (($val > 0 && !User::canUpvote()) || ($val < 0 && !User::canDownvote()))
$result = ['error' => 1, 'message' => Lang::$main['bannedRating']]; $result = ['error' => 1, 'message' => Lang::main('bannedRating')];
if ($result) if ($result)
break; break;
@@ -425,7 +425,7 @@ class AjaxHandler
if (!$ok) if (!$ok)
{ {
$result = ['error' => 1, 'message' => Lang::$main['genericError']]; $result = ['error' => 1, 'message' => Lang::main('genericError')];
break; break;
} }
@@ -481,7 +481,7 @@ class AjaxHandler
if ($ok) // this one is very special; as in: completely retarded if ($ok) // this one is very special; as in: completely retarded
return 'ok'; // the script expects the actual characters 'ok' not some string like "ok" return 'ok'; // the script expects the actual characters 'ok' not some string like "ok"
$result = Lang::$main['genericError']; $result = Lang::main('genericError');
break; break;
case 'show-replies': case 'show-replies':
$result = empty($this->get['id']) ? [] : CommunityContent::getCommentReplies($this->get['id']); $result = empty($this->get['id']) ? [] : CommunityContent::getCommentReplies($this->get['id']);
@@ -494,13 +494,13 @@ class AjaxHandler
$result = 'Your reply has '.mb_strlen(@$this->post['body']).' characters and must have at least '.$_minRpl.' and at most '.$_maxRpl.'.'; $result = 'Your reply has '.mb_strlen(@$this->post['body']).' characters and must have at least '.$_minRpl.' and at most '.$_maxRpl.'.';
else if (empty($this->post['commentId']) || !DB::Aowow()->selectCell('SELECT 1 FROM ?_comments WHERE id = ?d', $this->post['commentId'])) else if (empty($this->post['commentId']) || !DB::Aowow()->selectCell('SELECT 1 FROM ?_comments WHERE id = ?d', $this->post['commentId']))
$result = Lang::$main['genericError']; $result = Lang::main('genericError');
else if (DB::Aowow()->query('INSERT INTO ?_comments (`userId`, `roles`, `body`, `date`, `replyTo`) VALUES (?d, ?d, ?, UNIX_TIMESTAMP(), ?d)', User::$id, User::$groups, $this->post['body'], $this->post['commentId'])) else if (DB::Aowow()->query('INSERT INTO ?_comments (`userId`, `roles`, `body`, `date`, `replyTo`) VALUES (?d, ?d, ?, UNIX_TIMESTAMP(), ?d)', User::$id, User::$groups, $this->post['body'], $this->post['commentId']))
$result = CommunityContent::getCommentReplies($this->post['commentId']); $result = CommunityContent::getCommentReplies($this->post['commentId']);
else else
$result = Lang::$main['genericError']; $result = Lang::main('genericError');
break; break;
case 'edit-reply': // also returns all replies on success case 'edit-reply': // also returns all replies on success
@@ -508,7 +508,7 @@ class AjaxHandler
$result = 'You are not allowed to reply.'; $result = 'You are not allowed to reply.';
else if (empty($this->post['replyId']) || empty($this->post['commentId'])) else if (empty($this->post['replyId']) || empty($this->post['commentId']))
$result = Lang::$main['genericError']; $result = Lang::main('genericError');
else if (empty($this->post['body']) || mb_strlen($this->post['body']) < $_minRpl || mb_strlen($this->post['body']) > $_maxRpl) else if (empty($this->post['body']) || mb_strlen($this->post['body']) < $_minRpl || mb_strlen($this->post['body']) > $_maxRpl)
$result = 'Your reply has '.mb_strlen(@$this->post['body']).' characters and must have at least '.$_minRpl.' and at most '.$_maxRpl.'.'; $result = 'Your reply has '.mb_strlen(@$this->post['body']).' characters and must have at least '.$_minRpl.' and at most '.$_maxRpl.'.';
@@ -525,7 +525,7 @@ class AjaxHandler
User::isInGroup(U_GROUP_MODERATOR) ? DBSIMPLE_SKIP : User::$id User::isInGroup(U_GROUP_MODERATOR) ? DBSIMPLE_SKIP : User::$id
); );
$result = $ok ? CommunityContent::getCommentReplies($this->post['commentId']) : Lang::$main['genericError']; $result = $ok ? CommunityContent::getCommentReplies($this->post['commentId']) : Lang::main('genericError');
break; break;
case 'detach-reply': case 'detach-reply':
if (!User::isInGroup(U_GROUP_MODERATOR) || empty($this->post['id'])) if (!User::isInGroup(U_GROUP_MODERATOR) || empty($this->post['id']))

View File

@@ -158,7 +158,7 @@ class AchievementList extends BaseType
{ {
// link to title - todo (low): crosslink // link to title - todo (low): crosslink
case ACHIEVEMENT_CRITERIA_TYPE_EARNED_PVP_TITLE: case ACHIEVEMENT_CRITERIA_TYPE_EARNED_PVP_TITLE:
$crtName = Util::ucFirst(Lang::$game['title']).Lang::$main['colon'].$crtName; $crtName = Util::ucFirst(Lang::game('title')).Lang::main('colon').$crtName;
break; break;
// link to quest // link to quest
case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST: case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST:
@@ -209,7 +209,7 @@ class AchievementList extends BaseType
if ($criteria) if ($criteria)
{ {
$x .= '<br /><span class="q">'.Lang::$achievement['criteria'].':</span>'; $x .= '<br /><span class="q">'.Lang::achievement('criteria').':</span>';
$x .= '<table width="100%"><tr><td class="q0" style="white-space: nowrap"><small>'.$criteria.'</small></th></tr></table>'; $x .= '<table width="100%"><tr><td class="q0" style="white-space: nowrap"><small>'.$criteria.'</small></th></tr></table>';
} }
if ($description || $criteria) if ($description || $criteria)

View File

@@ -549,10 +549,10 @@ trait spawnHelper
{ {
foreach ($wPoints as $i => $p) foreach ($wPoints as $i => $p)
{ {
$label = [Lang::$npc['waypoint'].Lang::$main['colon'].$p['point']]; $label = [Lang::npc('waypoint').Lang::main('colon').$p['point']];
if ($p['wait']) if ($p['wait'])
$label[] = Lang::$npc['wait'].Lang::$main['colon'].Util::formatTime($p['wait'], false); $label[] = Lang::npc('wait').Lang::main('colon').Util::formatTime($p['wait'], false);
$set = ['label' => '$<br><span class="q0">'.implode('<br>', $label).'</span>', 'type' => $wpIdx]; $set = ['label' => '$<br><span class="q0">'.implode('<br>', $label).'</span>', 'type' => $wpIdx];
@@ -573,26 +573,26 @@ trait spawnHelper
$label = []; $label = [];
if (User::isInGroup(U_GROUP_STAFF)) if (User::isInGroup(U_GROUP_STAFF))
$label[] = $s['guid'] < 0 ? 'Vehicle Accessory' : 'GUID'.Lang::$main['colon'].$s['guid']; $label[] = $s['guid'] < 0 ? 'Vehicle Accessory' : 'GUID'.Lang::main('colon').$s['guid'];
if ($s['respawn']) if ($s['respawn'])
$label[] = Lang::$npc['respawnIn'].Lang::$main['colon'].Util::formatTime($s['respawn'] * 1000, false); $label[] = Lang::npc('respawnIn').Lang::main('colon').Util::formatTime($s['respawn'] * 1000, false);
if (User::isInGroup(U_GROUP_STAFF)) if (User::isInGroup(U_GROUP_STAFF))
{ {
if ($s['phaseMask'] > 1) if ($s['phaseMask'] > 1)
$label[] = Lang::$game['phases'].Lang::$main['colon'].$s['phaseMask']; $label[] = Lang::game('phases').Lang::main('colon').$s['phaseMask'];
if ($s['spawnMask'] == 15) if ($s['spawnMask'] == 15)
$label[] = Lang::$game['mode'].Lang::$main['colon'].Lang::$game['modes'][-1]; $label[] = Lang::game('mode').Lang::main('colon').Lang::game('modes', -1);
else if ($s['spawnMask']) else if ($s['spawnMask'])
{ {
$_ = []; $_ = [];
for ($i = 0; $i < 4; $i++) for ($i = 0; $i < 4; $i++)
if ($s['spawnMask'] & 1 << $i) if ($s['spawnMask'] & 1 << $i)
$_[] = Lang::$game['modes'][$i]; $_[] = Lang::game('modes', $i);
$label[] = Lang::$game['mode'].Lang::$main['colon'].implode(', ', $_); $label[] = Lang::game('mode').Lang::main('colon').implode(', ', $_);
} }
} }

View File

@@ -56,7 +56,7 @@ class CreatureList extends BaseType
$level = '??'; $level = '??';
$type = $this->curTpl['type']; $type = $this->curTpl['type'];
$row3 = [Lang::$game['level']]; $row3 = [Lang::game('level')];
$fam = $this->curTpl['family']; $fam = $this->curTpl['family'];
if (!($this->curTpl['typeFlags'] & 0x4)) if (!($this->curTpl['typeFlags'] & 0x4))
@@ -71,9 +71,9 @@ class CreatureList extends BaseType
$row3[] = $level; $row3[] = $level;
if ($type) if ($type)
$row3[] = Lang::$game['ct'][$type]; $row3[] = Lang::game('ct', $type);
$row3[] = '('.Lang::$npc['rank'][$this->curTpl['rank']].')'; $row3[] = '('.Lang::npc('rank', $this->curTpl['rank']).')';
$x = '<table>'; $x = '<table>';
$x .= '<tr><td><b class="q">'.$this->getField('name', true).'</b></td></tr>'; $x .= '<tr><td><b class="q">'.$this->getField('name', true).'</b></td></tr>';
@@ -84,7 +84,7 @@ class CreatureList extends BaseType
$x .= '<tr><td>'.implode(' ', $row3).'</td></tr>'; $x .= '<tr><td>'.implode(' ', $row3).'</td></tr>';
if ($type == 1 && $fam) // 1: Beast if ($type == 1 && $fam) // 1: Beast
$x .= '<tr><td>'.Lang::$game['fa'][$fam].'</td></tr>'; $x .= '<tr><td>'.Lang::game('fa', $fam).'</td></tr>';
$fac = new FactionList(array([['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0], ['id', (int)$this->getField('factionId')])); $fac = new FactionList(array([['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0], ['id', (int)$this->getField('factionId')]));
if (!$fac->error) if (!$fac->error)

View File

@@ -487,7 +487,7 @@ class ItemList extends BaseType
// heroic tag // heroic tag
if (($_flags & ITEM_FLAG_HEROIC) && $_quality == ITEM_QUALITY_EPIC) if (($_flags & ITEM_FLAG_HEROIC) && $_quality == ITEM_QUALITY_EPIC)
$x .= '<br /><span class="q2">'.Lang::$item['heroic'].'</span>'; $x .= '<br /><span class="q2">'.Lang::item('heroic').'</span>';
// requires map (todo: reparse ?_zones for non-conflicting data; generate Link to zone) // requires map (todo: reparse ?_zones for non-conflicting data; generate Link to zone)
if ($_ = $this->curTpl['map']) if ($_ = $this->curTpl['map'])
@@ -505,44 +505,44 @@ class ItemList extends BaseType
// conjured // conjured
if ($_flags & ITEM_FLAG_CONJURED) if ($_flags & ITEM_FLAG_CONJURED)
$x .= '<br />'.Lang::$item['conjured']; $x .= '<br />'.Lang::item('conjured');
// bonding // bonding
if ($_flags & ITEM_FLAG_ACCOUNTBOUND) if ($_flags & ITEM_FLAG_ACCOUNTBOUND)
$x .= '<br /><!--bo-->'.Lang::$item['bonding'][0]; $x .= '<br /><!--bo-->'.Lang::item('bonding', 0);
else if ($this->curTpl['bonding']) else if ($this->curTpl['bonding'])
$x .= '<br /><!--bo-->'.Lang::$item['bonding'][$this->curTpl['bonding']]; $x .= '<br /><!--bo-->'.Lang::item('bonding', $this->curTpl['bonding']);
// unique || unique-equipped || unique-limited // unique || unique-equipped || unique-limited
if ($this->curTpl['maxCount'] > 0) if ($this->curTpl['maxCount'] > 0)
{ {
$x .= '<br />'.Lang::$item['unique']; $x .= '<br />'.Lang::item('unique');
if ($this->curTpl['maxCount'] > 1) if ($this->curTpl['maxCount'] > 1)
$x .= ' ('.$this->curTpl['maxCount'].')'; $x .= ' ('.$this->curTpl['maxCount'].')';
} }
else if ($_flags & ITEM_FLAG_UNIQUEEQUIPPED) else if ($_flags & ITEM_FLAG_UNIQUEEQUIPPED)
$x .= '<br />'.Lang::$item['uniqueEquipped']; $x .= '<br />'.Lang::item('uniqueEquipped');
else if ($this->curTpl['itemLimitCategory']) else if ($this->curTpl['itemLimitCategory'])
{ {
$limit = DB::Aowow()->selectRow("SELECT * FROM ?_itemlimitcategory WHERE id = ?", $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']).Lang::$main['colon'].Util::localizedString($limit, 'name').' ('.$limit['count'].')'; $x .= '<br />'.($limit['isGem'] ? Lang::item('uniqueEquipped') : Lang::item('unique')).Lang::main('colon').Util::localizedString($limit, 'name').' ('.$limit['count'].')';
} }
// max duration // max duration
if ($dur = $this->curTpl['duration']) if ($dur = $this->curTpl['duration'])
$x .= "<br />".Lang::$game['duration'].Lang::$main['colon'].Util::formatTime(abs($dur) * 1000).($this->curTpl['flagsCustom'] & 0x1 ? ' ('.Lang::$item['realTime'].')' : null); $x .= "<br />".Lang::game('duration').Lang::main('colon').Util::formatTime(abs($dur) * 1000).($this->curTpl['flagsCustom'] & 0x1 ? ' ('.Lang::item('realTime').')' : null);
// required holiday // required holiday
if ($hId = $this->curTpl['holidayId']) if ($hId = $this->curTpl['holidayId'])
{ {
$hDay = DB::Aowow()->selectRow("SELECT * FROM ?_holidays WHERE id = ?", $hId); $hDay = DB::Aowow()->selectRow("SELECT * FROM ?_holidays WHERE id = ?", $hId);
$x .= '<br />'.sprintf(Lang::$game['requires'], '<a href="'.$hId.'" class="q1">'.Util::localizedString($hDay, 'name').'</a>'); $x .= '<br />'.sprintf(Lang::game('requires'), '<a href="'.$hId.'" class="q1">'.Util::localizedString($hDay, 'name').'</a>');
} }
// item begins a quest // item begins a quest
if ($this->curTpl['startQuest']) if ($this->curTpl['startQuest'])
$x .= '<br /><a class="q1" href="?quest='.$this->curTpl['startQuest'].'">'.Lang::$item['startQuest'].'</a>'; $x .= '<br /><a class="q1" href="?quest='.$this->curTpl['startQuest'].'">'.Lang::item('startQuest').'</a>';
// containerType (slotCount) // containerType (slotCount)
if ($this->curTpl['slots'] > 0) if ($this->curTpl['slots'] > 0)
@@ -551,9 +551,9 @@ class ItemList extends BaseType
// word order differs <_< // word order differs <_<
if (in_array(User::$localeId, [LOCALE_FR, LOCALE_ES, LOCALE_RU])) if (in_array(User::$localeId, [LOCALE_FR, LOCALE_ES, LOCALE_RU]))
$x .= '<br />'.sprintf(Lang::$item['bagSlotString'], Lang::$item['bagFamily'][$fam], $this->curTpl['slots']); $x .= '<br />'.sprintf(Lang::item('bagSlotString'), Lang::item('bagFamily', $fam), $this->curTpl['slots']);
else else
$x .= '<br />'.sprintf(Lang::$item['bagSlotString'], $this->curTpl['slots'], Lang::$item['bagFamily'][$fam]); $x .= '<br />'.sprintf(Lang::item('bagSlotString'), $this->curTpl['slots'], Lang::item('bagFamily', $fam));
} }
if (in_array($_class, [ITEM_CLASS_ARMOR, ITEM_CLASS_WEAPON, ITEM_CLASS_AMMUNITION])) if (in_array($_class, [ITEM_CLASS_ARMOR, ITEM_CLASS_WEAPON, ITEM_CLASS_AMMUNITION]))
@@ -561,20 +561,20 @@ class ItemList extends BaseType
$x .= '<table width="100%"><tr>'; $x .= '<table width="100%"><tr>';
// Class // Class
$x .= '<td>'.Lang::$item['inventoryType'][$_slot].'</td>'; $x .= '<td>'.Lang::item('inventoryType', $_slot).'</td>';
// Subclass // Subclass
if ($_class == ITEM_CLASS_ARMOR && $_subClass > 0) if ($_class == ITEM_CLASS_ARMOR && $_subClass > 0)
$x .= '<th><!--asc'.$_subClass.'-->'.Lang::$item['armorSubClass'][$_subClass].'</th>'; $x .= '<th><!--asc'.$_subClass.'-->'.Lang::item('armorSubClass', $_subClass).'</th>';
else if ($_class == ITEM_CLASS_WEAPON) else if ($_class == ITEM_CLASS_WEAPON)
$x .= '<th>'.Lang::$item['weaponSubClass'][$_subClass].'</th>'; $x .= '<th>'.Lang::item('weaponSubClass', $_subClass).'</th>';
else if ($_class == ITEM_CLASS_AMMUNITION) else if ($_class == ITEM_CLASS_AMMUNITION)
$x .= '<th>'.Lang::$item['projectileSubClass'][$_subClass].'</th>'; $x .= '<th>'.Lang::item('projectileSubClass', $_subClass).'</th>';
$x .= '</tr></table>'; $x .= '</tr></table>';
} }
else if ($_slot && $_class != ITEM_CLASS_CONTAINER) // yes, slot can occur on random items and is then also displayed <_< .. excluding Bags >_> else if ($_slot && $_class != ITEM_CLASS_CONTAINER) // yes, slot can occur on random items and is then also displayed <_< .. excluding Bags >_>
$x .= '<br />'.Lang::$item['inventoryType'][$_slot].'<br />'; $x .= '<br />'.Lang::item('inventoryType', $_slot).'<br />';
else else
$x .= '<br />'; $x .= '<br />';
@@ -585,29 +585,29 @@ class ItemList extends BaseType
$dps = $speed ? ($dmgmin1 + $dmgmax1) / (2 * $speed) : 0; $dps = $speed ? ($dmgmin1 + $dmgmax1) / (2 * $speed) : 0;
if ($_class == ITEM_CLASS_AMMUNITION && $dmgmin1 && $dmgmax1) if ($_class == ITEM_CLASS_AMMUNITION && $dmgmin1 && $dmgmax1)
$x .= Lang::$item['addsDps'].' '.number_format(($dmgmin1 + $dmgmax1) / 2, 1).' '.Lang::$item['dps2'].'<br />'; $x .= Lang::item('addsDps').' '.number_format(($dmgmin1 + $dmgmax1) / 2, 1).' '.Lang::item('dps2').'<br />';
else if ($dps) else if ($dps)
{ {
if ($_class == ITEM_CLASS_WEAPON) if ($_class == ITEM_CLASS_WEAPON)
{ {
$x .= '<table width="100%"><tr>'; $x .= '<table width="100%"><tr>';
$x .= '<td><!--dmg-->'.sprintf($this->curTpl['dmgType1'] ? Lang::$item['damageMagic'] : Lang::$item['damagePhys'], $this->curTpl['dmgMin1'].' - '.$this->curTpl['dmgMax1'], Lang::$game['sc'][$this->curTpl['dmgType1']]).'</td>'; $x .= '<td><!--dmg-->'.sprintf($this->curTpl['dmgType1'] ? Lang::item('damageMagic') : Lang::item('damagePhys'), $this->curTpl['dmgMin1'].' - '.$this->curTpl['dmgMax1'], Lang::game('sc', $this->curTpl['dmgType1'])).'</td>';
$x .= '<th>'.Lang::$item['speed'].' <!--spd-->'.number_format($speed, 2).'</th>'; $x .= '<th>'.Lang::item('speed').' <!--spd-->'.number_format($speed, 2).'</th>';
$x .= '</tr></table>'; $x .= '</tr></table>';
} }
else else
$x .= '<!--dmg-->'.sprintf($this->curTpl['dmgType1'] ? Lang::$item['damageMagic'] : Lang::$item['damagePhys'], $this->curTpl['dmgMin1'].' - '.$this->curTpl['dmgMax1'], Lang::$game['sc'][$this->curTpl['dmgType1']]).'<br />'; $x .= '<!--dmg-->'.sprintf($this->curTpl['dmgType1'] ? Lang::item('damageMagic') : Lang::item('damagePhys'), $this->curTpl['dmgMin1'].' - '.$this->curTpl['dmgMax1'], Lang::game('sc', $this->curTpl['dmgType1'])).'<br />';
// secondary damage is set // secondary damage is set
if ($this->curTpl['dmgMin2']) if ($this->curTpl['dmgMin2'])
$x .= '+'.sprintf($this->curTpl['dmgType2'] ? Lang::$item['damageMagic'] : Lang::$item['damagePhys'], $this->curTpl['dmgMin2'].' - '.$this->curTpl['dmgMax2'], Lang::$game['sc'][$this->curTpl['dmgType2']]).'<br />'; $x .= '+'.sprintf($this->curTpl['dmgType2'] ? Lang::item('damageMagic') : Lang::item('damagePhys'), $this->curTpl['dmgMin2'].' - '.$this->curTpl['dmgMax2'], Lang::game('sc', $this->curTpl['dmgType2'])).'<br />';
if ($_class == ITEM_CLASS_WEAPON) if ($_class == ITEM_CLASS_WEAPON)
$x .= '<!--dps-->('.number_format($dps, 1).' '.Lang::$item['dps'].')<br />'; $x .= '<!--dps-->('.number_format($dps, 1).' '.Lang::item('dps').')<br />';
// display FeralAttackPower if set // display FeralAttackPower if set
if ($fap = $this->getFeralAP()) if ($fap = $this->getFeralAP())
$x .= '<span class="c11"><!--fap-->('.$fap.' '.Lang::$item['fap'].')</span><br />'; $x .= '<span class="c11"><!--fap-->('.$fap.' '.Lang::item('fap').')</span><br />';
} }
// Armor // Armor
@@ -617,14 +617,14 @@ class ItemList extends BaseType
if ($interactive) if ($interactive)
$spanI = 'class="q2 tip" onmouseover="$WH.Tooltip.showAtCursor(event, $WH.sprintf(LANG.tooltip_armorbonus, '.$this->curTpl['armorDamageModifier'].'), 0, 0, \'q\')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"'; $spanI = 'class="q2 tip" onmouseover="$WH.Tooltip.showAtCursor(event, $WH.sprintf(LANG.tooltip_armorbonus, '.$this->curTpl['armorDamageModifier'].'), 0, 0, \'q\')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"';
$x .= '<span '.$spanI.'><!--addamr'.$this->curTpl['armorDamageModifier'].'--><span>'.sprintf(Lang::$item['armor'], intVal($this->curTpl['armor'] + $this->curTpl['armorDamageModifier'])).'</span></span><br />'; $x .= '<span '.$spanI.'><!--addamr'.$this->curTpl['armorDamageModifier'].'--><span>'.sprintf(Lang::item('armor'), intVal($this->curTpl['armor'] + $this->curTpl['armorDamageModifier'])).'</span></span><br />';
} }
else if (($this->curTpl['armor'] + $this->curTpl['armorDamageModifier']) > 0) else if (($this->curTpl['armor'] + $this->curTpl['armorDamageModifier']) > 0)
$x .= '<span><!--amr-->'.sprintf(Lang::$item['armor'], intVal($this->curTpl['armor'] + $this->curTpl['armorDamageModifier'])).'</span><br />'; $x .= '<span><!--amr-->'.sprintf(Lang::item('armor'), intVal($this->curTpl['armor'] + $this->curTpl['armorDamageModifier'])).'</span><br />';
// Block // Block
if ($this->curTpl['block']) if ($this->curTpl['block'])
$x .= '<span>'.sprintf(Lang::$item['block'], $this->curTpl['block']).'</span><br />'; $x .= '<span>'.sprintf(Lang::item('block'), $this->curTpl['block']).'</span><br />';
// Item is a gem (don't mix with sockets) // Item is a gem (don't mix with sockets)
if ($geId = $this->curTpl['gemEnchantmentId']) if ($geId = $this->curTpl['gemEnchantmentId'])
@@ -647,10 +647,10 @@ class ItemList extends BaseType
case 2: // requires less <color> than (<value> || <comparecolor>) gems case 2: // requires less <color> than (<value> || <comparecolor>) gems
case 5: // requires at least <color> than (<value> || <comparecolor>) gems case 5: // requires at least <color> than (<value> || <comparecolor>) gems
$sp = (int)$gemCnd['value'.$i] > 1; $sp = (int)$gemCnd['value'.$i] > 1;
$x .= '<span class="q0">'.Lang::$achievement['reqNumCrt'].' '.sprintf(Lang::$item['gemConditions'][$gemCnd['comparator'.$i]][$sp], $gemCnd['value'.$i], Lang::$item['gemColors'][$gemCnd['color'.$i] - 1]).'</span><br />'; $x .= '<span class="q0">'.Lang::achievement('reqNumCrt').' '.sprintf(Lang::item('gemConditions', $gemCnd['comparator'.$i], $sp), $gemCnd['value'.$i], Lang::item('gemColors', $gemCnd['color'.$i] - 1)).'</span><br />';
break; break;
case 3: // requires more <color> than (<value> || <comparecolor>) gems case 3: // requires more <color> than (<value> || <comparecolor>) gems
$x .= '<span class="q0">'.Lang::$achievement['reqNumCrt'].' '.sprintf(Lang::$item['gemConditions'][3], Lang::$item['gemColors'][$gemCnd['color'.$i] - 1], Lang::$item['gemColors'][$gemCnd['cmpColor'.$i] - 1]).'</span><br />'; $x .= '<span class="q0">'.Lang::achievement('reqNumCrt').' '.sprintf(Lang::item('gemConditions', 3), Lang::item('gemColors', $gemCnd['color'.$i] - 1), Lang::item('gemColors', $gemCnd['cmpColor'.$i] - 1)).'</span><br />';
break; break;
} }
} }
@@ -660,7 +660,7 @@ class ItemList extends BaseType
// Random Enchantment - if random enchantment is set, prepend stats from it // Random Enchantment - if random enchantment is set, prepend stats from it
if ($this->curTpl['randomEnchant'] && !isset($enhance['r'])) if ($this->curTpl['randomEnchant'] && !isset($enhance['r']))
$x .= '<span class="q2">'.Lang::$item['randEnchant'].'</span><br />'; $x .= '<span class="q2">'.Lang::item('randEnchant').'</span><br />';
else if (isset($enhance['r'])) else if (isset($enhance['r']))
$x .= $randEnchant; $x .= $randEnchant;
@@ -675,7 +675,7 @@ class ItemList extends BaseType
// base stat // base stat
if ($type >= ITEM_MOD_AGILITY && $type <= ITEM_MOD_STAMINA) if ($type >= ITEM_MOD_AGILITY && $type <= ITEM_MOD_STAMINA)
$x .= '<span><!--stat'.$type.'-->'.($qty > 0 ? '+' : '-').abs($qty).' '.Lang::$item['statType'][$type].'</span><br />'; $x .= '<span><!--stat'.$type.'-->'.($qty > 0 ? '+' : '-').abs($qty).' '.Lang::item('statType', $type).'</span><br />';
else // rating with % for reqLevel else // rating with % for reqLevel
$green[] = $this->parseRating($type, $qty, $interactive, $causesScaling); $green[] = $this->parseRating($type, $qty, $interactive, $causesScaling);
} }
@@ -683,7 +683,7 @@ class ItemList extends BaseType
// magic resistances // magic resistances
foreach (Util::$resistanceFields as $j => $rowName) foreach (Util::$resistanceFields as $j => $rowName)
if ($rowName && $this->curTpl[$rowName] != 0) if ($rowName && $this->curTpl[$rowName] != 0)
$x .= '+'.$this->curTpl[$rowName].' '.Lang::$game['resistances'][$j].'<br />'; $x .= '+'.$this->curTpl[$rowName].' '.Lang::game('resistances', $j).'<br />';
// Enchantment // Enchantment
if (isset($enhance['e'])) if (isset($enhance['e']))
@@ -735,7 +735,7 @@ class ItemList extends BaseType
$col = $pop ? 1 : 0; $col = $pop ? 1 : 0;
$hasMatch &= $pop ? (($gems[$pop]['colorMask'] & (1 << $colorId)) ? 1 : 0) : 0; $hasMatch &= $pop ? (($gems[$pop]['colorMask'] & (1 << $colorId)) ? 1 : 0) : 0;
$icon = $pop ? sprintf(Util::$bgImagePath['tiny'], STATIC_URL, strtolower($gems[$pop]['iconString'])) : null; $icon = $pop ? sprintf(Util::$bgImagePath['tiny'], STATIC_URL, strtolower($gems[$pop]['iconString'])) : null;
$text = $pop ? Util::localizedString($gems[$pop], 'text') : Lang::$item['socket'][$colorId]; $text = $pop ? Util::localizedString($gems[$pop], 'text') : Lang::item('socket', $colorId);
if ($interactive) if ($interactive)
$x .= '<a href="?items=3&amp;filter=cr=81;crs='.($colorId + 1).';crv=0" class="socket-'.Util::$sockets[$colorId].' q'.$col.'" '.$icon.'>'.$text.'</a><br />'; $x .= '<a href="?items=3&amp;filter=cr=81;crs='.($colorId + 1).';crv=0" class="socket-'.Util::$sockets[$colorId].' q'.$col.'" '.$icon.'>'.$text.'</a><br />';
@@ -749,7 +749,7 @@ class ItemList extends BaseType
$pop = array_pop($enhance['g']); $pop = array_pop($enhance['g']);
$col = $pop ? 1 : 0; $col = $pop ? 1 : 0;
$icon = $pop ? sprintf(Util::$bgImagePath['tiny'], STATIC_URL, strtolower($gems[$pop]['iconString'])) : null; $icon = $pop ? sprintf(Util::$bgImagePath['tiny'], STATIC_URL, strtolower($gems[$pop]['iconString'])) : null;
$text = $pop ? Util::localizedString($gems[$pop], 'text') : Lang::$item['socket'][-1]; $text = $pop ? Util::localizedString($gems[$pop], 'text') : Lang::item('socket', -1);
if ($interactive) if ($interactive)
$x .= '<a href="?items=3&amp;filter=cr=81;crs=5;crv=0" class="socket-prismatic q'.$col.'" '.$icon.'>'.$text.'</a><br />'; $x .= '<a href="?items=3&amp;filter=cr=81;crs=5;crv=0" class="socket-prismatic q'.$col.'" '.$icon.'>'.$text.'</a><br />';
@@ -762,12 +762,12 @@ class ItemList extends BaseType
if ($this->curTpl['socketBonus']) if ($this->curTpl['socketBonus'])
{ {
$sbonus = DB::Aowow()->selectRow('SELECT * FROM ?_itemenchantment WHERE Id = ?d', $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'].Lang::$main['colon'].Util::localizedString($sbonus, 'text').'</span><br />'; $x .= '<span class="q'.($hasMatch ? '2' : '0').'">'.Lang::item('socketBonus').Lang::main('colon').Util::localizedString($sbonus, 'text').'</span><br />';
} }
// durability // durability
if ($dur = $this->curTpl['durability']) if ($dur = $this->curTpl['durability'])
$x .= Lang::$item['durability'].' '.$dur.' / '.$dur.'<br />'; $x .= Lang::item('durability').' '.$dur.' / '.$dur.'<br />';
// required classes // required classes
if ($classes = Lang::getClassString($this->curTpl['requiredClass'], $jsg, $__)) if ($classes = Lang::getClassString($this->curTpl['requiredClass'], $jsg, $__))
@@ -776,7 +776,7 @@ class ItemList extends BaseType
if (empty($this->jsGlobals[TYPE_CLASS][$js])) if (empty($this->jsGlobals[TYPE_CLASS][$js]))
$this->jsGlobals[TYPE_CLASS][$js] = $js; $this->jsGlobals[TYPE_CLASS][$js] = $js;
$x .= Lang::$game['classes'].Lang::$main['colon'].$classes.'<br />'; $x .= Lang::game('classes').Lang::main('colon').$classes.'<br />';
} }
// required races // required races
@@ -786,30 +786,30 @@ class ItemList extends BaseType
if (empty($this->jsGlobals[TYPE_RACE][$js])) if (empty($this->jsGlobals[TYPE_RACE][$js]))
$this->jsGlobals[TYPE_RACE][$js] = $js; $this->jsGlobals[TYPE_RACE][$js] = $js;
if ($races != Lang::$game['ra'][0]) // not "both", but display combinations like: troll, dwarf if ($races != Lang::game('ra', 0)) // not "both", but display combinations like: troll, dwarf
$x .= Lang::$game['races'].Lang::$main['colon'].$races.'<br />'; $x .= Lang::game('races').Lang::main('colon').$races.'<br />';
} }
// required honorRank (not used anymore) // required honorRank (not used anymore)
if ($rhr = $this->curTpl['requiredHonorRank']) if ($rhr = $this->curTpl['requiredHonorRank'])
$x .= sprintf(Lang::$game['requires'], Lang::$game['pvpRank'][$rhr]).'<br />'; $x .= sprintf(Lang::game('requires'), Lang::game('pvpRank', $rhr)).'<br />';
// required CityRank..? // required CityRank..?
// what the f.. // what the f..
// required level // required level
if (($_flags & ITEM_FLAG_ACCOUNTBOUND) && $_quality == ITEM_QUALITY_HEIRLOOM) if (($_flags & ITEM_FLAG_ACCOUNTBOUND) && $_quality == ITEM_QUALITY_HEIRLOOM)
$x .= sprintf(Lang::$game['reqLevelHlm'], ' 1'.Lang::$game['valueDelim'].MAX_LEVEL.' ('.($interactive ? sprintf(Util::$changeLevelString, MAX_LEVEL) : '<!--lvl-->'.MAX_LEVEL).')').'<br />'; $x .= sprintf(Lang::game('reqLevelHlm'), ' 1'.Lang::game('valueDelim').MAX_LEVEL.' ('.($interactive ? sprintf(Util::$changeLevelString, MAX_LEVEL) : '<!--lvl-->'.MAX_LEVEL).')').'<br />';
else if ($_reqLvl > 1) else if ($_reqLvl > 1)
$x .= sprintf(Lang::$game['reqLevel'], $_reqLvl).'<br />'; $x .= sprintf(Lang::game('reqLevel'), $_reqLvl).'<br />';
// required arena team rating / personal rating / todo (low): sort out what kind of rating // required arena team rating / personal rating / todo (low): sort out what kind of rating
if (!empty($this->getExtendedCost([], $reqRating)[$this->id]) && $reqRating) if (!empty($this->getExtendedCost([], $reqRating)[$this->id]) && $reqRating)
$x .= sprintf(Lang::$item['reqRating'], $reqRating).'<br />'; $x .= sprintf(Lang::item('reqRating'), $reqRating).'<br />';
// item level // item level
if (in_array($_class, [ITEM_CLASS_ARMOR, ITEM_CLASS_WEAPON])) if (in_array($_class, [ITEM_CLASS_ARMOR, ITEM_CLASS_WEAPON]))
$x .= Lang::$item['itemLevel'].' '.$this->curTpl['itemLevel'].'<br />'; $x .= Lang::item('itemLevel').' '.$this->curTpl['itemLevel'].'<br />';
// required skill // required skill
if ($reqSkill = $this->curTpl['requiredSkill']) if ($reqSkill = $this->curTpl['requiredSkill'])
@@ -818,22 +818,22 @@ class ItemList extends BaseType
if ($this->curTpl['requiredSkillRank'] > 0) if ($this->curTpl['requiredSkillRank'] > 0)
$_ .= ' ('.$this->curTpl['requiredSkillRank'].')'; $_ .= ' ('.$this->curTpl['requiredSkillRank'].')';
$x .= sprintf(Lang::$game['requires'], $_).'<br />'; $x .= sprintf(Lang::game('requires'), $_).'<br />';
} }
// required spell // required spell
if ($reqSpell = $this->curTpl['requiredSpell']) if ($reqSpell = $this->curTpl['requiredSpell'])
$x .= Lang::$game['requires2'].' <a class="q1" href="?spell='.$reqSpell.'">'.SpellList::getName($reqSpell).'</a><br />'; $x .= Lang::game('requires2').' <a class="q1" href="?spell='.$reqSpell.'">'.SpellList::getName($reqSpell).'</a><br />';
// required reputation w/ faction // required reputation w/ faction
if ($reqFac = $this->curTpl['requiredFaction']) if ($reqFac = $this->curTpl['requiredFaction'])
$x .= sprintf(Lang::$game['requires'], '<a class="q1" href=?faction="'.$reqFac.'">'.FactionList::getName($reqFac).'</a> - '.Lang::$game['rep'][$this->curTpl['requiredFactionRank']]).'<br />'; $x .= sprintf(Lang::game('requires'), '<a class="q1" href=?faction="'.$reqFac.'">'.FactionList::getName($reqFac).'</a> - '.Lang::game('rep', $this->curTpl['requiredFactionRank'])).'<br />';
// locked or openable // locked or openable
if ($locks = Lang::getLocks($this->curTpl['lockId'], true)) if ($locks = Lang::getLocks($this->curTpl['lockId'], true))
$x .= '<span class="q0">'.Lang::$item['locked'].'<br />'.implode('<br />', $locks).'</span><br />'; $x .= '<span class="q0">'.Lang::item('locked').'<br />'.implode('<br />', $locks).'</span><br />';
else if ($this->curTpl['flags'] & ITEM_FLAG_OPENABLE) else if ($this->curTpl['flags'] & ITEM_FLAG_OPENABLE)
$x .= '<span class="q2">'.Lang::$item['openClick'].'</span><br />'; $x .= '<span class="q2">'.Lang::item('openClick').'</span><br />';
// upper table: done // upper table: done
if (!$subOf) if (!$subOf)
@@ -851,7 +851,7 @@ class ItemList extends BaseType
if ($cd < $this->curTpl['spellCategoryCooldown'.$j]) if ($cd < $this->curTpl['spellCategoryCooldown'.$j])
$cd = $this->curTpl['spellCategoryCooldown'.$j]; $cd = $this->curTpl['spellCategoryCooldown'.$j];
$cd = $cd < 5000 ? null : ' ('.sprintf(Lang::$game['cooldown'], Util::formatTime($cd)).')'; $cd = $cd < 5000 ? null : ' ('.sprintf(Lang::game('cooldown'), Util::formatTime($cd)).')';
$itemSpellsAndTrigger[$this->curTpl['spellId'.$j]] = [$this->curTpl['spellTrigger'.$j], $cd]; $itemSpellsAndTrigger[$this->curTpl['spellId'.$j]] = [$this->curTpl['spellTrigger'.$j], $cd];
} }
@@ -879,7 +879,7 @@ class ItemList extends BaseType
$parsed = sprintF($link, $parsed); $parsed = sprintF($link, $parsed);
} }
$green[] = Lang::$item['trigger'][$itemSpellsAndTrigger[$itemSpells->id][0]].$parsed.$itemSpellsAndTrigger[$itemSpells->id][1]; $green[] = Lang::item('trigger', $itemSpellsAndTrigger[$itemSpells->id][0]).$parsed.$itemSpellsAndTrigger[$itemSpells->id][1];
} }
} }
} }
@@ -915,7 +915,7 @@ class ItemList extends BaseType
if ($skId = $itemset->getField('skillId')) // bonus requires skill to activate if ($skId = $itemset->getField('skillId')) // bonus requires skill to activate
{ {
$xSet .= '<br />'.sprintf(Lang::$game['requires'], '<a href="?skills='.$skId.'" class="q1">'.SkillList::getName($skId).'</a>'); $xSet .= '<br />'.sprintf(Lang::game('requires'), '<a href="?skills='.$skId.'" class="q1">'.SkillList::getName($skId).'</a>');
if ($_ = $itemset->getField('skillLevel')) if ($_ = $itemset->getField('skillLevel'))
$xSet .= ' ('.$_.')'; $xSet .= ' ('.$_.')';
@@ -959,7 +959,7 @@ class ItemList extends BaseType
$setSpells[$i] = $setSpells[$j]; $setSpells[$i] = $setSpells[$j];
$setSpells[$j] = $tmp; $setSpells[$j] = $tmp;
} }
$xSet .= '<span>('.$setSpells[$i]['bonus'].') '.Lang::$item['set'].': <a href="?spell='.$setSpells[$i]['entry'].'">'.$setSpells[$i]['tooltip'].'</a></span>'; $xSet .= '<span>('.$setSpells[$i]['bonus'].') '.Lang::item('set').': <a href="?spell='.$setSpells[$i]['entry'].'">'.$setSpells[$i]['tooltip'].'</a></span>';
if ($i < count($setSpells) - 1) if ($i < count($setSpells) - 1)
$xSet .= '<br />'; $xSet .= '<br />';
} }
@@ -974,7 +974,7 @@ class ItemList extends BaseType
{ {
$xCraft = ''; $xCraft = '';
if ($desc = $this->getField('description', true)) if ($desc = $this->getField('description', true))
$x .= '<span class="q2">'.Lang::$item['trigger'][0].' <a href="?spell='.$this->curTpl['spellId2'].'">'.$desc.'</a></span><br />'; $x .= '<span class="q2">'.Lang::item('trigger', 0).' <a href="?spell='.$this->curTpl['spellId2'].'">'.$desc.'</a></span><br />';
// recipe handling (some stray Techniques have subclass == 0), place at bottom of tooltipp // recipe handling (some stray Techniques have subclass == 0), place at bottom of tooltipp
if ($_class == ITEM_CLASS_RECIPE || $this->curTpl['bagFamily'] == 16) if ($_class == ITEM_CLASS_RECIPE || $this->curTpl['bagFamily'] == 16)
@@ -998,7 +998,7 @@ class ItemList extends BaseType
foreach ($reagents->iterate() as $__) foreach ($reagents->iterate() as $__)
$reqReag[] = '<a href="?item='.$reagents->id.'">'.$reagents->getField('name', true).'</a> ('.$reagentItems[$reagents->id].')'; $reqReag[] = '<a href="?item='.$reagents->id.'">'.$reagents->getField('name', true).'</a> ('.$reagentItems[$reagents->id].')';
$xCraft .= '<div class="q1 whtt-reagents"><br />'.Lang::$game['requires2'].' '.implode(', ', $reqReag).'</div>'; $xCraft .= '<div class="q1 whtt-reagents"><br />'.Lang::game('requires2').' '.implode(', ', $reqReag).'</div>';
} }
} }
} }
@@ -1018,11 +1018,11 @@ class ItemList extends BaseType
// readable // readable
if ($this->curTpl['pageTextId']) if ($this->curTpl['pageTextId'])
$xMisc[] = '<span class="q2">'.Lang::$item['readClick'].'</span>'; $xMisc[] = '<span class="q2">'.Lang::item('readClick').'</span>';
// charges (i guess checking first spell is enough (single charges not shown)) // charges (i guess checking first spell is enough (single charges not shown))
if ($this->curTpl['spellCharges1'] > 1 || $this->curTpl['spellCharges1'] < -1) if ($this->curTpl['spellCharges1'] > 1 || $this->curTpl['spellCharges1'] < -1)
$xMisc[] = '<span class="q1">'.abs($this->curTpl['spellCharges1']).' '.Lang::$item['charges'].'</span>'; $xMisc[] = '<span class="q1">'.abs($this->curTpl['spellCharges1']).' '.Lang::item('charges').'</span>';
// list required reagents // list required reagents
if (isset($xCraft)) if (isset($xCraft))
@@ -1032,7 +1032,7 @@ class ItemList extends BaseType
$x .= implode('<br />', $xMisc); $x .= implode('<br />', $xMisc);
if ($sp = $this->curTpl['sellPrice']) if ($sp = $this->curTpl['sellPrice'])
$x .= '<div class="q1 whtt-sellprice">'.Lang::$item['sellPrice'].Lang::$main['colon'].Util::formatMoney($sp).'</div>'; $x .= '<div class="q1 whtt-sellprice">'.Lang::item('sellPrice').Lang::main('colon').Util::formatMoney($sp).'</div>';
if (!$subOf) if (!$subOf)
$x .= '</td></tr></table>'; $x .= '</td></tr></table>';
@@ -1277,10 +1277,10 @@ class ItemList extends BaseType
$reqLvl = $this->curTpl['requiredLevel'] > 1 ? $this->curTpl['requiredLevel'] : MAX_LEVEL; $reqLvl = $this->curTpl['requiredLevel'] > 1 ? $this->curTpl['requiredLevel'] : MAX_LEVEL;
$level = min(max($reqLvl, $ssdLvl), MAX_LEVEL); $level = min(max($reqLvl, $ssdLvl), MAX_LEVEL);
if (!Lang::$item['statType'][$type]) // unknown rating if (!Lang::item('statType', $type)) // unknown rating
return sprintf(Lang::$item['statType'][count(Lang::$item['statType']) - 1], $type, $value); return sprintf(Lang::item('statType', count(Lang::item('statType')) - 1), $type, $value);
else if (in_array($type, Util::$lvlIndepRating)) // level independant Bonus else if (in_array($type, Util::$lvlIndepRating)) // level independant Bonus
return Lang::$item['trigger'][1].str_replace('%d', '<!--rtg'.$type.'-->'.$value, Lang::$item['statType'][$type]); return Lang::item('trigger', 1).str_replace('%d', '<!--rtg'.$type.'-->'.$value, Lang::item('statType', $type));
else // rating-Bonuses else // rating-Bonuses
{ {
$scaling = true; $scaling = true;
@@ -1290,7 +1290,7 @@ class ItemList extends BaseType
else else
$js = "&nbsp;<small>(".Util::setRatingLevel($level, $type, $value).")</small>"; $js = "&nbsp;<small>(".Util::setRatingLevel($level, $type, $value).")</small>";
return Lang::$item['trigger'][1].str_replace('%d', '<!--rtg'.$type.'-->'.$value.$js, Lang::$item['statType'][$type]); return Lang::item('trigger', 1).str_replace('%d', '<!--rtg'.$type.'-->'.$value.$js, Lang::item('statType', $type));
} }
} }

View File

@@ -155,7 +155,7 @@ class ProfileList extends BaseType
$x .= '<tr><td>&lt;'.$g.'&gt; ('.$this->getField('guildrank').')</td></tr>'; $x .= '<tr><td>&lt;'.$g.'&gt; ('.$this->getField('guildrank').')</td></tr>';
else if ($d = $this->getField('description')) else if ($d = $this->getField('description'))
$x .= '<tr><td>'.$d.'</td></tr>'; $x .= '<tr><td>'.$d.'</td></tr>';
$x .= '<tr><td>'.Lang::$game['level'].' '.$this->getField('level').' '.Lang::$game['ra'][$this->curTpl['race']].' '.Lang::$game['cl'][$this->curTpl['classs']].'</td></tr>'; $x .= '<tr><td>'.Lang::game('level').' '.$this->getField('level').' '.Lang::game('ra', $this->curTpl['race']).' '.Lang::game('cl', $this->curTpl['classs']).'</td></tr>';
$x .= '</table>'; $x .= '</table>';
return $x; return $x;

View File

@@ -281,10 +281,10 @@ class QuestList extends BaseType
$x = ''; $x = '';
if ($level) if ($level)
{ {
$level = sprintf(Lang::$quest['questLevel'], $level); $level = sprintf(Lang::quest('questLevel'), $level);
if ($this->curTpl['flags'] & QUEST_FLAG_DAILY) // daily if ($this->curTpl['flags'] & QUEST_FLAG_DAILY) // daily
$level .= ' '.Lang::$quest['daily']; $level .= ' '.Lang::quest('daily');
$x .= '<table><tr><td><table width="100%"><tr><td><b class="q">'.$title.'</b></td><th><b class="q0">'.$level.'</b></th></tr></table></td></tr></table>'; $x .= '<table><tr><td><table width="100%"><tr><td><b class="q">'.$title.'</b></td><th><b class="q0">'.$level.'</b></th></tr></table></td></tr></table>';
} }
@@ -329,10 +329,10 @@ class QuestList extends BaseType
if ($_ = $this->getField('rewardOrReqMoney')) if ($_ = $this->getField('rewardOrReqMoney'))
if ($_ < 0) if ($_ < 0)
$xReq .= '<br /> - '.Lang::$quest['money'].Lang::$main['colon'].Util::formatMoney(abs($_)); $xReq .= '<br /> - '.Lang::quest('money').Lang::main('colon').Util::formatMoney(abs($_));
if ($xReq) if ($xReq)
$x .= '<br /><br /><span class="q">'.Lang::$quest['requirements'].Lang::$main['colon'].'</span>'.$xReq; $x .= '<br /><br /><span class="q">'.Lang::quest('requirements').Lang::main('colon').'</span>'.$xReq;
$x .= '</td></tr></table>'; $x .= '</td></tr></table>';

View File

@@ -503,19 +503,19 @@ class SpellList extends BaseType
// minRange exists; show as range // minRange exists; show as range
if ($this->curTpl['rangeMinHostile']) if ($this->curTpl['rangeMinHostile'])
return sprintf(Lang::$spell['range'], $this->curTpl['rangeMinHostile'].' - '.$this->curTpl['rangeMaxHostile']); return sprintf(Lang::spell('range'), $this->curTpl['rangeMinHostile'].' - '.$this->curTpl['rangeMaxHostile']);
// friend and hostile differ; do color // friend and hostile differ; do color
else if ($this->curTpl['rangeMaxHostile'] != $this->curTpl['rangeMaxFriend']) else if ($this->curTpl['rangeMaxHostile'] != $this->curTpl['rangeMaxFriend'])
return sprintf(Lang::$spell['range'], '<span class="q10">'.$this->curTpl['rangeMaxHostile'].'</span> - <span class="q2">'.$this->curTpl['rangeMaxHostile']. '</span>'); return sprintf(Lang::spell('range'), '<span class="q10">'.$this->curTpl['rangeMaxHostile'].'</span> - <span class="q2">'.$this->curTpl['rangeMaxHostile']. '</span>');
// hardcode: "melee range" // hardcode: "melee range"
else if ($this->curTpl['rangeMaxHostile'] == 5) else if ($this->curTpl['rangeMaxHostile'] == 5)
return Lang::$spell['meleeRange']; return Lang::spell('meleeRange');
// hardcode "unlimited range" // hardcode "unlimited range"
else if ($this->curTpl['rangeMaxHostile'] == 50000) else if ($this->curTpl['rangeMaxHostile'] == 50000)
return Lang::$spell['unlimRange']; return Lang::spell('unlimRange');
// regular case // regular case
else else
return sprintf(Lang::$spell['range'], $this->curTpl['rangeMaxHostile']); return sprintf(Lang::spell('range'), $this->curTpl['rangeMaxHostile']);
} }
public function createPowerCostForCurrent() public function createPowerCostForCurrent()
@@ -527,29 +527,29 @@ class SpellList extends BaseType
// power cost: pct over static // power cost: pct over static
if ($this->curTpl['powerCostPercent'] > 0) if ($this->curTpl['powerCostPercent'] > 0)
$str .= $this->curTpl['powerCostPercent']."% ".sprintf(Lang::$spell['pctCostOf'], strtolower(Lang::$spell['powerTypes'][$pt])); $str .= $this->curTpl['powerCostPercent']."% ".sprintf(Lang::spell('pctCostOf'), strtolower(Lang::spell('powerTypes', $pt)));
else if ($this->curTpl['powerCost'] > 0 || $this->curTpl['powerPerSecond'] > 0 || $this->curTpl['powerCostPerLevel'] > 0) else if ($this->curTpl['powerCost'] > 0 || $this->curTpl['powerPerSecond'] > 0 || $this->curTpl['powerCostPerLevel'] > 0)
$str .= ($pt == POWER_RAGE || $pt == POWER_RUNIC_POWER ? $this->curTpl['powerCost'] / 10 : $this->curTpl['powerCost']).' '.Util::ucFirst(Lang::$spell['powerTypes'][$pt]); $str .= ($pt == POWER_RAGE || $pt == POWER_RUNIC_POWER ? $this->curTpl['powerCost'] / 10 : $this->curTpl['powerCost']).' '.Util::ucFirst(Lang::spell('powerTypes', $pt));
else if ($rCost = ($this->curTpl['powerCostRunes'] & 0x333)) else if ($rCost = ($this->curTpl['powerCostRunes'] & 0x333))
{ // Blood 2|1 - Unholy 2|1 - Frost 2|1 { // Blood 2|1 - Unholy 2|1 - Frost 2|1
$runes = []; $runes = [];
if ($_ = (($rCost & 0x300) >> 8)) if ($_ = (($rCost & 0x300) >> 8))
$runes[] = $_.' '.Lang::$spell['powerRunes'][2]; $runes[] = $_.' '.Lang::spell('powerRunes', 2);
if ($_ = (($rCost & 0x030) >> 4)) if ($_ = (($rCost & 0x030) >> 4))
$runes[] = $_.' '.Lang::$spell['powerRunes'][1]; $runes[] = $_.' '.Lang::spell('powerRunes', 1);
if ($_ = ($rCost & 0x003)) if ($_ = ($rCost & 0x003))
$runes[] = $_.' '.Lang::$spell['powerRunes'][0]; $runes[] = $_.' '.Lang::spell('powerRunes', 0);
$str .= implode(', ', $runes); $str .= implode(', ', $runes);
} }
// append periodic cost // append periodic cost
if ($this->curTpl['powerPerSecond'] > 0) if ($this->curTpl['powerPerSecond'] > 0)
$str .= sprintf(Lang::$spell['costPerSec'], $this->curTpl['powerPerSecond']); $str .= sprintf(Lang::spell('costPerSec'), $this->curTpl['powerPerSecond']);
// append level cost (todo (low): work in as scaling cost) // append level cost (todo (low): work in as scaling cost)
if ($this->curTpl['powerCostPerLevel'] > 0) if ($this->curTpl['powerCostPerLevel'] > 0)
$str .= sprintf(Lang::$spell['costPerLevel'], $this->curTpl['powerCostPerLevel']); $str .= sprintf(Lang::spell('costPerLevel'), $this->curTpl['powerCostPerLevel']);
return $str; return $str;
} }
@@ -557,25 +557,25 @@ class SpellList extends BaseType
public function createCastTimeForCurrent($short = true, $noInstant = true) public function createCastTimeForCurrent($short = true, $noInstant = true)
{ {
if ($this->curTpl['interruptFlagsChannel']) if ($this->curTpl['interruptFlagsChannel'])
return Lang::$spell['channeled']; return Lang::spell('channeled');
else if ($this->curTpl['castTime'] > 0) else if ($this->curTpl['castTime'] > 0)
return $short ? sprintf(Lang::$spell['castIn'], $this->curTpl['castTime'] / 1000) : Util::formatTime($this->curTpl['castTime']); return $short ? sprintf(Lang::spell('castIn'), $this->curTpl['castTime'] / 1000) : Util::formatTime($this->curTpl['castTime']);
// show instant only for player/pet/npc abilities (todo (low): unsure when really hidden (like talent-case)) // show instant only for player/pet/npc abilities (todo (low): unsure when really hidden (like talent-case))
else if ($noInstant && !in_array($this->curTpl['typeCat'], [11, 7, -3, -6, -8, 0]) && !($this->curTpl['cuFlags'] & SPELL_CU_TALENTSPELL)) else if ($noInstant && !in_array($this->curTpl['typeCat'], [11, 7, -3, -6, -8, 0]) && !($this->curTpl['cuFlags'] & SPELL_CU_TALENTSPELL))
return ''; return '';
// SPELL_ATTR0_ABILITY instant ability.. yeah, wording thing only (todo (low): rule is imperfect) // SPELL_ATTR0_ABILITY instant ability.. yeah, wording thing only (todo (low): rule is imperfect)
else if ($this->curTpl['damageClass'] != 1 || $this->curTpl['attributes0'] & 0x10) else if ($this->curTpl['damageClass'] != 1 || $this->curTpl['attributes0'] & 0x10)
return Lang::$spell['instantPhys']; return Lang::spell('instantPhys');
else // instant cast else // instant cast
return Lang::$spell['instantMagic']; return Lang::spell('instantMagic');
} }
private function createCooldownForCurrent() private function createCooldownForCurrent()
{ {
if ($this->curTpl['recoveryTime']) if ($this->curTpl['recoveryTime'])
return sprintf(Lang::$game['cooldown'], Util::formatTime($this->curTpl['recoveryTime'], true)); return sprintf(Lang::game('cooldown'), Util::formatTime($this->curTpl['recoveryTime'], true));
else if ($this->curTpl['recoveryCategory']) else if ($this->curTpl['recoveryCategory'])
return sprintf(Lang::$game['cooldown'], Util::formatTime($this->curTpl['recoveryCategory'], true)); return sprintf(Lang::game('cooldown'), Util::formatTime($this->curTpl['recoveryCategory'], true));
else else
return ''; return '';
} }
@@ -686,17 +686,17 @@ class SpellList extends BaseType
// if (character level is set manually (profiler only)) // if (character level is set manually (profiler only))
// $pl = $PL = $this->charLevel; // $pl = $PL = $this->charLevel;
$PlayerName = Lang::$main['name']; $PlayerName = Lang::main('name');
$ap = $AP = $this->interactive ? sprintf(Util::$dfnString, 'LANG.traits.atkpwr[0]', Lang::$spell['traitShort']['atkpwr']) : Lang::$spell['traitShort']['atkpwr']; $ap = $AP = $this->interactive ? sprintf(Util::$dfnString, 'LANG.traits.atkpwr[0]', Lang::spell('traitShort', 'atkpwr')) : Lang::spell('traitShort', 'atkpwr');
$rap = $RAP = $this->interactive ? sprintf(Util::$dfnString, 'LANG.traits.rgdatkpwr[0]', Lang::$spell['traitShort']['rgdatkpwr']) : Lang::$spell['traitShort']['rgdatkpwr']; $rap = $RAP = $this->interactive ? sprintf(Util::$dfnString, 'LANG.traits.rgdatkpwr[0]', Lang::spell('traitShort', 'rgdatkpwr')) : Lang::spell('traitShort', 'rgdatkpwr');
$sp = $SP = $this->interactive ? sprintf(Util::$dfnString, 'LANG.traits.splpwr[0]', Lang::$spell['traitShort']['splpwr']) : Lang::$spell['traitShort']['splpwr']; $sp = $SP = $this->interactive ? sprintf(Util::$dfnString, 'LANG.traits.splpwr[0]', Lang::spell('traitShort', 'splpwr')) : Lang::spell('traitShort', 'splpwr');
$spa = $SPA = $this->interactive ? sprintf(Util::$dfnString, 'LANG.traits.arcsplpwr[0]', Lang::$spell['traitShort']['arcsplpwr']) : Lang::$spell['traitShort']['arcsplpwr']; $spa = $SPA = $this->interactive ? sprintf(Util::$dfnString, 'LANG.traits.arcsplpwr[0]', Lang::spell('traitShort', 'arcsplpwr')) : Lang::spell('traitShort', 'arcsplpwr');
$spfi = $SPFI = $this->interactive ? sprintf(Util::$dfnString, 'LANG.traits.firsplpwr[0]', Lang::$spell['traitShort']['firsplpwr']) : Lang::$spell['traitShort']['firsplpwr']; $spfi = $SPFI = $this->interactive ? sprintf(Util::$dfnString, 'LANG.traits.firsplpwr[0]', Lang::spell('traitShort', 'firsplpwr')) : Lang::spell('traitShort', 'firsplpwr');
$spfr = $SPFR = $this->interactive ? sprintf(Util::$dfnString, 'LANG.traits.frosplpwr[0]', Lang::$spell['traitShort']['frosplpwr']) : Lang::$spell['traitShort']['frosplpwr']; $spfr = $SPFR = $this->interactive ? sprintf(Util::$dfnString, 'LANG.traits.frosplpwr[0]', Lang::spell('traitShort', 'frosplpwr')) : Lang::spell('traitShort', 'frosplpwr');
$sph = $SPH = $this->interactive ? sprintf(Util::$dfnString, 'LANG.traits.holsplpwr[0]', Lang::$spell['traitShort']['holsplpwr']) : Lang::$spell['traitShort']['holsplpwr']; $sph = $SPH = $this->interactive ? sprintf(Util::$dfnString, 'LANG.traits.holsplpwr[0]', Lang::spell('traitShort', 'holsplpwr')) : Lang::spell('traitShort', 'holsplpwr');
$spn = $SPN = $this->interactive ? sprintf(Util::$dfnString, 'LANG.traits.natsplpwr[0]', Lang::$spell['traitShort']['natsplpwr']) : Lang::$spell['traitShort']['natsplpwr']; $spn = $SPN = $this->interactive ? sprintf(Util::$dfnString, 'LANG.traits.natsplpwr[0]', Lang::spell('traitShort', 'natsplpwr')) : Lang::spell('traitShort', 'natsplpwr');
$sps = $SPS = $this->interactive ? sprintf(Util::$dfnString, 'LANG.traits.shasplpwr[0]', Lang::$spell['traitShort']['shasplpwr']) : Lang::$spell['traitShort']['shasplpwr']; $sps = $SPS = $this->interactive ? sprintf(Util::$dfnString, 'LANG.traits.shasplpwr[0]', Lang::spell('traitShort', 'shasplpwr')) : Lang::spell('traitShort', 'shasplpwr');
$bh = $BH = $this->interactive ? sprintf(Util::$dfnString, 'LANG.traits.splheal[0]', Lang::$spell['traitShort']['splheal']) : Lang::$spell['traitShort']['splheal']; $bh = $BH = $this->interactive ? sprintf(Util::$dfnString, 'LANG.traits.splheal[0]', Lang::spell('traitShort', 'splheal')) : Lang::spell('traitShort', 'splheal');
$HND = $hnd = $this->interactive ? sprintf(Util::$dfnString, '[Hands required by weapon]', 'HND') : 'HND'; // todo (med): localize this one $HND = $hnd = $this->interactive ? sprintf(Util::$dfnString, '[Hands required by weapon]', 'HND') : 'HND'; // todo (med): localize this one
$MWS = $mws = $this->interactive ? sprintf(Util::$dfnString, 'LANG.traits.mlespeed[0]', 'MWS') : 'MWS'; $MWS = $mws = $this->interactive ? sprintf(Util::$dfnString, 'LANG.traits.mlespeed[0]', 'MWS') : 'MWS';
@@ -815,7 +815,7 @@ class SpellList extends BaseType
$base = $this->getField('duration'); $base = $this->getField('duration');
if ($base <= 0) if ($base <= 0)
return Lang::$spell['untilCanceled']; return Lang::spell('untilCanceled');
if ($op && is_numeric($oparg) && is_numeric($base)) if ($op && is_numeric($oparg) && is_numeric($base))
eval("\$base = $base $op $oparg;"); eval("\$base = $base $op $oparg;");
@@ -948,9 +948,9 @@ class SpellList extends BaseType
eval("\$min = $min $op $oparg;"); eval("\$min = $min $op $oparg;");
if ($this->interactive) if ($this->interactive)
return $modStrMin.$min . (!$equal ? Lang::$game['valueDelim'] . $modStrMax.$max : null); return $modStrMin.$min . (!$equal ? Lang::game('valueDelim') . $modStrMax.$max : null);
else else
return $min . (!$equal ? Lang::$game['valueDelim'] . $max : null); return $min . (!$equal ? Lang::game('valueDelim') . $max : null);
case 'q': // EffectMiscValue case 'q': // EffectMiscValue
case 'Q': case 'Q':
if ($lookup) if ($lookup)
@@ -1008,9 +1008,9 @@ class SpellList extends BaseType
else if ($rType && $equal && $aura == 189) else if ($rType && $equal && $aura == 189)
return '<!--rtg'.$rType.'-->'.$min.'&nbsp;<small>('.Util::setRatingLevel($this->charLevel, $rType, $min).')</small>'; return '<!--rtg'.$rType.'-->'.$min.'&nbsp;<small>('.Util::setRatingLevel($this->charLevel, $rType, $min).')</small>';
else if ($this->interactive && $aura == 189) else if ($this->interactive && $aura == 189)
return $modStrMin.$min . (!$equal ? Lang::$game['valueDelim'] . $modStrMax.$max : null); return $modStrMin.$min . (!$equal ? Lang::game('valueDelim') . $modStrMax.$max : null);
else else
return $min . (!$equal ? Lang::$game['valueDelim'] . $max : null); return $min . (!$equal ? Lang::game('valueDelim') . $max : null);
case 't': // Periode case 't': // Periode
case 'T': case 'T':
if ($lookup) if ($lookup)
@@ -1056,7 +1056,7 @@ class SpellList extends BaseType
return $base; return $base;
case 'z': // HomeZone case 'z': // HomeZone
return Lang::$spell['home']; return Lang::spell('home');
} }
} }
@@ -1456,7 +1456,7 @@ Lasts 5 min. $?$gte($pl,68)[][Cannot be used on items level 138 and higher.]
$x .= '<td><b class="q">'.$this->getField('name', true).'</b></td>'; $x .= '<td><b class="q">'.$this->getField('name', true).'</b></td>';
// dispelType (if applicable) // dispelType (if applicable)
if ($dispel = Lang::$game['dt'][$this->curTpl['dispelType']]) if ($dispel = Lang::game('dt', $this->curTpl['dispelType']))
$x .= '<th><b class="q">'.$dispel.'</b></th>'; $x .= '<th><b class="q">'.$dispel.'</b></th>';
$x .= '</tr></table>'; $x .= '</tr></table>';
@@ -1469,7 +1469,7 @@ Lasts 5 min. $?$gte($pl,68)[][Cannot be used on items level 138 and higher.]
// duration // duration
if ($this->curTpl['duration'] > 0) if ($this->curTpl['duration'] > 0)
$x .= '<span class="q">'.sprintf(Lang::$spell['remaining'], Util::formatTime($this->curTpl['duration'])).'<span>'; $x .= '<span class="q">'.sprintf(Lang::spell('remaining'), Util::formatTime($this->curTpl['duration'])).'<span>';
$x .= '</td></tr></table>'; $x .= '</td></tr></table>';
@@ -1506,7 +1506,7 @@ Lasts 5 min. $?$gte($pl,68)[][Cannot be used on items level 138 and higher.]
// get stances (check: SPELL_ATTR2_NOT_NEED_SHAPESHIFT) // get stances (check: SPELL_ATTR2_NOT_NEED_SHAPESHIFT)
$stances = ''; $stances = '';
if ($this->curTpl['stanceMask'] && !($this->curTpl['attributes2'] & 0x80000)) if ($this->curTpl['stanceMask'] && !($this->curTpl['attributes2'] & 0x80000))
$stances = Lang::$game['requires2'].' '.Lang::getStances($this->curTpl['stanceMask']); $stances = Lang::game('requires2').' '.Lang::getStances($this->curTpl['stanceMask']);
// get item requirement (skip for professions) // get item requirement (skip for professions)
$reqItems = ''; $reqItems = '';
@@ -1576,7 +1576,7 @@ Lasts 5 min. $?$gte($pl,68)[][Cannot be used on items level 138 and higher.]
if ($tools) if ($tools)
{ {
$_ = Lang::$spell['tools'].':<br/><div class="indent q1">'; $_ = Lang::spell('tools').':<br/><div class="indent q1">';
while ($tool = array_pop($tools)) while ($tool = array_pop($tools))
{ {
if (isset($tool['itemId'])) if (isset($tool['itemId']))
@@ -1597,7 +1597,7 @@ Lasts 5 min. $?$gte($pl,68)[][Cannot be used on items level 138 and higher.]
if ($reagents) if ($reagents)
{ {
$_ = Lang::$spell['reagents'].':<br/><div class="indent q1">'; $_ = Lang::spell('reagents').':<br/><div class="indent q1">';
while ($reagent = array_pop($reagents)) while ($reagent = array_pop($reagents))
{ {
$_ .= '<a href="?item='.$reagent[0].'">'.$reagent[2].'</a>'; $_ .= '<a href="?item='.$reagent[0].'">'.$reagent[2].'</a>';
@@ -1611,7 +1611,7 @@ Lasts 5 min. $?$gte($pl,68)[][Cannot be used on items level 138 and higher.]
} }
if ($reqItems) if ($reqItems)
$xTmp[] = Lang::$game['requires2'].' '.$reqItems; $xTmp[] = Lang::game('requires2').' '.$reqItems;
if ($desc[0]) if ($desc[0])
$xTmp[] = '<span class="q">'.$desc[0].'</span>'; $xTmp[] = '<span class="q">'.$desc[0].'</span>';

View File

@@ -156,7 +156,7 @@ class TitleList extends BaseType
public function getHtmlizedName($gender = GENDER_MALE) public function getHtmlizedName($gender = GENDER_MALE)
{ {
$field = $gender == GENDER_FEMALE ? 'female' : 'male'; $field = $gender == GENDER_FEMALE ? 'female' : 'male';
return str_replace('%s', '<span class="q0">&lt;'.Util::ucFirst(Lang::$main['name']).'&gt;</span>', $this->getField($field, true)); return str_replace('%s', '<span class="q0">&lt;'.Util::ucFirst(Lang::main('name')).'&gt;</span>', $this->getField($field, true));
} }
public function renderTooltip() { } public function renderTooltip() { }

View File

@@ -813,45 +813,45 @@ class Util
if ($short) if ($short)
{ {
if ($_ = round($s['d'] / 364)) if ($_ = round($s['d'] / 364))
return $_." ".Lang::$timeUnits['ab'][0]; return $_." ".Lang::timeUnits('ab', 0);
if ($_ = round($s['d'] / 30)) if ($_ = round($s['d'] / 30))
return $_." ".Lang::$timeUnits['ab'][1]; return $_." ".Lang::timeUnits('ab', 1);
if ($_ = round($s['d'] / 7)) if ($_ = round($s['d'] / 7))
return $_." ".Lang::$timeUnits['ab'][2]; return $_." ".Lang::timeUnits('ab', 2);
if ($_ = round($s['d'])) if ($_ = round($s['d']))
return $_." ".Lang::$timeUnits['ab'][3]; return $_." ".Lang::timeUnits('ab', 3);
if ($_ = round($s['h'])) if ($_ = round($s['h']))
return $_." ".Lang::$timeUnits['ab'][4]; return $_." ".Lang::timeUnits('ab', 4);
if ($_ = round($s['m'])) if ($_ = round($s['m']))
return $_." ".Lang::$timeUnits['ab'][5]; return $_." ".Lang::timeUnits('ab', 5);
if ($_ = round($s['s'] + $s['ms'] / 1000, 2)) if ($_ = round($s['s'] + $s['ms'] / 1000, 2))
return $_." ".Lang::$timeUnits['ab'][6]; return $_." ".Lang::timeUnits('ab', 6);
if ($s['ms']) if ($s['ms'])
return $s['ms']." ".Lang::$timeUnits['ab'][7]; return $s['ms']." ".Lang::timeUnits('ab', 7);
return '0 '.Lang::$timeUnits['ab'][6]; return '0 '.Lang::timeUnits('ab', 6);
} }
else else
{ {
$_ = $s['d'] + $s['h'] / 24; $_ = $s['d'] + $s['h'] / 24;
if ($_ > 1 && !($_ % 364)) // whole years if ($_ > 1 && !($_ % 364)) // whole years
return round(($s['d'] + $s['h'] / 24) / 364, 2)." ".Lang::$timeUnits[$s['d'] / 364 == 1 && !$s['h'] ? 'sg' : 'pl'][0]; return round(($s['d'] + $s['h'] / 24) / 364, 2)." ".Lang::timeUnits($s['d'] / 364 == 1 && !$s['h'] ? 'sg' : 'pl', 0);
if ($_ > 1 && !($_ % 30)) // whole month if ($_ > 1 && !($_ % 30)) // whole month
return round(($s['d'] + $s['h'] / 24) / 30, 2)." ".Lang::$timeUnits[$s['d'] / 30 == 1 && !$s['h'] ? 'sg' : 'pl'][1]; return round(($s['d'] + $s['h'] / 24) / 30, 2)." ".Lang::timeUnits($s['d'] / 30 == 1 && !$s['h'] ? 'sg' : 'pl', 1);
if ($_ > 1 && !($_ % 7)) // whole weeks if ($_ > 1 && !($_ % 7)) // whole weeks
return round(($s['d'] + $s['h'] / 24) / 7, 2)." ".Lang::$timeUnits[$s['d'] / 7 == 1 && !$s['h'] ? 'sg' : 'pl'][2]; return round(($s['d'] + $s['h'] / 24) / 7, 2)." ".Lang::timeUnits($s['d'] / 7 == 1 && !$s['h'] ? 'sg' : 'pl', 2);
if ($s['d']) if ($s['d'])
return round($s['d'] + $s['h'] / 24, 2)." ".Lang::$timeUnits[$s['d'] == 1 && !$s['h'] ? 'sg' : 'pl'][3]; return round($s['d'] + $s['h'] / 24, 2)." ".Lang::timeUnits($s['d'] == 1 && !$s['h'] ? 'sg' : 'pl', 3);
if ($s['h']) if ($s['h'])
return round($s['h'] + $s['m'] / 60, 2)." ".Lang::$timeUnits[$s['h'] == 1 && !$s['m'] ? 'sg' : 'pl'][4]; return round($s['h'] + $s['m'] / 60, 2)." ".Lang::timeUnits($s['h'] == 1 && !$s['m'] ? 'sg' : 'pl', 4);
if ($s['m']) if ($s['m'])
return round($s['m'] + $s['s'] / 60, 2)." ".Lang::$timeUnits[$s['m'] == 1 && !$s['s'] ? 'sg' : 'pl'][5]; return round($s['m'] + $s['s'] / 60, 2)." ".Lang::timeUnits($s['m'] == 1 && !$s['s'] ? 'sg' : 'pl', 5);
if ($s['s']) if ($s['s'])
return round($s['s'] + $s['ms'] / 1000, 2)." ".Lang::$timeUnits[$s['s'] == 1 && !$s['ms'] ? 'sg' : 'pl'][6]; return round($s['s'] + $s['ms'] / 1000, 2)." ".Lang::timeUnits($s['s'] == 1 && !$s['ms'] ? 'sg' : 'pl', 6);
if ($s['ms']) if ($s['ms'])
return $s['ms']." ".Lang::$timeUnits[$s['ms'] == 1 ? 'sg' : 'pl'][7]; return $s['ms']." ".Lang::timeUnits($s['ms'] == 1 ? 'sg' : 'pl', 7);
return '0 '.Lang::$timeUnits['pl'][6]; return '0 '.Lang::timeUnits('pl', 6);
} }
} }
@@ -960,12 +960,12 @@ class Util
$text = preg_replace($from, $to, $text); $text = preg_replace($from, $to, $text);
$pairs = array( $pairs = array(
'$c' => '&lt;'.Lang::$game['class'].'&gt;', '$c' => '&lt;'.Lang::game('class').'&gt;',
'$C' => '&lt;'.Lang::$game['class'].'&gt;', '$C' => '&lt;'.Lang::game('class').'&gt;',
'$r' => '&lt;'.Lang::$game['race'].'&gt;', '$r' => '&lt;'.Lang::game('race').'&gt;',
'$R' => '&lt;'.Lang::$game['race'].'&gt;', '$R' => '&lt;'.Lang::game('race').'&gt;',
'$n' => '&lt;'.Lang::$main['name'].'&gt;', '$n' => '&lt;'.Lang::main('name').'&gt;',
'$N' => '&lt;'.Lang::$main['name'].'&gt;', '$N' => '&lt;'.Lang::main('name').'&gt;',
'$b' => '<br />', '$b' => '<br />',
'$B' => '<br />', '$B' => '<br />',
'|n' => '' // what .. the fuck .. another type of line terminator? (only in spanish though) '|n' => '' // what .. the fuck .. another type of line terminator? (only in spanish though)
@@ -1084,7 +1084,7 @@ class Util
if (!in_array($type, array(ITEM_MOD_DEFENSE_SKILL_RATING, ITEM_MOD_EXPERTISE_RATING))) if (!in_array($type, array(ITEM_MOD_DEFENSE_SKILL_RATING, ITEM_MOD_EXPERTISE_RATING)))
$result .= '%'; $result .= '%';
return sprintf(Lang::$item['ratingString'], '<!--rtg%'.$type.'-->'.$result, '<!--lvl-->'.$level); return sprintf(Lang::item('ratingString'), '<!--rtg%'.$type.'-->'.$result, '<!--lvl-->'.$level);
} }
public static function powerUseLocale($domain = 'www') public static function powerUseLocale($domain = 'www')

View File

@@ -2,28 +2,28 @@
class Lang class Lang
{ {
public static $timeUnits; private static $timeUnits;
public static $main; private static $main;
public static $account; private static $account;
public static $mail; private static $mail;
public static $game; private static $game;
public static $achievement; private static $achievement;
public static $class; private static $class;
public static $currency; private static $currency;
public static $event; private static $event;
public static $faction; private static $faction;
public static $gameObject; private static $gameObject;
public static $item; private static $item;
public static $itemset; private static $itemset;
public static $maps; private static $maps;
public static $npc; private static $npc;
public static $pet; private static $pet;
public static $quest; private static $quest;
public static $skill; private static $skill;
public static $spell; private static $spell;
public static $title; private static $title;
public static $zone; private static $zone;
public static function load($loc) public static function load($loc)
{ {
@@ -44,13 +44,19 @@ class Lang
public static function __callStatic($name, $args) public static function __callStatic($name, $args)
{ {
if (!isset(self::$$name)) if (!isset(self::$$name))
{
Util::addNote(U_GROUP_STAFF, 'Lang: tried to use undefined property Lang::$'.$name);
return null; return null;
}
$var = self::$$name; $var = self::$$name;
foreach ($args as $key) foreach ($args as $key)
{ {
if (!isset($var[$key])) if (!isset($var[$key]))
{
Util::addNote(U_GROUP_STAFF, 'Lang: undefined key "'.$key.'" in property Lang::$'.$name.'. Full key chain: '.implode(', ', $args));
return null; return null;
}
$var = $var[$key]; $var = $var[$key];
} }
@@ -64,13 +70,13 @@ class Lang
$tmp = []; $tmp = [];
if ($flags & CUSTOM_DISABLED) if ($flags & CUSTOM_DISABLED)
$tmp[] = '[tooltip name=disabledHint]'.Util::jsEscape(self::$main['disabledHint']).'[/tooltip][span class=tip tooltip=disabledHint]'.Util::jsEscape(self::$main['disabled']).'[/span]'; $tmp[] = '[tooltip name=disabledHint]'.Util::jsEscape(self::main('disabledHint')).'[/tooltip][span class=tip tooltip=disabledHint]'.Util::jsEscape(self::main('disabled')).'[/span]';
if ($flags & CUSTOM_SERVERSIDE) if ($flags & CUSTOM_SERVERSIDE)
$tmp[] = '[tooltip name=serversideHint]'.Util::jsEscape(self::$main['serversideHint']).'[/tooltip][span class=tip tooltip=serversideHint]'.Util::jsEscape(self::$main['serverside']).'[/span]'; $tmp[] = '[tooltip name=serversideHint]'.Util::jsEscape(self::main('serversideHint')).'[/tooltip][span class=tip tooltip=serversideHint]'.Util::jsEscape(self::main('serverside')).'[/span]';
if ($flags & CUSTOM_UNAVAILABLE) if ($flags & CUSTOM_UNAVAILABLE)
$tmp[] = self::$main['unavailable']; $tmp[] = self::main('unavailable');
if ($flags & CUSTOM_EXCLUDE_FOR_LISTVIEW && User::isInGroup(U_GROUP_STAFF)) if ($flags & CUSTOM_EXCLUDE_FOR_LISTVIEW && User::isInGroup(U_GROUP_STAFF))
$tmp[] = '[tooltip name=excludedHint]This entry is excluded from lists and is not searchable.[/tooltip][span tooltip=excludedHint class="tip q10"]Hidden[/span]'; $tmp[] = '[tooltip name=excludedHint]This entry is excluded from lists and is not searchable.[/tooltip][span tooltip=excludedHint class="tip q10"]Hidden[/span]';
@@ -106,7 +112,7 @@ class Lang
if (!in_array($prop, [1, 2, 3, 4, 9, 16, 20])) if (!in_array($prop, [1, 2, 3, 4, 9, 16, 20]))
continue; continue;
$name = Lang::$spell['lockType'][$prop]; $name = self::spell('lockType', $prop);
if (!$name) if (!$name)
continue; continue;
@@ -131,7 +137,7 @@ class Lang
else else
continue; continue;
$locks[$lock['type'.$i] == 1 ? $prop : -$prop] = sprintf(Lang::$game['requires'], $name); $locks[$lock['type'.$i] == 1 ? $prop : -$prop] = sprintf(self::game('requires'), $name);
} }
return $locks; return $locks;
@@ -141,7 +147,7 @@ class Lang
{ {
$_ = Util::getReputationLevelForPoints($pts); $_ = Util::getReputationLevelForPoints($pts);
return self::$game['rep'][$_]; return self::game('rep', $_);
} }
public static function getRequiredItems($class, $mask, $short = true) public static function getRequiredItems($class, $mask, $short = true)
@@ -164,16 +170,16 @@ class Lang
if ($class == ITEM_CLASS_WEAPON && ($mask & 0x1DE5FF) == 0x1DE5FF) if ($class == ITEM_CLASS_WEAPON && ($mask & 0x1DE5FF) == 0x1DE5FF)
return ''; return '';
foreach (Lang::$spell['subClassMasks'] as $m => $str) foreach (self::spell('subClassMasks') as $m => $str)
if ($mask == $m) if ($mask == $m)
return $str; return $str;
} }
if ($class == ITEM_CLASS_MISC) // yeah hardcoded.. sue me! if ($class == ITEM_CLASS_MISC) // yeah hardcoded.. sue me!
return Lang::$spell['cat'][-5]; return self::spell('cat', -5);
$tmp = []; $tmp = [];
$strs = Lang::$spell[$class == ITEM_CLASS_ARMOR ? 'armorSubClass' : 'weaponSubClass']; $strs = self::spell($class == ITEM_CLASS_ARMOR ? 'armorSubClass' : 'weaponSubClass');
foreach ($strs as $k => $str) foreach ($strs as $k => $str)
if ($mask & (1 << $k) && $str) if ($mask & (1 << $k) && $str)
$tmp[] = $str; $tmp[] = $str;
@@ -192,7 +198,7 @@ class Lang
{ {
if ($stanceMask & (1 << ($i - 1))) if ($stanceMask & (1 << ($i - 1)))
{ {
$tmp[] = self::$game['st'][$i]; $tmp[] = self::game('st', $i);
$stanceMask &= ~(1 << ($i - 1)); $stanceMask &= ~(1 << ($i - 1));
} }
$i++; $i++;
@@ -211,7 +217,7 @@ class Lang
{ {
if ($schoolMask & (1 << $i)) if ($schoolMask & (1 << $i))
{ {
$tmp[] = self::$game['sc'][$i]; $tmp[] = self::game('sc', $i);
$schoolMask &= ~(1 << $i); $schoolMask &= ~(1 << $i);
} }
$i++; $i++;
@@ -236,7 +242,7 @@ class Lang
{ {
if ($classMask & (1 << ($i - 1))) if ($classMask & (1 << ($i - 1)))
{ {
$tmp[$i] = (!fMod(count($tmp) + 1, 3) ? $br : null).sprintf($base, $i, self::$game['cl'][$i]); $tmp[$i] = (!fMod(count($tmp) + 1, 3) ? $br : null).sprintf($base, $i, self::game('cl', $i));
$classMask &= ~(1 << ($i - 1)); $classMask &= ~(1 << ($i - 1));
} }
$i++; $i++;
@@ -263,7 +269,7 @@ class Lang
if (!$raceMask) if (!$raceMask)
{ {
$side |= SIDE_BOTH; $side |= SIDE_BOTH;
return self::$game['ra'][0]; return self::game('ra', 0);
} }
if ($raceMask & RACE_MASK_HORDE) if ($raceMask & RACE_MASK_HORDE)
@@ -273,16 +279,16 @@ class Lang
$side |= SIDE_ALLIANCE; $side |= SIDE_ALLIANCE;
if ($raceMask == RACE_MASK_HORDE) if ($raceMask == RACE_MASK_HORDE)
return self::$game['ra'][-2]; return self::game('ra', -2);
if ($raceMask == RACE_MASK_ALLIANCE) if ($raceMask == RACE_MASK_ALLIANCE)
return self::$game['ra'][-1]; return self::game('ra', -1);
while ($raceMask) while ($raceMask)
{ {
if ($raceMask & (1 << ($i - 1))) if ($raceMask & (1 << ($i - 1)))
{ {
$tmp[$i] = (!fMod(count($tmp) + 1, 3) ? $br : null).sprintf($base, $i, self::$game['ra'][$i]); $tmp[$i] = (!fMod(count($tmp) + 1, 3) ? $br : null).sprintf($base, $i, self::game('ra', $i));
$raceMask &= ~(1 << ($i - 1)); $raceMask &= ~(1 << ($i - 1));
} }
$i++; $i++;

View File

@@ -78,7 +78,7 @@ class AccountPage extends GenericPage
if ($this->createRecoverPass($nStep)) // location-header after final step if ($this->createRecoverPass($nStep)) // location-header after final step
header('Location: ?account=signin', true, 302); header('Location: ?account=signin', true, 302);
$this->head = sprintf(Lang::$account['recoverPass'], $nStep); $this->head = sprintf(Lang::account('recoverPass'), $nStep);
break; break;
case 'forgotusername': case 'forgotusername':
if (CFG_AUTH_MODE != AUTH_MODE_SELF) // only recover own accounts if (CFG_AUTH_MODE != AUTH_MODE_SELF) // only recover own accounts
@@ -90,16 +90,16 @@ class AccountPage extends GenericPage
if ($this->_post['email']) if ($this->_post['email'])
{ {
if (!Util::isValidEmail($this->_post['email'])) if (!Util::isValidEmail($this->_post['email']))
$this->error = Lang::$account['emailInvalid']; $this->error = Lang::account('emailInvalid');
else if (!DB::Aowow()->selectCell('SELECT 1 FROM ?_account WHERE email = ?', $this->_post['email'])) else if (!DB::Aowow()->selectCell('SELECT 1 FROM ?_account WHERE email = ?', $this->_post['email']))
$this->error = Lang::$account['emailNotFound']; $this->error = Lang::account('emailNotFound');
else if ($err = $this->doRecoverUser()) else if ($err = $this->doRecoverUser())
$this->error = $err; $this->error = $err;
else else
$this->text = sprintf(Lang::$account['recovUserSent']. $this->_post['email']); $this->text = sprintf(Lang::account('recovUserSent'). $this->_post['email']);
} }
$this->head = Lang::$account['recoverUser']; $this->head = Lang::account('recoverUser');
break; break;
case 'signin': case 'signin':
$this->tpl = 'acc-signIn'; $this->tpl = 'acc-signIn';
@@ -131,7 +131,7 @@ class AccountPage extends GenericPage
else else
{ {
$nStep = 1.5; $nStep = 1.5;
$this->text = sprintf(Lang::$account['createAccSent'], $this->_post['email']); $this->text = sprintf(Lang::account('createAccSent'), $this->_post['email']);
} }
} }
else if (!empty($_GET['token']) && ($newId = DB::Aowow()->selectCell('SELECT id FROM ?_account WHERE status = ?d AND token = ?', ACC_STATUS_NEW, $_GET['token']))) else if (!empty($_GET['token']) && ($newId = DB::Aowow()->selectCell('SELECT id FROM ?_account WHERE status = ?d AND token = ?', ACC_STATUS_NEW, $_GET['token'])))
@@ -142,12 +142,12 @@ class AccountPage extends GenericPage
Util::gainSiteReputation($newId, SITEREP_ACTION_REGISTER); Util::gainSiteReputation($newId, SITEREP_ACTION_REGISTER);
$this->text = sprintf(Lang::$account['accActivated'], $_GET['token']); $this->text = sprintf(Lang::account('accActivated'), $_GET['token']);
} }
else else
$this->next = $this->getNext(); $this->next = $this->getNext();
$this->head = sprintf(Lang::$account['register'], $nStep); $this->head = sprintf(Lang::account('register'), $nStep);
break; break;
case 'signout': case 'signout':
User::destroy(); User::destroy();
@@ -159,7 +159,7 @@ class AccountPage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
$this->title = [Lang::$account['title']]; $this->title = [Lang::account('title')];
} }
protected function generatePath() { } protected function generatePath() { }
@@ -177,17 +177,17 @@ class AccountPage extends GenericPage
/***********/ /***********/
$infobox = []; $infobox = [];
$infobox[] = Lang::$account['joinDate']. Lang::$main['colon'].'[tooltip name=joinDate]'. date('l, G:i:s', $user['joinDate']). '[/tooltip][span class=tip tooltip=joinDate]'. date(Lang::$main['dateFmtShort'], $user['joinDate']). '[/span]'; $infobox[] = Lang::account('joinDate'). Lang::main('colon').'[tooltip name=joinDate]'. date('l, G:i:s', $user['joinDate']). '[/tooltip][span class=tip tooltip=joinDate]'. date(Lang::main('dateFmtShort'), $user['joinDate']). '[/span]';
$infobox[] = Lang::$account['lastLogin'].Lang::$main['colon'].'[tooltip name=lastLogin]'.date('l, G:i:s', $user['prevLogin']).'[/tooltip][span class=tip tooltip=lastLogin]'.date(Lang::$main['dateFmtShort'], $user['prevLogin']).'[/span]'; $infobox[] = Lang::account('lastLogin').Lang::main('colon').'[tooltip name=lastLogin]'.date('l, G:i:s', $user['prevLogin']).'[/tooltip][span class=tip tooltip=lastLogin]'.date(Lang::main('dateFmtShort'), $user['prevLogin']).'[/span]';
$infobox[] = Lang::$account['lastIP']. Lang::$main['colon'].$user['prevIP']; $infobox[] = Lang::account('lastIP'). Lang::main('colon').$user['prevIP'];
$infobox[] = Lang::$account['email']. Lang::$main['colon'].$user['email']; $infobox[] = Lang::account('email'). Lang::main('colon').$user['email'];
$groups = []; $groups = [];
foreach (Lang::$account['groups'] as $idx => $key) foreach (Lang::account('groups') as $idx => $key)
if ($idx >= 0 && $user['userGroups'] & (1 << $idx)) if ($idx >= 0 && $user['userGroups'] & (1 << $idx))
$groups[] = (!fMod(count($groups) + 1, 3) ? '[br]' : null).Lang::$account['groups'][$idx]; $groups[] = (!fMod(count($groups) + 1, 3) ? '[br]' : null).Lang::account('groups', $idx);
$infobox[] = Lang::$account['userGroups'].Lang::$main['colon'].($groups ? implode(', ', $groups) : Lang::$account['groups'][-1]); $infobox[] = Lang::account('userGroups').Lang::main('colon').($groups ? implode(', ', $groups) : Lang::account('groups', -1));
$infobox[] = Util::ucFirst(Lang::$main['siteRep']).Lang::$main['colon'].User::getReputation(); $infobox[] = Util::ucFirst(Lang::main('siteRep')).Lang::main('colon').User::getReputation();
$this->infobox = '[ul][li]'.implode('[/li][li]', $infobox).'[/li][/ul]'; $this->infobox = '[ul][li]'.implode('[/li][li]', $infobox).'[/li][/ul]';
@@ -294,15 +294,15 @@ Markup.printHtml("description text here", "description-generic", { allow: Markup
if ($this->_post['email']) // step 1 if ($this->_post['email']) // step 1
{ {
if (!Util::isValidEmail($this->_post['email'])) if (!Util::isValidEmail($this->_post['email']))
$this->error = Lang::$account['emailInvalid']; $this->error = Lang::account('emailInvalid');
else if (!DB::Aowow()->selectCell('SELECT 1 FROM ?_account WHERE email = ?', $this->_post['email'])) else if (!DB::Aowow()->selectCell('SELECT 1 FROM ?_account WHERE email = ?', $this->_post['email']))
$this->error = Lang::$account['emailNotFound']; $this->error = Lang::account('emailNotFound');
else if ($err = $this->doRecoverPass()) else if ($err = $this->doRecoverPass())
$this->error = $err; $this->error = $err;
else else
{ {
$step = 1.5; $step = 1.5;
$this->text = sprintf(Lang::$account['recovPassSent'], $this->_post['email']); $this->text = sprintf(Lang::account('recovPassSent'), $this->_post['email']);
} }
} }
else if (isset($_GET['token'])) // step 2 else if (isset($_GET['token'])) // step 2
@@ -330,17 +330,17 @@ Markup.printHtml("description text here", "description-generic", { allow: Markup
{ {
// check username // check username
if (!User::isValidName($this->_post['username'])) if (!User::isValidName($this->_post['username']))
return Lang::$account['userNotFound']; return Lang::account('userNotFound');
// check password // check password
if (!User::isValidPass($this->_post['password'])) if (!User::isValidPass($this->_post['password']))
return Lang::$account['wrongPass']; return Lang::account('wrongPass');
switch (User::Auth($this->_post['username'], $this->_post['password'])) switch (User::Auth($this->_post['username'], $this->_post['password']))
{ {
case AUTH_OK: case AUTH_OK:
if (!User::$ip) if (!User::$ip)
return Lang::$main['intError']; return Lang::main('intError');
// reset account status, update expiration // reset account status, update expiration
DB::Aowow()->query('UPDATE ?_account SET prevIP = IF(curIp = ?, prevIP, curIP), curIP = IF(curIp = ?, curIP, ?), allowExpire = ?d, status = 0, statusTimer = 0, token = "" WHERE user = ?', DB::Aowow()->query('UPDATE ?_account SET prevIP = IF(curIp = ?, prevIP, curIP), curIP = IF(curIp = ?, curIP, ?), allowExpire = ?d, status = 0, statusTimer = 0, token = "" WHERE user = ?',
@@ -356,22 +356,22 @@ Markup.printHtml("description text here", "description-generic", { allow: Markup
case AUTH_BANNED: case AUTH_BANNED:
if (User::init()) if (User::init())
User::save(); User::save();
return Lang::$account['accBanned']; return Lang::account('accBanned');
case AUTH_WRONGUSER: case AUTH_WRONGUSER:
User::destroy(); User::destroy();
return Lang::$account['userNotFound']; return Lang::account('userNotFound');
case AUTH_WRONGPASS: case AUTH_WRONGPASS:
User::destroy(); User::destroy();
return Lang::$account['wrongPass']; return Lang::account('wrongPass');
case AUTH_ACC_INACTIVE: case AUTH_ACC_INACTIVE:
User::destroy(); User::destroy();
return Lang::$account['accInactive']; return Lang::account('accInactive');
case AUTH_IPBANNED: case AUTH_IPBANNED:
User::destroy(); User::destroy();
return sprintf(Lang::$account['loginExceeded'], Util::formatTime(CFG_FAILED_AUTH_EXCLUSION * 1000)); return sprintf(Lang::account('loginExceeded'), Util::formatTime(CFG_FAILED_AUTH_EXCLUSION * 1000));
case AUTH_INTERNAL_ERR: case AUTH_INTERNAL_ERR:
User::destroy(); User::destroy();
return Lang::$main['intError']; return Lang::main('intError');
default: default:
return; return;
} }
@@ -381,34 +381,34 @@ Markup.printHtml("description text here", "description-generic", { allow: Markup
{ {
// check username // check username
if (!User::isValidName($this->_post['username'], $e)) if (!User::isValidName($this->_post['username'], $e))
return Lang::$account[$e == 1 ? 'errNameLength' : 'errNameChars']; return Lang::account($e == 1 ? 'errNameLength' : 'errNameChars');
// check password // check password
if (!User::isValidPass($this->_post['password'], $e)) if (!User::isValidPass($this->_post['password'], $e))
return Lang::$account[$e == 1 ? 'errPassLength' : 'errPassChars']; return Lang::account($e == 1 ? 'errPassLength' : 'errPassChars');
if ($this->_post['password'] != $this->_post['c_password']) if ($this->_post['password'] != $this->_post['c_password'])
return Lang::$account['passMismatch']; return Lang::account('passMismatch');
// check email // check email
if (!Util::isValidEmail($this->_post['email'])) if (!Util::isValidEmail($this->_post['email']))
return Lang::$account['emailInvalid']; return Lang::account('emailInvalid');
// check ip // check ip
if (!User::$ip) if (!User::$ip)
return Lang::$main['intError']; return Lang::main('intError');
// limit account creation // limit account creation
$ip = DB::Aowow()->selectRow('SELECT ip, count, unbanDate FROM ?_account_bannedips WHERE type = 1 AND ip = ?', User::$ip); $ip = DB::Aowow()->selectRow('SELECT ip, count, unbanDate FROM ?_account_bannedips WHERE type = 1 AND ip = ?', User::$ip);
if ($ip && $ip['count'] >= CFG_FAILED_AUTH_COUNT && $ip['unbanDate'] >= time()) if ($ip && $ip['count'] >= CFG_FAILED_AUTH_COUNT && $ip['unbanDate'] >= time())
{ {
DB::Aowow()->query('UPDATE ?_account_bannedips SET count = count + 1, unbanDate = UNIX_TIMESTAMP() + ?d WHERE ip = ? AND type = 1', CFG_FAILED_AUTH_EXCLUSION, User::$ip); DB::Aowow()->query('UPDATE ?_account_bannedips SET count = count + 1, unbanDate = UNIX_TIMESTAMP() + ?d WHERE ip = ? AND type = 1', CFG_FAILED_AUTH_EXCLUSION, User::$ip);
return sprintf(Lang::$account['signupExceeded'], Util::formatTime(CFG_FAILED_AUTH_EXCLUSION * 1000)); return sprintf(Lang::account('signupExceeded'), Util::formatTime(CFG_FAILED_AUTH_EXCLUSION * 1000));
} }
// username taken // username taken
if ($_ = DB::Aowow()->SelectCell('SELECT user FROM ?_account WHERE (user = ? OR email = ?) AND (status <> ?d OR (status = ?d AND statusTimer > UNIX_TIMESTAMP()))', $this->_post['username'], $email, ACC_STATUS_NEW, ACC_STATUS_NEW)) if ($_ = DB::Aowow()->SelectCell('SELECT user FROM ?_account WHERE (user = ? OR email = ?) AND (status <> ?d OR (status = ?d AND statusTimer > UNIX_TIMESTAMP()))', $this->_post['username'], $email, ACC_STATUS_NEW, ACC_STATUS_NEW))
return $_ == $this->_post['username'] ? Lang::$account['nameInUse'] : Lang::$account['mailInUse']; return $_ == $this->_post['username'] ? Lang::account('nameInUse') : Lang::account('mailInUse');
// create.. // create..
$token = Util::createHash(); $token = Util::createHash();
@@ -425,8 +425,8 @@ Markup.printHtml("description text here", "description-generic", { allow: Markup
$token $token
); );
if (!$id) // something went wrong if (!$id) // something went wrong
return Lang::$main['intError']; return Lang::main('intError');
else if ($_ = $this->sendMail(Lang::$mail['accConfirm'][0], sprintf(Lang::$mail['accConfirm'][1], $token), CFG_ACCOUNT_CREATE_SAVE_DECAY)) else if ($_ = $this->sendMail(Lang::mail('accConfirm', 0), sprintf(Lang::mail('accConfirm', 1), $token), CFG_ACCOUNT_CREATE_SAVE_DECAY))
{ {
// success:: update ip-bans // success:: update ip-bans
if (!$ip || $ip['unbanDate'] < time()) if (!$ip || $ip['unbanDate'] < time())
@@ -444,16 +444,16 @@ Markup.printHtml("description text here", "description-generic", { allow: Markup
return $_; return $_;
// send recovery mail // send recovery mail
return $this->sendMail(Lang::$mail['resetPass'][0], sprintf(Lang::$mail['resetPass'][1], $token), CFG_ACCOUNT_RECOVERY_DECAY); return $this->sendMail(Lang::mail('resetPass', 0), sprintf(Lang::mail('resetPass', 1), $token), CFG_ACCOUNT_RECOVERY_DECAY);
} }
private function doResetPass() private function doResetPass()
{ {
if ($this->_post['password'] != $this->_post['c_password']) if ($this->_post['password'] != $this->_post['c_password'])
return Lang::$account['passCheckFail']; return Lang::account('passCheckFail');
if (!Util::isValidEmail($this->_post['email'])) if (!Util::isValidEmail($this->_post['email']))
return Lang::$account['emailInvalid']; return Lang::account('emailInvalid');
$uId = DB::Aowow()->selectCell('SELECT id FROM ?_account WHERE token = ? AND email = ? AND status = ?d AND statusTimer > UNIX_TIMESTAMP()', $uId = DB::Aowow()->selectCell('SELECT id FROM ?_account WHERE token = ? AND email = ? AND status = ?d AND statusTimer > UNIX_TIMESTAMP()',
$this->_post['token'], $this->_post['token'],
@@ -461,13 +461,13 @@ Markup.printHtml("description text here", "description-generic", { allow: Markup
ACC_STATUS_RECOVER_PASS ACC_STATUS_RECOVER_PASS
); );
if (!$uId) if (!$uId)
return Lang::$account['emailNotFound']; // assume they didn't meddle with the token return Lang::account('emailNotFound'); // assume they didn't meddle with the token
if (!User::verifyCrypt($newPass)) if (!User::verifyCrypt($newPass))
return Lang::$account['newPassDiff']; return Lang::account('newPassDiff');
if (!DB::Aowow()->query('UPDATE ?_account SET passHash = ?, status = ?d WHERE id = ?d', User::hashcrypt($newPass), ACC_STATUS_OK, $uId)) if (!DB::Aowow()->query('UPDATE ?_account SET passHash = ?, status = ?d WHERE id = ?d', User::hashcrypt($newPass), ACC_STATUS_OK, $uId))
return Lang::$main['intError']; return Lang::main('intError');
} }
private function doRecoverUser() private function doRecoverUser()
@@ -476,35 +476,35 @@ Markup.printHtml("description text here", "description-generic", { allow: Markup
return $_; return $_;
// send recovery mail // send recovery mail
return $this->sendMail(Lang::$mail['recoverUser'][0], sprintf(Lang::$mail['recoverUser'][1], $token), CFG_ACCOUNT_RECOVERY_DECAY); return $this->sendMail(Lang::mail('recoverUser', 0), sprintf(Lang::mail('recoverUser', 1), $token), CFG_ACCOUNT_RECOVERY_DECAY);
} }
private function initRecovery($type, $delay, &$token) private function initRecovery($type, $delay, &$token)
{ {
if (!$type) if (!$type)
return Lang::$main['intError']; return Lang::main('intError');
// check if already processing // check if already processing
if ($_ = DB::Aowow()->selectCell('SELECT statusTimer - UNIX_TIMESTAMP() FROM ?_account WHERE email = ? AND status <> ?d AND statusTimer > UNIX_TIMESTAMP()', $this->_post['email'], ACC_STATUS_OK)) if ($_ = DB::Aowow()->selectCell('SELECT statusTimer - UNIX_TIMESTAMP() FROM ?_account WHERE email = ? AND status <> ?d AND statusTimer > UNIX_TIMESTAMP()', $this->_post['email'], ACC_STATUS_OK))
return sprintf(lang::$account['isRecovering'], Util::formatTime($_ * 1000)); return sprintf(Lang::account('isRecovering'), Util::formatTime($_ * 1000));
// create new token and write to db // create new token and write to db
$token = Util::createHash(); $token = Util::createHash();
if (!DB::Aowow()->query('UPDATE ?_account SET token = ?, status = ?d, statusTimer = UNIX_TIMESTAMP() + ?d WHERE email = ?', $token, $type, $delay, $this->_post['email'])) if (!DB::Aowow()->query('UPDATE ?_account SET token = ?, status = ?d, statusTimer = UNIX_TIMESTAMP() + ?d WHERE email = ?', $token, $type, $delay, $this->_post['email']))
return Lang::$main['intError']; return Lang::main('intError');
} }
private function sendMail($subj, $msg, $delay = 300) private function sendMail($subj, $msg, $delay = 300)
{ {
// send recovery mail // send recovery mail
$subj = CFG_NAME_SHORT.Lang::$main['colon'] . $subj; $subj = CFG_NAME_SHORT.Lang::main('colon') . $subj;
$msg .= "\r\n\r\n".sprintf(Lang::$mail['tokenExpires'], Util::formatTime($delay * 1000))."\r\n"; $msg .= "\r\n\r\n".sprintf(Lang::mail('tokenExpires'), Util::formatTime($delay * 1000))."\r\n";
$header = 'From: '.CFG_CONTACT_EMAIL . "\r\n" . $header = 'From: '.CFG_CONTACT_EMAIL . "\r\n" .
'Reply-To: '.CFG_CONTACT_EMAIL . "\r\n" . 'Reply-To: '.CFG_CONTACT_EMAIL . "\r\n" .
'X-Mailer: PHP/' . phpversion(); 'X-Mailer: PHP/' . phpversion();
if (!mail($this->_post['email'], $subj, $msg, $header)) if (!mail($this->_post['email'], $subj, $msg, $header))
return sprintf(Lang::$main['intError2'], 'send mail'); return sprintf(Lang::main('intError2'), 'send mail');
} }
private function getNext($forHeader = false) private function getNext($forHeader = false)

View File

@@ -44,7 +44,7 @@ class AchievementPage extends GenericPage
$this->subject = new AchievementList(array(['id', $this->typeId])); $this->subject = new AchievementList(array(['id', $this->typeId]));
if ($this->subject->error) if ($this->subject->error)
$this->notFound(Lang::$game['achievement']); $this->notFound(Lang::game('achievement'));
$this->extendGlobalData($this->subject->getJSGlobals(GLOBALINFO_REWARDS)); $this->extendGlobalData($this->subject->getJSGlobals(GLOBALINFO_REWARDS));
@@ -68,7 +68,7 @@ class AchievementPage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, $this->subject->getField('name', true), Util::ucFirst(Lang::$game['achievement'])); array_unshift($this->title, $this->subject->getField('name', true), Util::ucFirst(Lang::game('achievement')));
} }
protected function generateContent() protected function generateContent()
@@ -81,7 +81,7 @@ class AchievementPage extends GenericPage
// points // points
if ($_ = $this->subject->getField('points')) if ($_ = $this->subject->getField('points'))
$infobox[] = Lang::$achievement['points'].Lang::$main['colon'].'[achievementpoints='.$_.']'; $infobox[] = Lang::achievement('points').Lang::main('colon').'[achievementpoints='.$_.']';
// location // location
// todo (low) // todo (low)
@@ -90,13 +90,13 @@ class AchievementPage extends GenericPage
switch ($this->subject->getField('faction')) switch ($this->subject->getField('faction'))
{ {
case 1: case 1:
$infobox[] = Lang::$main['side'].Lang::$main['colon'].'[span class=icon-alliance]'.Lang::$game['si'][SIDE_ALLIANCE].'[/span]'; $infobox[] = Lang::main('side').Lang::main('colon').'[span class=icon-alliance]'.Lang::game('si', SIDE_ALLIANCE).'[/span]';
break; break;
case 2: case 2:
$infobox[] = Lang::$main['side'].Lang::$main['colon'].'[span class=icon-horde]'.Lang::$game['si'][SIDE_HORDE].'[/span]'; $infobox[] = Lang::main('side').Lang::main('colon').'[span class=icon-horde]'.Lang::game('si', SIDE_HORDE).'[/span]';
break; break;
default: // case 3 default: // case 3
$infobox[] = Lang::$main['side'].Lang::$main['colon'].Lang::$game['si'][SIDE_BOTH]; $infobox[] = Lang::main('side').Lang::main('colon').Lang::game('si', SIDE_BOTH);
} }
// todo (low): crosslink with charactersDB to check if realmFirsts are still available // todo (low): crosslink with charactersDB to check if realmFirsts are still available
@@ -178,7 +178,7 @@ class AchievementPage extends GenericPage
$bar = new TitleList(array(['id', $foo])); $bar = new TitleList(array(['id', $foo]));
foreach ($bar->iterate() as $__) foreach ($bar->iterate() as $__)
$this->rewards['title'][] = sprintf(Lang::$achievement['titleReward'], $bar->id, trim(str_replace('%s', '', $bar->getField('male', true)))); $this->rewards['title'][] = sprintf(Lang::achievement('titleReward'), $bar->id, trim(str_replace('%s', '', $bar->getField('male', true))));
} }
$this->rewards['text'] = $this->subject->getField('reward', true); $this->rewards['text'] = $this->subject->getField('reward', true);
@@ -190,13 +190,13 @@ class AchievementPage extends GenericPage
if (!$altAcv->error) if (!$altAcv->error)
{ {
$this->transfer = sprintf( $this->transfer = sprintf(
Lang::$achievement['_transfer'], Lang::achievement('_transfer'),
$altAcv->id, $altAcv->id,
1, // quality 1, // quality
$altAcv->getField('iconString'), $altAcv->getField('iconString'),
$altAcv->getField('name', true), $altAcv->getField('name', true),
$pendant > 0 ? 'alliance' : 'horde', $pendant > 0 ? 'alliance' : 'horde',
$pendant > 0 ? Lang::$game['si'][1] : Lang::$game['si'][2] $pendant > 0 ? Lang::game('si', 1) : Lang::game('si', 2)
); );
} }
} }
@@ -276,7 +276,7 @@ class AchievementPage extends GenericPage
'href' => '?npc='.$obj, 'href' => '?npc='.$obj,
'text' => $crtName, 'text' => $crtName,
); );
$tmp['extraText'] = Lang::$achievement['slain']; $tmp['extraText'] = Lang::achievement('slain');
break; break;
// link to area (by map) // link to area (by map)
case ACHIEVEMENT_CRITERIA_TYPE_WIN_BG: case ACHIEVEMENT_CRITERIA_TYPE_WIN_BG:
@@ -326,7 +326,7 @@ class AchievementPage extends GenericPage
break; break;
// link to title - todo (low): crosslink // link to title - todo (low): crosslink
case ACHIEVEMENT_CRITERIA_TYPE_EARNED_PVP_TITLE: case ACHIEVEMENT_CRITERIA_TYPE_EARNED_PVP_TITLE:
$tmp['extraText'] = Util::ucFirst(Lang::$game['title']).Lang::$main['colon'].$crtName; $tmp['extraText'] = Util::ucFirst(Lang::game('title')).Lang::main('colon').$crtName;
break; break;
// link to achivement (/w icon) // link to achivement (/w icon)
case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ACHIEVEMENT: case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ACHIEVEMENT:
@@ -491,7 +491,7 @@ class AchievementPage extends GenericPage
} }
if ($_ = CreatureList::getName($this->subject->getField('sender'))) if ($_ = CreatureList::getName($this->subject->getField('sender')))
$mail['sender'] = sprintf(Lang::$quest['mailBy'], $this->subject->getField('sender'), $_); $mail['sender'] = sprintf(Lang::quest('mailBy'), $this->subject->getField('sender'), $_);
return $mail; return $mail;
} }

View File

@@ -47,7 +47,7 @@ class AchievementsPage extends GenericPage
parent::__construct($pageCall, $pageParam); parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::$game['achievements']); $this->name = Util::ucFirst(Lang::game('achievements'));
$this->subCat = $pageParam ? '='.$pageParam : ''; $this->subCat = $pageParam ? '='.$pageParam : '';
} }
@@ -121,12 +121,12 @@ class AchievementsPage extends GenericPage
); );
// sort for dropdown-menus in filter // sort for dropdown-menus in filter
asort(Lang::$game['si']); asort(Lang::game('si'));
} }
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, Util::ucFirst(Lang::$game['achievements'])); array_unshift($this->title, Util::ucFirst(Lang::game('achievements')));
if ($this->category) if ($this->category)
{ {
$catrow = DB::Aowow()->SelectRow('SELECT * FROM ?_achievementcategory WHERE id = ?d', end($this->category)); $catrow = DB::Aowow()->SelectRow('SELECT * FROM ?_achievementcategory WHERE id = ?d', end($this->category));

View File

@@ -26,7 +26,7 @@ class ClassPage extends GenericPage
$this->subject = new CharClassList(array(['id', $this->typeId])); $this->subject = new CharClassList(array(['id', $this->typeId]));
if ($this->subject->error) if ($this->subject->error)
$this->notFound(Lang::$game['class']); $this->notFound(Lang::game('class'));
$this->name = $this->subject->getField('name', true); $this->name = $this->subject->getField('name', true);
} }
@@ -38,7 +38,7 @@ class ClassPage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, $this->name, Util::ucFirst(Lang::$game['class'])); array_unshift($this->title, $this->name, Util::ucFirst(Lang::game('class')));
} }
protected function generateContent() protected function generateContent()
@@ -56,27 +56,27 @@ class ClassPage extends GenericPage
// hero class // hero class
if ($this->subject->getField('flags') & 0x40) if ($this->subject->getField('flags') & 0x40)
$infobox[] = '[tooltip=tooltip_heroclass]'.Lang::$game['heroClass'].'[/tooltip]'; $infobox[] = '[tooltip=tooltip_heroclass]'.Lang::game('heroClass').'[/tooltip]';
// resource // resource
if ($this->typeId == 11) // special Druid case if ($this->typeId == 11) // special Druid case
$infobox[] = Lang::$game['resources'].Lang::$main['colon']. $infobox[] = Lang::game('resources').Lang::main('colon').
'[tooltip name=powertype1]'.Lang::$game['st'][0].', '.Lang::$game['st'][31].', '.Lang::$game['st'][2].'[/tooltip][span class=tip tooltip=powertype1]'.Util::ucFirst(Lang::$spell['powerTypes'][0]).'[/span], '. '[tooltip name=powertype1]'.Lang::game('st', 0).', '.Lang::game('st', 31).', '.Lang::game('st', 2).'[/tooltip][span class=tip tooltip=powertype1]'.Util::ucFirst(Lang::spell('powerTypes', 0)).'[/span], '.
'[tooltip name=powertype2]'.Lang::$game['st'][5].', '.Lang::$game['st'][8].'[/tooltip][span class=tip tooltip=powertype2]'.Util::ucFirst(Lang::$spell['powerTypes'][1]).'[/span], '. '[tooltip name=powertype2]'.Lang::game('st', 5).', '.Lang::game('st', 8).'[/tooltip][span class=tip tooltip=powertype2]'.Util::ucFirst(Lang::spell('powerTypes', 1)).'[/span], '.
'[tooltip name=powertype8]'.Lang::$game['st'][1].'[/tooltip][span class=tip tooltip=powertype8]'.Util::ucFirst(Lang::$spell['powerTypes'][3]).'[/span]'; '[tooltip name=powertype8]'.Lang::game('st', 1).'[/tooltip][span class=tip tooltip=powertype8]'.Util::ucFirst(Lang::spell('powerTypes', 3)).'[/span]';
else if ($this->typeId == 6) // special DK case else if ($this->typeId == 6) // special DK case
$infobox[] = Lang::$game['resources'].Lang::$main['colon'].'[span]'.Util::ucFirst(Lang::$spell['powerTypes'][5]).', '.Util::ucFirst(Lang::$spell['powerTypes'][$this->subject->getField('powerType')]).'[/span]'; $infobox[] = Lang::game('resources').Lang::main('colon').'[span]'.Util::ucFirst(Lang::spell('powerTypes', 5)).', '.Util::ucFirst(Lang::spell('powerTypes', $this->subject->getField('powerType'))).'[/span]';
else // regular case else // regular case
$infobox[] = Lang::$game['resource'].Lang::$main['colon'].'[span]'.Util::ucFirst(Lang::$spell['powerTypes'][$this->subject->getField('powerType')]).'[/span]'; $infobox[] = Lang::game('resource').Lang::main('colon').'[span]'.Util::ucFirst(Lang::spell('powerTypes', $this->subject->getField('powerType'))).'[/span]';
// roles // roles
$roles = []; $roles = [];
for ($i = 0; $i < 4; $i++) for ($i = 0; $i < 4; $i++)
if ($this->subject->getField('roles') & (1 << $i)) if ($this->subject->getField('roles') & (1 << $i))
$roles[] = (count($roles) == 2 ? "\n" : '').Lang::$game['_roles'][$i]; $roles[] = (count($roles) == 2 ? "\n" : '').Lang::game('_roles', $i);
if ($roles) if ($roles)
$infobox[] = (count($roles) > 1 ? Lang::$game['roles'] : Lang::$game['role']).Lang::$main['colon'].implode(', ', $roles); $infobox[] = (count($roles) > 1 ? Lang::game('roles') : Lang::game('role')).Lang::main('colon').implode(', ', $roles);
// specs // specs
$specList = []; $specList = [];
@@ -85,7 +85,7 @@ class ClassPage extends GenericPage
$specList[$k] = '[icon name='.$skills->getField('iconString').'][url=?spells=7.'.$this->typeId.'.'.$k.']'.$skills->getField('name', true).'[/url][/icon]'; $specList[$k] = '[icon name='.$skills->getField('iconString').'][url=?spells=7.'.$this->typeId.'.'.$k.']'.$skills->getField('name', true).'[/url][/icon]';
if ($specList) if ($specList)
$infobox[] = Lang::$game['specs'].Lang::$main['colon'].'[ul][li]'.implode('[/li][li]', $specList).'[/li][/ul]'; $infobox[] = Lang::game('specs').Lang::main('colon').'[ul][li]'.implode('[/li][li]', $specList).'[/li][/ul]';
/****************/ /****************/

View File

@@ -20,7 +20,7 @@ class ClassesPage extends GenericPage
{ {
parent::__construct($pageCall, $pageParam); parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::$game['classes']); $this->name = Util::ucFirst(Lang::game('classes'));
} }
protected function generateContent() protected function generateContent()
@@ -38,7 +38,7 @@ class ClassesPage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, Util::ucFirst(Lang::$game['classes'])); array_unshift($this->title, Util::ucFirst(Lang::game('classes')));
} }
protected function generatePath() {} protected function generatePath() {}

View File

@@ -35,7 +35,7 @@ class ComparePage extends GenericPage
else if (!empty($_COOKIE['compare_groups'])) else if (!empty($_COOKIE['compare_groups']))
$this->compareString = urldecode($_COOKIE['compare_groups']); $this->compareString = urldecode($_COOKIE['compare_groups']);
$this->name = Lang::$main['compareTool']; $this->name = Lang::main('compareTool');
} }
protected function generateContent() protected function generateContent()

View File

@@ -23,7 +23,7 @@ class CurrenciesPage extends GenericPage
parent::__construct($pageCall, $pageParam); parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::$game['currencies']); $this->name = Util::ucFirst(Lang::game('currencies'));
} }
protected function generateContent() protected function generateContent()
@@ -48,7 +48,7 @@ class CurrenciesPage extends GenericPage
{ {
array_unshift($this->title, $this->name); array_unshift($this->title, $this->name);
if ($this->category) if ($this->category)
array_unshift($this->title, Lang::$currency['cat'][$this->category[0]]); array_unshift($this->title, Lang::currency('cat', $this->category[0]));
} }
protected function generatePath() protected function generatePath()

View File

@@ -25,7 +25,7 @@ class CurrencyPage extends GenericPage
$this->subject = new CurrencyList(array(['id', $this->typeId])); $this->subject = new CurrencyList(array(['id', $this->typeId]));
if ($this->subject->error) if ($this->subject->error)
$this->notFound(Lang::$game['currency']); $this->notFound(Lang::game('currency'));
$this->name = $this->subject->getField('name', true); $this->name = $this->subject->getField('name', true);
} }
@@ -37,7 +37,7 @@ class CurrencyPage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, $this->subject->getField('name', true), Util::ucFirst(Lang::$game['currency'])); array_unshift($this->title, $this->subject->getField('name', true), Util::ucFirst(Lang::game('currency')));
} }
protected function generateContent() protected function generateContent()
@@ -53,9 +53,9 @@ class CurrencyPage extends GenericPage
$infobox = Lang::getInfoBoxForFlags($this->subject->getField('cuFlags')); $infobox = Lang::getInfoBoxForFlags($this->subject->getField('cuFlags'));
if ($this->typeId == 103) // Arena Points if ($this->typeId == 103) // Arena Points
$infobox[] = Lang::$currency['cap'].Lang::$main['colon'].'10\'000'; $infobox[] = Lang::currency('cap').Lang::main('colon').'10\'000';
else if ($this->typeId == 104) // Honor else if ($this->typeId == 104) // Honor
$infobox[] = Lang::$currency['cap'].Lang::$main['colon'].'75\'000'; $infobox[] = Lang::currency('cap').Lang::main('colon').'75\'000';
/****************/ /****************/
/* Main Content */ /* Main Content */

View File

@@ -30,7 +30,7 @@ class EventPage extends GenericPage
$this->subject = new WorldEventList($conditions); $this->subject = new WorldEventList($conditions);
if ($this->subject->error) if ($this->subject->error)
$this->notFound(Lang::$game['event']); $this->notFound(Lang::game('event'));
$this->hId = $this->subject->getField('holidayId'); $this->hId = $this->subject->getField('holidayId');
$this->eId = $this->subject->getField('eventBak'); $this->eId = $this->subject->getField('eventBak');
@@ -56,7 +56,7 @@ class EventPage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, $this->subject->getField('name', true), Util::ucFirst(Lang::$game['event'])); array_unshift($this->title, $this->subject->getField('name', true), Util::ucFirst(Lang::game('event')));
} }
protected function generateContent() protected function generateContent()
@@ -73,12 +73,12 @@ class EventPage extends GenericPage
if ($_ = $this->subject->getField('bossCreature')) if ($_ = $this->subject->getField('bossCreature'))
{ {
$this->extendGlobalIds(TYPE_NPC, $_); $this->extendGlobalIds(TYPE_NPC, $_);
$this->infobox[] = Lang::$npc['rank'][3].Lang::$main['colon'].'[npc='.$_.']'; $this->infobox[] = Lang::npc('rank', 3).Lang::main('colon').'[npc='.$_.']';
} }
// display internal id to staff // display internal id to staff
if (User::isInGroup(U_GROUP_STAFF)) if (User::isInGroup(U_GROUP_STAFF))
$this->infobox[] = 'Event-Id'.Lang::$main['colon'].$this->eId; $this->infobox[] = 'Event-Id'.Lang::main('colon').$this->eId;
/****************/ /****************/
/* Main Content */ /* Main Content */
@@ -274,19 +274,19 @@ class EventPage extends GenericPage
// start // start
if ($updated['start']) if ($updated['start'])
array_push($this->infobox, Lang::$event['start'].Lang::$main['colon'].date(Lang::$main['dateFmtLong'], $updated['start'])); array_push($this->infobox, Lang::event('start').Lang::main('colon').date(Lang::main('dateFmtLong'), $updated['start']));
// end // end
if ($updated['end']) if ($updated['end'])
array_push($this->infobox, Lang::$event['end'].Lang::$main['colon'].date(Lang::$main['dateFmtLong'], $updated['end'])); array_push($this->infobox, Lang::event('end').Lang::main('colon').date(Lang::main('dateFmtLong'), $updated['end']));
// occurence // occurence
if ($updated['rec'] > 0) if ($updated['rec'] > 0)
array_push($this->infobox, Lang::$event['interval'].Lang::$main['colon'].Util::formatTime($updated['rec'] * 1000)); array_push($this->infobox, Lang::event('interval').Lang::main('colon').Util::formatTime($updated['rec'] * 1000));
// in progress // in progress
if ($updated['start'] < time() && $updated['end'] > time()) if ($updated['start'] < time() && $updated['end'] > time())
array_push($this->infobox, '[span class=q2]'.Lang::$event['inProgress'].'[/span]'); array_push($this->infobox, '[span class=q2]'.Lang::event('inProgress').'[/span]');
$this->infobox = '[ul][li]'.implode('[/li][li]', $this->infobox).'[/li][/ul]'; $this->infobox = '[ul][li]'.implode('[/li][li]', $this->infobox).'[/li][/ul]';

View File

@@ -23,7 +23,7 @@ class EventsPage extends GenericPage
parent::__construct($pageCall, $pageParam); parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::$game['events']); $this->name = Util::ucFirst(Lang::game('events'));
} }
protected function generateContent() protected function generateContent()
@@ -72,7 +72,7 @@ class EventsPage extends GenericPage
{ {
array_unshift($this->title, $this->name); array_unshift($this->title, $this->name);
if ($this->category) if ($this->category)
array_unshift($this->title, Lang::$event['category'][$this->category[0]]); array_unshift($this->title, Lang::event('category')[$this->category[0]]);
} }
protected function generatePath() protected function generatePath()

View File

@@ -25,7 +25,7 @@ class FactionPage extends GenericPage
$this->subject = new FactionList(array(['id', $this->typeId])); $this->subject = new FactionList(array(['id', $this->typeId]));
if ($this->subject->error) if ($this->subject->error)
$smarty->notFound(Lang::$game['faction']); $smarty->notFound(Lang::game('faction'));
$this->name = $this->subject->getField('name', true); $this->name = $this->subject->getField('name', true);
} }
@@ -43,7 +43,7 @@ class FactionPage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, $this->subject->getField('name', true), Util::ucFirst(Lang::$game['faction'])); array_unshift($this->title, $this->subject->getField('name', true), Util::ucFirst(Lang::game('faction')));
} }
protected function generateContent() protected function generateContent()
@@ -60,7 +60,7 @@ class FactionPage extends GenericPage
{ {
$this->extendGlobalIds(TYPE_NPC, $ids); $this->extendGlobalIds(TYPE_NPC, $ids);
$qmStr = Lang::$faction['quartermaster'].Lang::$main['colon']; $qmStr = Lang::faction('quartermaster').Lang::main('colon');
if (count($ids) == 1) if (count($ids) == 1)
$qmStr .= '[npc='.$ids[0].']'; $qmStr .= '[npc='.$ids[0].']';
@@ -78,7 +78,7 @@ class FactionPage extends GenericPage
// side if any // side if any
if ($_ = $this->subject->getField('side')) if ($_ = $this->subject->getField('side'))
$infobox[] = Lang::$main['side'].Lang::$main['colon'].'[span class=icon-'.($_ == 1 ? 'alliance' : 'horde').']'.Lang::$game['si'][$_].'[/span]'; $infobox[] = Lang::main('side').Lang::main('colon').'[span class=icon-'.($_ == 1 ? 'alliance' : 'horde').']'.Lang::game('si', $_).'[/span]';
/****************/ /****************/
/* Main Content */ /* Main Content */
@@ -117,10 +117,10 @@ class FactionPage extends GenericPage
$buff = ''; $buff = '';
foreach ($spillover->iterate() as $spillId => $__) foreach ($spillover->iterate() as $spillId => $__)
if ($val = ($spillover->getField('spilloverRateIn') * $this->subject->getField('spilloverRateOut') * 100)) if ($val = ($spillover->getField('spilloverRateIn') * $this->subject->getField('spilloverRateOut') * 100))
$buff .= '[tr][td][faction='.$spillId.'][/td][td][span class=q'.($val > 0 ? '2]+' : '10]').$val.'%[/span][/td][td]'.Lang::$game['rep'][$spillover->getField('spilloverMaxRank')].'[/td][/tr]'; $buff .= '[tr][td][faction='.$spillId.'][/td][td][span class=q'.($val > 0 ? '2]+' : '10]').$val.'%[/span][/td][td]'.Lang::game('rep', $spillover->getField('spilloverMaxRank')).'[/td][/tr]';
if ($buff) if ($buff)
$this->extraText .= '[h3 class=clear]'.Lang::$faction['spillover'].'[/h3][div margin=15px]'.Lang::$faction['spilloverDesc'].'[/div][table class=grid width=400px][tr][td width=150px][b]'.Util::ucFirst(Lang::$game['faction']).'[/b][/td][td width=100px][b]'.Lang::$spell['_value'].'[/b][/td][td width=150px][b]'.Lang::$faction['maxStanding'].'[/b][/td][/tr]'.$buff.'[/table]'; $this->extraText .= '[h3 class=clear]'.Lang::faction('spillover').'[/h3][div margin=15px]'.Lang::faction('spilloverDesc').'[/div][table class=grid width=400px][tr][td width=150px][b]'.Util::ucFirst(Lang::game('faction')).'[/b][/td][td width=100px][b]'.Lang::spell('_value').'[/b][/td][td width=150px][b]'.Lang::faction('maxStanding').'[/b][/td][/tr]'.$buff.'[/table]';
// reward rates (ultimately this should be calculated into each reward display) // reward rates (ultimately this should be calculated into each reward display)
@@ -134,12 +134,12 @@ class FactionPage extends GenericPage
switch ($k) switch ($k)
{ {
case 'quest_rate': $buff .= '[tr][td]'.Lang::$game['quests'].Lang::$main['colon'].'[/td]'; break; case 'quest_rate': $buff .= '[tr][td]'.Lang::game('quests') .Lang::main('colon').'[/td]'; break;
case 'quest_daily_rate': $buff .= '[tr][td]'.Lang::$game['quests'].' ('.Lang::$quest['daily'].')'.Lang::$main['colon'].'[/td]'; break; case 'quest_daily_rate': $buff .= '[tr][td]'.Lang::game('quests').' ('.Lang::quest('daily').')' .Lang::main('colon').'[/td]'; break;
case 'quest_weekly_rate': $buff .= '[tr][td]'.Lang::$game['quests'].' ('.Lang::$quest['weekly'].')'.Lang::$main['colon'].'[/td]'; break; case 'quest_weekly_rate': $buff .= '[tr][td]'.Lang::game('quests').' ('.Lang::quest('weekly').')' .Lang::main('colon').'[/td]'; break;
case 'quest_monthly_rate': $buff .= '[tr][td]'.Lang::$game['quests'].' ('.Lang::$quest['monthly'].')'.Lang::$main['colon'].'[/td]'; break; case 'quest_monthly_rate': $buff .= '[tr][td]'.Lang::game('quests').' ('.Lang::quest('monthly').')'.Lang::main('colon').'[/td]'; break;
case 'creature_rate': $buff .= '[tr][td]'.Lang::$game['npcs'].Lang::$main['colon'].'[/td]'; break; case 'creature_rate': $buff .= '[tr][td]'.Lang::game('npcs') .Lang::main('colon').'[/td]'; break;
case 'spell_rate': $buff .= '[tr][td]'.Lang::$game['spells'].Lang::$main['colon'].'[/td]'; break; case 'spell_rate': $buff .= '[tr][td]'.Lang::game('spells') .Lang::main('colon').'[/td]'; break;
} }
$buff .= '[td width=35px align=right][span class=q'.($v < 1 ? '10]' : '2]+').intVal(($v - 1) * 100).'%[/span][/td][/tr]'; $buff .= '[td width=35px align=right][span class=q'.($v < 1 ? '10]' : '2]+').intVal(($v - 1) * 100).'%[/span][/td][/tr]';
@@ -160,7 +160,7 @@ class FactionPage extends GenericPage
$altFac->id, $altFac->id,
$altFac->getField('name', true), $altFac->getField('name', true),
$pendant > 0 ? 'alliance' : 'horde', $pendant > 0 ? 'alliance' : 'horde',
$pendant > 0 ? Lang::$game['si'][1] : Lang::$game['si'][2] $pendant > 0 ? Lang::game('si', 1) : Lang::game('si', 2)
); );
} }
} }

View File

@@ -28,7 +28,7 @@ class FactionsPage extends GenericPage
parent::__construct($pageCall, $pageParam); parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::$game['factions']); $this->name = Util::ucFirst(Lang::game('factions'));
} }
protected function generateContent() protected function generateContent()
@@ -71,11 +71,11 @@ class FactionsPage extends GenericPage
switch (count($this->category)) switch (count($this->category))
{ {
case 1: case 1:
$t = Lang::$faction['cat'][$this->category[0]]; $t = Lang::faction('cat', $this->category[0]);
array_unshift($this->title, is_array($t) ? $t[0] : $t); array_unshift($this->title, is_array($t) ? $t[0] : $t);
break; break;
case 2: case 2:
array_unshift($this->title, Lang::$faction['cat'][$this->category[0]][$this->category[1]]); array_unshift($this->title, Lang::faction('cat', $this->category[0], $this->category[1]));
break; break;
} }
} }

View File

@@ -285,7 +285,7 @@ class GenericPage
$this->infobox = $article['quickInfo']; $this->infobox = $article['quickInfo'];
if ($article['locale'] != User::$localeId) if ($article['locale'] != User::$localeId)
$this->article['params'] = ['prepend' => Util::jsEscape('<div class="notice-box"><span class="icon-bubble">'.Lang::$main['englishOnly'].'</span></div>')]; $this->article['params'] = ['prepend' => Util::jsEscape('<div class="notice-box"><span class="icon-bubble">'.Lang::main('englishOnly').'</span></div>')];
} }
} }
@@ -380,8 +380,8 @@ class GenericPage
$this->tabId = null; $this->tabId = null;
$this->type = -99; // get error-article $this->type = -99; // get error-article
$this->typeId = 0; $this->typeId = 0;
$this->title[] = Lang::$main['errPageTitle']; $this->title[] = Lang::main('errPageTitle');
$this->name = Lang::$main['errPageTitle']; $this->name = Lang::main('errPageTitle');
$this->addArticle(); $this->addArticle();

View File

@@ -59,7 +59,7 @@ class ItemPage extends genericPage
$this->subject = new ItemList($conditions); $this->subject = new ItemList($conditions);
if ($this->subject->error) if ($this->subject->error)
$this->notFound(Lang::$game['item']); $this->notFound(Lang::game('item'));
if (!is_numeric($param)) if (!is_numeric($param))
$this->typeId = $this->subject->id; $this->typeId = $this->subject->id;
@@ -106,7 +106,7 @@ class ItemPage extends genericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, $this->subject->getField('name', true), Util::ucFirst(Lang::$game['item'])); array_unshift($this->title, $this->subject->getField('name', true), Util::ucFirst(Lang::game('item')));
} }
protected function generateContent() protected function generateContent()
@@ -133,16 +133,16 @@ class ItemPage extends genericPage
// itemlevel // itemlevel
if (in_array($_class, [ITEM_CLASS_ARMOR, ITEM_CLASS_WEAPON, ITEM_CLASS_AMMUNITION]) || $this->subject->getField('gemEnchantmentId')) if (in_array($_class, [ITEM_CLASS_ARMOR, ITEM_CLASS_WEAPON, ITEM_CLASS_AMMUNITION]) || $this->subject->getField('gemEnchantmentId'))
$infobox[] = Lang::$game['level'].Lang::$main['colon'].$this->subject->getField('itemLevel'); $infobox[] = Lang::game('level').Lang::main('colon').$this->subject->getField('itemLevel');
// account-wide // account-wide
if ($_flags & ITEM_FLAG_ACCOUNTBOUND) if ($_flags & ITEM_FLAG_ACCOUNTBOUND)
$infobox[] = Lang::$item['accountWide']; $infobox[] = Lang::item('accountWide');
// side // side
if ($si = $this->subject->json[$this->typeId]['side']) if ($si = $this->subject->json[$this->typeId]['side'])
if ($si != 3) if ($si != 3)
$infobox[] = Lang::$main['side'].Lang::$main['colon'].'[span class=icon-'.($si == 1 ? 'alliance' : 'horde').']'.Lang::$game['si'][$si].'[/span]'; $infobox[] = Lang::main('side').Lang::main('colon').'[span class=icon-'.($si == 1 ? 'alliance' : 'horde').']'.Lang::game('si', $si).'[/span]';
// consumable / not consumable // consumable / not consumable
if (!$_slot) if (!$_slot)
@@ -158,29 +158,29 @@ class ItemPage extends genericPage
if ($this->subject->getField('spellCharges'.$i) >= 0) if ($this->subject->getField('spellCharges'.$i) >= 0)
continue; continue;
$tt = '[tooltip=tooltip_consumedonuse]'.Lang::$item['consumable'].'[/tooltip]'; $tt = '[tooltip=tooltip_consumedonuse]'.Lang::item('consumable').'[/tooltip]';
break; break;
} }
if ($hasUse) if ($hasUse)
$infobox[] = isset($tt) ? $tt : '[tooltip=tooltip_notconsumedonuse]'.Lang::$item['nonConsumable'].'[/tooltip]'; $infobox[] = isset($tt) ? $tt : '[tooltip=tooltip_notconsumedonuse]'.Lang::item('nonConsumable').'[/tooltip]';
} }
// related holiday // related holiday
if ($hId = $this->subject->getField('holidayId')) if ($hId = $this->subject->getField('holidayId'))
if ($hName = DB::Aowow()->selectRow('SELECT * FROM ?_holidays WHERE id = ?d', $hId)) if ($hName = DB::Aowow()->selectRow('SELECT * FROM ?_holidays WHERE id = ?d', $hId))
$infobox[] = Lang::$game['eventShort'].Lang::$main['colon'].'[url=?event='.$hId.']'.Util::localizedString($hName, 'name').'[/url]'; $infobox[] = Lang::game('eventShort').Lang::main('colon').'[url=?event='.$hId.']'.Util::localizedString($hName, 'name').'[/url]';
// tool // tool
if ($tId = $this->subject->getField('totemCategory')) if ($tId = $this->subject->getField('totemCategory'))
if ($tName = DB::Aowow()->selectRow('SELECT * FROM ?_totemcategory WHERE id = ?d', $tId)) if ($tName = DB::Aowow()->selectRow('SELECT * FROM ?_totemcategory WHERE id = ?d', $tId))
$infobox[] = Lang::$item['tool'].Lang::$main['colon'].'[url=?items&filter=cr=91;crs='.$tId.';crv=0]'.Util::localizedString($tName, 'name').'[/url]'; $infobox[] = Lang::item('tool').Lang::main('colon').'[url=?items&filter=cr=91;crs='.$tId.';crv=0]'.Util::localizedString($tName, 'name').'[/url]';
// extendedCost // extendedCost
if (!empty($this->subject->getExtendedCost([], $_reqRating)[$this->subject->id])) if (!empty($this->subject->getExtendedCost([], $_reqRating)[$this->subject->id]))
{ {
$vendors = $this->subject->getExtendedCost()[$this->subject->id]; $vendors = $this->subject->getExtendedCost()[$this->subject->id];
$each = $this->subject->getField('stackable') > 1 ? '[color=q0] ('.Lang::$item['each'].')[/color]' : null; $each = $this->subject->getField('stackable') > 1 ? '[color=q0] ('.Lang::item('each').')[/color]' : null;
$handled = []; $handled = [];
$costList = []; $costList = [];
foreach ($vendors as $npcId => $data) foreach ($vendors as $npcId => $data)
@@ -225,16 +225,16 @@ class ItemPage extends genericPage
} }
if (count($costList) == 1) if (count($costList) == 1)
$infobox[] = Lang::$item['cost'].Lang::$main['colon'].$costList[0].$each; $infobox[] = Lang::item('cost').Lang::main('colon').$costList[0].$each;
else if (count($costList) > 1) else if (count($costList) > 1)
$infobox[] = Lang::$item['cost'].$each.Lang::$main['colon'].'[ul][li]'.implode('[/li][li]', $costList).'[/li][/ul]'; $infobox[] = Lang::item('cost').$each.Lang::main('colon').'[ul][li]'.implode('[/li][li]', $costList).'[/li][/ul]';
if ($_reqRating) if ($_reqRating)
{ {
$res = []; $res = [];
$i = 0; $i = 0;
$len = 0; $len = 0;
$parts = explode(' ', sprintf(Lang::$item['reqRating'], $_reqRating)); $parts = explode(' ', sprintf(Lang::item('reqRating'), $_reqRating));
foreach ($parts as $p) foreach ($parts as $p)
{ {
$res[$i][] = $p; $res[$i][] = $p;
@@ -255,17 +255,17 @@ class ItemPage extends genericPage
// repair cost // repair cost
if ($_ = $this->subject->getField('repairPrice')) if ($_ = $this->subject->getField('repairPrice'))
$infobox[] = Lang::$item['repairCost'].Lang::$main['colon'].'[money='.$_.']'; $infobox[] = Lang::item('repairCost').Lang::main('colon').'[money='.$_.']';
// avg auction buyout // avg auction buyout
if (in_array($this->subject->getField('bonding'), [0, 2, 3])) if (in_array($this->subject->getField('bonding'), [0, 2, 3]))
if ($_ = Util::getBuyoutForItem($this->typeId)) if ($_ = Util::getBuyoutForItem($this->typeId))
$infobox[] = '[tooltip=tooltip_buyoutprice]'.Lang::$item['buyout.'].'[/tooltip]'.Lang::$main['colon'].'[money='.$_.']'.$each; $infobox[] = '[tooltip=tooltip_buyoutprice]'.Lang::item('buyout.').'[/tooltip]'.Lang::main('colon').'[money='.$_.']'.$each;
// avg money contained // avg money contained
if ($_flags & ITEM_FLAG_OPENABLE) if ($_flags & ITEM_FLAG_OPENABLE)
if ($_ = intVal(($this->subject->getField('minMoneyLoot') + $this->subject->getField('maxMoneyLoot')) / 2)) if ($_ = intVal(($this->subject->getField('minMoneyLoot') + $this->subject->getField('maxMoneyLoot')) / 2))
$infobox[] = Lang::$item['worth'].Lang::$main['colon'].'[tooltip=tooltip_avgmoneycontained][money='.$_.'][/tooltip]'; $infobox[] = Lang::item('worth').Lang::main('colon').'[tooltip=tooltip_avgmoneycontained][money='.$_.'][/tooltip]';
// if it goes into a slot it may be disenchanted // if it goes into a slot it may be disenchanted
if ($_slot && $_class != ITEM_CLASS_CONTAINER) if ($_slot && $_class != ITEM_CLASS_CONTAINER)
@@ -276,49 +276,49 @@ class ItemPage extends genericPage
if ($_ < 1) // these are some items, that never went live .. extremely rough emulation here if ($_ < 1) // these are some items, that never went live .. extremely rough emulation here
$_ = intVal($this->subject->getField('itemLevel') / 7.5) * 25; $_ = intVal($this->subject->getField('itemLevel') / 7.5) * 25;
$infobox[] = Lang::$item['disenchantable'].'&nbsp;([tooltip=tooltip_reqenchanting]'.$_.'[/tooltip])'; $infobox[] = Lang::item('disenchantable').'&nbsp;([tooltip=tooltip_reqenchanting]'.$_.'[/tooltip])';
} }
else else
$infobox[] = Lang::$item['cantDisenchant']; $infobox[] = Lang::item('cantDisenchant');
} }
if (($_flags & ITEM_FLAG_MILLABLE) && $this->subject->getField('requiredSkill') == 773) if (($_flags & ITEM_FLAG_MILLABLE) && $this->subject->getField('requiredSkill') == 773)
$infobox[] = Lang::$item['millable'].'&nbsp;([tooltip=tooltip_reqinscription]'.$this->subject->getField('requiredSkillRank').'[/tooltip])'; $infobox[] = Lang::item('millable').'&nbsp;([tooltip=tooltip_reqinscription]'.$this->subject->getField('requiredSkillRank').'[/tooltip])';
if (($_flags & ITEM_FLAG_PROSPECTABLE) && $this->subject->getField('requiredSkill') == 755) if (($_flags & ITEM_FLAG_PROSPECTABLE) && $this->subject->getField('requiredSkill') == 755)
$infobox[] = Lang::$item['prospectable'].'&nbsp;([tooltip=tooltip_reqjewelcrafting]'.$this->subject->getField('requiredSkillRank').'[/tooltip])'; $infobox[] = Lang::item('prospectable').'&nbsp;([tooltip=tooltip_reqjewelcrafting]'.$this->subject->getField('requiredSkillRank').'[/tooltip])';
if ($_flags & ITEM_FLAG_DEPRECATED) if ($_flags & ITEM_FLAG_DEPRECATED)
$infobox[] = '[tooltip=tooltip_deprecated]'.Lang::$item['deprecated'].'[/tooltip]'; $infobox[] = '[tooltip=tooltip_deprecated]'.Lang::item('deprecated').'[/tooltip]';
if ($_flags & ITEM_FLAG_NO_EQUIPCD) if ($_flags & ITEM_FLAG_NO_EQUIPCD)
$infobox[] = '[tooltip=tooltip_noequipcooldown]'.Lang::$item['noEquipCD'].'[/tooltip]'; $infobox[] = '[tooltip=tooltip_noequipcooldown]'.Lang::item('noEquipCD').'[/tooltip]';
if ($_flags & ITEM_FLAG_PARTYLOOT) if ($_flags & ITEM_FLAG_PARTYLOOT)
$infobox[] = '[tooltip=tooltip_partyloot]'.Lang::$item['partyLoot'].'[/tooltip]'; $infobox[] = '[tooltip=tooltip_partyloot]'.Lang::item('partyLoot').'[/tooltip]';
if ($_flags & ITEM_FLAG_REFUNDABLE) if ($_flags & ITEM_FLAG_REFUNDABLE)
$infobox[] = '[tooltip=tooltip_refundable]'.Lang::$item['refundable'].'[/tooltip]'; $infobox[] = '[tooltip=tooltip_refundable]'.Lang::item('refundable').'[/tooltip]';
if ($_flags & ITEM_FLAG_SMARTLOOT) if ($_flags & ITEM_FLAG_SMARTLOOT)
$infobox[] = '[tooltip=tooltip_smartloot]'.Lang::$item['smartLoot'].'[/tooltip]'; $infobox[] = '[tooltip=tooltip_smartloot]'.Lang::item('smartLoot').'[/tooltip]';
if ($_flags & ITEM_FLAG_INDESTRUCTIBLE) if ($_flags & ITEM_FLAG_INDESTRUCTIBLE)
$infobox[] = Lang::$item['indestructible']; $infobox[] = Lang::item('indestructible');
if ($_flags & ITEM_FLAG_USABLE_ARENA) if ($_flags & ITEM_FLAG_USABLE_ARENA)
$infobox[] = Lang::$item['useInArena']; $infobox[] = Lang::item('useInArena');
if ($_flags & ITEM_FLAG_USABLE_SHAPED) if ($_flags & ITEM_FLAG_USABLE_SHAPED)
$infobox[] = Lang::$item['useInShape']; $infobox[] = Lang::item('useInShape');
// cant roll need // cant roll need
if ($this->subject->getField('flagsExtra') & 0x0100) if ($this->subject->getField('flagsExtra') & 0x0100)
$infobox[] = '[tooltip=tooltip_cannotrollneed]'.Lang::$item['noNeedRoll'].'[/tooltip]'; $infobox[] = '[tooltip=tooltip_cannotrollneed]'.Lang::item('noNeedRoll').'[/tooltip]';
// fits into keyring // fits into keyring
if ($_bagFamily & 0x0100) if ($_bagFamily & 0x0100)
$infobox[] = Lang::$item['atKeyring']; $infobox[] = Lang::item('atKeyring');
/****************/ /****************/
/* Main Content */ /* Main Content */
@@ -389,13 +389,13 @@ class ItemPage extends genericPage
if (!$altItem->error) if (!$altItem->error)
{ {
$this->transfer = sprintf( $this->transfer = sprintf(
Lang::$item['_transfer'], Lang::item('_transfer'),
$altItem->id, $altItem->id,
$altItem->getField('quality'), $altItem->getField('quality'),
$altItem->getField('iconString'), $altItem->getField('iconString'),
$altItem->getField('name', true), $altItem->getField('name', true),
$pendant > 0 ? 'alliance' : 'horde', $pendant > 0 ? 'alliance' : 'horde',
$pendant > 0 ? Lang::$game['si'][1] : Lang::$game['si'][2] $pendant > 0 ? Lang::game('si', 1) : Lang::game('si', 2)
); );
} }
} }
@@ -968,17 +968,17 @@ class ItemPage extends genericPage
// itemlevel // itemlevel
$xml->addChild('level', $this->subject->getField('itemLevel')); $xml->addChild('level', $this->subject->getField('itemLevel'));
// quality // quality
$xml->addChild('quality', Lang::$item['quality'][$this->subject->getField('quality')])->addAttribute('id', $this->subject->getField('quality')); $xml->addChild('quality', Lang::item('quality', $this->subject->getField('quality')))->addAttribute('id', $this->subject->getField('quality'));
// class // class
$x = Lang::$item['cat'][$this->subject->getField('class')]; $x = Lang::item('cat', $this->subject->getField('class'));
$xml->addChild('class')->addCData(is_array($x) ? $x[0] : $x)->addAttribute('id', $this->subject->getField('class')); $xml->addChild('class')->addCData(is_array($x) ? $x[0] : $x)->addAttribute('id', $this->subject->getField('class'));
// subclass // subclass
$x = $this->subject->getField('class') == 2 ? Lang::$spell['weaponSubClass'] : Lang::$item['cat'][$this->subject->getField('class')][1]; $x = $this->subject->getField('class') == 2 ? Lang::spell('weaponSubClass') : Lang::item('cat', $this->subject->getField('class'), 1);
$xml->addChild('subclass')->addCData(is_array($x) ? (is_array($x[$this->subject->getField('subClass')]) ? $x[$this->subject->getField('subClass')][0] : $x[$this->subject->getField('subClass')]) : null)->addAttribute('id', $this->subject->getField('subClass')); $xml->addChild('subclass')->addCData(is_array($x) ? (is_array($x[$this->subject->getField('subClass')]) ? $x[$this->subject->getField('subClass')][0] : $x[$this->subject->getField('subClass')]) : null)->addAttribute('id', $this->subject->getField('subClass'));
// icon + displayId // icon + displayId
$xml->addChild('icon', $this->subject->getField('iconString'))->addAttribute('displayId', $this->subject->getField('displayId')); $xml->addChild('icon', $this->subject->getField('iconString'))->addAttribute('displayId', $this->subject->getField('displayId'));
// inventorySlot // inventorySlot
$xml->addChild('inventorySlot', Lang::$item['inventoryType'][$this->subject->getField('slot')])->addAttribute('id', $this->subject->getField('slot')); $xml->addChild('inventorySlot', Lang::item('inventoryType', $this->subject->getField('slot')))->addAttribute('id', $this->subject->getField('slot'));
// tooltip // tooltip
$xml->addChild('htmlTooltip')->addCData($this->subject->renderTooltip()); $xml->addChild('htmlTooltip')->addCData($this->subject->renderTooltip());

View File

@@ -86,7 +86,7 @@ class ItemsPage extends GenericPage
parent::__construct($pageCall, $pageParam); parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::$game['items']); $this->name = Util::ucFirst(Lang::game('items'));
$this->subCat = $pageParam ? '='.$pageParam : ''; $this->subCat = $pageParam ? '='.$pageParam : '';
} }
@@ -122,7 +122,7 @@ class ItemsPage extends GenericPage
$this->filter['slot'][$k] = $str; $this->filter['slot'][$k] = $str;
if (isset($this->filter['slot'][INVTYPE_SHIELD])) // "Off Hand" => "Shield" if (isset($this->filter['slot'][INVTYPE_SHIELD])) // "Off Hand" => "Shield"
$this->filter['slot'][INVTYPE_SHIELD] = Lang::$item['armorSubClass'][6]; $this->filter['slot'][INVTYPE_SHIELD] = Lang::item('armorSubClass', 6);
$xCols = $this->filterObj->getForm('extraCols', true); $xCols = $this->filterObj->getForm('extraCols', true);
@@ -237,7 +237,7 @@ class ItemsPage extends GenericPage
if ($groups) if ($groups)
{ {
$nameSource = Lang::$item['inventoryType']; $nameSource = Lang::item('inventoryType');
$this->forceTabs = true; $this->forceTabs = true;
} }
@@ -254,7 +254,7 @@ class ItemsPage extends GenericPage
{ {
$l = $levelRef->getField('itemLevel'); $l = $levelRef->getField('itemLevel');
$groups[] = $l; $groups[] = $l;
$nameSource[$l] = Lang::$game['level'].' '.$l; $nameSource[$l] = Lang::game('level').' '.$l;
} }
if ($groups) if ($groups)
@@ -262,14 +262,14 @@ class ItemsPage extends GenericPage
$l = -end($groups); $l = -end($groups);
$groups[] = $l; // push last value as negativ to signal misc group after $this level $groups[] = $l; // push last value as negativ to signal misc group after $this level
$extraOpts = ['i' => ['o' => ['itemlevel DESC']]]; $extraOpts = ['i' => ['o' => ['itemlevel DESC']]];
$nameSource[$l] = Lang::$item['tabOther']; $nameSource[$l] = Lang::item('tabOther');
$this->forceTabs = true; $this->forceTabs = true;
} }
break; break;
case 3: // source case 3: // source
$groups = [1, 2, 3, 4, 5, 10, 11, 12, 0]; $groups = [1, 2, 3, 4, 5, 10, 11, 12, 0];
$nameSource = Lang::$game['sources']; $nameSource = Lang::game('sources');
$this->forceTabs = true; $this->forceTabs = true;
break; break;
@@ -427,8 +427,8 @@ class ItemsPage extends GenericPage
} }
// sort for dropdown-menus // sort for dropdown-menus
asort(Lang::$game['ra']); asort(Lang::game('ra'));
asort(Lang::$game['cl']); asort(Lang::game('cl'));
} }
protected function generateTitle() protected function generateTitle()
@@ -438,12 +438,12 @@ class ItemsPage extends GenericPage
if (!$this->category) if (!$this->category)
return; return;
if (isset($this->category[2]) && is_array(Lang::$item['cat'][$this->category[0]][1][$this->category[1]])) if (isset($this->category[2]) && is_array(Lang::item('cat', $this->category[0], 1, $this->category[1])))
$tPart = Lang::$item['cat'][$this->category[0]][1][$this->category[1]][1][$this->category[2]]; $tPart = Lang::item('cat', $this->category[0], 1, $this->category[1], 1, $this->category[2]);
else if (isset($this->category[1]) && is_array(Lang::$item['cat'][$this->category[0]])) else if (isset($this->category[1]) && is_array(Lang::item('cat', $this->category[0])))
$tPart = Lang::$item['cat'][$this->category[0]][1][$this->category[1]]; $tPart = Lang::item('cat', $this->category[0], 1, $this->category[1]);
else else
$tPart = Lang::$item['cat'][$this->category[0]]; $tPart = Lang::item('cat', $this->category[0]);
array_unshift($this->title, is_array($tPart) ? $tPart[0] : $tPart); array_unshift($this->title, is_array($tPart) ? $tPart[0] : $tPart);
} }
@@ -519,45 +519,45 @@ class ItemsPage extends GenericPage
if (!$this->category) if (!$this->category)
{ {
$menu['slot'] = [Lang::$item['inventoryType'], null]; $menu['slot'] = [Lang::item('inventoryType'), null];
asort($menu['slot'][0]); asort($menu['slot'][0]);
} }
else else
{ {
if (isset($this->category[2]) && is_array(Lang::$item['cat'][$this->category[0]][1][$this->category[1]])) if (isset($this->category[2]) && is_array(Lang::item('cat', $this->category[0], 1, $this->category[1])))
$catList = Lang::$item['cat'][$this->category[0]][1][$this->category[1]][1][$this->category[2]]; $catList = Lang::item('cat', $this->category[0], 1, $this->category[1], 1, $this->category[2]);
else if (isset($this->category[1]) && is_array(Lang::$item['cat'][$this->category[0]])) else if (isset($this->category[1]) && is_array(Lang::item('cat', $this->category[0])))
$catList = Lang::$item['cat'][$this->category[0]][1][$this->category[1]]; $catList = Lang::item('cat', $this->category[0], 1, $this->category[1]);
else else
$catList = Lang::$item['cat'][$this->category[0]]; $catList = Lang::item('cat', $this->category[0]);
switch ($this->category[0]) switch ($this->category[0])
{ {
case 0: case 0:
if (!isset($this->category[1])) if (!isset($this->category[1]))
$menu['type'] = [Lang::$item['cat'][0][1], null]; $menu['type'] = [Lang::item('cat', 0, 1), null];
if (!isset($this->category[1]) || in_array($this->category[1], [6, -3])) if (!isset($this->category[1]) || in_array($this->category[1], [6, -3]))
{ {
$menu['slot'] = [Lang::$item['inventoryType'], 0x63EFEA]; $menu['slot'] = [Lang::item('inventoryType'), 0x63EFEA];
asort($menu['slot'][0]); asort($menu['slot'][0]);
} }
break; break;
case 2: case 2:
if (!isset($this->category[1])) if (!isset($this->category[1]))
$menu['type'] = [Lang::$spell['weaponSubClass'], null]; $menu['type'] = [Lang::spell('weaponSubClass'), null];
$menu['slot'] = [Lang::$item['inventoryType'], 0x262A000]; $menu['slot'] = [Lang::item('inventoryType'), 0x262A000];
asort($menu['slot'][0]); asort($menu['slot'][0]);
break; break;
case 4: case 4:
if (!isset($this->category[1])) if (!isset($this->category[1]))
{ {
$menu['slot'] = [Lang::$item['inventoryType'], 0x10895FFE]; $menu['slot'] = [Lang::item('inventoryType'), 0x10895FFE];
$menu['type'] = [Lang::$item['cat'][4][1], null]; $menu['type'] = [Lang::item('cat', 4, 1), null];
} }
else if (in_array($this->category[1], [1, 2, 3, 4])) else if (in_array($this->category[1], [1, 2, 3, 4]))
$menu['slot'] = [Lang::$item['inventoryType'], 0x7EA]; $menu['slot'] = [Lang::item('inventoryType'), 0x7EA];
asort($menu['slot'][0]); asort($menu['slot'][0]);
break; break;

View File

@@ -29,7 +29,7 @@ class ItemsetPage extends GenericPage
$this->subject = new ItemsetList(array(['id', $this->typeId])); $this->subject = new ItemsetList(array(['id', $this->typeId]));
if ($this->subject->error) if ($this->subject->error)
$this->notFound(Lang::$game['itemset']); $this->notFound(Lang::game('itemset'));
$this->name = $this->subject->getField('name', true); $this->name = $this->subject->getField('name', true);
$this->extendGlobalData($this->subject->getJSGlobals()); $this->extendGlobalData($this->subject->getJSGlobals());
@@ -49,7 +49,7 @@ class ItemsetPage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, $this->name, Util::ucFirst(Lang::$game['itemset'])); array_unshift($this->title, $this->name, Util::ucFirst(Lang::game('itemset')));
} }
protected function generateContent() protected function generateContent()
@@ -66,19 +66,19 @@ class ItemsetPage extends GenericPage
// unavailable (todo (low): set data) // unavailable (todo (low): set data)
if ($this->subject->getField('cuFlags') & CUSTOM_UNAVAILABLE) if ($this->subject->getField('cuFlags') & CUSTOM_UNAVAILABLE)
$infobox[] = Lang::$main['unavailable']; $infobox[] = Lang::main('unavailable');
// holiday // holiday
if ($h = $this->subject->getField('holidayId')) if ($h = $this->subject->getField('holidayId'))
{ {
$infobox[] = Lang::$game['eventShort'].Lang::$main['colon'].'[event='.$h.']'; $infobox[] = Lang::game('eventShort').Lang::main('colon').'[event='.$h.']';
$this->extendGlobalIds(TYPE_WORLDEVENT, $h); $this->extendGlobalIds(TYPE_WORLDEVENT, $h);
} }
// itemLevel // itemLevel
if ($min = $this->subject->getField('minLevel')) if ($min = $this->subject->getField('minLevel'))
{ {
$foo = Lang::$game['level'].Lang::$main['colon'].$min; $foo = Lang::game('level').Lang::main('colon').$min;
$max = $this->subject->getField('maxLevel'); $max = $this->subject->getField('maxLevel');
if ($min < $max) if ($min < $max)
@@ -91,21 +91,21 @@ class ItemsetPage extends GenericPage
if ($cl = Lang::getClassString($this->subject->getField('classMask'), $jsg, $qty, false)) if ($cl = Lang::getClassString($this->subject->getField('classMask'), $jsg, $qty, false))
{ {
$this->extendGlobalIds(TYPE_CLASS, $jsg); $this->extendGlobalIds(TYPE_CLASS, $jsg);
$t = $qty == 1 ? Lang::$game['class'] : Lang::$game['classes']; $t = $qty == 1 ? Lang::game('class') : Lang::game('classes');
$infobox[] = Util::ucFirst($t).Lang::$main['colon'].$cl; $infobox[] = Util::ucFirst($t).Lang::main('colon').$cl;
} }
// required level // required level
if ($lvl = $this->subject->getField('reqLevel')) if ($lvl = $this->subject->getField('reqLevel'))
$infobox[] = sprintf(Lang::$game['reqLevel'], $lvl); $infobox[] = sprintf(Lang::game('reqLevel'), $lvl);
// type // type
if ($_ty) if ($_ty)
$infobox[] = Lang::$game['type'].Lang::$main['colon'].Lang::$itemset['types'][$_ty]; $infobox[] = Lang::game('type').Lang::main('colon').Lang::itemset('types', $_ty);
// tag // tag
if ($_ta) if ($_ta)
$infobox[] = Lang::$itemset['_tag'].Lang::$main['colon'].'[url=?itemsets&filter=ta='.$_ta.']'.Lang::$itemset['notes'][$_ta].'[/url]'; $infobox[] = Lang::itemset('_tag').Lang::main('colon').'[url=?itemsets&filter=ta='.$_ta.']'.Lang::itemset('notes', $_ta).'[/url]';
/****************/ /****************/
/* Main Content */ /* Main Content */
@@ -186,12 +186,12 @@ class ItemsetPage extends GenericPage
$skill = ''; $skill = '';
if ($_sk = $this->subject->getField('skillId')) if ($_sk = $this->subject->getField('skillId'))
{ {
$spellLink = sprintf('<a href="?spells=11.%s">%s</a> (%s)', $_sk, Lang::$spell['cat'][11][$_sk][0], $this->subject->getField('skillLevel')); $spellLink = sprintf('<a href="?spells=11.%s">%s</a> (%s)', $_sk, Lang::spell('cat', 11, $_sk, 0), $this->subject->getField('skillLevel'));
$skill = ' &ndash; <small><b>'.sprintf(Lang::$game['requires'], $spellLink).'</b></small>'; $skill = ' &ndash; <small><b>'.sprintf(Lang::game('requires'), $spellLink).'</b></small>';
} }
$this->bonusExt = $skill; $this->bonusExt = $skill;
$this->description = $_ta ? sprintf(Lang::$itemset['_desc'], $this->name, Lang::$itemset['notes'][$_ta], $_cnt) : sprintf(Lang::$itemset['_descTagless'], $this->name, $_cnt); $this->description = $_ta ? sprintf(Lang::itemset('_desc'), $this->name, Lang::itemset('notes', $_ta), $_cnt) : sprintf(Lang::itemset('_descTagless'), $this->name, $_cnt);
$this->unavailable = $this->subject->getField('cuFlags') & CUSTOM_UNAVAILABLE; $this->unavailable = $this->subject->getField('cuFlags') & CUSTOM_UNAVAILABLE;
$this->infobox = $infobox ? '[ul][li]'.implode('[/li][li]', $infobox).'[/li][/ul]' : null; $this->infobox = $infobox ? '[ul][li]'.implode('[/li][li]', $infobox).'[/li][/ul]' : null;
$this->pieces = $pieces; $this->pieces = $pieces;

View File

@@ -24,7 +24,7 @@ class ItemsetsPage extends GenericPage
parent::__construct($pageCall, $pageParam); parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::$game['itemsets']); $this->name = Util::ucFirst(Lang::game('itemsets'));
} }
protected function generateContent() protected function generateContent()
@@ -69,8 +69,8 @@ class ItemsetsPage extends GenericPage
$this->lvTabs[] = $lv; $this->lvTabs[] = $lv;
// sort for dropdown-menus // sort for dropdown-menus
asort(Lang::$itemset['notes'], SORT_NATURAL); asort(Lang::itemset('notes'), SORT_NATURAL);
asort(Lang::$game['cl']); asort(Lang::game('cl'));
} }
protected function generateTitle() protected function generateTitle()
@@ -79,7 +79,7 @@ class ItemsetsPage extends GenericPage
$form = $this->filterObj->getForm('form'); $form = $this->filterObj->getForm('form');
if (isset($form['cl'])) if (isset($form['cl']))
array_unshift($this->title, Lang::$game['cl'][$form['cl']]); array_unshift($this->title, Lang::game('cl', $form['cl']));
} }
protected function generatePath() protected function generatePath()

View File

@@ -18,7 +18,7 @@ class MapsPage extends GenericPage
{ {
parent::__construct($pageCall, $__); parent::__construct($pageCall, $__);
$this->name = Lang::$maps['maps']; $this->name = Lang::maps('maps');
} }
protected function generateContent() protected function generateContent()

View File

@@ -43,7 +43,7 @@ class MorePage extends GenericPage
$this->error(); $this->error();
if ($pageCall == 'help') // ye.. hack .. class definitions only allow static values if ($pageCall == 'help') // ye.. hack .. class definitions only allow static values
$_[2] = Lang::$main['helpTopics'][$_[1]]; $_[2] = Lang::main('helpTopics', $_[1]);
} }
$this->type = $_[0]; $this->type = $_[0];
$this->typeId = $_[1]; $this->typeId = $_[1];

View File

@@ -30,7 +30,7 @@ class NpcPage extends GenericPage
$this->subject = new CreatureList(array(['id', $this->typeId])); $this->subject = new CreatureList(array(['id', $this->typeId]));
if ($this->subject->error) if ($this->subject->error)
$this->notFound(Lang::$game['npc']); $this->notFound(Lang::game('npc'));
$this->name = $this->subject->getField('name', true); $this->name = $this->subject->getField('name', true);
$this->subname = $this->subject->getField('subname', true); $this->subname = $this->subject->getField('subname', true);
@@ -46,7 +46,7 @@ class NpcPage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, $this->name, Util::ucFirst(Lang::$game['npc'])); array_unshift($this->title, $this->name, Util::ucFirst(Lang::game('npc')));
} }
protected function generateContent() protected function generateContent()
@@ -116,7 +116,7 @@ class NpcPage extends GenericPage
foreach ($_ as $i => $e) foreach ($_ as $i => $e)
$ev[] = ($i % 2 ? '[br]' : ' ') . '[event='.$e.']'; $ev[] = ($i % 2 ? '[br]' : ' ') . '[event='.$e.']';
$infobox[] = Util::ucFirst(Lang::$game['eventShort']).Lang::$main['colon'].implode(',', $ev); $infobox[] = Util::ucFirst(Lang::game('eventShort')).Lang::main('colon').implode(',', $ev);
} }
// Level // Level
@@ -130,13 +130,13 @@ class NpcPage extends GenericPage
else // Boss Level else // Boss Level
$level = '??'; $level = '??';
$infobox[] = Lang::$game['level'].Lang::$main['colon'].$level; $infobox[] = Lang::game('level').Lang::main('colon').$level;
// Classification // Classification
if ($_ = $this->subject->getField('rank')) // != NPC_RANK_NORMAL if ($_ = $this->subject->getField('rank')) // != NPC_RANK_NORMAL
{ {
$str = $_typeFlags & 0x4 ? '[span class=icon-boss]'.Lang::$npc['rank'][$_].'[/span]' : Lang::$npc['rank'][$_]; $str = $_typeFlags & 0x4 ? '[span class=icon-boss]'.Lang::npc('rank', $_).'[/span]' : Lang::npc('rank', $_);
$infobox[] = Lang::$npc['classification'].Lang::$main['colon'].$str; $infobox[] = Lang::npc('classification').Lang::main('colon').$str;
} }
// Reaction // Reaction
@@ -146,32 +146,32 @@ class NpcPage extends GenericPage
if ($r == -1) return 10; if ($r == -1) return 10;
return; return;
}; };
$infobox[] = Lang::$npc['react'].Lang::$main['colon'].'[color=q'.$_($this->subject->getField('A')).']A[/color] [color=q'.$_($this->subject->getField('H')).']H[/color]'; $infobox[] = Lang::npc('react').Lang::main('colon').'[color=q'.$_($this->subject->getField('A')).']A[/color] [color=q'.$_($this->subject->getField('H')).']H[/color]';
// Faction // Faction
$this->extendGlobalIds(TYPE_FACTION, $this->subject->getField('factionId')); $this->extendGlobalIds(TYPE_FACTION, $this->subject->getField('factionId'));
$infobox[] = Util::ucFirst(Lang::$game['faction']).Lang::$main['colon'].'[faction='.$this->subject->getField('factionId').']'; $infobox[] = Util::ucFirst(Lang::game('faction')).Lang::main('colon').'[faction='.$this->subject->getField('factionId').']';
// Tameable // Tameable
if ($_typeFlags & 0x1) if ($_typeFlags & 0x1)
if ($_ = $this->subject->getField('family')) if ($_ = $this->subject->getField('family'))
$infobox[] = sprintf(Lang::$npc['tameable'], '[url=pet='.$_.']'.Lang::$game['fa'][$_].'[/url]'); $infobox[] = sprintf(Lang::npc('tameable'), '[url=pet='.$_.']'.Lang::game('fa', $_).'[/url]');
// Wealth // Wealth
if ($_ = intVal(($this->subject->getField('minGold') + $this->subject->getField('maxGold')) / 2)) if ($_ = intVal(($this->subject->getField('minGold') + $this->subject->getField('maxGold')) / 2))
$infobox[] = Lang::$npc['worth'].Lang::$main['colon'].'[tooltip=tooltip_avgmoneydropped][money='.$_.'][/tooltip]'; $infobox[] = Lang::npc('worth').Lang::main('colon').'[tooltip=tooltip_avgmoneydropped][money='.$_.'][/tooltip]';
// is Vehicle // is Vehicle
if ($this->subject->getField('vehicleId')) if ($this->subject->getField('vehicleId'))
$infobox[] = Lang::$npc['vehicle']; $infobox[] = Lang::npc('vehicle');
// AI // AI
if (User::isInGroup(U_GROUP_EMPLOYEE)) if (User::isInGroup(U_GROUP_EMPLOYEE))
{ {
if ($_ = $this->subject->getField('scriptName')) if ($_ = $this->subject->getField('scriptName'))
$infobox[] = 'Script'.Lang::$main['colon'].$_; $infobox[] = 'Script'.Lang::main('colon').$_;
else if ($_ = $this->subject->getField('aiName')) else if ($_ = $this->subject->getField('aiName'))
$infobox[] = 'AI'.Lang::$main['colon'].$_; $infobox[] = 'AI'.Lang::main('colon').$_;
} }
if (User::isInGroup(U_GROUP_STAFF)) if (User::isInGroup(U_GROUP_STAFF))
@@ -233,26 +233,26 @@ class NpcPage extends GenericPage
$modeRow = '[tr][td]%s&nbsp;&nbsp;[/td][td]%s[/td][/tr]'; $modeRow = '[tr][td]%s&nbsp;&nbsp;[/td][td]%s[/td][/tr]';
// Health // Health
$health = $this->subject->getBaseStats('health'); $health = $this->subject->getBaseStats('health');
$stats['health'] = Util::ucFirst(Lang::$spell['powerTypes'][-2]).Lang::$main['colon'].($health[0] < $health[1] ? $_nf($health[0]).' - '.$_nf($health[1]) : $_nf($health[0])); $stats['health'] = Util::ucFirst(Lang::spell('powerTypes', -2)).Lang::main('colon').($health[0] < $health[1] ? $_nf($health[0]).' - '.$_nf($health[1]) : $_nf($health[0]));
// Mana (may be 0) // Mana (may be 0)
$mana = $this->subject->getBaseStats('power'); $mana = $this->subject->getBaseStats('power');
$stats['mana'] = $mana[0] ? Lang::$spell['powerTypes'][0].Lang::$main['colon'].($mana[0] < $mana[1] ? $_nf($mana[0]).' - '.$_nf($mana[1]) : $_nf($mana[0])) : null; $stats['mana'] = $mana[0] ? Lang::spell('powerTypes', 0).Lang::main('colon').($mana[0] < $mana[1] ? $_nf($mana[0]).' - '.$_nf($mana[1]) : $_nf($mana[0])) : null;
// Armor // Armor
$armor = $this->subject->getBaseStats('armor'); $armor = $this->subject->getBaseStats('armor');
$stats['armor'] = Lang::$npc['armor'].Lang::$main['colon'].($armor[0] < $armor[1] ? $_nf($armor[0]).' - '.$_nf($armor[1]) : $_nf($armor[0])); $stats['armor'] = Lang::npc('armor').Lang::main('colon').($armor[0] < $armor[1] ? $_nf($armor[0]).' - '.$_nf($armor[1]) : $_nf($armor[0]));
// Melee Damage // Melee Damage
$melee = $this->subject->getBaseStats('melee'); $melee = $this->subject->getBaseStats('melee');
if ($_ = $this->subject->getField('dmgSchool')) // magic damage if ($_ = $this->subject->getField('dmgSchool')) // magic damage
$stats['melee'] = Lang::$npc['melee'].Lang::$main['colon'].$_nf($melee[0]).' - '.$_nf($melee[1]).' ('.Lang::$game['sc'][$_].')'; $stats['melee'] = Lang::npc('melee').Lang::main('colon').$_nf($melee[0]).' - '.$_nf($melee[1]).' ('.Lang::game('sc', $_).')';
else // phys. damage else // phys. damage
$stats['melee'] = Lang::$npc['melee'].Lang::$main['colon'].$_nf($melee[0]).' - '.$_nf($melee[1]); $stats['melee'] = Lang::npc('melee').Lang::main('colon').$_nf($melee[0]).' - '.$_nf($melee[1]);
// Ranged Damage // Ranged Damage
$ranged = $this->subject->getBaseStats('ranged'); $ranged = $this->subject->getBaseStats('ranged');
$stats['ranged'] = Lang::$npc['ranged'].Lang::$main['colon'].$_nf($ranged[0]).' - '.$_nf($ranged[1]); $stats['ranged'] = Lang::npc('ranged').Lang::main('colon').$_nf($ranged[0]).' - '.$_nf($ranged[1]);
if (in_array($mapType, [1, 2])) // Dungeon or Raid if (in_array($mapType, [1, 2])) // Dungeon or Raid
{ {
@@ -263,7 +263,7 @@ class NpcPage extends GenericPage
if ($dId != $id) if ($dId != $id)
continue; continue;
$m = Lang::$npc['modes'][$mapType][$mode]; $m = Lang::npc('modes', $mapType, $mode);
// Health // Health
$health = $_altNPCs->getBaseStats('health'); $health = $_altNPCs->getBaseStats('health');
@@ -280,7 +280,7 @@ class NpcPage extends GenericPage
// Melee Damage // Melee Damage
$melee = $_altNPCs->getBaseStats('melee'); $melee = $_altNPCs->getBaseStats('melee');
if ($_ = $_altNPCs->getField('dmgSchool')) // magic damage if ($_ = $_altNPCs->getField('dmgSchool')) // magic damage
$modes['melee'][] = sprintf($modeRow, $m, $_nf($melee[0]).' - '.$_nf($melee[1]).' ('.Lang::$game['sc'][$_].')'); $modes['melee'][] = sprintf($modeRow, $m, $_nf($melee[0]).' - '.$_nf($melee[1]).' ('.Lang::game('sc', $_).')');
else // phys. damage else // phys. damage
$modes['melee'][] = sprintf($modeRow, $m, $_nf($melee[0]).' - '.$_nf($melee[1])); $modes['melee'][] = sprintf($modeRow, $m, $_nf($melee[0]).' - '.$_nf($melee[1]));
@@ -298,7 +298,7 @@ class NpcPage extends GenericPage
// < Stats // < Stats
if ($stats) if ($stats)
$infobox[] = Lang::$npc['stats'].($modes ? ' ('.Lang::$npc['modes'][$mapType][0].')' : null).Lang::$main['colon'].'[ul][li]'.implode('[/li][li]', $stats).'[/li][/ul]'; $infobox[] = Lang::npc('stats').($modes ? ' ('.Lang::npc('modes', $mapType, 0).')' : null).Lang::main('colon').'[ul][li]'.implode('[/li][li]', $stats).'[/li][/ul]';
/****************/ /****************/
/* Main Content */ /* Main Content */
@@ -759,7 +759,7 @@ class NpcPage extends GenericPage
foreach ($data as $id => &$d) foreach ($data as $id => &$d)
$d['seat'] = str_replace(',', ', ', $_[$id]); $d['seat'] = str_replace(',', ', ', $_[$id]);
$xCols = "$[Listview.funcBox.createSimpleCol('seat', '".Lang::$npc['seat']."', '10%', 'seat')]"; $xCols = "$[Listview.funcBox.createSimpleCol('seat', '".Lang::npc('seat')."', '10%', 'seat')]";
} }
$this->extendGlobalData($passengers->getJSGlobals(GLOBALINFO_SELF)); $this->extendGlobalData($passengers->getJSGlobals(GLOBALINFO_SELF));
@@ -768,7 +768,7 @@ class NpcPage extends GenericPage
'data' => $data, 'data' => $data,
'params' => array( 'params' => array(
'extraCols' => $xCols, 'extraCols' => $xCols,
'name' => Lang::$npc['accessory'], 'name' => Lang::npc('accessory'),
'id' => 'accessory' 'id' => 'accessory'
) )
); );
@@ -840,7 +840,7 @@ class NpcPage extends GenericPage
'qty' => $row['qty'], 'qty' => $row['qty'],
'name' => $factions->getField('name', true), 'name' => $factions->getField('name', true),
'npc' => $row['npc'], 'npc' => $row['npc'],
'cap' => $row['maxRank'] && $row['maxRank'] < REP_EXALTED ? Lang::$game['rep'][$row['maxRank']] : null 'cap' => $row['maxRank'] && $row['maxRank'] < REP_EXALTED ? Lang::game('rep', $row['maxRank']) : null
); );
if ($row['spillover']) if ($row['spillover'])
@@ -862,7 +862,7 @@ class NpcPage extends GenericPage
// base NPC // base NPC
if ($base = $this->getRepForId($this->typeId, $spilledParents)) if ($base = $this->getRepForId($this->typeId, $spilledParents))
$reputation[] = [Lang::$npc['modes'][1][0], $base]; $reputation[] = [Lang::npc('modes', 1, 0), $base];
// difficulty dummys // difficulty dummys
if ($dummyIds) if ($dummyIds)
@@ -876,7 +876,7 @@ class NpcPage extends GenericPage
// apply by difficulty // apply by difficulty
foreach ($alt as $mode => $dat) foreach ($alt as $mode => $dat)
$reputation[] = [Lang::$npc['modes'][$mapType][$mode], $dat]; $reputation[] = [Lang::npc('modes', $mapType, $mode), $dat];
} }
// get spillover factions and apply // get spillover factions and apply
@@ -907,7 +907,7 @@ class NpcPage extends GenericPage
'id' => $spId, 'id' => $spId,
'qty' => $spilledParents[$row['spillover']][0], 'qty' => $spilledParents[$row['spillover']][0],
'name' => $spilled->getField('name', true), 'name' => $spilled->getField('name', true),
'cap' => $spMax && $spMax < REP_EXALTED ? Lang::$game['rep'][$spMax] : null 'cap' => $spMax && $spMax < REP_EXALTED ? Lang::game('rep', $spMax) : null
); );
} }
} }
@@ -958,7 +958,7 @@ class NpcPage extends GenericPage
$line = array( $line = array(
'range' => $t['range'], 'range' => $t['range'],
'type' => 2, // [type: 0, 12] say: yellow-ish 'type' => 2, // [type: 0, 12] say: yellow-ish
'lang' => !empty($t['language']) ? Lang::$game['languages'][$t['language']] : null, 'lang' => !empty($t['language']) ? Lang::game('languages', $t['language']) : null,
'text' => sprintf(Util::parseHtmlText(htmlentities($msg)), $this->name), 'text' => sprintf(Util::parseHtmlText(htmlentities($msg)), $this->name),
); );

View File

@@ -25,12 +25,14 @@ class NpcsPage extends GenericPage
parent::__construct($pageCall, $pageParam); parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::$game['npcs']); $this->name = Util::ucFirst(Lang::game('npcs'));
$this->subCat = $pageParam ? '='.$pageParam : ''; $this->subCat = $pageParam ? '='.$pageParam : '';
} }
protected function generateContent() protected function generateContent()
{ {
$this->addJS('?data=zones&locale='.User::$localeId.'&t='.$_SESSION['dataKey']);
$conditions = []; $conditions = [];
if (!User::isInGroup(U_GROUP_EMPLOYEE)) if (!User::isInGroup(U_GROUP_EMPLOYEE))
@@ -80,14 +82,14 @@ class NpcsPage extends GenericPage
$this->lvTabs[] = $lv; $this->lvTabs[] = $lv;
// sort for dropdown-menus // sort for dropdown-menus
asort(Lang::$game['fa']); asort(Lang::game('fa'));
} }
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, $this->name); array_unshift($this->title, $this->name);
if ($this->category) if ($this->category)
array_unshift($this->title, Lang::$npc['cat'][$this->category[0]]); array_unshift($this->title, Lang::npc('cat', $this->category[0]));
} }
protected function generatePath() protected function generatePath()

View File

@@ -37,7 +37,7 @@ class ObjectPage extends GenericPage
$this->subject = new GameObjectList(array(['id', $this->typeId])); $this->subject = new GameObjectList(array(['id', $this->typeId]));
if ($this->subject->error) if ($this->subject->error)
$this->notFound(Lang::$game['gameObject']); $this->notFound(Lang::game('gameObject'));
$this->name = $this->subject->getField('name', true); $this->name = $this->subject->getField('name', true);
} }
@@ -49,7 +49,7 @@ class ObjectPage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, $this->name, Util::ucFirst(Lang::$game['gameObject'])); array_unshift($this->title, $this->name, Util::ucFirst(Lang::game('gameObject')));
} }
protected function generateContent() protected function generateContent()
@@ -70,7 +70,7 @@ class ObjectPage extends GenericPage
foreach ($_ as $i => $e) foreach ($_ as $i => $e)
$ev[] = ($i % 2 ? '[br]' : ' ') . '[event='.$e.']'; $ev[] = ($i % 2 ? '[br]' : ' ') . '[event='.$e.']';
$infobox[] = Util::ucFirst(Lang::$game['eventShort']).Lang::$main['colon'].implode(',', $ev); $infobox[] = Util::ucFirst(Lang::game('eventShort')).Lang::main('colon').implode(',', $ev);
} }
// Reaction // Reaction
@@ -80,19 +80,19 @@ class ObjectPage extends GenericPage
if ($r == -1) return 10; if ($r == -1) return 10;
return; return;
}; };
$infobox[] = Lang::$npc['react'].Lang::$main['colon'].'[color=q'.$_($this->subject->getField('A')).']A[/color] [color=q'.$_($this->subject->getField('H')).']H[/color]'; $infobox[] = Lang::npc('react').Lang::main('colon').'[color=q'.$_($this->subject->getField('A')).']A[/color] [color=q'.$_($this->subject->getField('H')).']H[/color]';
// reqSkill // reqSkill
switch ($this->subject->getField('typeCat')) switch ($this->subject->getField('typeCat'))
{ {
case -3: // Herbalism case -3: // Herbalism
$infobox[] = sprintf(Lang::$game['requires'], Lang::$spell['lockType'][2].' ('.$this->subject->getField('reqSkill').')'); $infobox[] = sprintf(Lang::game('requires'), Lang::spell('lockType', 2).' ('.$this->subject->getField('reqSkill').')');
break; break;
case -4: // Mining case -4: // Mining
$infobox[] = sprintf(Lang::$game['requires'], Lang::$spell['lockType'][3].' ('.$this->subject->getField('reqSkill').')'); $infobox[] = sprintf(Lang::game('requires'), Lang::spell('lockType', 3).' ('.$this->subject->getField('reqSkill').')');
break; break;
case -5: // Lockpicking case -5: // Lockpicking
$infobox[] = sprintf(Lang::$game['requires'], Lang::$spell['lockType'][1].' ('.$this->subject->getField('reqSkill').')'); $infobox[] = sprintf(Lang::game('requires'), Lang::spell('lockType', 1).' ('.$this->subject->getField('reqSkill').')');
break; break;
default: // requires key .. maybe default: // requires key .. maybe
{ {
@@ -104,7 +104,7 @@ class ObjectPage extends GenericPage
continue; continue;
$this->extendGlobalIds(TYPE_ITEM, $idx); $this->extendGlobalIds(TYPE_ITEM, $idx);
$l = Lang::$gameObject['key'].Lang::$main['colon'].'[item='.$idx.']'; $l = Lang::gameObject('key').Lang::main('colon').'[item='.$idx.']';
} }
// if no propper item is found use a skill // if no propper item is found use a skill
@@ -117,7 +117,7 @@ class ObjectPage extends GenericPage
if ($_ = $this->subject->getField('linkedTrap')) if ($_ = $this->subject->getField('linkedTrap'))
{ {
$this->extendGlobalIds(TYPE_OBJECT, $_); $this->extendGlobalIds(TYPE_OBJECT, $_);
$infobox[] = Lang::$gameObject['trap'].Lang::$main['colon'].'[object='.$_.']'; $infobox[] = Lang::gameObject('trap').Lang::main('colon').'[object='.$_.']';
} }
// trap for // trap for
@@ -125,20 +125,20 @@ class ObjectPage extends GenericPage
if (!$trigger->error) if (!$trigger->error)
{ {
$this->extendGlobalData($trigger->getJSGlobals()); $this->extendGlobalData($trigger->getJSGlobals());
$infobox[] = Lang::$gameObject['triggeredBy'].Lang::$main['colon'].'[object='.$trigger->id.']'; $infobox[] = Lang::gameObject('triggeredBy').Lang::main('colon').'[object='.$trigger->id.']';
} }
// SpellFocus // SpellFocus
if ($_ = $this->subject->getField('spellFocusId')) if ($_ = $this->subject->getField('spellFocusId'))
if ($sfo = DB::Aowow()->selectRow('SELECT * FROM ?_spellfocusobject WHERE id = ?d', $_)) if ($sfo = DB::Aowow()->selectRow('SELECT * FROM ?_spellfocusobject WHERE id = ?d', $_))
$infobox[] = '[tooltip name=focus]'.Lang::$gameObject['focusDesc'].'[/tooltip][span class=tip tooltip=focus]'.Lang::$gameObject['focus'].Lang::$main['colon'].Util::localizedString($sfo, 'name').'[/span]'; $infobox[] = '[tooltip name=focus]'.Lang::gameObject('focusDesc').'[/tooltip][span class=tip tooltip=focus]'.Lang::gameObject('focus').Lang::main('colon').Util::localizedString($sfo, 'name').'[/span]';
// lootinfo: [min, max, restock] // lootinfo: [min, max, restock]
if (($_ = $this->subject->getField('lootStack')) && $_[0]) if (($_ = $this->subject->getField('lootStack')) && $_[0])
{ {
$buff = Lang::$item['charges'].Lang::$main['colon'].$_[0]; $buff = Lang::item('charges').Lang::main('colon').$_[0];
if ($_[0] < $_[1]) if ($_[0] < $_[1])
$buff .= Lang::$game['valueDelim'].$_[1]; $buff .= Lang::game('valueDelim').$_[1];
// since Veins don't have charges anymore, the timer is questionable // since Veins don't have charges anymore, the timer is questionable
$infobox[] = $_[2] > 1 ? '[tooltip name=restock]'.sprintf(Lang::gameObject('restock'), Util::formatTime($_[2] * 1000)).'[/tooltip][span class=tip tooltip=restock]'.$buff.'[/span]' : $buff; $infobox[] = $_[2] > 1 ? '[tooltip name=restock]'.sprintf(Lang::gameObject('restock'), Util::formatTime($_[2] * 1000)).'[/tooltip][span class=tip tooltip=restock]'.$buff.'[/span]' : $buff;
@@ -150,13 +150,13 @@ class ObjectPage extends GenericPage
if ($_ = $this->subject->getField('mStone')) if ($_ = $this->subject->getField('mStone'))
{ {
$this->extendGlobalIds(TYPE_ZONE, $_[2]); $this->extendGlobalIds(TYPE_ZONE, $_[2]);
$m = Lang::$game['meetingStone'].Lang::$main['colon'].'[zone='.$_[2].']'; $m = Lang::game('meetingStone').Lang::main('colon').'[zone='.$_[2].']';
$l = $_[0]; $l = $_[0];
if ($_[0] > 1 && $_[1] > $_[0]) if ($_[0] > 1 && $_[1] > $_[0])
$l .= Lang::$game['valueDelim'].min($_[1], MAX_LEVEL); $l .= Lang::game('valueDelim').min($_[1], MAX_LEVEL);
$infobox[] = $l ? '[tooltip name=meetingstone]'.sprintf(Lang::$game['reqLevel'], $l).'[/tooltip][span class=tip tooltip=meetingstone]'.$m.'[/span]' : $m; $infobox[] = $l ? '[tooltip name=meetingstone]'.sprintf(Lang::game('reqLevel'), $l).'[/tooltip][span class=tip tooltip=meetingstone]'.$m.'[/span]' : $m;
} }
} }
@@ -165,19 +165,19 @@ class ObjectPage extends GenericPage
{ {
if ($_ = $this->subject->getField('capture')) if ($_ = $this->subject->getField('capture'))
{ {
$buff = Lang::$gameObject['capturePoint']; $buff = Lang::gameObject('capturePoint');
if ($_[2] > 1 || $_[0]) if ($_[2] > 1 || $_[0])
$buff .= Lang::$main['colon'].'[ul]'; $buff .= Lang::main('colon').'[ul]';
if ($_[2] > 1) if ($_[2] > 1)
$buff .= '[li]'.Lang::$game['duration'].Lang::$main['colon'].($_[3] > $_[2] ? Util::FormatTime($_[3] * 1000, true).' - ' : null).Util::FormatTime($_[2] * 1000, true).'[/li]'; $buff .= '[li]'.Lang::game('duration').Lang::main('colon').($_[3] > $_[2] ? Util::FormatTime($_[3] * 1000, true).' - ' : null).Util::FormatTime($_[2] * 1000, true).'[/li]';
if ($_[1]) if ($_[1])
$buff .= '[li]'.Lang::$main['players'].Lang::$main['colon'].$_[0].($_[1] > $_[0] ? ' - '.$_[1] : null).'[/li]'; $buff .= '[li]'.Lang::main('players').Lang::main('colon').$_[0].($_[1] > $_[0] ? ' - '.$_[1] : null).'[/li]';
if ($_[4]) if ($_[4])
$buff .= '[li]'.sprintf(Lang::$spell['range'], $_[4]).'[/li]'; $buff .= '[li]'.sprintf(Lang::spell('range'), $_[4]).'[/li]';
if ($_[2] > 1 || $_[0]) if ($_[2] > 1 || $_[0])
$buff .= '[/ul]'; $buff .= '[/ul]';
@@ -190,9 +190,9 @@ class ObjectPage extends GenericPage
if (User::isInGroup(U_GROUP_EMPLOYEE)) if (User::isInGroup(U_GROUP_EMPLOYEE))
{ {
if ($_ = $this->subject->getField('ScriptName')) if ($_ = $this->subject->getField('ScriptName'))
$infobox[] = 'Script'.Lang::$main['colon'].$_; $infobox[] = 'Script'.Lang::main('colon').$_;
else if ($_ = $this->subject->getField('AIName')) else if ($_ = $this->subject->getField('AIName'))
$infobox[] = 'AI'.Lang::$main['colon'].$_; $infobox[] = 'AI'.Lang::main('colon').$_;
} }

View File

@@ -25,7 +25,7 @@ class ObjectsPage extends GenericPage
parent::__construct($pageCall, $pageParam); parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::$game['gameObjects']); $this->name = Util::ucFirst(Lang::game('gameObjects'));
$this->subCat = $pageParam ? '='.$pageParam : ''; $this->subCat = $pageParam ? '='.$pageParam : '';
} }
@@ -78,7 +78,7 @@ class ObjectsPage extends GenericPage
{ {
array_unshift($this->title, $this->name); array_unshift($this->title, $this->name);
if ($this->category) if ($this->category)
array_unshift($this->title, Lang::$gameObject['cat'][$this->category[0]]); array_unshift($this->title, Lang::gameObject('cat', $this->category[0]));
} }
protected function generatePath() protected function generatePath()

View File

@@ -26,7 +26,7 @@ class PetPage extends GenericPage
$this->subject = new PetList(array(['id', $this->typeId])); $this->subject = new PetList(array(['id', $this->typeId]));
if ($this->subject->error) if ($this->subject->error)
$this->notFound(Lang::$game['pet']); $this->notFound(Lang::game('pet'));
$this->name = $this->subject->getField('name', true); $this->name = $this->subject->getField('name', true);
} }
@@ -38,7 +38,7 @@ class PetPage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, $this->name, Util::ucFirst(Lang::$game['pet'])); array_unshift($this->title, $this->name, Util::ucFirst(Lang::game('pet')));
} }
protected function generateContent() protected function generateContent()
@@ -52,11 +52,11 @@ class PetPage extends GenericPage
$infobox = Lang::getInfoBoxForFlags($this->subject->getField('cuFlags')); $infobox = Lang::getInfoBoxForFlags($this->subject->getField('cuFlags'));
// level range // level range
$infobox[] = Lang::$game['level'].Lang::$main['colon'].$this->subject->getField('minLevel').' - '.$this->subject->getField('maxLevel'); $infobox[] = Lang::game('level').Lang::main('colon').$this->subject->getField('minLevel').' - '.$this->subject->getField('maxLevel');
// exotic // exotic
if ($this->subject->getField('exotic')) if ($this->subject->getField('exotic'))
$infobox[] = '[url=?spell=53270]'.Lang::$pet['exotic'].'[/url]'; $infobox[] = '[url=?spell=53270]'.Lang::pet('exotic').'[/url]';
/****************/ /****************/
/* Main Content */ /* Main Content */

View File

@@ -23,7 +23,7 @@ class PetsPage extends GenericPage
parent::__construct($pageCall, $pageParam); parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::$game['pets']); $this->name = Util::ucFirst(Lang::game('pets'));
} }
protected function generateContent() protected function generateContent()
@@ -55,9 +55,9 @@ class PetsPage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, Util::ucFirst(Lang::$game['pets'])); array_unshift($this->title, Util::ucFirst(Lang::game('pets')));
if ($this->category) if ($this->category)
array_unshift($this->title, Lang::$pet['cat'][$this->category[0]]); array_unshift($this->title, Lang::pet('cat', $this->category[0]));
} }
protected function generatePath() protected function generatePath()

View File

@@ -41,7 +41,7 @@ class ProfilePage extends GenericPage
if ($foo = DB::Aowow()->selectCell('SELECT 2161862')) if ($foo = DB::Aowow()->selectCell('SELECT 2161862'))
$this->profileId = $foo; $this->profileId = $foo;
else else
$this->notFound(Util::ucFirst(Lang::$game['profile'])); $this->notFound(Util::ucFirst(Lang::game('profile')));
$this->isCustom = true; $this->isCustom = true;
$this->profile = intVal($_[0]); $this->profile = intVal($_[0]);
@@ -52,12 +52,12 @@ class ProfilePage extends GenericPage
if ($foo = DB::Aowow()->selectCell('SELECT 2161862')) if ($foo = DB::Aowow()->selectCell('SELECT 2161862'))
$this->profileId = $foo; $this->profileId = $foo;
else else
$this->notFound(Util::ucFirst(Lang::$game['profile'])); $this->notFound(Util::ucFirst(Lang::game('profile')));
$this->profile = $_; $this->profile = $_;
} }
else if ($_ || !isset($_GET['new'])) else if ($_ || !isset($_GET['new']))
$this->notFound(Util::ucFirst(Lang::$game['profile'])); $this->notFound(Util::ucFirst(Lang::game('profile')));
$this->subject = new ProfileList(/*stuff*/); $this->subject = new ProfileList(/*stuff*/);
} }
@@ -77,7 +77,7 @@ class ProfilePage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, Util::ucFirst(Lang::$game['profile'])); array_unshift($this->title, Util::ucFirst(Lang::game('profile')));
} }
protected function generateTooltip($asError = false) protected function generateTooltip($asError = false)

View File

@@ -22,7 +22,7 @@ class ProfilerPage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, Util::ucFirst(Lang::$main['_cpHead'])); array_unshift($this->title, Util::ucFirst(Lang::main('_cpHead')));
} }
} }

View File

@@ -46,7 +46,7 @@ class ProfilesPage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
$this->title[] = Util::ucFirst(Lang::$game['profiles']); $this->title[] = Util::ucFirst(Lang::game('profiles'));
} }
protected function generatePath() protected function generatePath()
@@ -113,8 +113,8 @@ class ProfilesPage extends GenericPage
$this->filter = ['query' => 1]; $this->filter = ['query' => 1];
asort(Lang::$game['cl']); asort(Lang::game('cl'));
asort(Lang::$game['ra']); asort(Lang::game('ra'));
} }
private function getTalentDistribution($tString) private function getTalentDistribution($tString)

View File

@@ -30,7 +30,7 @@ class QuestPage extends GenericPage
$this->subject = new QuestList(array(['id', $this->typeId])); $this->subject = new QuestList(array(['id', $this->typeId]));
if ($this->subject->error) if ($this->subject->error)
$this->notFound(Lang::$game['quest']); $this->notFound(Lang::game('quest'));
$this->name = $this->subject->getField('name', true); $this->name = $this->subject->getField('name', true);
} }
@@ -45,7 +45,7 @@ class QuestPage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, $this->name, Util::ucFirst(Lang::$game['quest'])); array_unshift($this->title, $this->name, Util::ucFirst(Lang::game('quest')));
} }
protected function generateContent() protected function generateContent()
@@ -66,12 +66,12 @@ class QuestPage extends GenericPage
if ($_ = $this->subject->getField('holidayId')) if ($_ = $this->subject->getField('holidayId'))
{ {
$this->extendGlobalIds(TYPE_WORLDEVENT, $_); $this->extendGlobalIds(TYPE_WORLDEVENT, $_);
$infobox[] = Lang::$game['eventShort'].Lang::$main['colon'].'[event='.$_.']'; $infobox[] = Lang::game('eventShort').Lang::main('colon').'[event='.$_.']';
} }
// level // level
if ($_level > 0) if ($_level > 0)
$infobox[] = Lang::$game['level'].Lang::$main['colon'].$_level; $infobox[] = Lang::game('level').Lang::main('colon').$_level;
// reqlevel // reqlevel
if ($_minLevel) if ($_minLevel)
@@ -80,7 +80,7 @@ class QuestPage extends GenericPage
if ($_ = $this->subject->getField('maxLevel')) if ($_ = $this->subject->getField('maxLevel'))
$lvl .= ' - '.$_; $lvl .= ' - '.$_;
$infobox[] = sprintf(Lang::$game['reqLevel'], $lvl); $infobox[] = sprintf(Lang::game('reqLevel'), $lvl);
} }
// loremaster (i dearly hope those flags cover every case...) // loremaster (i dearly hope those flags cover every case...)
@@ -99,10 +99,10 @@ class QuestPage extends GenericPage
case 0: case 0:
break; break;
case 1: case 1:
$infobox[] = Lang::$quest['loremaster'].Lang::$main['colon'].'[achievement='.$loremaster->id.']'; $infobox[] = Lang::quest('loremaster').Lang::main('colon').'[achievement='.$loremaster->id.']';
break; break;
default: default:
$lm = Lang::$quest['loremaster'].Lang::$main['colon'].'[ul]'; $lm = Lang::quest('loremaster').Lang::main('colon').'[ul]';
foreach ($loremaster->iterate() as $id => $__) foreach ($loremaster->iterate() as $id => $__)
$lm .= '[li][achievement='.$id.'][/li]'; $lm .= '[li][achievement='.$id.'][/li]';
@@ -114,41 +114,41 @@ class QuestPage extends GenericPage
// type (maybe expand uppon?) // type (maybe expand uppon?)
$_ = []; $_ = [];
if ($_flags & QUEST_FLAG_DAILY) if ($_flags & QUEST_FLAG_DAILY)
$_[] = Lang::$quest['daily']; $_[] = Lang::quest('daily');
else if ($_flags & QUEST_FLAG_WEEKLY) else if ($_flags & QUEST_FLAG_WEEKLY)
$_[] = Lang::$quest['weekly']; $_[] = Lang::quest('weekly');
else if ($_specialFlags & QUEST_FLAG_SPECIAL_MONTHLY) else if ($_specialFlags & QUEST_FLAG_SPECIAL_MONTHLY)
$_[] = Lang::$quest['monthly']; $_[] = Lang::quest('monthly');
if ($t = $this->subject->getField('type')) if ($t = $this->subject->getField('type'))
$_[] = Lang::$quest['questInfo'][$t]; $_[] = Lang::quest('questInfo', $t);
if ($_) if ($_)
$infobox[] = Lang::$game['type'].Lang::$main['colon'].implode(' ', $_); $infobox[] = Lang::game('type').Lang::main('colon').implode(' ', $_);
// side // side
$_ = Lang::$main['side'].Lang::$main['colon']; $_ = Lang::main('side').Lang::main('colon');
switch ($_side) switch ($_side)
{ {
case 3: $infobox[] = $_.Lang::$game['si'][3]; break; case 3: $infobox[] = $_.Lang::game('si', 3); break;
case 2: $infobox[] = $_.'[span class=icon-horde]'.Lang::$game['si'][2].'[/span]'; break; case 2: $infobox[] = $_.'[span class=icon-horde]'.Lang::game('si', 2).'[/span]'; break;
case 1: $infobox[] = $_.'[span class=icon-alliance]'.Lang::$game['si'][1].'[/span]'; break; case 1: $infobox[] = $_.'[span class=icon-alliance]'.Lang::game('si', 1).'[/span]'; break;
} }
// races // races
if ($_ = Lang::getRaceString($this->subject->getField('reqRaceMask'), $__, $jsg, $n, false)) if ($_ = Lang::getRaceString($this->subject->getField('reqRaceMask'), $__, $jsg, $n, false))
{ {
$this->extendGlobalIds(TYPE_RACE, $jsg); $this->extendGlobalIds(TYPE_RACE, $jsg);
$t = $n == 1 ? Lang::$game['race'] : Lang::$game['races']; $t = $n == 1 ? Lang::game('race') : Lang::game('races');
$infobox[] = Util::ucFirst($t).Lang::$main['colon'].$_; $infobox[] = Util::ucFirst($t).Lang::main('colon').$_;
} }
// classes // classes
if ($_ = Lang::getClassString($this->subject->getField('reqClassMask'), $jsg, $n, false)) if ($_ = Lang::getClassString($this->subject->getField('reqClassMask'), $jsg, $n, false))
{ {
$this->extendGlobalIds(TYPE_CLASS, $jsg); $this->extendGlobalIds(TYPE_CLASS, $jsg);
$t = $n == 1 ? Lang::$game['class'] : Lang::$game['classes']; $t = $n == 1 ? Lang::game('class') : Lang::game('classes');
$infobox[] = Util::ucFirst($t).Lang::$main['colon'].$_; $infobox[] = Util::ucFirst($t).Lang::main('colon').$_;
} }
// profession / skill // profession / skill
@@ -159,17 +159,17 @@ class QuestPage extends GenericPage
if ($_ = $this->subject->getField('reqSkillPoints')) if ($_ = $this->subject->getField('reqSkillPoints'))
$sk .= ' ('.$_.')'; $sk .= ' ('.$_.')';
$infobox[] = Lang::$quest['profession'].Lang::$main['colon'].$sk; $infobox[] = Lang::quest('profession').Lang::main('colon').$sk;
} }
// timer // timer
if ($_ = $this->subject->getField('timeLimit')) if ($_ = $this->subject->getField('timeLimit'))
$infobox[] = Lang::$quest['timer'].Lang::$main['colon'].Util::formatTime($_ * 1000); $infobox[] = Lang::quest('timer').Lang::main('colon').Util::formatTime($_ * 1000);
$startEnd = DB::Aowow()->select('SELECT * FROM ?_quests_startend WHERE questId = ?d', $this->typeId); $startEnd = DB::Aowow()->select('SELECT * FROM ?_quests_startend WHERE questId = ?d', $this->typeId);
// start // start
$start = '[icon name=quest_start'.($this->subject->isDaily() ? '_daily' : '').']'.lang::$event['start'].Lang::$main['colon'].'[/icon]'; $start = '[icon name=quest_start'.($this->subject->isDaily() ? '_daily' : '').']'.Lang::event('start').Lang::main('colon').'[/icon]';
$s = []; $s = [];
foreach ($startEnd as $se) foreach ($startEnd as $se)
{ {
@@ -184,7 +184,7 @@ class QuestPage extends GenericPage
$infobox[] = implode('[br]', $s); $infobox[] = implode('[br]', $s);
// end // end
$end = '[icon name=quest_end'.($this->subject->isDaily() ? '_daily' : '').']'.lang::$event['end'].Lang::$main['colon'].'[/icon]'; $end = '[icon name=quest_end'.($this->subject->isDaily() ? '_daily' : '').']'.Lang::event('end').Lang::main('colon').'[/icon]';
$e = []; $e = [];
foreach ($startEnd as $se) foreach ($startEnd as $se)
{ {
@@ -200,14 +200,14 @@ class QuestPage extends GenericPage
// Repeatable // Repeatable
if ($_flags & QUEST_FLAG_REPEATABLE || $_specialFlags & QUEST_FLAG_SPECIAL_REPEATABLE) if ($_flags & QUEST_FLAG_REPEATABLE || $_specialFlags & QUEST_FLAG_SPECIAL_REPEATABLE)
$infobox[] = Lang::$quest['repeatable']; $infobox[] = Lang::quest('repeatable');
// sharable | not sharable // sharable | not sharable
$infobox[] = $_flags & QUEST_FLAG_SHARABLE ? Lang::$quest['sharable'] : Lang::$quest['notSharable']; $infobox[] = $_flags & QUEST_FLAG_SHARABLE ? Lang::quest('sharable') : Lang::quest('notSharable');
// Keeps you PvP flagged // Keeps you PvP flagged
if ($this->subject->isPvPEnabled()) if ($this->subject->isPvPEnabled())
$infobox[] = Lang::$quest['keepsPvpFlag']; $infobox[] = Lang::quest('keepsPvpFlag');
// difficulty (todo (low): formula unclear. seems to be [minLevel,] -4, -2, (level), +3, +(9 to 15)) // difficulty (todo (low): formula unclear. seems to be [minLevel,] -4, -2, (level), +3, +(9 to 15))
if ($_level > 0) if ($_level > 0)
@@ -232,7 +232,7 @@ class QuestPage extends GenericPage
$_[] = '[color=r4]'.($_level + 3 + ceil(12 * $_level / MAX_LEVEL)).'[/color]'; $_[] = '[color=r4]'.($_level + 3 + ceil(12 * $_level / MAX_LEVEL)).'[/color]';
if ($_) if ($_)
$infobox[] = Lang::$game['difficulty'].Lang::$main['colon'].implode('[small] &nbsp;[/small]', $_); $infobox[] = Lang::game('difficulty').Lang::main('colon').implode('[small] &nbsp;[/small]', $_);
} }
$this->infobox = '[ul][li]'.implode('[/li][li]', $infobox).'[/li][/ul]'; $this->infobox = '[ul][li]'.implode('[/li][li]', $infobox).'[/li][/ul]';
@@ -337,7 +337,7 @@ class QuestPage extends GenericPage
foreach ($extraLists as $el) foreach ($extraLists as $el)
if ($_ = $listGen($el[1])) if ($_ = $listGen($el[1]))
$this->series[] = [$_, sprintf(Util::$dfnString, Lang::$quest[$el[0].'Desc'], Lang::$quest[$el[0]])]; $this->series[] = [$_, sprintf(Util::$dfnString, Lang::quest($el[0].'Desc'), Lang::quest($el[0]))];
/*******************/ /*******************/
/* Objectives List */ /* Objectives List */
@@ -380,7 +380,7 @@ class QuestPage extends GenericPage
'name' => $olItemData->json[$pair[0]]['name'], 'name' => $olItemData->json[$pair[0]]['name'],
'qty' => $pair[1] > 1 ? $pair[1] : 0, 'qty' => $pair[1] > 1 ? $pair[1] : 0,
'quality' => 7 - $olItemData->json[$pair[0]]['quality'], 'quality' => 7 - $olItemData->json[$pair[0]]['quality'],
'extraText' => $i ? '' : '&nbsp;('.Lang::$quest['provided'].')' 'extraText' => $i ? '' : '&nbsp;('.Lang::quest('provided').')'
); );
} }
} }
@@ -425,7 +425,7 @@ class QuestPage extends GenericPage
'id' => $i, 'id' => $i,
'name' => $pair[1] ?: Util::localizedString($olNPCData->getEntry($i), 'name'), 'name' => $pair[1] ?: Util::localizedString($olNPCData->getEntry($i), 'name'),
'qty' => $pair[0] > 1 ? $pair[0] : 0, 'qty' => $pair[0] > 1 ? $pair[0] : 0,
'extraText' => (($_specialFlags & QUEST_FLAG_SPECIAL_SPELLCAST) || $pair[1]) ? '' : ' '.Lang::$achievement['slain'], 'extraText' => (($_specialFlags & QUEST_FLAG_SPECIAL_SPELLCAST) || $pair[1]) ? '' : ' '.Lang::achievement('slain'),
'proxy' => $pair[2] 'proxy' => $pair[2]
); );
@@ -481,7 +481,7 @@ class QuestPage extends GenericPage
'typeStr' => Util::$typeStrings[TYPE_FACTION], 'typeStr' => Util::$typeStrings[TYPE_FACTION],
'id' => $i, 'id' => $i,
'name' => Util::localizedString($olFactionsData->getEntry($i), 'name'), 'name' => Util::localizedString($olFactionsData->getEntry($i), 'name'),
'qty' => sprintf(Util::$dfnString, $val.' '.Lang::$achievement['points'], Lang::getReputationLevelForPoints($val)), 'qty' => sprintf(Util::$dfnString, $val.' '.Lang::achievement('points'), Lang::getReputationLevelForPoints($val)),
'extraText' => '' 'extraText' => ''
); );
} }
@@ -496,17 +496,17 @@ class QuestPage extends GenericPage
'id' => $_, 'id' => $_,
'name' => SpellList::getName($_), 'name' => SpellList::getName($_),
'qty' => 0, 'qty' => 0,
'extraText' => '&nbsp;('.Lang::$quest['provided'].')' 'extraText' => '&nbsp;('.Lang::quest('provided').')'
); );
} }
// required money // required money
if ($this->subject->getField('rewardOrReqMoney') < 0) if ($this->subject->getField('rewardOrReqMoney') < 0)
$this->objectiveList[] = ['text' => Lang::$quest['reqMoney'].Lang::$main['colon'].Util::formatMoney(abs($this->subject->getField('rewardOrReqMoney')))]; $this->objectiveList[] = ['text' => Lang::quest('reqMoney').Lang::main('colon').Util::formatMoney(abs($this->subject->getField('rewardOrReqMoney')))];
// required pvp kills // required pvp kills
if ($_ = $this->subject->getField('reqPlayerKills')) if ($_ = $this->subject->getField('reqPlayerKills'))
$this->objectiveList[] = ['text' => Lang::$quest['playerSlain'].'&nbsp;('.$_.')']; $this->objectiveList[] = ['text' => Lang::quest('playerSlain').'&nbsp;('.$_.')'];
/**********/ /**********/
/* Mapper */ /* Mapper */
@@ -560,7 +560,7 @@ class QuestPage extends GenericPage
$altQuest->id, $altQuest->id,
$altQuest->getField('name', true), $altQuest->getField('name', true),
$pendant > 0 ? 'alliance' : 'horde', $pendant > 0 ? 'alliance' : 'horde',
$pendant > 0 ? Lang::$game['si'][1] : Lang::$game['si'][2] $pendant > 0 ? Lang::game('si', 1) : Lang::game('si', 2)
); );
} }
} }
@@ -700,10 +700,10 @@ class QuestPage extends GenericPage
{ {
$rewards['money'] = Util::formatMoney($questMoney); $rewards['money'] = Util::formatMoney($questMoney);
if ($comp > 0) if ($comp > 0)
$rewards['money'] .= '&nbsp;' . sprintf(Lang::$quest['expConvert'], Util::formatMoney($questMoney + $comp), MAX_LEVEL); $rewards['money'] .= '&nbsp;' . sprintf(Lang::quest('expConvert'), Util::formatMoney($questMoney + $comp), MAX_LEVEL);
} }
else if ($questMoney <= 0 && $questMoney + $comp > 0) else if ($questMoney <= 0 && $questMoney + $comp > 0)
$rewards['money'] = sprintf(Lang::$quest['expConvert2'], Util::formatMoney($questMoney + $comp), MAX_LEVEL); $rewards['money'] = sprintf(Lang::quest('expConvert2'), Util::formatMoney($questMoney + $comp), MAX_LEVEL);
// itemChoices // itemChoices
if (!empty($this->subject->choices[$this->typeId][TYPE_ITEM])) if (!empty($this->subject->choices[$this->typeId][TYPE_ITEM]))
@@ -788,7 +788,7 @@ class QuestPage extends GenericPage
{ {
$extra = null; $extra = null;
if ($_ = $rewSpells->getEntry($displ)) if ($_ = $rewSpells->getEntry($displ))
$extra = sprintf(Lang::$quest['spellDisplayed'], $displ, Util::localizedString($_, 'name')); $extra = sprintf(Lang::quest('spellDisplayed'), $displ, Util::localizedString($_, 'name'));
if ($_ = $rewSpells->getEntry($cast)) if ($_ = $rewSpells->getEntry($cast))
{ {
@@ -863,7 +863,7 @@ class QuestPage extends GenericPage
$letter = DB::Aowow()->selectRow('SELECT * FROM ?_mailtemplate WHERE id = ?d', $_); $letter = DB::Aowow()->selectRow('SELECT * FROM ?_mailtemplate WHERE id = ?d', $_);
$mail = array( $mail = array(
'delay' => $delay ? sprintf(Lang::$quest['mailIn'], Util::formatTime($delay * 1000)) : null, 'delay' => $delay ? sprintf(Lang::quest('mailIn'), Util::formatTime($delay * 1000)) : null,
'sender' => null, 'sender' => null,
'text' => $letter ? Util::parseHtmlText(Util::localizedString($letter, 'text')) : null, 'text' => $letter ? Util::parseHtmlText(Util::localizedString($letter, 'text')) : null,
'subject' => Util::parseHtmlText(Util::localizedString($letter, 'subject')) 'subject' => Util::parseHtmlText(Util::localizedString($letter, 'subject'))
@@ -876,7 +876,7 @@ class QuestPage extends GenericPage
if ($_ = CreatureList::getName($se['typeId'])) if ($_ = CreatureList::getName($se['typeId']))
{ {
$mail['sender'] = sprintf(Lang::$quest['mailBy'], $se['typeId'], $_); $mail['sender'] = sprintf(Lang::quest('mailBy'), $se['typeId'], $_);
break; break;
} }
} }

View File

@@ -26,7 +26,7 @@ class QuestsPage extends GenericPage
parent::__construct($pageCall, $pageParam); parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::$game['quests']); $this->name = Util::ucFirst(Lang::game('quests'));
$this->subCat = $pageParam ? '='.$pageParam : ''; $this->subCat = $pageParam ? '='.$pageParam : '';
} }
@@ -83,10 +83,10 @@ class QuestsPage extends GenericPage
array_unshift($this->title, $this->name); array_unshift($this->title, $this->name);
if (isset($this->category[1])) if (isset($this->category[1]))
array_unshift($this->title, Lang::$quest['cat'][$this->category[0]][$this->category[1]]); array_unshift($this->title, Lang::quest('cat', $this->category[0], $this->category[1]));
else if (isset($this->category[0])) else if (isset($this->category[0]))
{ {
$c0 = Lang::$quest['cat'][$this->category[0]]; $c0 = Lang::quest('cat', $this->category[0]);
array_unshift($this->title, is_array($c0) ? $c0[0] : $c0); array_unshift($this->title, is_array($c0) ? $c0[0] : $c0);
} }
} }

View File

@@ -26,7 +26,7 @@ class RacePage extends GenericPage
$this->subject = new CharRaceList(array(['id', $this->typeId])); $this->subject = new CharRaceList(array(['id', $this->typeId]));
if ($this->subject->error) if ($this->subject->error)
$this->notFound(Lang::$game['race']); $this->notFound(Lang::game('race'));
$this->name = $this->subject->getField('name', true); $this->name = $this->subject->getField('name', true);
} }
@@ -38,7 +38,7 @@ class RacePage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, $this->subject->getField('name', true), Util::ucFirst(Lang::$game['class'])); array_unshift($this->title, $this->subject->getField('name', true), Util::ucFirst(Lang::game('class')));
} }
protected function generateContent() protected function generateContent()
@@ -59,28 +59,28 @@ class RacePage extends GenericPage
// side // side
if ($_ = $this->subject->getField('side')) if ($_ = $this->subject->getField('side'))
$infobox[] = Lang::$main['side'].Lang::$main['colon'].'[span class=icon-'.($_ == 2 ? 'horde' : 'alliance').']'.Lang::$game['si'][$_].'[/span]'; $infobox[] = Lang::main('side').Lang::main('colon').'[span class=icon-'.($_ == 2 ? 'horde' : 'alliance').']'.Lang::game('si', $_).'[/span]';
// faction // faction
if ($_ = $this->subject->getField('factionId')) if ($_ = $this->subject->getField('factionId'))
{ {
$fac = new FactionList(array(['ft.id', $_])); $fac = new FactionList(array(['ft.id', $_]));
$this->extendGlobalData($fac->getJSGlobals()); $this->extendGlobalData($fac->getJSGlobals());
$infobox[] = Util::ucFirst(Lang::$game['faction']).Lang::$main['colon'].'[faction='.$fac->id.']'; $infobox[] = Util::ucFirst(Lang::game('faction')).Lang::main('colon').'[faction='.$fac->id.']';
} }
// leader // leader
if ($_ = $this->subject->getField('leader')) if ($_ = $this->subject->getField('leader'))
{ {
$this->extendGlobalIds(TYPE_NPC, $_); $this->extendGlobalIds(TYPE_NPC, $_);
$infobox[] = Lang::$class['racialLeader'].Lang::$main['colon'].'[npc='.$_.']'; $infobox[] = Lang::class('racialLeader').Lang::main('colon').'[npc='.$_.']';
} }
// start area // start area
if ($_ = $this->subject->getField('startAreaId')) if ($_ = $this->subject->getField('startAreaId'))
{ {
$this->extendGlobalIds(TYPE_ZONE, $_); $this->extendGlobalIds(TYPE_ZONE, $_);
$infobox[] = Lang::$class['startZone'].Lang::$main['colon'].'[zone='.$_.']'; $infobox[] = Lang::class('startZone').Lang::main('colon').'[zone='.$_.']';
} }

View File

@@ -20,7 +20,7 @@ class RacesPage extends GenericPage
{ {
parent::__construct($pageCall, $pageParam); parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::$game['races']); $this->name = Util::ucFirst(Lang::game('races'));
} }
protected function generateContent() protected function generateContent()
@@ -43,7 +43,7 @@ class RacesPage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, Util::ucFirst(Lang::$game['races'])); array_unshift($this->title, Util::ucFirst(Lang::game('races')));
} }
protected function generatePath() {} protected function generatePath() {}

View File

@@ -22,7 +22,7 @@ class ScreenshotPage extends GenericPage
{ {
parent::__construct($pageCall, $pageParam); parent::__construct($pageCall, $pageParam);
$this->name = Lang::$main['ssEdit']; $this->name = Lang::main('ssEdit');
// do not htmlEscape caption. It's applied as textnode // do not htmlEscape caption. It's applied as textnode
$this->caption = !empty($_POST['screenshotcaption']) ? $_POST['screenshotcaption'] : ''; $this->caption = !empty($_POST['screenshotcaption']) ? $_POST['screenshotcaption'] : '';
@@ -133,13 +133,13 @@ class ScreenshotPage extends GenericPage
if (!$this->destType) if (!$this->destType)
{ {
$this->error = Lang::$main['ssErrors']['noDest']; $this->error = Lang::main('ssErrors', 'noDest');
return; return;
} }
if (User::$banStatus & ACC_BAN_SCREENSHOT) if (User::$banStatus & ACC_BAN_SCREENSHOT)
{ {
$this->error = Lang::$main['ssErrors']['notAllowed']; $this->error = Lang::main('ssErrors', 'notAllowed');
return; return;
} }
@@ -152,7 +152,7 @@ class ScreenshotPage extends GenericPage
$im = $isPNG ? $this->loadFromPNG() : $this->loadFromJPG(); $im = $isPNG ? $this->loadFromPNG() : $this->loadFromJPG();
if (!$im) if (!$im)
{ {
$this->error = Lang::$main['ssErrors']['load']; $this->error = Lang::main('ssErrors', 'load');
return; return;
} }
@@ -191,17 +191,17 @@ class ScreenshotPage extends GenericPage
$infobox = []; $infobox = [];
// target // target
$infobox[] = sprintf(Lang::$main['displayOn'], Util::ucFirst(Lang::$game[Util::$typeStrings[$this->destType]]), Util::$typeStrings[$this->destType], $this->destTypeId); $infobox[] = sprintf(Lang::main('displayOn'), Util::ucFirst(Lang::game(Util::$typeStrings[$this->destType])), Util::$typeStrings[$this->destType], $this->destTypeId);
$this->extendGlobalIds($this->destType, $this->destTypeId); $this->extendGlobalIds($this->destType, $this->destTypeId);
// dimensions // dimensions
$infobox[] = Lang::$main['originalSize'].Lang::$main['colon'].$oSize[0].' x '.$oSize[1]; $infobox[] = Lang::main('originalSize').Lang::main('colon').$oSize[0].' x '.$oSize[1];
$infobox[] = Lang::$main['targetSize'].Lang::$main['colon'].'[span id=qf-newSize][/span]'; $infobox[] = Lang::main('targetSize').Lang::main('colon').'[span id=qf-newSize][/span]';
// minimum dimensions // minimum dimensions
if (!User::isInGroup(U_GROUP_STAFF)) if (!User::isInGroup(U_GROUP_STAFF))
{ {
$infobox[] = Lang::$main['minSize'].Lang::$main['colon'].$minCrop.' x '.$minCrop; $infobox[] = Lang::main('minSize').Lang::main('colon').$minCrop.' x '.$minCrop;
$this->cropper['minCrop'] = $minCrop; $this->cropper['minCrop'] = $minCrop;
} }
@@ -240,35 +240,35 @@ class ScreenshotPage extends GenericPage
{ {
// no upload happened or some error occured // no upload happened or some error occured
if (!$_FILES || empty($_FILES['screenshotfile'])) if (!$_FILES || empty($_FILES['screenshotfile']))
return Lang::$main['ssErrors']['noUpload']; return Lang::main('ssErrors', 'noUpload');
switch ($_FILES['screenshotfile']['error']) switch ($_FILES['screenshotfile']['error'])
{ {
case 1: case 1:
return sprintf(Lang::$main['ssErrors']['maxSize'], ini_get('upload_max_filesize'));; return sprintf(Lang::main('ssErrors', 'maxSize'), ini_get('upload_max_filesize'));;
case 3: case 3:
return Lang::$main['ssErrors']['interrupted']; return Lang::main('ssErrors', 'interrupted');
case 4: case 4:
return Lang::$main['ssErrors']['noFile']; return Lang::main('ssErrors', 'noFile');
case 6: case 6:
Util::addNote(U_GROUP_ADMIN, 'ScreenshotPage::validateScreenshot() - temporary upload directory is not set'); Util::addNote(U_GROUP_ADMIN, 'ScreenshotPage::validateScreenshot() - temporary upload directory is not set');
return Lang::$main['intError']; return Lang::main('intError');
case 7: case 7:
Util::addNote(U_GROUP_ADMIN, 'ScreenshotPage::validateScreenshot() - could not write temporary file to disk'); Util::addNote(U_GROUP_ADMIN, 'ScreenshotPage::validateScreenshot() - could not write temporary file to disk');
return Lang::$main['genericError']; return Lang::main('genericError');
} }
// points to invalid file (hack attempt) // points to invalid file (hack attempt)
if (!is_uploaded_file($_FILES['screenshotfile']['tmp_name'])) if (!is_uploaded_file($_FILES['screenshotfile']['tmp_name']))
{ {
Util::addNote(U_GROUP_ADMIN, 'ScreenshotPage::validateScreenshot() - uploaded file not in upload directory'); Util::addNote(U_GROUP_ADMIN, 'ScreenshotPage::validateScreenshot() - uploaded file not in upload directory');
return Lang::$main['genericError']; return Lang::main('genericError');
} }
// invalid file // invalid file
$is = getimagesize($_FILES['screenshotfile']['tmp_name']); $is = getimagesize($_FILES['screenshotfile']['tmp_name']);
if (!$is || empty($is['mime'])) if (!$is || empty($is['mime']))
return Lang::$main['ssErrors']['notImage']; return Lang::main('ssErrors', 'notImage');
// allow jpeg, png // allow jpeg, png
switch ($is['mime']) switch ($is['mime'])
@@ -279,15 +279,15 @@ class ScreenshotPage extends GenericPage
case 'image/jpeg': case 'image/jpeg':
break; break;
default: default:
return Lang::$main['ssErrors']['wrongFormat']; return Lang::main('ssErrors', 'wrongFormat');
} }
// size-missmatch: 4k UHD upper limit; 150px lower limit // size-missmatch: 4k UHD upper limit; 150px lower limit
if ($is[0] < 150 || $is[1] < 150) if ($is[0] < 150 || $is[1] < 150)
return sprintf(Lang::$main['ssErrors']['tooSmall'], 150, 150); return sprintf(Lang::main('ssErrors', 'tooSmall'), 150, 150);
if ($is[0] > 3840 || $is[1] > 2160) if ($is[0] > 3840 || $is[1] > 2160)
return sprintf(Lang::$main['ssErrors']['tooLarge'], 150, 150); return sprintf(Lang::main('ssErrors', 'tooLarge'), 150, 150);
return null; return null;
} }
@@ -295,7 +295,7 @@ class ScreenshotPage extends GenericPage
protected function generatePath() { } protected function generatePath() { }
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, Lang::$main['ssUpload']); array_unshift($this->title, Lang::main('ssUpload'));
} }
} }

View File

@@ -182,7 +182,7 @@ class SearchPage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, $this->search, Lang::$main['search']); array_unshift($this->title, $this->search, Lang::main('search'));
} }
protected function generatePath() { } protected function generatePath() { }

View File

@@ -27,7 +27,7 @@ class SkillPage extends GenericPage
$this->subject = new SkillList(array(['id', $this->typeId])); $this->subject = new SkillList(array(['id', $this->typeId]));
if ($this->subject->error) if ($this->subject->error)
$this->notFound(Lang::$game['skill']); $this->notFound(Lang::game('skill'));
$this->name = $this->subject->getField('name', true); $this->name = $this->subject->getField('name', true);
$this->cat = $this->subject->getField('typeCat'); $this->cat = $this->subject->getField('typeCat');
@@ -40,7 +40,7 @@ class SkillPage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, $this->name, Util::ucFirst(Lang::$game['skill'])); array_unshift($this->title, $this->name, Util::ucFirst(Lang::game('skill')));
} }
protected function generateContent() protected function generateContent()

View File

@@ -23,7 +23,7 @@ class SkillsPage extends GenericPage
parent::__construct($pageCall, $pageParam); parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::$game['skills']); $this->name = Util::ucFirst(Lang::game('skills'));
} }
protected function generateContent() protected function generateContent()
@@ -48,7 +48,7 @@ class SkillsPage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
if ($this->category) if ($this->category)
array_unshift($this->title, Lang::$skill['cat'][$this->category[0]]); array_unshift($this->title, Lang::skill('cat', $this->category[0]));
} }
protected function generatePath() protected function generatePath()

View File

@@ -33,7 +33,7 @@ class SpellPage extends GenericPage
$this->subject = new SpellList(array(['id', $this->typeId])); $this->subject = new SpellList(array(['id', $this->typeId]));
if ($this->subject->error) if ($this->subject->error)
$this->notFound(Lang::$game['spell']); $this->notFound(Lang::game('spell'));
$jsg = $this->subject->getJSGlobals(GLOBALINFO_ANY, $extra); $jsg = $this->subject->getJSGlobals(GLOBALINFO_ANY, $extra);
$this->extendGlobalData($jsg, $extra); $this->extendGlobalData($jsg, $extra);
@@ -112,7 +112,7 @@ class SpellPage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, $this->name, Util::ucFirst(Lang::$game['spell'])); array_unshift($this->title, $this->name, Util::ucFirst(Lang::game('spell')));
} }
protected function generateContent() protected function generateContent()
@@ -137,19 +137,19 @@ class SpellPage extends GenericPage
if (!in_array($_cat, [-5, -6])) // not mount or vanity pet if (!in_array($_cat, [-5, -6])) // not mount or vanity pet
{ {
if ($_ = $this->subject->getField('talentLevel')) if ($_ = $this->subject->getField('talentLevel'))
$infobox[] = '[li]'.(in_array($_cat, [-2, 7, -13]) ? sprintf(Lang::$game['reqLevel'], $_) : Lang::$game['level'].Lang::$main['colon'].$_).'[/li]'; $infobox[] = '[li]'.(in_array($_cat, [-2, 7, -13]) ? sprintf(Lang::game('reqLevel'), $_) : Lang::game('level').Lang::main('colon').$_).'[/li]';
else if ($_ = $this->subject->getField('spellLevel')) else if ($_ = $this->subject->getField('spellLevel'))
$infobox[] = '[li]'.(in_array($_cat, [-2, 7, -13]) ? sprintf(Lang::$game['reqLevel'], $_) : Lang::$game['level'].Lang::$main['colon'].$_).'[/li]'; $infobox[] = '[li]'.(in_array($_cat, [-2, 7, -13]) ? sprintf(Lang::game('reqLevel'), $_) : Lang::game('level').Lang::main('colon').$_).'[/li]';
} }
// races // races
if ($_ = Lang::getRaceString($this->subject->getField('reqRaceMask'), $__, $jsg, $n, false)) if ($_ = Lang::getRaceString($this->subject->getField('reqRaceMask'), $__, $jsg, $n, false))
{ {
if ($_ != Lang::$game['ra'][0]) // omit: "both" if ($_ != Lang::game('ra', 0)) // omit: "both"
{ {
$this->extendGlobalIds(TYPE_RACE, $jsg); $this->extendGlobalIds(TYPE_RACE, $jsg);
$t = $n == 1 ? Lang::$game['race'] : Lang::$game['races']; $t = $n == 1 ? Lang::game('race') : Lang::game('races');
$infobox[] = '[li]'.Util::ucFirst($t).Lang::$main['colon'].$_.'[/li]'; $infobox[] = '[li]'.Util::ucFirst($t).Lang::main('colon').$_.'[/li]';
} }
} }
@@ -157,8 +157,8 @@ class SpellPage extends GenericPage
if ($_ = Lang::getClassString($this->subject->getField('reqClassMask'), $jsg, $n, false)) if ($_ = Lang::getClassString($this->subject->getField('reqClassMask'), $jsg, $n, false))
{ {
$this->extendGlobalIds(TYPE_CLASS, $jsg); $this->extendGlobalIds(TYPE_CLASS, $jsg);
$t = $n == 1 ? Lang::$game['class'] : Lang::$game['classes']; $t = $n == 1 ? Lang::game('class') : Lang::game('classes');
$infobox[] = '[li]'.Util::ucFirst($t).Lang::$main['colon'].$_.'[/li]'; $infobox[] = '[li]'.Util::ucFirst($t).Lang::main('colon').$_.'[/li]';
} }
// spell focus // spell focus
@@ -166,7 +166,7 @@ class SpellPage extends GenericPage
{ {
$bar = DB::Aowow()->selectRow('SELECT * FROM ?_spellfocusobject WHERE id = ?d', $_); $bar = DB::Aowow()->selectRow('SELECT * FROM ?_spellfocusobject WHERE id = ?d', $_);
$focus = new GameObjectList(array(['spellFocusId', $_], 1)); $focus = new GameObjectList(array(['spellFocusId', $_], 1));
$infobox[] = '[li]'.Lang::$game['requires2'].' '.($focus->error ? Util::localizedString($bar, 'name') : '[url=?object='.$focus->id.']'.Util::localizedString($bar, 'name').'[/url]').'[/li]'; $infobox[] = '[li]'.Lang::game('requires2').' '.($focus->error ? Util::localizedString($bar, 'name') : '[url=?object='.$focus->id.']'.Util::localizedString($bar, 'name').'[/url]').'[/li]';
} }
// primary & secondary trades // primary & secondary trades
@@ -180,7 +180,7 @@ class SpellPage extends GenericPage
{ {
$this->extendGlobalData($rSkill->getJSGlobals()); $this->extendGlobalData($rSkill->getJSGlobals());
$bar = sprintf(Lang::$game['requires'], '[skill='.$rSkill->id.']'); $bar = sprintf(Lang::game('requires'), '[skill='.$rSkill->id.']');
if ($_ = $this->subject->getField('learnedAt')) if ($_ = $this->subject->getField('learnedAt'))
$bar .= ' ('.$_.')'; $bar .= ' ('.$_.')';
@@ -195,7 +195,7 @@ class SpellPage extends GenericPage
if (!$rSpell->error) if (!$rSpell->error)
{ {
$this->extendGlobalData($rSpell->getJSGlobals()); $this->extendGlobalData($rSpell->getJSGlobals());
$infobox[] = '[li]'.Lang::$game['requires2'].' [spell='.$rSpell->id.'][/li]'; $infobox[] = '[li]'.Lang::game('requires2').' [spell='.$rSpell->id.'][/li]';
} }
} }
@@ -207,24 +207,24 @@ class SpellPage extends GenericPage
if ($_[$i]) if ($_[$i])
$bar[] = '[color=r'.($i + 1).']'.$_[$i].'[/color]'; $bar[] = '[color=r'.($i + 1).']'.$_[$i].'[/color]';
$infobox[] = '[li]'.Lang::$game['difficulty'].Lang::$main['colon'].implode(' ', $bar).'[/li]'; $infobox[] = '[li]'.Lang::game('difficulty').Lang::main('colon').implode(' ', $bar).'[/li]';
} }
} }
// accquisition.. 10: starter spell; 7: discovery // accquisition.. 10: starter spell; 7: discovery
if (isset($this->subject->sources[$this->subject->id][10])) if (isset($this->subject->sources[$this->subject->id][10]))
$infobox[] = '[li]'.Lang::$spell['starter'].'[/li]'; $infobox[] = '[li]'.Lang::spell('starter').'[/li]';
else if (isset($this->subject->sources[$this->subject->id][7])) else if (isset($this->subject->sources[$this->subject->id][7]))
$infobox[] = '[li]'.Lang::$spell['discovered'].'[/li]'; $infobox[] = '[li]'.Lang::spell('discovered').'[/li]';
// training cost // training cost
if ($cost = DB::World()->selectCell('SELECT spellcost FROM npc_trainer WHERE spell = ?d', $this->subject->id)) if ($cost = DB::World()->selectCell('SELECT spellcost FROM npc_trainer WHERE spell = ?d', $this->subject->id))
$infobox[] = '[li]'.Lang::$spell['trainingCost'].Lang::$main['colon'].'[money='.$cost.'][/li]'; $infobox[] = '[li]'.Lang::spell('trainingCost').Lang::main('colon').'[money='.$cost.'][/li]';
// used in mode // used in mode
foreach ($this->difficulties as $n => $id) foreach ($this->difficulties as $n => $id)
if ($id == $this->typeId) // "Mode" seems to be multilingual acceptable if ($id == $this->typeId) // "Mode" seems to be multilingual acceptable
$infobox[] = '[li]Mode'.Lang::$main['colon'].Lang::$game['modes'][$n].'[/li]'; $infobox[] = '[li]Mode'.Lang::main('colon').Lang::game('modes', $n).'[/li]';
$effects = $this->createEffects($infobox, $redButtons); $effects = $this->createEffects($infobox, $redButtons);
$infobox = $infobox ? '[ul]'.implode('', $infobox).'[/ul]' : ''; $infobox = $infobox ? '[ul]'.implode('', $infobox).'[/ul]' : '';
@@ -260,8 +260,8 @@ class SpellPage extends GenericPage
$this->gcd = Util::formatTime($this->subject->getField('startRecoveryTime')); $this->gcd = Util::formatTime($this->subject->getField('startRecoveryTime'));
$this->gcdCat = null; // todo (low): nyi; find out how this works [n/a; normal; ..] $this->gcdCat = null; // todo (low): nyi; find out how this works [n/a; normal; ..]
$this->school = [Util::asHex($this->subject->getField('schoolMask')), Lang::getMagicSchools($this->subject->getField('schoolMask'))]; $this->school = [Util::asHex($this->subject->getField('schoolMask')), Lang::getMagicSchools($this->subject->getField('schoolMask'))];
$this->dispel = Lang::$game['dt'][$this->subject->getField('dispelType')]; $this->dispel = Lang::game('dt', $this->subject->getField('dispelType'));
$this->mechanic = Lang::$game['me'][$this->subject->getField('mechanic')]; $this->mechanic = Lang::game('me', $this->subject->getField('mechanic'));
$this->unavailable = $this->subject->getField('cuFlags') & CUSTOM_UNAVAILABLE; $this->unavailable = $this->subject->getField('cuFlags') & CUSTOM_UNAVAILABLE;
$this->redButtons = $redButtons; $this->redButtons = $redButtons;
@@ -285,13 +285,13 @@ class SpellPage extends GenericPage
if (!$altSpell->error) if (!$altSpell->error)
{ {
$this->transfer = sprintf( $this->transfer = sprintf(
Lang::$spell['_transfer'], Lang::spell('_transfer'),
$altSpell->id, $altSpell->id,
1, // quality 1, // quality
$altSpell->getField('iconString'), $altSpell->getField('iconString'),
$altSpell->getField('name', true), $altSpell->getField('name', true),
$pendant > 0 ? 'alliance' : 'horde', $pendant > 0 ? 'alliance' : 'horde',
$pendant > 0 ? Lang::$game['si'][1] : Lang::$game['si'][2] $pendant > 0 ? Lang::game('si', 1) : Lang::game('si', 2)
); );
} }
} }
@@ -1447,13 +1447,13 @@ class SpellPage extends GenericPage
} }
$_ = []; $_ = [];
$strs = Lang::$item['inventoryType']; $strs = Lang::item('inventoryType');
foreach ($strs as $k => $str) foreach ($strs as $k => $str)
if ($invType & 1 << $k && $str) if ($invType & 1 << $k && $str)
$_[] = $str; $_[] = $str;
$title[] = Lang::$item['slot'].Lang::$main['colon'].Util::asHex($invType); $title[] = Lang::item('slot').Lang::main('colon').Util::asHex($invType);
$text .= ' '.Lang::$spell['_inSlot'].Lang::$main['colon'].implode(', ', $_); $text .= ' '.Lang::spell('_inSlot').Lang::main('colon').implode(', ', $_);
} }
return [$title, $text]; return [$title, $text];
@@ -1538,7 +1538,7 @@ class SpellPage extends GenericPage
$foo['icon'] = array( $foo['icon'] = array(
'id' => $_, 'id' => $_,
'name' => $trig->error ? Util::ucFirst(Lang::$game['spell']).' #'.$_ : $trig->getField('name', true), 'name' => $trig->error ? Util::ucFirst(Lang::game('spell')).' #'.$_ : $trig->getField('name', true),
'count' => 0 'count' => 0
); );
@@ -1552,15 +1552,15 @@ class SpellPage extends GenericPage
$foo['radius'] = $this->subject->getField('effect'.$i.'RadiusMax'); $foo['radius'] = $this->subject->getField('effect'.$i.'RadiusMax');
if (!in_array($i, $itemIdx) && !in_array($i, $spellIdx) && !in_array($effAura, [225, 227])) if (!in_array($i, $itemIdx) && !in_array($i, $spellIdx) && !in_array($effAura, [225, 227]))
$foo['value'] = ($effDS && $effDS != 1 ? ($effBP + 1).Lang::$game['valueDelim'] : null).($effBP + $effDS); $foo['value'] = ($effDS && $effDS != 1 ? ($effBP + 1).Lang::game('valueDelim') : null).($effBP + $effDS);
if ($effRPPL != 0) if ($effRPPL != 0)
$foo['value'] = (isset($foo['value']) ? $foo['value'] : '0').sprintf(Lang::$spell['costPerLevel'], $effRPPL); $foo['value'] = (isset($foo['value']) ? $foo['value'] : '0').sprintf(Lang::spell('costPerLevel'), $effRPPL);
if ($this->subject->getField('effect'.$i.'Periode') > 0) if ($this->subject->getField('effect'.$i.'Periode') > 0)
$foo['interval'] = Util::formatTime($this->subject->getField('effect'.$i.'Periode')); $foo['interval'] = Util::formatTime($this->subject->getField('effect'.$i.'Periode'));
if ($_ = $this->subject->getField('effect'.$i.'Mechanic')) if ($_ = $this->subject->getField('effect'.$i.'Mechanic'))
$foo['mechanic'] = Lang::$game['me'][$_]; $foo['mechanic'] = Lang::game('me', $_);
if (!empty($procData['chance'])) if (!empty($procData['chance']))
$foo['procData'] = array( $foo['procData'] = array(
@@ -1581,37 +1581,37 @@ class SpellPage extends GenericPage
case 137: // Energize Pct case 137: // Energize Pct
$_ = Lang::spell('powerTypes', $effMV); $_ = Lang::spell('powerTypes', $effMV);
if ($_ && User::isInGroup(U_GROUP_EMPLOYEE)) if ($_ && User::isInGroup(U_GROUP_EMPLOYEE))
$_ = sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$effMV, $_); $_ = sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_);
else if (!$_) else if (!$_)
$_ = $effMV; $_ = $effMV;
if ($effMV == POWER_RAGE || $effMV == POWER_RUNIC_POWER) if ($effMV == POWER_RAGE || $effMV == POWER_RUNIC_POWER)
$foo['value'] = ($effDS && $effDS != 1 ? (($effBP + 1) / 10).Lang::$game['valueDelim'] : null).(($effBP + $effDS) / 10); $foo['value'] = ($effDS && $effDS != 1 ? (($effBP + 1) / 10).Lang::game('valueDelim') : null).(($effBP + $effDS) / 10);
$foo['name'] .= ' ('.$_.')'; $foo['name'] .= ' ('.$_.')';
break; break;
case 16: // QuestComplete case 16: // QuestComplete
if ($_ = QuestList::getName($effMV)) if ($_ = QuestList::getName($effMV))
$foo['name'] .= Lang::$main['colon'].'(<a href="?quest='.$effMV.'">'.$_.'</a>)'; $foo['name'] .= Lang::main('colon').'(<a href="?quest='.$effMV.'">'.$_.'</a>)';
else else
$foo['name'] .= Lang::$main['colon'].Util::ucFirst(Lang::$game['quest']).' #'.$effMV;; $foo['name'] .= Lang::main('colon').Util::ucFirst(Lang::game('quest')).' #'.$effMV;;
break; break;
case 28: // Summon case 28: // Summon
case 90: // Kill Credit case 90: // Kill Credit
case 134: // Kill Credit2 case 134: // Kill Credit2
$_ = Lang::$game['npc'].' #'.$effMV; $_ = Lang::game('npc').' #'.$effMV;
if ($summon = $this->subject->getModelInfo($this->typeId)) if ($summon = $this->subject->getModelInfo($this->typeId))
{ {
$_ = '(<a href="?npc='.$summon['typeId'].'">'.$summon['displayName'].'</a>)'; $_ = '(<a href="?npc='.$summon['typeId'].'">'.$summon['displayName'].'</a>)';
$redButtons[BUTTON_VIEW3D] = ['type' => TYPE_NPC, 'displayId' => $summon['displayId']]; $redButtons[BUTTON_VIEW3D] = ['type' => TYPE_NPC, 'displayId' => $summon['displayId']];
} }
$foo['name'] .= Lang::$main['colon'].$_; $foo['name'] .= Lang::main('colon').$_;
break; break;
case 33: // Open Lock case 33: // Open Lock
$_ = Lang::spell('lockType', $effMV); $_ = Lang::spell('lockType', $effMV);
if ($_ && User::isInGroup(U_GROUP_EMPLOYEE)) if ($_ && User::isInGroup(U_GROUP_EMPLOYEE))
$_ = sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$effMV, $_); $_ = sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_);
else if (!$_) else if (!$_)
$_ = $effMV; $_ = $effMV;
@@ -1629,7 +1629,7 @@ class SpellPage extends GenericPage
case 126: // Steal Aura case 126: // Steal Aura
$_ = Lang::game('dt', $effMV); $_ = Lang::game('dt', $effMV);
if ($_ && User::isInGroup(U_GROUP_EMPLOYEE)) if ($_ && User::isInGroup(U_GROUP_EMPLOYEE))
$_ = sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$effMV, $_); $_ = sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_);
else if (!$_) else if (!$_)
$_ = $effMV; $_ = $effMV;
@@ -1638,7 +1638,7 @@ class SpellPage extends GenericPage
case 39: // Learn Language case 39: // Learn Language
$_ = Lang::game('languages', $effMV); $_ = Lang::game('languages', $effMV);
if ($_ && User::isInGroup(U_GROUP_EMPLOYEE)) if ($_ && User::isInGroup(U_GROUP_EMPLOYEE))
$_ = sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$effMV, $_); $_ = sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_);
else if (!$_) else if (!$_)
$_ = $effMV; $_ = $effMV;
@@ -1651,22 +1651,22 @@ class SpellPage extends GenericPage
case 105: // Summon Object (slot 2) case 105: // Summon Object (slot 2)
case 106: // Summon Object (slot 3) case 106: // Summon Object (slot 3)
case 107: // Summon Object (slot 4) case 107: // Summon Object (slot 4)
$_ = Util::ucFirst(Lang::$game['gameObject']).' #'.$effMV; $_ = Util::ucFirst(Lang::game('gameObject')).' #'.$effMV;
if ($summon = $this->subject->getModelInfo($this->typeId)) if ($summon = $this->subject->getModelInfo($this->typeId))
{ {
$_ = '(<a href="?object='.$summon['typeId'].'">'.$summon['displayName'].'</a>)'; $_ = '(<a href="?object='.$summon['typeId'].'">'.$summon['displayName'].'</a>)';
$redButtons[BUTTON_VIEW3D] = ['type' => TYPE_OBJECT, 'displayId' => $summon['displayId']]; $redButtons[BUTTON_VIEW3D] = ['type' => TYPE_OBJECT, 'displayId' => $summon['displayId']];
} }
$foo['name'] .= Lang::$main['colon'].$_; $foo['name'] .= Lang::main('colon').$_;
break; break;
case 74: // Apply Glyph case 74: // Apply Glyph
if ($_ = DB::Aowow()->selectCell('SELECT spellId FROM ?_glyphproperties WHERE id = ?d', $effMV)) if ($_ = DB::Aowow()->selectCell('SELECT spellId FROM ?_glyphproperties WHERE id = ?d', $effMV))
{ {
if ($n = SpellList::getName($_)) if ($n = SpellList::getName($_))
$foo['name'] .= Lang::$main['colon'].'(<a href="?spell='.$_.'">'.$n.'</a>)'; $foo['name'] .= Lang::main('colon').'(<a href="?spell='.$_.'">'.$n.'</a>)';
else else
$foo['name'] .= Lang::$main['colon'].Util::ucFirst(Lang::$game['spell']).' #'.$effMV; $foo['name'] .= Lang::main('colon').Util::ucFirst(Lang::game('spell')).' #'.$effMV;
} }
else else
$foo['name'] .= ' #'.$effMV;; $foo['name'] .= ' #'.$effMV;;
@@ -1674,14 +1674,14 @@ class SpellPage extends GenericPage
case 95: // Skinning case 95: // Skinning
switch ($effMV) switch ($effMV)
{ {
case 0: $_ = Lang::$game['ct'][1].', '.Lang::$game['ct'][2]; break; // Beast, Dragonkin case 0: $_ = Lang::game('ct', 1).', '.Lang::game('ct', 2); break; // Beast, Dragonkin
case 1: case 1:
case 2: $_ = Lang::$game['ct'][4]; break; // Elemental (nature based, earth based) case 2: $_ = Lang::game('ct', 4); break; // Elemental (nature based, earth based)
case 3: $_ = Lang::$game['ct'][9]; break; // Mechanic case 3: $_ = Lang::game('ct', 9); break; // Mechanic
default; $_ = ''; default; $_ = '';
} }
if (User::isInGroup(U_GROUP_EMPLOYEE)) if (User::isInGroup(U_GROUP_EMPLOYEE))
$_ = sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$effMV, $_); $_ = sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_);
else else
$_ = $effMV; $_ = $effMV;
@@ -1690,7 +1690,7 @@ class SpellPage extends GenericPage
case 108: // Dispel Mechanic case 108: // Dispel Mechanic
$_ = Lang::game('me', $effMV); $_ = Lang::game('me', $effMV);
if ($_ && User::isInGroup(U_GROUP_EMPLOYEE)) if ($_ && User::isInGroup(U_GROUP_EMPLOYEE))
$_ = sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$effMV, $_); $_ = sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_);
else if (!$_) else if (!$_)
$_ = $effMV; $_ = $effMV;
@@ -1698,14 +1698,14 @@ class SpellPage extends GenericPage
break; break;
case 118: // Require Skill case 118: // Require Skill
if ($_ = SkillList::getName($effMV)) if ($_ = SkillList::getName($effMV))
$foo['name'] .= Lang::$main['colon'].'(<a href="?skill='.$effMV.'">'.$_.'</a>)'; $foo['name'] .= Lang::main('colon').'(<a href="?skill='.$effMV.'">'.$_.'</a>)';
else else
$foo['name'] .= Lang::$main['colon'].Util::ucFirst(Lang::$game['skill']).' #'.$effMV;; $foo['name'] .= Lang::main('colon').Util::ucFirst(Lang::game('skill')).' #'.$effMV;;
break; break;
case 146: // Activate Rune case 146: // Activate Rune
$_ = Lang::spell('powerRunes', $effMV); $_ = Lang::spell('powerRunes', $effMV);
if ($_ && User::isInGroup(U_GROUP_EMPLOYEE)) if ($_ && User::isInGroup(U_GROUP_EMPLOYEE))
$_ = sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$effMV, $_); $_ = sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_);
else if (!$_) else if (!$_)
$_ = $effMV; $_ = $effMV;
@@ -1729,19 +1729,19 @@ class SpellPage extends GenericPage
{ {
if ($effAura > 0 && isset(Util::$spellAuraStrings[$effAura])) if ($effAura > 0 && isset(Util::$spellAuraStrings[$effAura]))
{ {
$foo['name'] .= User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'AuraId: '.$effAura, Lang::$main['colon'].Util::$spellAuraStrings[$effAura]) : Lang::$main['colon'].Util::$spellAuraStrings[$effAura]; $foo['name'] .= User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, 'AuraId: '.$effAura, Lang::main('colon').Util::$spellAuraStrings[$effAura]) : Lang::main('colon').Util::$spellAuraStrings[$effAura];
$bar = $effMV; $bar = $effMV;
switch ($effAura) switch ($effAura)
{ {
case 17: // Mod Stealth Detection case 17: // Mod Stealth Detection
if ($_ = Lang::spell('stealthType', $effMV)) 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, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
break; break;
case 19: // Mod Invisibility Detection case 19: // Mod Invisibility Detection
if ($_ = Lang::spell('invisibilityType', $effMV)) 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, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
break; break;
case 24: // Periodic Energize case 24: // Periodic Energize
@@ -1750,7 +1750,7 @@ class SpellPage extends GenericPage
case 85: // Mod Power Regeneration case 85: // Mod Power Regeneration
case 110: // Mod Power Regeneration Pct case 110: // Mod Power Regeneration Pct
if ($_ = Lang::spell('powerTypes', $effMV)) 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, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
break; break;
case 29: // Mod Stat case 29: // Mod Stat
@@ -1764,10 +1764,10 @@ class SpellPage extends GenericPage
$_ = []; $_ = [];
for ($j = 0; $j < 5; $j++) for ($j = 0; $j < 5; $j++)
if ($mask & (1 << $j)) if ($mask & (1 << $j))
$_[] = Lang::$game['stats'][$j]; $_[] = Lang::game('stats', $j);
if ($_ = implode(', ', $_)); 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, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
break; break;
case 36: // Shapeshift case 36: // Shapeshift
@@ -1779,17 +1779,17 @@ class SpellPage extends GenericPage
); );
if ($st['creatureType'] > 0) if ($st['creatureType'] > 0)
$infobox[] = '[li]'.Lang::$game['type'].Lang::$main['colon'].Lang::$game['ct'][$st['creatureType']].'[/li]'; $infobox[] = '[li]'.Lang::game('type').Lang::main('colon').Lang::game('ct', $st['creatureType']).'[/li]';
if ($_ = $st['displayName']) 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, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
} }
break; break;
case 37: // Effect immunity case 37: // Effect immunity
if (isset(Util::$spellEffectStrings[$effMV])) if (isset(Util::$spellEffectStrings[$effMV]))
{ {
$_ = Util::$spellEffectStrings[$effMV]; $_ = Util::$spellEffectStrings[$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, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
} }
break; break;
@@ -1797,7 +1797,7 @@ class SpellPage extends GenericPage
if (isset(Util::$spellAuraStrings[$effMV])) if (isset(Util::$spellAuraStrings[$effMV]))
{ {
$_ = Util::$spellAuraStrings[$effMV]; $_ = Util::$spellAuraStrings[$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, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
} }
break; break;
@@ -1805,22 +1805,22 @@ class SpellPage extends GenericPage
case 178: // Mod Debuff Resistance case 178: // Mod Debuff Resistance
case 245: // Mod Aura Duration By Dispel case 245: // Mod Aura Duration By Dispel
if ($_ = Lang::game('dt', $effMV)) 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, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
break; break;
case 44: // Track Creature case 44: // Track Creature
if ($_ = Lang::game('ct', $effMV)) 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, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
break; break;
case 45: // Track Resource case 45: // Track Resource
if ($_ = Lang::spell('lockType', $effMV)) 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, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
break; break;
case 75: // Language case 75: // Language
if ($_ = Lang::game('languages', $effMV)) 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, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
break; break;
case 77: // Mechanic Immunity case 77: // Mechanic Immunity
@@ -1830,17 +1830,17 @@ class SpellPage extends GenericPage
case 255: // Mod Mechanic Damage Taken Pct case 255: // Mod Mechanic Damage Taken Pct
case 276: // Mod Mechanic Damage Done Percent case 276: // Mod Mechanic Damage Done Percent
if ($_ = Lang::game('me', $effMV)) 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, Lang::spell('_value').Lang::main('colon').Util::asHex($effMV), $_) : $_;
break; break;
case 147: // Mechanic Immunity Mask case 147: // Mechanic Immunity Mask
$_ = []; $_ = [];
foreach (Lang::$game['me'] as $k => $str) foreach (Lang::game('me') as $k => $str)
if ($effMV & (1 << $k - 1)) if ($effMV & (1 << $k - 1))
$_[] = $str; $_[] = $str;
if ($_ = implode(', ', $_)) 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, Lang::spell('_value').Lang::main('colon').Util::asHex($effMV), $_) : $_;
break; break;
case 10: // Mod Threat case 10: // Mod Threat
@@ -1880,7 +1880,7 @@ class SpellPage extends GenericPage
case 271: // Mod Damage Percent Taken Form Caster case 271: // Mod Damage Percent Taken Form Caster
case 310: // Mod Creature AoE Damage Avoidance case 310: // Mod Creature AoE Damage Avoidance
if ($_ = Lang::getMagicSchools($effMV)) 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, Lang::spell('_value').Lang::main('colon').Util::asHex($effMV), $_) : $_;
break; break;
case 30: // Mod Skill case 30: // Mod Skill
@@ -1888,41 +1888,41 @@ class SpellPage extends GenericPage
if ($_ = SkillList::getName($effMV)) if ($_ = SkillList::getName($effMV))
$bar = ' (<a href="?skill='.$effMV.'">'.SkillList::getName($effMV).'</a>)'; $bar = ' (<a href="?skill='.$effMV.'">'.SkillList::getName($effMV).'</a>)';
else else
$bar = Lang::$main['colon'].Util::ucFirst(Lang::$game['skill']).' #'.$effMV;; $bar = Lang::main('colon').Util::ucFirst(Lang::game('skill')).' #'.$effMV;;
break; break;
case 107: // Flat Modifier case 107: // Flat Modifier
case 108: // Pct Modifier case 108: // Pct Modifier
if ($_ = Lang::spell('spellModOp', $effMV)) 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, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
break; break;
case 189: // Mod Rating case 189: // Mod Rating
case 220: // Combat Rating From Stat case 220: // Combat Rating From Stat
$_ = []; $_ = [];
foreach (Lang::$spell['combatRating'] as $k => $str) foreach (Lang::spell('combatRating') as $k => $str)
if ((1 << $k) & $effMV) if ((1 << $k) & $effMV)
$_[] = $str; $_[] = $str;
if ($_ = implode(', ', $_)) 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, Lang::spell('_value').Lang::main('colon').Util::asHex($effMV), $_) : $_;
break; break;
case 168: // Mod Damage Done Versus case 168: // Mod Damage Done Versus
case 59: // Mod Damage Done Versus Creature case 59: // Mod Damage Done Versus Creature
$_ = []; $_ = [];
foreach (Lang::$game['ct'] as $k => $str) foreach (Lang::game('ct') as $k => $str)
if ($effMV & (1 << $k - 1)) if ($effMV & (1 << $k - 1))
$_[] = $str; $_[] = $str;
if ($_ = implode(', ', $_)) 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, Lang::spell('_value').Lang::main('colon').Util::asHex($effMV), $_) : $_;
break; break;
case 249: // Convert Rune case 249: // Convert Rune
$x = $this->subject->getField('effect'.$i.'MiscValueB'); $x = $this->subject->getField('effect'.$i.'MiscValueB');
if ($_ = Lang::spell('powerRunes', $x)) if ($_ = Lang::spell('powerRunes', $x))
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$x, $_) : $_; $bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$x, $_) : $_;
break; break;
case 78: // Mounted case 78: // Mounted
@@ -1933,11 +1933,11 @@ class SpellPage extends GenericPage
$bar = ' (<a href="?npc='.$transform['typeId'].'">'.$transform['displayName'].'</a>)'; $bar = ' (<a href="?npc='.$transform['typeId'].'">'.$transform['displayName'].'</a>)';
} }
else else
$bar = Lang::$main['colon'].Lang::$game['npc'].' #'.$effMV;; $bar = Lang::main('colon').Lang::game('npc').' #'.$effMV;;
break; break;
case 139: // Force Reaction case 139: // Force Reaction
$foo['value'] = sprintf(Util::$dfnString, $foo['value'], Lang::$game['rep'][$foo['value']]); $foo['value'] = sprintf(Util::$dfnString, $foo['value'], Lang::game('rep', $foo['value']));
// DO NOT BREAK // DO NOT BREAK
case 190: // Mod Faction Reputation Gain case 190: // Mod Faction Reputation Gain
$bar = ' (<a href="?faction='.$effMV.'">'.FactionList::getName($effMV).'</a>)'; $bar = ' (<a href="?faction='.$effMV.'">'.FactionList::getName($effMV).'</a>)';
@@ -1946,13 +1946,13 @@ class SpellPage extends GenericPage
$foo['name'] .= strstr($bar, 'href') || strstr($bar, '#') ? $bar : ($bar ? ' ('.$bar.')' : null); $foo['name'] .= strstr($bar, 'href') || strstr($bar, '#') ? $bar : ($bar ? ' ('.$bar.')' : null);
if (in_array($effAura, [174, 220, 182])) 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')).']'; $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) else if ($this->subject->getField('effect'.$i.'MiscValueB') > 0)
$foo['name'] .= ' ['.$this->subject->getField('effect'.$i.'MiscValueB').']'; $foo['name'] .= ' ['.$this->subject->getField('effect'.$i.'MiscValueB').']';
} }
else if ($effAura > 0) else if ($effAura > 0)
$foo['name'] .= Lang::$main['colon'].'Unknown Aura ('.$effAura.')'; $foo['name'] .= Lang::main('colon').'Unknown Aura ('.$effAura.')';
break; break;
} }

View File

@@ -90,7 +90,7 @@ class SpellsPage extends GenericPage
parent::__construct($pageCall, $pageParam); parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::$game['spells']); $this->name = Util::ucFirst(Lang::game('spells'));
$this->subCat = $pageParam !== null ? '='.$pageParam : ''; $this->subCat = $pageParam !== null ? '='.$pageParam : '';
$this->filter = ['classPanel' => false, 'glyphPanel' => false]; $this->filter = ['classPanel' => false, 'glyphPanel' => false];
} }
@@ -289,17 +289,17 @@ class SpellsPage extends GenericPage
$sf = $this->shortFilter[$this->category[1]]; $sf = $this->shortFilter[$this->category[1]];
$txt = ''; $txt = '';
if ($sf[0] && $sf[1]) if ($sf[0] && $sf[1])
$txt = sprintf(Lang::$spell['relItems']['crafted'], $sf[0]) . Lang::$spell['relItems']['link'] . sprintf(Lang::$spell['relItems']['recipes'], $sf[1]); $txt = sprintf(Lang::spell('relItems', 'crafted'), $sf[0]) . Lang::spell('relItems', 'link') . sprintf(Lang::spell('relItems', 'recipes'), $sf[1]);
else if ($sf[0]) else if ($sf[0])
$txt = sprintf(Lang::$spell['relItems']['crafted'], $sf[0]); $txt = sprintf(Lang::spell('relItems', 'crafted'), $sf[0]);
else if ($sf[1]) else if ($sf[1])
$txt = sprintf(Lang::$spell['relItems']['recipes'], $sf[1]); $txt = sprintf(Lang::spell('relItems', 'recipes'), $sf[1]);
$note = Lang::$spell['cat'][$this->category[0]][$this->category[1]]; $note = Lang::spell('cat', $this->category[0], $this->category[1]);
if (is_array($note)) if (is_array($note))
$note = $note[0]; $note = $note[0];
$tab['params']['note'] = sprintf(Lang::$spell['relItems']['base'], $txt, $note); $tab['params']['note'] = sprintf(Lang::spell('relItems', 'base'), $txt, $note);
$tab['params']['sort'] = "$['skill', 'name']"; $tab['params']['sort'] = "$['skill', 'name']";
} }
} }
@@ -329,17 +329,17 @@ class SpellsPage extends GenericPage
$sf = $this->shortFilter[$this->category[1]]; $sf = $this->shortFilter[$this->category[1]];
$txt = ''; $txt = '';
if ($sf[0] && $sf[1]) if ($sf[0] && $sf[1])
$txt = sprintf(Lang::$spell['relItems']['crafted'], $sf[0]) . Lang::$spell['relItems']['link'] . sprintf(Lang::$spell['relItems']['recipes'], $sf[1]); $txt = sprintf(Lang::spell('relItems', 'crafted'), $sf[0]) . Lang::spell('relItems', 'link') . sprintf(Lang::spell('relItems', 'recipes'), $sf[1]);
else if ($sf[0]) else if ($sf[0])
$txt = sprintf(Lang::$spell['relItems']['crafted'], $sf[0]); $txt = sprintf(Lang::spell('relItems', 'crafted'), $sf[0]);
else if ($sf[1]) else if ($sf[1])
$txt = sprintf(Lang::$spell['relItems']['recipes'], $sf[1]); $txt = sprintf(Lang::spell('relItems', 'recipes'), $sf[1]);
$note = Lang::$spell['cat'][$this->category[0]][$this->category[1]]; $note = Lang::spell('cat', $this->category[0], $this->category[1]);
if (is_array($note)) if (is_array($note))
$note = $note[0]; $note = $note[0];
$tab['params']['note'] = sprintf(Lang::$spell['relItems']['base'], $txt, $note); $tab['params']['note'] = sprintf(Lang::spell('relItems', 'base'), $txt, $note);
$tab['params']['sort'] = "$['skill', 'name']"; $tab['params']['sort'] = "$['skill', 'name']";
} }
} }
@@ -404,10 +404,10 @@ class SpellsPage extends GenericPage
$this->lvTabs[] = $tab; $this->lvTabs[] = $tab;
// sort for dropdown-menus // sort for dropdown-menus
asort(Lang::$game['ra']); asort(Lang::game('ra'));
asort(Lang::$game['cl']); asort(Lang::game('cl'));
asort(Lang::$game['sc']); asort(Lang::game('sc'));
asort(Lang::$game['me']); asort(Lang::game('me'));
} }
protected function generateTitle() protected function generateTitle()
@@ -415,16 +415,16 @@ class SpellsPage extends GenericPage
$foo = []; $foo = [];
$c = $this->category; // shothand $c = $this->category; // shothand
if (isset($c[2]) && $c[0] == 11) if (isset($c[2]) && $c[0] == 11)
array_unshift($foo, Lang::$spell['cat'][$c[0]][$c[1]][$c[2]]); array_unshift($foo, Lang::spell('cat', $c[0], $c[1], $c[2]));
else if (isset($c[1])) else if (isset($c[1]))
{ {
$_ = in_array($c[0], [-2, -13, 7]) ? Lang::$game['cl'] : Lang::$spell['cat'][$c[0]]; $_ = in_array($c[0], [-2, -13, 7]) ? Lang::game('cl') : Lang::spell('cat', $c[0])];
array_unshift($foo, is_array($_[$c[1]]) ? $_[$c[1]][0] : $_[$c[1]]); array_unshift($foo, is_array($_[$c[1]]) ? $_[$c[1]][0] : $_[$c[1]]);
} }
if (isset($c[0]) && count($foo) < 2) if (isset($c[0]) && count($foo) < 2)
{ {
$_ = Lang::$spell['cat'][$c[0]]; $_ = Lang::spell('cat', $c[0]);
array_unshift($foo, is_array($_) ? $_[0] : $_); array_unshift($foo, is_array($_) ? $_[0] : $_);
} }

View File

@@ -25,7 +25,7 @@ class TalentPage extends GenericPage
parent::__construct($pageCall, $__); parent::__construct($pageCall, $__);
$this->isPetCalc = $pageCall == 'petcalc'; $this->isPetCalc = $pageCall == 'petcalc';
$this->name = $this->isPetCalc ? Lang::$main['petCalc'] : Lang::$main['talentCalc']; $this->name = $this->isPetCalc ? Lang::main('petCalc') : Lang::main('talentCalc');
} }
protected function generateContent() protected function generateContent()

View File

@@ -32,7 +32,7 @@ class TitlePage extends GenericPage
$this->subject = new TitleList(array(['id', $this->typeId])); $this->subject = new TitleList(array(['id', $this->typeId]));
if ($this->subject->error) if ($this->subject->error)
$this->notFound(Lang::$game['title']); $this->notFound(Lang::game('title'));
$this->name = $this->subject->getHtmlizedName(); $this->name = $this->subject->getHtmlizedName();
$this->nameFixed = Util::ucFirst(trim(strtr($this->subject->getField('male', true), ['%s' => '', ',' => '']))); $this->nameFixed = Util::ucFirst(trim(strtr($this->subject->getField('male', true), ['%s' => '', ',' => ''])));
@@ -45,7 +45,7 @@ class TitlePage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, $this->nameFixed, Util::ucFirst(Lang::$game['title'])); array_unshift($this->title, $this->nameFixed, Util::ucFirst(Lang::game('title')));
} }
protected function generateContent() protected function generateContent()
@@ -57,17 +57,17 @@ class TitlePage extends GenericPage
$infobox = Lang::getInfoBoxForFlags($this->subject->getField('cuFlags')); $infobox = Lang::getInfoBoxForFlags($this->subject->getField('cuFlags'));
if ($this->subject->getField('side') == SIDE_ALLIANCE) if ($this->subject->getField('side') == SIDE_ALLIANCE)
$infobox[] = Lang::$main['side'].Lang::$main['colon'].'[span class=icon-alliance]'.Lang::$game['si'][SIDE_ALLIANCE].'[/span]'; $infobox[] = Lang::main('side').Lang::main('colon').'[span class=icon-alliance]'.Lang::game('si', SIDE_ALLIANCE).'[/span]';
else if ($this->subject->getField('side') == SIDE_HORDE) else if ($this->subject->getField('side') == SIDE_HORDE)
$infobox[] = Lang::$main['side'].Lang::$main['colon'].'[span class=icon-horde]'.Lang::$game['si'][SIDE_HORDE].'[/span]'; $infobox[] = Lang::main('side').Lang::main('colon').'[span class=icon-horde]'.Lang::game('si', SIDE_HORDE).'[/span]';
else else
$infobox[] = Lang::$main['side'].Lang::$main['colon'].Lang::$game['si'][SIDE_BOTH]; $infobox[] = Lang::main('side').Lang::main('colon').Lang::game('si', SIDE_BOTH);
if ($g = $this->subject->getField('gender')) if ($g = $this->subject->getField('gender'))
$infobox[] = Lang::$main['gender'].Lang::$main['colon'].'[span class=icon-'.($g == 2 ? 'female' : 'male').']'.Lang::$main['sex'][$g].'[/span]'; $infobox[] = Lang::main('gender').Lang::main('colon').'[span class=icon-'.($g == 2 ? 'female' : 'male').']'.Lang::main('sex', $g).'[/span]';
if ($e = $this->subject->getField('eventId')) if ($e = $this->subject->getField('eventId'))
$infobox[] = Lang::$game['eventShort'].Lang::$main['colon'].'[url=?event='.$e.']'.WorldEventList::getName($e).'[/url]'; $infobox[] = Lang::game('eventShort').Lang::main('colon').'[url=?event='.$e.']'.WorldEventList::getName($e).'[/url]';
/****************/ /****************/
/* Main Content */ /* Main Content */
@@ -91,7 +91,7 @@ class TitlePage extends GenericPage
$altTitle->id, $altTitle->id,
$altTitle->getHtmlizedName(), $altTitle->getHtmlizedName(),
$pendant > 0 ? 'alliance' : 'horde', $pendant > 0 ? 'alliance' : 'horde',
$pendant > 0 ? Lang::$game['si'][1] : Lang::$game['si'][2] $pendant > 0 ? Lang::game('si', 1) : Lang::game('si', 2)
); );
} }
} }

View File

@@ -23,7 +23,7 @@ class TitlesPage extends GenericPage
parent::__construct($pageCall, $pageParam); parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::$game['titles']); $this->name = Util::ucFirst(Lang::game('titles'));
} }
protected function generateContent() protected function generateContent()
@@ -56,9 +56,9 @@ class TitlesPage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, Util::ucFirst(Lang::$game['titles'])); array_unshift($this->title, Util::ucFirst(Lang::game('titles')));
if ($this->category) if ($this->category)
array_unshift($this->title, Lang::$title['cat'][$this->category[0]]); array_unshift($this->title, Lang::title('cat', $this->category[0]));
} }
protected function generatePath() protected function generatePath()

View File

@@ -27,14 +27,14 @@ class UtilityPage extends GenericPage
$this->page = $pageCall; $this->page = $pageCall;
$this->rss = isset($_GET['rss']); $this->rss = isset($_GET['rss']);
$this->name = Lang::$main['utilities'][array_search($pageCall, $this->validPages)]; $this->name = Lang::main('utilities', array_search($pageCall, $this->validPages));
if ($this->page == 'most-comments') if ($this->page == 'most-comments')
{ {
if ($this->category && in_array($this->category[0], [7, 30])) if ($this->category && in_array($this->category[0], [7, 30]))
$this->name .= Lang::$main['colon'] . sprintf(Lang::$main['mostComments'][1], $this->category[0]); $this->name .= Lang::main('colon') . sprintf(Lang::main('mostComments', 1), $this->category[0]);
else else
$this->name .= Lang::$main['colon'] . Lang::$main['mostComments'][0]; $this->name .= Lang::main('colon') . Lang::main('mostComments', 0);
} }
} }
@@ -56,7 +56,7 @@ class UtilityPage extends GenericPage
/****************/ /****************/
if (in_array(array_search($this->page, $this->validPages), [0, 1, 2, 3, 11, 12])) if (in_array(array_search($this->page, $this->validPages), [0, 1, 2, 3, 11, 12]))
$this->h1Links = '<small><a href="?'.$this->page.($this->category ? '='.$this->category[0] : null).'&rss" class="icon-rss">'.Lang::$main['subscribe'].'</a></small>'; $this->h1Links = '<small><a href="?'.$this->page.($this->category ? '='.$this->category[0] : null).'&rss" class="icon-rss">'.Lang::main('subscribe').'</a></small>';
switch ($this->page) switch ($this->page)
{ {
@@ -154,7 +154,7 @@ class UtilityPage extends GenericPage
$xml .= "<item>\n". $xml .= "<item>\n".
"<title><![CDATA[".htmlentities($row['subject'])."]]></title>\n". "<title><![CDATA[".htmlentities($row['subject'])."]]></title>\n".
"<link>".HOST_URL.'?go-to-comment&amp;id='.$row['id']."</link>\n". "<link>".HOST_URL.'?go-to-comment&amp;id='.$row['id']."</link>\n".
"<description><![CDATA[".htmlentities($row['preview'])." ".sprintf(Lang::$timeUnits['ago'], Util::formatTime($row['elapsed'] * 100, true))."]]></description>\n". // todo (low): preview should be html-formated "<description><![CDATA[".htmlentities($row['preview'])." ".sprintf(Lang::timeUnits('ago'), Util::formatTime($row['elapsed'] * 100, true))."]]></description>\n". // todo (low): preview should be html-formated
"<pubDate>".date(DATE_RSS, time() - $row['elapsed'])."</pubDate>\n". "<pubDate>".date(DATE_RSS, time() - $row['elapsed'])."</pubDate>\n".
"<guid>".HOST_URL.'?go-to-comment&amp;id='.$row['id']."</guid>\n". "<guid>".HOST_URL.'?go-to-comment&amp;id='.$row['id']."</guid>\n".
"<domain />\n". "<domain />\n".
@@ -171,12 +171,12 @@ class UtilityPage extends GenericPage
if ($this->page == 'most-comments') if ($this->page == 'most-comments')
{ {
if ($this->category && in_array($this->category[0], [7, 30])) if ($this->category && in_array($this->category[0], [7, 30]))
array_unshift($this->title, sprintf(Lang::$main['mostComments'][1], $this->category[0])); array_unshift($this->title, sprintf(Lang::main('mostComments', 1), $this->category[0]));
else else
array_unshift($this->title, Lang::$main['mostComments'][0]); array_unshift($this->title, Lang::main('mostComments', 0));
} }
array_unshift($this->title, Lang::$main['utilities'][array_search($this->page, $this->validPages)]); array_unshift($this->title, Lang::main('utilities', array_search($this->page, $this->validPages)));
} }
protected function generatePath() protected function generatePath()

View File

@@ -24,7 +24,7 @@ class ZonePage extends GenericPage
$this->subject = new ZoneList(array(['id', $this->typeId])); $this->subject = new ZoneList(array(['id', $this->typeId]));
if ($this->subject->error) if ($this->subject->error)
$this->notFound(Lang::$game['zone']); $this->notFound(Lang::game('zone'));
$this->name = $this->subject->getField('name', true); $this->name = $this->subject->getField('name', true);
} }
@@ -41,7 +41,7 @@ class ZonePage extends GenericPage
// City // City
if ($this->subject->getField('flags') & 0x200000 && !$this->subject->getField('parentArea')) if ($this->subject->getField('flags') & 0x200000 && !$this->subject->getField('parentArea'))
$infobox[] = Lang::$zone['city']; $infobox[] = Lang::zone('city');
// Level // Level
if ($_ = $this->subject->getField('levelMin')) if ($_ = $this->subject->getField('levelMin'))
@@ -49,7 +49,7 @@ class ZonePage extends GenericPage
if ($_ < $this->subject->getField('levelMax')) if ($_ < $this->subject->getField('levelMax'))
$_ .= ' - '.$this->subject->getField('levelMax'); $_ .= ' - '.$this->subject->getField('levelMax');
$infobox[] = Lang::$game['level'].Lang::$main['colon'].$_; $infobox[] = Lang::game('level').Lang::main('colon').$_;
} }
// required Level // required Level
@@ -65,18 +65,18 @@ class ZonePage extends GenericPage
else if ($_ == 4) else if ($_ == 4)
$__ = '[span class=icon-ffa]%s[/span]'; $__ = '[span class=icon-ffa]%s[/span]';
$infobox[] = Lang::$zone['territory'].Lang::$main['colon'].sprintf($__, lang::$zone['territories'][$_]); $infobox[] = Lang::zone('territory').Lang::main('colon').sprintf($__, Lang::zone('territories', $_));
// Instance Type // Instance Type
$infobox[] = Lang::$zone['instanceType'].Lang::$main['colon'].'[span class=icon-instance'.$this->subject->getField('type').']'.Lang::$zone['instanceTypes'][$this->subject->getField('type')].'[/span]'; $infobox[] = Lang::zone('instanceType').Lang::main('colon').'[span class=icon-instance'.$this->subject->getField('type').']'.Lang::zone('instanceTypes', $this->subject->getField('type')).'[/span]';
// Heroic mode // Heroic mode
if ($_ = $this->subject->getField('levelHeroic')) if ($_ = $this->subject->getField('levelHeroic'))
$infobox[] = '[icon preset=heroic]'.sprintf(Lang::$zone['hcAvailable'], $_).'[/icon]'; $infobox[] = '[icon preset=heroic]'.sprintf(Lang::zone('hcAvailable'), $_).'[/icon]';
// number of players // number of players
if ($_ = $this->subject->getField('maxPlayer')) if ($_ = $this->subject->getField('maxPlayer'))
$infobox[] = Lang::$zone['numPlayers'].Lang::$main['colon'].($_ == -2 ? '10/25' : $_); $infobox[] = Lang::zone('numPlayers').Lang::main('colon').($_ == -2 ? '10/25' : $_);
// attunement // attunement
// [li]Attunement: [quest=24712][/li] // [li]Attunement: [quest=24712][/li]
@@ -462,7 +462,7 @@ class ZonePage extends GenericPage
protected function generateTitle() protected function generateTitle()
{ {
array_unshift($this->title, $this->name, Util::ucFirst(Lang::$game['zone'])); array_unshift($this->title, $this->name, Util::ucFirst(Lang::game('zone')));
} }
} }

View File

@@ -24,7 +24,7 @@ class ZonesPage extends GenericPage
parent::__construct($pageCall, $pageParam); parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::$game['zones']); $this->name = Util::ucFirst(Lang::game('zones'));
} }
protected function generateContent() protected function generateContent()
@@ -167,9 +167,9 @@ class ZonesPage extends GenericPage
if ($this->category) if ($this->category)
{ {
if (isset($this->category[1])) if (isset($this->category[1]))
array_unshift($this->title, Lang::$game['expansions'][$this->category[1]]); array_unshift($this->title, Lang::game('expansions', $this->category[1]));
array_unshift($this->title, Lang::$zone['cat'][$this->category[0]]); array_unshift($this->title, Lang::zone('cat', $this->category[0]));
} }
} }

View File

@@ -2,7 +2,7 @@
if (!empty($this->pageText)): if (!empty($this->pageText)):
?> ?>
<div class="clear"></div> <div class="clear"></div>
<h3><?php echo Lang::$item['content']; ?></h3> <h3><?php echo Lang::item('content'); ?></h3>
<div id="book-generic"></div> <div id="book-generic"></div>
<script>//<![CDATA[ <script>//<![CDATA[

View File

@@ -1,6 +1,6 @@
<div class="clear"></div> <div class="clear"></div>
<div class="text"> <div class="text">
<h2><?php echo Lang::$main['contribute']; ?></h2> <h2><?php echo Lang::main('contribute'); ?></h2>
</div> </div>
<div id="tabs-contribute-generic" style="width: 50%"></div> <div id="tabs-contribute-generic" style="width: 50%"></div>
<div class="text" style="margin-right: 310px"> <div class="text" style="margin-right: 310px">

View File

@@ -4,8 +4,8 @@ if (User::isInGroup(U_GROUP_EMPLOYEE) && ($this->time || isset($this->mysql) ||
echo " <table style=\"margin:auto;\">\n"; echo " <table style=\"margin:auto;\">\n";
if (isset($this->mysql)): if (isset($this->mysql)):
echo ' <tr><td style="text-align:left;">'.Lang::$main['numSQL'] .'</td><td>'.$this->mysql['count']."</td></tr>\n"; echo ' <tr><td style="text-align:left;">'.Lang::main('numSQL') .'</td><td>'.$this->mysql['count']."</td></tr>\n";
echo ' <tr><td style="text-align:left;">'.Lang::$main['timeSQL'].'</td><td>'.Util::formatTime($this->mysql['time'] * 1000, true)."</td></tr>\n"; echo ' <tr><td style="text-align:left;">'.Lang::main('timeSQL').'</td><td>'.Util::formatTime($this->mysql['time'] * 1000, true)."</td></tr>\n";
endif; endif;
if ($this->time): if ($this->time):
@@ -13,9 +13,9 @@ if (User::isInGroup(U_GROUP_EMPLOYEE) && ($this->time || isset($this->mysql) ||
endif; endif;
if ($this->cacheLoaded && $this->cacheLoaded[0] == CACHE_MODE_FILECACHE): if ($this->cacheLoaded && $this->cacheLoaded[0] == CACHE_MODE_FILECACHE):
echo " <tr><td style=\"text-align:left;\">reloaded from filecache</td><td>created".Lang::$main['colon'].date(Lang::$main['dateFmtLong'], $this->cacheLoaded[1])."</td></tr>\n"; echo " <tr><td style=\"text-align:left;\">reloaded from filecache</td><td>created".Lang::main('colon').date(Lang::main('dateFmtLong'), $this->cacheLoaded[1])."</td></tr>\n";
elseif ($this->cacheLoaded && $this->cacheLoaded[0] == CACHE_MODE_MEMCACHED): elseif ($this->cacheLoaded && $this->cacheLoaded[0] == CACHE_MODE_MEMCACHED):
echo " <tr><td style=\"text-align:left;\">reloaded from memcached</td><td>created".Lang::$main['colon'].date(Lang::$main['dateFmtLong'], $this->cacheLoaded[1])."</td></tr>\n"; echo " <tr><td style=\"text-align:left;\">reloaded from memcached</td><td>created".Lang::main('colon').date(Lang::main('dateFmtLong'), $this->cacheLoaded[1])."</td></tr>\n";
endif; endif;
echo " </table>\n"; echo " </table>\n";
@@ -28,7 +28,7 @@ endif;
<noscript> <noscript>
<div id="noscript-bg"></div> <div id="noscript-bg"></div>
<div id="noscript-text"><?php echo Lang::$main['noJScript']; ?></div> <div id="noscript-text"><?php echo Lang::main('noJScript'); ?></div>
</noscript> </noscript>
<script type="text/javascript">DomContentLoaded.now()</script> <script type="text/javascript">DomContentLoaded.now()</script>

View File

@@ -2,8 +2,8 @@
if (User::$id): if (User::$id):
echo '<a id="toplinks-user">'.User::$displayName.'</a>'; echo '<a id="toplinks-user">'.User::$displayName.'</a>';
else: else:
echo '<a href="?account=signin">'.Lang::$main['signIn'].'</a>'; echo '<a href="?account=signin">'.Lang::main('signIn').'</a>';
endif; endif;
?> ?>
|<a href="#" id="toplinks-feedback" class="icon-email"><?php echo Lang::$main['feedback']; ?></a> |<a href="#" id="toplinks-feedback" class="icon-email"><?php echo Lang::main('feedback'); ?></a>
|<a href="javascript:;" id="toplinks-language"><?php echo Lang::$main['language']; ?></a> |<a href="javascript:;" id="toplinks-language"><?php echo Lang::main('language'); ?></a>

View File

@@ -2,7 +2,7 @@
<?php <?php
if (!empty($this->infobox)): if (!empty($this->infobox)):
?> ?>
<tr><th id="infobox-quick-facts"><?php echo Lang::$main['quickFacts']; ?></th></tr> <tr><th id="infobox-quick-facts"><?php echo Lang::main('quickFacts'); ?></th></tr>
<tr><td> <tr><td>
<div class="infobox-spacer"></div> <div class="infobox-spacer"></div>
<div id="infobox-contents0"></div> <div id="infobox-contents0"></div>
@@ -15,7 +15,7 @@ endif;
if (!empty($this->contributions)): if (!empty($this->contributions)):
?> ?>
<tr><th id="infobox-contributions"><?php echo Lang::$main['contributions']; ?></th></tr> <tr><th id="infobox-contributions"><?php echo Lang::main('contributions'); ?></th></tr>
<tr><td> <tr><td>
<div class="infobox-spacer"></div> <div class="infobox-spacer"></div>
<div id="infobox-contents1"></div> <div id="infobox-contents1"></div>
@@ -34,12 +34,12 @@ endif;
if (!empty($this->type) && !empty($this->typeId)): if (!empty($this->type) && !empty($this->typeId)):
?> ?>
<tr><th id="infobox-screenshots"><?php echo Lang::$main['screenshots']; ?></th></tr> <tr><th id="infobox-screenshots"><?php echo Lang::main('screenshots'); ?></th></tr>
<tr><td><div class="infobox-spacer"></div><div id="infobox-sticky-ss"></div></td></tr> <tr><td><div class="infobox-spacer"></div><div id="infobox-sticky-ss"></div></td></tr>
<?php <?php
if (User::isInGroup(U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_VIDEO) || !empty($this->community['vi'])): if (User::isInGroup(U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_VIDEO) || !empty($this->community['vi'])):
?> ?>
<tr><th id="infobox-videos"><?php echo Lang::$main['videos']; ?></th></tr> <tr><th id="infobox-videos"><?php echo Lang::main('videos'); ?></th></tr>
<tr><td><div class="infobox-spacer"></div><div id="infobox-sticky-vi"></div></td></tr> <tr><td><div class="infobox-spacer"></div><div id="infobox-sticky-vi"></div></td></tr>
<?php <?php
endif; endif;

View File

@@ -1,6 +1,6 @@
<?php <?php
if ($m = $this->mail): if ($m = $this->mail):
echo ' <h3>'.sprintf(Lang::$quest['mailDelivery'], $m['sender'], $m['delay'])."</h3>\n"; echo ' <h3>'.sprintf(Lang::quest('mailDelivery'), $m['sender'], $m['delay'])."</h3>\n";
if ($m['subject']): if ($m['subject']):
echo ' <div class="book"><div class="page">'.$m['subject']."</div></div>\n"; echo ' <div class="book"><div class="page">'.$m['subject']."</div></div>\n";

View File

@@ -1,15 +1,15 @@
<?php <?php
if (isset($this->map) && empty($this->map)): if (isset($this->map) && empty($this->map)):
echo Lang::$zone['noMap']; echo Lang::zone('noMap');
elseif (!empty($this->map['data'])): elseif (!empty($this->map['data'])):
if ($this->type != TYPE_ZONE): if ($this->type != TYPE_ZONE):
echo ' <div>'.($this->type == TYPE_OBJECT ? Lang::$gameObject['foundIn'] : Lang::$npc['foundIn']).' <span id="locations">'; echo ' <div>'.($this->type == TYPE_OBJECT ? Lang::gameObject('foundIn') : Lang::npc('foundIn')).' <span id="locations">';
$n = count($this->map['mapperData']); $n = count($this->map['mapperData']);
$i = 0; $i = 0;
foreach ($this->map['mapperData'] as $areaId => $areaData): foreach ($this->map['mapperData'] as $areaId => $areaData):
if ($n > 1 && $i++ > 0): if ($n > 1 && $i++ > 0):
echo $i < $n ? ', ' : Lang::$main['and']; echo $i < $n ? ', ' : Lang::main('and');
endif; endif;
echo '<a href="javascript:;" onclick="myMapper.update({zone: '.$areaId.'}); g_setSelectedLink(this, \'mapper\'); return false" onmousedown="return false">'.$this->map['extra'][$areaId].'</a>&nbsp;('.reset($areaData)['count'].')'; echo '<a href="javascript:;" onclick="myMapper.update({zone: '.$areaId.'}); g_setSelectedLink(this, \'mapper\'); return false" onmousedown="return false">'.$this->map['extra'][$areaId].'</a>&nbsp;('.reset($areaData)['count'].')';

View File

@@ -1,4 +1,4 @@
<h3><?php echo Lang::$spell['reagents']; ?></h3> <h3><?php echo Lang::spell('reagents'); ?></h3>
<?php <?php
if ($enhanced): if ($enhanced):
@@ -168,8 +168,8 @@ if ($enhanced):
<tr> <tr>
<th></th> <th></th>
<th align="left"> <th align="left">
<input type="button" style="font-size: 11px; margin-right: 0.5em" onclick="iconlist_expandall('reagent-list-generic',true);" value="<?php echo Lang::$spell['_expandAll']; ?>"> <input type="button" style="font-size: 11px; margin-right: 0.5em" onclick="iconlist_expandall('reagent-list-generic',true);" value="<?php echo Lang::spell('_expandAll'); ?>">
<input type="button" style="font-size: 11px; margin-right: 0.5em" onclick="iconlist_expandall('reagent-list-generic',false);" value="<?php echo Lang::$spell['_collapseAll']; ?>"> <input type="button" style="font-size: 11px; margin-right: 0.5em" onclick="iconlist_expandall('reagent-list-generic',false);" value="<?php echo Lang::spell('_collapseAll'); ?>">
</th> </th>
</tr> </tr>
<?php <?php

View File

@@ -13,9 +13,9 @@ if (isset($this->redButtons[BUTTON_LINKS])):
if ($b = $this->redButtons[BUTTON_LINKS]): if ($b = $this->redButtons[BUTTON_LINKS]):
echo '<a href="javascript:;" id="open-links-button" class="button-red" onclick="this.blur(); Links.show({' . echo '<a href="javascript:;" id="open-links-button" class="button-red" onclick="this.blur(); Links.show({' .
(isset($b['color']) ? "linkColor: '".$b['color']."', " : null) . (isset($b['linkId']) ? "linkId: '".$b['linkId']."', " : null) . (isset($b['color']) ? "linkColor: '".$b['color']."', " : null) . (isset($b['linkId']) ? "linkId: '".$b['linkId']."', " : null) .
"linkName: '".Util::jsEscape(isset($b['name']) ? $b['name'] : $this->name)."', type: ".$this->type.', typeId: '.$this->typeId.' });"><em><b><i>'.Lang::$main['links'].'</i></b><span>'.Lang::$main['links'].'</span></em></a>'; "linkName: '".Util::jsEscape(isset($b['name']) ? $b['name'] : $this->name)."', type: ".$this->type.', typeId: '.$this->typeId.' });"><em><b><i>'.Lang::main('links').'</i></b><span>'.Lang::main('links').'</span></em></a>';
else: else:
echo '<a href="javascript:;" id="open-links-button" class="button-red button-red-disabled"><em><b><i>'.Lang::$main['links'].'</i></b><span>'.Lang::$main['links'].'</span></em></a>'; echo '<a href="javascript:;" id="open-links-button" class="button-red button-red-disabled"><em><b><i>'.Lang::main('links').'</i></b><span>'.Lang::main('links').'</span></em></a>';
endif; endif;
endif; endif;
@@ -28,46 +28,46 @@ if (isset($this->redButtons[BUTTON_VIEW3D])):
foreach ($b as $k => $v) foreach ($b as $k => $v)
$data[] = $k.': '.json_encode($v, JSON_NUMERIC_CHECK); $data[] = $k.': '.json_encode($v, JSON_NUMERIC_CHECK);
echo '<a href="javascript:;" id="view3D-button" class="button-red" onclick="this.blur(); ModelViewer.show({'.implode(', ', $data).'})"><em><b><i>'.Lang::$main['view3D'].'</i></b><span>'.Lang::$main['view3D'].'</span></em></a>'; echo '<a href="javascript:;" id="view3D-button" class="button-red" onclick="this.blur(); ModelViewer.show({'.implode(', ', $data).'})"><em><b><i>'.Lang::main('view3D').'</i></b><span>'.Lang::main('view3D').'</span></em></a>';
} }
else: else:
echo '<a href="javascript:;" id="view3D-button" class="button-red button-red-disabled"><em><b><i>'.Lang::$main['view3D'].'</i></b><span>'.Lang::$main['view3D'].'</span></em></a>'; echo '<a href="javascript:;" id="view3D-button" class="button-red button-red-disabled"><em><b><i>'.Lang::main('view3D').'</i></b><span>'.Lang::main('view3D').'</span></em></a>';
endif; endif;
endif; endif;
// item comparison tool // item comparison tool
if (isset($this->redButtons[BUTTON_COMPARE])): if (isset($this->redButtons[BUTTON_COMPARE])):
if ($b = $this->redButtons[BUTTON_COMPARE]): if ($b = $this->redButtons[BUTTON_COMPARE]):
echo '<a href="javascript:;" class="button-red" onclick="this.blur(); su_addToSaved(\''.(isset($b['eqList']) ? $b['eqList'] : $this->typeId).'\', '.(isset($b['qty']) ? $b['qty'] : 1).')"><em><b><i>'.Lang::$main['compare'].'</i></b><span>'.Lang::$main['compare'].'</span></em></a>'; echo '<a href="javascript:;" class="button-red" onclick="this.blur(); su_addToSaved(\''.(isset($b['eqList']) ? $b['eqList'] : $this->typeId).'\', '.(isset($b['qty']) ? $b['qty'] : 1).')"><em><b><i>'.Lang::main('compare').'</i></b><span>'.Lang::main('compare').'</span></em></a>';
else: else:
echo '<a href="javascript:;" class="button-red button-red-disabled"><em><b><i>'.Lang::$main['compare'].'</i></b><span>'.Lang::$main['compare'].'</span></em></a>'; echo '<a href="javascript:;" class="button-red button-red-disabled"><em><b><i>'.Lang::main('compare').'</i></b><span>'.Lang::main('compare').'</span></em></a>';
endif; endif;
endif; endif;
// item upgrade search // item upgrade search
if (isset($this->redButtons[BUTTON_UPGRADE])): if (isset($this->redButtons[BUTTON_UPGRADE])):
if ($b = $this->redButtons[BUTTON_UPGRADE]): if ($b = $this->redButtons[BUTTON_UPGRADE]):
echo '<a href="javascript:;" class="button-red" onclick="this.blur(); pr_showClassPresetMenu(this, '.$this->typeId.', ',$b['class'].', '.$b['slot'].', event);"><em><b><i>'.Lang::$main['findUpgrades'].'</i></b><span>'.Lang::$main['findUpgrades'].'</span></em></a>'; echo '<a href="javascript:;" class="button-red" onclick="this.blur(); pr_showClassPresetMenu(this, '.$this->typeId.', ',$b['class'].', '.$b['slot'].', event);"><em><b><i>'.Lang::main('findUpgrades').'</i></b><span>'.Lang::main('findUpgrades').'</span></em></a>';
else: else:
echo '<a href="javascript:;" class="button-red button-red-disabled"><em><b><i>'.Lang::$main['findUpgrades'].'</i></b><span>'.Lang::$main['findUpgrades'].'</span></em></a>'; echo '<a href="javascript:;" class="button-red button-red-disabled"><em><b><i>'.Lang::main('findUpgrades').'</i></b><span>'.Lang::main('findUpgrades').'</span></em></a>';
endif; endif;
endif; endif;
// goto: talent calculator // goto: talent calculator
if (isset($this->redButtons[BUTTON_TALENT])): if (isset($this->redButtons[BUTTON_TALENT])):
if ($b = $this->redButtons[BUTTON_TALENT]): if ($b = $this->redButtons[BUTTON_TALENT]):
echo '<a href="'.$b['href'].'" class="button-red"><em><b><i>'.($b['pet'] ? Lang::$main['petCalc'] : Lang::$main['talentCalc']).'</i></b><span>'.($b['pet'] ? Lang::$main['petCalc'] : Lang::$main['talentCalc']).'</span></em></a>'; echo '<a href="'.$b['href'].'" class="button-red"><em><b><i>'.($b['pet'] ? Lang::main('petCalc') : Lang::main('talentCalc')).'</i></b><span>'.($b['pet'] ? Lang::main('petCalc') : Lang::main('talentCalc')).'</span></em></a>';
else: else:
echo '<a href="javascript:;" class="button-red button-red-disabled"><em><b><i>{if $b.pet}'.Lang::$main['petCalc'].'else:'.Lang::$main['talentCalc'].'endif;</i></b><span>{if $b.pet}'.Lang::$main['petCalc'].'else:'.Lang::$main['talentCalc'].'endif;</span></em></a>'; echo '<a href="javascript:;" class="button-red button-red-disabled"><em><b><i>{if $b.pet}'.Lang::main('petCalc').'else:'.Lang::main('talentCalc').'endif;</i></b><span>{if $b.pet}'.Lang::main('petCalc').'else:'.Lang::main('talentCalc').'endif;</span></em></a>';
endif; endif;
endif; endif;
// goto: (sub-)forum // goto: (sub-)forum
if (isset($this->redButtons[BUTTON_FORUM])): if (isset($this->redButtons[BUTTON_FORUM])):
if ($b = $this->redButtons[BUTTON_FORUM]): if ($b = $this->redButtons[BUTTON_FORUM]):
echo '<a href="'.$b['href'].'" class="button-red"><em><b><i>'.Lang::$main['forum'].'</i></b><span>'.Lang::$main['forum'].'</span></em></a>'; echo '<a href="'.$b['href'].'" class="button-red"><em><b><i>'.Lang::main('forum').'</i></b><span>'.Lang::main('forum').'</span></em></a>';
else: else:
echo '<a href="javascript:;" class="button-red button-red-disabled"><em><b><i>'.Lang::$main['forum'].'</i></b><span>'.Lang::$main['forum'].'</span></em></a>'; echo '<a href="javascript:;" class="button-red button-red-disabled"><em><b><i>'.Lang::main('forum').'</i></b><span>'.Lang::main('forum').'</span></em></a>';
endif; endif;
endif; endif;

View File

@@ -4,7 +4,7 @@ if (!isset($offset)) // in case we have m
$offset = 0; $offset = 0;
if ($rewTitle): if ($rewTitle):
echo $rewTitle.Lang::$main['colon'].(isset($extra) ? $extra : null); echo $rewTitle.Lang::main('colon').(isset($extra) ? $extra : null);
endif; endif;
if ($rewards): if ($rewards):

View File

@@ -1,4 +1,4 @@
<tr><th id="infobox-series"><?php echo $listTitle ?: Lang::$achievement['series']; ?></th></tr> <tr><th id="infobox-series"><?php echo $listTitle ?: Lang::achievement('series'); ?></th></tr>
<tr><td> <tr><td>
<div class="infobox-spacer"></div> <div class="infobox-spacer"></div>
<table class="series"> <table class="series">

View File

@@ -9,7 +9,7 @@ $hasBuff = !empty($this->jsGlobals[6][2][$this->typeId]['buff']); // not set wit
if ($hasBuff): if ($hasBuff):
?> ?>
<h3><?php echo Lang::$spell['_aura']; ?></h3> <h3><?php echo Lang::spell('_aura'); ?></h3>
<div id="btt<?php echo $this->typeId; ?>" class="wowhead-tooltip"></div> <div id="btt<?php echo $this->typeId; ?>" class="wowhead-tooltip"></div>
<?php <?php
endif; endif;

View File

@@ -19,17 +19,17 @@
<script type="text/javascript"> <script type="text/javascript">
$WH.ge('h1-icon-generic').appendChild(Icon.createUser(<?php echo (is_numeric(User::$avatar) ? 2 : 1).' , \''.User::$avatar.'\''?>, 1, null, <?php echo User::isInGroup(U_GROUP_PREMIUM) ? 0 : 2; ?>, false, Icon.getPrivilegeBorder(<?php echo User::getReputation(); ?>))); $WH.ge('h1-icon-generic').appendChild(Icon.createUser(<?php echo (is_numeric(User::$avatar) ? 2 : 1).' , \''.User::$avatar.'\''?>, 1, null, <?php echo User::isInGroup(U_GROUP_PREMIUM) ? 0 : 2; ?>, false, Icon.getPrivilegeBorder(<?php echo User::getReputation(); ?>)));
</script> </script>
<h1 class="h1-icon"><?php echo Lang::$account['myAccount']; ?></h1> <h1 class="h1-icon"><?php echo Lang::account('myAccount'); ?></h1>
<?php <?php
// Banned-Minibox // Banned-Minibox
if ($b = $this->banned): if ($b = $this->banned):
?> ?>
<div style="max-width:300px;" class="minibox"> <div style="max-width:300px;" class="minibox">
<h1 class="q10"><?php echo Lang::$account['accBanned']; ?></h1> <h1 class="q10"><?php echo Lang::account('accBanned'); ?></h1>
<ul style="text-align:left"> <ul style="text-align:left">
<li><div><?php echo '<b>'.Lang::$account['bannedBy'].'</b>'.Lang::$main['colon'].'<a href="?user='.$b['by'][0].'">'.$b['by'][1].'</a>'; ?></div></li> <li><div><?php echo '<b>'.Lang::account('bannedBy').'</b>'.Lang::main('colon').'<a href="?user='.$b['by'][0].'">'.$b['by'][1].'</a>'; ?></div></li>
<li><div><?php echo '<b>'.Lang::$account['ends'].'</b>'.Lang::$main['colon'].($b['end'] ? date(Lang::$main['dateFmtLong'], $b['end']) : Lang::$account['permanent']); ?></div></li> <li><div><?php echo '<b>'.Lang::account('ends').'</b>'.Lang::main('colon').($b['end'] ? date(Lang::main('dateFmtLong'), $b['end']) : Lang::account('permanent')); ?></div></li>
<li><div><?php echo '<b>'.Lang::$account['reason'].'</b>'.Lang::$main['colon'].'<span class="msg-failure">'.($b['reason'] ?: Lang::$account['noReason']).'</span>'; ?></div></li> <li><div><?php echo '<b>'.Lang::account('reason').'</b>'.Lang::main('colon').'<span class="msg-failure">'.($b['reason'] ?: Lang::account('noReason')).'</span>'; ?></div></li>
</ul> </ul>
</div> </div>
<?php <?php
@@ -37,7 +37,7 @@ if ($b = $this->banned):
else: else:
// profile editing // profile editing
echo ' '.Lang::$account['editAccount']."\n"; echo ' '.Lang::account('editAccount')."\n";
?> ?>
<ul class="last"> <ul class="last">

View File

@@ -67,20 +67,20 @@
<table align="center"> <table align="center">
<tr> <tr>
<td align="right"><?php echo Lang::$account['email'].lang::$main['colon']; ?></td> <td align="right"><?php echo Lang::account('email').Lang::main('colon'); ?></td>
<td><input type="text" name="email" style="width: 10em" /></td> <td><input type="text" name="email" style="width: 10em" /></td>
</tr> </tr>
<tr> <tr>
<td align="right"><?php echo Lang::$account['newPass'].lang::$main['colon']; ?></td> <td align="right"><?php echo Lang::account('newPass').Lang::main('colon'); ?></td>
<td><input type="password" name="password" style="width: 10em" /></td> <td><input type="password" name="password" style="width: 10em" /></td>
</tr> </tr>
<tr> <tr>
<td align="right"><?php echo Lang::$account['passConfirm'].lang::$main['colon']; ?></td> <td align="right"><?php echo Lang::account('passConfirm').Lang::main('colon'); ?></td>
<td><input type="password" name="c_password" style="width: 10em" /></td> <td><input type="password" name="c_password" style="width: 10em" /></td>
</tr> </tr>
<tr> <tr>
<td align="right" valign="top"></td> <td align="right" valign="top"></td>
<td><input type="submit" name="signup" value="<?php echo Lang::$account['continue']; ?>" /></td> <td><input type="submit" name="signup" value="<?php echo Lang::account('continue'); ?>" /></td>
</tr> </tr>
<input type="hidden" name="token" value="<?php echo $this->token; ?>" /> <input type="hidden" name="token" value="<?php echo $this->token; ?>" />
</table> </table>
@@ -117,10 +117,10 @@
<div id="inputbox-error"><?php echo $this->error; ?></div> <div id="inputbox-error"><?php echo $this->error; ?></div>
<div style="text-align: center"> <div style="text-align: center">
<?php echo Lang::$account['email'].Lang::$main['colon']; ?><input type="text" name="email" value="" id="email-generic" style="width: 12em" /> <?php echo Lang::account('email').Lang::main('colon'); ?><input type="text" name="email" value="" id="email-generic" style="width: 12em" />
<div class="pad2"></div> <div class="pad2"></div>
<input type="submit" value="<?php echo Lang::$account['continue']; ?>" /> <input type="submit" value="<?php echo Lang::account('continue'); ?>" />
</div> </div>
</div> </div>

View File

@@ -32,37 +32,37 @@
<form action="?account=signin&amp;next=<?php echo $this->next; ?>" method="post" onsubmit="return inputBoxValidate(this)"> <form action="?account=signin&amp;next=<?php echo $this->next; ?>" method="post" onsubmit="return inputBoxValidate(this)">
<div class="inputbox" style="position: relative"> <div class="inputbox" style="position: relative">
<h1><?php echo Lang::$account['doSignIn']; ?></h1> <h1><?php echo Lang::account('doSignIn'); ?></h1>
<div id="inputbox-error"><?php echo $this->error; ?></div> <div id="inputbox-error"><?php echo $this->error; ?></div>
<table align="center"> <table align="center">
<tr> <tr>
<td align="right"><?php echo Lang::$account['user'].lang::$main['colon']; ?></td> <td align="right"><?php echo Lang::account('user').Lang::main('colon'); ?></td>
<td><input type="text" name="username" value="<?php echo $this->user; ?>" maxlength="16" id="username-generic" style="width: 10em" /></td> <td><input type="text" name="username" value="<?php echo $this->user; ?>" maxlength="16" id="username-generic" style="width: 10em" /></td>
</tr> </tr>
<tr> <tr>
<td align="right"><?php echo Lang::$account['pass'].lang::$main['colon']; ?></td> <td align="right"><?php echo Lang::account('pass').Lang::main('colon'); ?></td>
<td><input type="password" name="password" style="width: 10em" /></td> <td><input type="password" name="password" style="width: 10em" /></td>
</tr> </tr>
<tr> <tr>
<td align="right" valign="top"><input type="checkbox" name="remember_me" id="remember_me" value="yes" checked="checked" /></td> <td align="right" valign="top"><input type="checkbox" name="remember_me" id="remember_me" value="yes" checked="checked" /></td>
<td> <td>
<label for="remember_me"><?php echo Lang::$account['rememberMe']; ?></label> <label for="remember_me"><?php echo Lang::account('rememberMe'); ?></label>
<div class="pad2"></div> <div class="pad2"></div>
<input type="submit" value="<?php echo Lang::$account['signIn']; ?>" /> <input type="submit" value="<?php echo Lang::account('signIn'); ?>" />
</td> </td>
</tr> </tr>
</table> </table>
<br> <br>
<div style="position: absolute; right: 5px; bottom: 5px;"><?php echo Lang::$account['forgot'].lang::$main['colon']; ?><a href="?account=forgotusername"><?php echo Lang::$account['forgotUser']; ?></a> | <a href="?account=forgotpassword"><?php echo Lang::$account['forgotPass']; ?></a></div> <div style="position: absolute; right: 5px; bottom: 5px;"><?php echo Lang::account('forgot').Lang::main('colon'); ?><a href="?account=forgotusername"><?php echo Lang::account('forgotUser'); ?></a> | <a href="?account=forgotpassword"><?php echo Lang::account('forgotPass'); ?></a></div>
</div> </div>
</form> </form>
<div class="pad3"></div> <div class="pad3"></div>
<?php <?php
if (CFG_ALLOW_REGISTER): if (CFG_ALLOW_REGISTER):
echo ' <div style="text-align: center; line-height: 1.5em; font-size: 125%">'.Lang::$account['accCreate']."</div>\n"; echo ' <div style="text-align: center; line-height: 1.5em; font-size: 125%">'.Lang::account('accCreate')."</div>\n";
endif; endif;
?> ?>
<script type="text/javascript">$WH.ge('username-generic').focus()</script> <script type="text/javascript">$WH.ge('username-generic').focus()</script>

View File

@@ -87,27 +87,27 @@
<table align="center"> <table align="center">
<tr> <tr>
<td align="right"><?php echo Lang::$account['user'].lang::$main['colon']; ?></td> <td align="right"><?php echo Lang::account('user').Lang::main('colon'); ?></td>
<td><input type="text" name="username" value="" maxlength="16" id="username-generic" style="width: 10em" /></td> <td><input type="text" name="username" value="" maxlength="16" id="username-generic" style="width: 10em" /></td>
</tr> </tr>
<tr> <tr>
<td align="right"><?php echo Lang::$account['pass'].lang::$main['colon']; ?></td> <td align="right"><?php echo Lang::account('pass').Lang::main('colon'); ?></td>
<td><input type="password" name="password" style="width: 10em" /></td> <td><input type="password" name="password" style="width: 10em" /></td>
</tr> </tr>
<tr> <tr>
<td align="right"><?php echo Lang::$account['passConfirm'].lang::$main['colon']; ?></td> <td align="right"><?php echo Lang::account('passConfirm').Lang::main('colon'); ?></td>
<td><input type="password" name="c_password" style="width: 10em" /></td> <td><input type="password" name="c_password" style="width: 10em" /></td>
</tr> </tr>
<tr> <tr>
<tr> <tr>
<td align="right"><?php echo Lang::$account['email'].lang::$main['colon']; ?></td> <td align="right"><?php echo Lang::account('email').Lang::main('colon'); ?></td>
<td><input type="text" name="email" style="width: 10em" /></td> <td><input type="text" name="email" style="width: 10em" /></td>
</tr> </tr>
<td align="right" valign="top"><input type="checkbox" name="remember_me" id="remember_me" value="yes" /></td> <td align="right" valign="top"><input type="checkbox" name="remember_me" id="remember_me" value="yes" /></td>
<td> <td>
<label for="remember_me"><?php echo Lang::$account['rememberMe']; ?></label> <label for="remember_me"><?php echo Lang::account('rememberMe'); ?></label>
<div class="pad2"></div> <div class="pad2"></div>
<input type="submit" name="signup" value="<?php echo Lang::$account['continue']; ?>" /> <input type="submit" name="signup" value="<?php echo Lang::account('continue'); ?>" />
</td> </td>
</tr> </tr>
</table> </table>

View File

@@ -23,7 +23,7 @@ $this->brick('redButtons');
<?php <?php
echo $this->description; echo $this->description;
echo '<h3>'.Lang::$achievement['criteria'].($this->criteria['reqQty'] ? ' &ndash; <small><b>'.Lang::$achievement['reqNumCrt'].' '.$this->criteria['reqQty'].' '.Lang::$achievement['outOf'].' '.count($this->criteria['data']).'</b></small>' : null)."</h3>\n"; echo '<h3>'.Lang::achievement('criteria').($this->criteria['reqQty'] ? ' &ndash; <small><b>'.Lang::achievement('reqNumCrt').' '.$this->criteria['reqQty'].' '.Lang::achievement('outOf').' '.count($this->criteria['data']).'</b></small>' : null)."</h3>\n";
?> ?>
@@ -52,7 +52,7 @@ foreach ($this->criteria['data'] as $i => $cr):
endif; endif;
if (User::isInGroup(U_GROUP_STAFF)): if (User::isInGroup(U_GROUP_STAFF)):
echo ' <small title="'.Lang::$achievement['criteriaType'].' '.$cr['type'].'" class="q0">['.$cr['id'].']</small>'; echo ' <small title="'.Lang::achievement('criteriaType').' '.$cr['type'].'" class="q0">['.$cr['id'].']</small>';
endif; endif;
echo '</td></tr>'; echo '</td></tr>';
@@ -79,12 +79,12 @@ endforeach;
<?php <?php
if ($r = $this->rewards): if ($r = $this->rewards):
if (!empty($r['item'])): if (!empty($r['item'])):
echo '<h3>'.Lang::$main['rewards']."</h3>\n"; echo '<h3>'.Lang::main('rewards')."</h3>\n";
$this->brick('rewards', ['rewards' => $r['item'], 'rewTitle' => null]); $this->brick('rewards', ['rewards' => $r['item'], 'rewTitle' => null]);
endif; endif;
if (!empty($r['title'])): if (!empty($r['title'])):
echo '<h3>'.Lang::$main['gains']."</h3>\n<ul>"; echo '<h3>'.Lang::main('gains')."</h3>\n<ul>";
foreach ($r['title'] as $i): foreach ($r['title'] as $i):
echo ' <li><div>'.$i."</div></li>\n"; echo ' <li><div>'.$i."</div></li>\n";
endforeach; endforeach;
@@ -92,7 +92,7 @@ if ($r = $this->rewards):
endif; endif;
if (empty($r['title']) && empty($r['item']) && $r['text']): if (empty($r['title']) && empty($r['item']) && $r['text']):
echo '<h3>'.Lang::$main['rewards']."</h3>\n" . echo '<h3>'.Lang::main('rewards')."</h3>\n" .
'<ul><li><div>'.$r['text']."</div></li></ul>\n"; '<ul><li><div>'.$r['text']."</div></li></ul>\n";
endif; endif;
endif; endif;
@@ -105,7 +105,7 @@ endif;
?> ?>
<h2 class="clear"><?php echo Lang::$main['related']; ?></h2> <h2 class="clear"><?php echo Lang::main('related'); ?></h2>
</div> </div>
<?php <?php

View File

@@ -17,20 +17,20 @@ $this->brick('pageTemplate', ['fi' => empty($f['query']) ? null : ['query' => $f
<form action="?achievements<?php echo $this->subCat; ?>&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)"> <form action="?achievements<?php echo $this->subCat; ?>&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
<table> <table>
<tr> <tr>
<td><?php echo Util::ucFirst(Lang::$main['name']).Lang::$main['colon']; ?></td> <td><?php echo Util::ucFirst(Lang::main('name')).Lang::main('colon'); ?></td>
<td colspan="3"> <td colspan="3">
<table><tr> <table><tr>
<td>&nbsp;<input type="text" name="na" size="30" <?php echo isset($f['na']) ? 'value="'.$f['na'].'"' : null; ?>/></td> <td>&nbsp;<input type="text" name="na" size="30" <?php echo isset($f['na']) ? 'value="'.$f['na'].'"' : null; ?>/></td>
<td>&nbsp; <input type="checkbox" name="ex" value="on" id="achievement-ex" <?php echo isset($f['ex']) ? 'checked="checked"' : null; ?>/></td> <td>&nbsp; <input type="checkbox" name="ex" value="on" id="achievement-ex" <?php echo isset($f['ex']) ? 'checked="checked"' : null; ?>/></td>
<td><label for="achievement-ex"><span class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, LANG.tooltip_extendedachievementsearch, 0, 0, 'q')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"><?php echo Lang::$main['extSearch']; ?></span></label></td> <td><label for="achievement-ex"><span class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, LANG.tooltip_extendedachievementsearch, 0, 0, 'q')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"><?php echo Lang::main('extSearch'); ?></span></label></td>
</tr></table> </tr></table>
</td> </td>
</tr><tr> </tr><tr>
<td class="padded"><?php echo Lang::$main['side'].Lang::$main['colon']; ?></td> <td class="padded"><?php echo Lang::main('side').Lang::main('colon'); ?></td>
<td class="padded">&nbsp;<select name="si"> <td class="padded">&nbsp;<select name="si">
<option></option> <option></option>
<?php <?php
foreach (Lang::$game['si'] as $i => $str): foreach (Lang::game('si') as $i => $str):
if ($str): if ($str):
echo ' <option value="'.$i.'" '.((isset($f['si']) && $f['si'] == $i) ? 'selected' : null).'>'.$str."</option>\n"; echo ' <option value="'.$i.'" '.((isset($f['si']) && $f['si'] == $i) ? 'selected' : null).'>'.$str."</option>\n";
endif; endif;
@@ -39,25 +39,25 @@ endforeach;
</select> </select>
</td> </td>
<td class="padded"><table><tr> <td class="padded"><table><tr>
<td>&nbsp;&nbsp;&nbsp;<?php echo Lang::$achievement['points'].Lang::$main['colon']; ?></td> <td>&nbsp;&nbsp;&nbsp;<?php echo Lang::achievement('points').Lang::main('colon'); ?></td>
<td>&nbsp;<input type="text" name="minpt" maxlength="2" class="smalltextbox" <?php echo isset($f['minpt']) ? 'value="'.$f['minpt'].'"' : null; ?>/> - <input type="text" name="maxpt" maxlength="2" class="smalltextbox" <?php echo isset($f['maxpt']) ? 'value="'.$f['maxpt'].'"' : null; ?>/></td> <td>&nbsp;<input type="text" name="minpt" maxlength="2" class="smalltextbox" <?php echo isset($f['minpt']) ? 'value="'.$f['minpt'].'"' : null; ?>/> - <input type="text" name="maxpt" maxlength="2" class="smalltextbox" <?php echo isset($f['maxpt']) ? 'value="'.$f['maxpt'].'"' : null; ?>/></td>
</tr></table></td> </tr></table></td>
</tr> </tr>
</table> </table>
<div id="fi_criteria" class="padded criteria"><div></div></div> <div id="fi_criteria" class="padded criteria"><div></div></div>
<div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false"><?php echo Lang::$main['addFilter']; ?></a></div> <div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false"><?php echo Lang::main('addFilter'); ?></a></div>
<div class="padded2"> <div class="padded2">
<div style="float: right"><?php echo Lang::$main['refineSearch']; ?></div> <div style="float: right"><?php echo Lang::main('refineSearch'); ?></div>
<?php echo Lang::$main['match'].Lang::$main['colon']; ?><input type="radio" name="ma" value="" id="ma-0" <?php echo !isset($f['ma']) ? 'checked="checked" ' : null ?>/><label for="ma-0"><?php echo Lang::$main['allFilter']; ?></label><input type="radio" name="ma" value="1" id="ma-1" <?php echo isset($f['ma']) ? 'checked="checked" ' : null ?> /><label for="ma-1"><?php echo Lang::$main['oneFilter']; ?></label> <?php echo Lang::main('match').Lang::main('colon'); ?><input type="radio" name="ma" value="" id="ma-0" <?php echo !isset($f['ma']) ? 'checked="checked" ' : null ?>/><label for="ma-0"><?php echo Lang::main('allFilter'); ?></label><input type="radio" name="ma" value="1" id="ma-1" <?php echo isset($f['ma']) ? 'checked="checked" ' : null ?> /><label for="ma-1"><?php echo Lang::main('oneFilter'); ?></label>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
<div class="padded"> <div class="padded">
<input type="submit" value="<?php echo Lang::$main['applyFilter']; ?>" /> <input type="submit" value="<?php echo Lang::main('applyFilter'); ?>" />
<input type="reset" value="<?php echo Lang::$main['resetForm']; ?>" /> <input type="reset" value="<?php echo Lang::main('resetForm'); ?>" />
</div> </div>
</form> </form>

View File

@@ -24,8 +24,8 @@ $this->brick('pageTemplate');
<select id="pagetype"> <select id="pagetype">
<?php <?php
foreach (Util::$typeStrings as $i => $str): foreach (Util::$typeStrings as $i => $str):
if (isset(Lang::$game[$str])): if (isset(Lang::game($str))):
echo " <option value=\"".$i."\">".Util::ucFirst(Lang::$game[$str])."</option>\n"; echo " <option value=\"".$i."\">".Util::ucFirst(Lang::game($str))."</option>\n";
endif; endif;
endforeach; endforeach;
?> ?>

View File

@@ -43,7 +43,7 @@ endif;
if (isset($this->unavailable)): if (isset($this->unavailable)):
?> ?>
<div class="pad"></div> <div class="pad"></div>
<b style="color: red"><?php echo Lang::$main['_unavailable']; ?></b> <b style="color: red"><?php echo Lang::main('_unavailable'); ?></b>
<?php <?php
endif; endif;
@@ -52,7 +52,7 @@ if (!empty($this->transfer)):
endif; endif;
?> ?>
<h2 class="clear"><?php echo Lang::$main['related']; ?></h2> <h2 class="clear"><?php echo Lang::main('related'); ?></h2>
</div> </div>
<?php <?php

View File

@@ -53,14 +53,14 @@
<div class="footer"> <div class="footer">
<div class="footer-links linklist"> <div class="footer-links linklist">
<a href="?aboutus"><?php echo lang::$main['aboutUs']; ?></a>| <a href="?aboutus"><?php echo Lang::main('aboutUs'); ?></a>|
<a href="#" id="footer-links-language"><?php echo Lang::$main['language']; ?></a> <a href="#" id="footer-links-language"><?php echo Lang::main('language'); ?></a>
</div> </div>
<div class="footer-copy">&#12484; 2014 Aowow</div> <div class="footer-copy">&#12484; 2014 Aowow</div>
</div> </div>
<?php $this->brick('pageTemplate'); ?> <?php $this->brick('pageTemplate'); ?>
<noscript><div id="noscript-bg"></div><div id="noscript-text"><b><?php echo Lang::$main['jsError']; ?></div></noscript> <noscript><div id="noscript-bg"></div><div id="noscript-text"><b><?php echo Lang::main('jsError'); ?></div></noscript>
</body> </body>
</html> </html>

View File

@@ -25,7 +25,7 @@
if ($this->disabled): if ($this->disabled):
?> ?>
<div class="pad"></div> <div class="pad"></div>
<b style="color: red"><?php echo Lang::$item['_unavailable']; ?></b> <b style="color: red"><?php echo Lang::item('_unavailable'); ?></b>
<?php <?php
endif; endif;
@@ -36,7 +36,7 @@ endif;
if (!empty($this->subItems)): if (!empty($this->subItems)):
?> ?>
<div class="clear"></div> <div class="clear"></div>
<h3><?php echo Lang::$item['_rndEnchants']; ?></h3> <h3><?php echo Lang::item('_rndEnchants'); ?></h3>
<div class="random-enchantments" style="margin-right: 25px"> <div class="random-enchantments" style="margin-right: 25px">
<ul> <ul>
@@ -44,7 +44,7 @@ if (!empty($this->subItems)):
foreach ($this->subItems['data'] as $k => $i): foreach ($this->subItems['data'] as $k => $i):
if ($k < (count($this->subItems['data']) / 2)): if ($k < (count($this->subItems['data']) / 2)):
echo ' <li><div><span class="q'.$this->subItems['quality'].'">...'.$i['name'].'</span>'; echo ' <li><div><span class="q'.$this->subItems['quality'].'">...'.$i['name'].'</span>';
echo ' <small class="q0">'.sprintf(Lang::$item['_chance'], $i['chance']).'</small><br />'.$i['enchantment'].'</div></li>'; echo ' <small class="q0">'.sprintf(Lang::item('_chance'), $i['chance']).'</small><br />'.$i['enchantment'].'</div></li>';
endif; endif;
endforeach; endforeach;
?> ?>
@@ -59,7 +59,7 @@ if (!empty($this->subItems)):
foreach ($this->subItems['data'] as $k => $i): foreach ($this->subItems['data'] as $k => $i):
if ($k >= (count($this->subItems['data']) / 2)): if ($k >= (count($this->subItems['data']) / 2)):
echo ' <li><div><span class="q'.$this->subItems['quality'].'">...'.$i['name'].'</span>'; echo ' <li><div><span class="q'.$this->subItems['quality'].'">...'.$i['name'].'</span>';
echo ' <small class="q0">'.sprintf(Lang::$item['_chance'], $i['chance']).'</small><br />'.$i['enchantment'].'</div></li>'; echo ' <small class="q0">'.sprintf(Lang::item('_chance'), $i['chance']).'</small><br />'.$i['enchantment'].'</div></li>';
endif; endif;
endforeach; endforeach;
?> ?>
@@ -72,7 +72,7 @@ endif;
$this->brick('book'); $this->brick('book');
?> ?>
<h2 class="clear"><?php echo Lang::$main['related']; ?></h2> <h2 class="clear"><?php echo Lang::main('related'); ?></h2>
</div> </div>
<?php <?php

View File

@@ -16,12 +16,12 @@ $this->brick('pageTemplate', ['fi' => empty($f['query']) ? null : ['query' => $f
<div id="fi" style="display: <?php echo empty($f['query']) ? 'none' : 'block' ?>;"> <div id="fi" style="display: <?php echo empty($f['query']) ? 'none' : 'block' ?>;">
<form action="?items<?php echo $this->subCat; ?>&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)"> <form action="?items<?php echo $this->subCat; ?>&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
<div class="rightpanel"> <div class="rightpanel">
<div style="float: left"><?php echo Lang::$item['_quality'].Lang::$main['colon']; ?></div> <div style="float: left"><?php echo Lang::item('_quality').Lang::main('colon'); ?></div>
<small><a href="javascript:;" onclick="document.forms['fi'].elements['qu[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::$main['clear']; ?></a></small> <small><a href="javascript:;" onclick="document.forms['fi'].elements['qu[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::main('clear'); ?></a></small>
<div class="clear"></div> <div class="clear"></div>
<select name="qu[]" size="7" multiple="multiple" class="rightselect" style="background-color: #181818"> <select name="qu[]" size="7" multiple="multiple" class="rightselect" style="background-color: #181818">
<?php <?php
foreach (Lang::$item['quality'] as $k => $str): foreach (Lang::item('quality') as $k => $str):
echo ' <option value="'.$k.'" class="q'.$k.'"'.(isset($f['qu']) && in_array($k, (array)$f['qu']) ? ' selected' : null).'>'.$str."</option>\n"; echo ' <option value="'.$k.'" class="q'.$k.'"'.(isset($f['qu']) && in_array($k, (array)$f['qu']) ? ' selected' : null).'>'.$str."</option>\n";
endforeach; endforeach;
?> ?>
@@ -32,8 +32,8 @@ endforeach;
if (!empty($f['slot'])): if (!empty($f['slot'])):
?> ?>
<div class="rightpanel2"> <div class="rightpanel2">
<div style="float: left"><?php echo Lang::$item['slot'].Lang::$main['colon']; ?></div> <div style="float: left"><?php echo Lang::item('slot').Lang::main('colon'); ?></div>
<small><a href="javascript:;" onclick="document.forms['fi'].elements['sl[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::$main['clear']; ?></a></small> <small><a href="javascript:;" onclick="document.forms['fi'].elements['sl[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::main('clear'); ?></a></small>
<div class="clear"></div> <div class="clear"></div>
<select name="sl[]" size="<?php echo min(count($f['slot']), 7); ?>" multiple="multiple" class="rightselect"> <select name="sl[]" size="<?php echo min(count($f['slot']), 7); ?>" multiple="multiple" class="rightselect">
<?php <?php
@@ -49,8 +49,8 @@ endif;
if (!empty($f['type'])): if (!empty($f['type'])):
?> ?>
<div class="rightpanel2"> <div class="rightpanel2">
<div style="float: left"><?php echo Lang::$game['type'].Lang::$main['colon']; ?></div> <div style="float: left"><?php echo Lang::game('type').Lang::main('colon'); ?></div>
<small><a href="javascript:;" onclick="document.forms['fi'].elements['ty[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::$main['clear']; ?></a></small> <small><a href="javascript:;" onclick="document.forms['fi'].elements['ty[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::main('clear'); ?></a></small>
<div class="clear"></div> <div class="clear"></div>
<select name="ty[]" size="<?php echo min(count($f['type']), 7); ?>" multiple="multiple" class="rightselect"> <select name="ty[]" size="<?php echo min(count($f['type']), 7); ?>" multiple="multiple" class="rightselect">
<?php <?php
@@ -64,27 +64,27 @@ if (!empty($f['type'])):
<table> <table>
<tr> <tr>
<td><?php echo Util::ucFirst(Lang::$main['name']).Lang::$main['colon']; ?></td> <td><?php echo Util::ucFirst(Lang::main('name')).Lang::main('colon'); ?></td>
<td colspan="2">&nbsp;<input type="text" name="na" size="30" <?php echo isset($f['na']) ? 'value="'.Util::htmlEscape($f['na']).'" ' : null; ?>/></td> <td colspan="2">&nbsp;<input type="text" name="na" size="30" <?php echo isset($f['na']) ? 'value="'.Util::htmlEscape($f['na']).'" ' : null; ?>/></td>
<td></td> <td></td>
</tr><tr> </tr><tr>
<td class="padded"><?php echo Lang::$game['level'].Lang::$main['colon']; ?></td> <td class="padded"><?php echo Lang::game('level').Lang::main('colon'); ?></td>
<td class="padded">&nbsp;<input type="text" name="minle" maxlength="3" class="smalltextbox2" <?php echo isset($f['minle']) ? 'value="'.$f['minle'].'" ' : null; ?>/> - <input type="text" name="maxle" maxlength="3" class="smalltextbox2" <?php echo isset($f['maxle']) ? 'value="'.$f['maxle'].'" ' : null; ?>/></td> <td class="padded">&nbsp;<input type="text" name="minle" maxlength="3" class="smalltextbox2" <?php echo isset($f['minle']) ? 'value="'.$f['minle'].'" ' : null; ?>/> - <input type="text" name="maxle" maxlength="3" class="smalltextbox2" <?php echo isset($f['maxle']) ? 'value="'.$f['maxle'].'" ' : null; ?>/></td>
<td class="padded"> <td class="padded">
<table> <table>
<tr> <tr>
<td>&nbsp;&nbsp;&nbsp;<?php echo Lang::$main['_reqLevel'].Lang::$main['colon']; ?></td> <td>&nbsp;&nbsp;&nbsp;<?php echo Lang::main('_reqLevel').Lang::main('colon'); ?></td>
<td>&nbsp;<input type="text" name="minrl" maxlength="2" class="smalltextbox" <?php echo isset($f['minrl']) ? 'value="'.$f['minrl'].'" ' : null; ?>/> - <input type="text" name="maxrl" maxlength="2" class="smalltextbox" <?php echo isset($f['maxrl']) ? 'value="'.$f['maxrl'].'" ' : null; ?>/></td> <td>&nbsp;<input type="text" name="minrl" maxlength="2" class="smalltextbox" <?php echo isset($f['minrl']) ? 'value="'.$f['minrl'].'" ' : null; ?>/> - <input type="text" name="maxrl" maxlength="2" class="smalltextbox" <?php echo isset($f['maxrl']) ? 'value="'.$f['maxrl'].'" ' : null; ?>/></td>
</tr> </tr>
</table> </table>
</td> </td>
<td></td> <td></td>
</tr><tr> </tr><tr>
<td class="padded"><?php echo Lang::$item['usableBy'].Lang::$main['colon']; ?></td> <td class="padded"><?php echo Lang::item('usableBy').Lang::main('colon'); ?></td>
<td class="padded">&nbsp;<select name="si" style="margin-right: 0.5em"> <td class="padded">&nbsp;<select name="si" style="margin-right: 0.5em">
<option></option> <option></option>
<?php <?php
foreach (Lang::$game['si'] as $k => $str): foreach (Lang::game('si') as $k => $str):
echo ' <option value="'.$k.'"'.(isset($f['si']) && $k == $f['si'] ? ' selected' : null).'>'.$str."</option>\n"; echo ' <option value="'.$k.'"'.(isset($f['si']) && $k == $f['si'] ? ' selected' : null).'>'.$str."</option>\n";
endforeach; endforeach;
?> ?>
@@ -93,7 +93,7 @@ endforeach;
&nbsp;<select name="ub"> &nbsp;<select name="ub">
<option></option> <option></option>
<?php <?php
foreach (Lang::$game['cl'] as $k => $str): foreach (Lang::game('cl') as $k => $str):
if ($str): if ($str):
echo ' <option value="'.$k.'"'.(isset($f['ub']) && $k == $f['ub'] ? ' selected' : null).'>'.$str."</option>\n"; echo ' <option value="'.$k.'"'.(isset($f['ub']) && $k == $f['ub'] ? ' selected' : null).'>'.$str."</option>\n";
endif; endif;
@@ -105,55 +105,55 @@ endforeach;
</table> </table>
<div id="fi_criteria" class="padded criteria"><div></div></div> <div id="fi_criteria" class="padded criteria"><div></div></div>
<div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false"><?php echo Lang::$main['addFilter']; ?></a></div> <div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false"><?php echo Lang::main('addFilter'); ?></a></div>
<div class="padded2"> <div class="padded2">
<div style="float: right"><?php echo Lang::$main['refineSearch']; ?></div> <div style="float: right"><?php echo Lang::main('refineSearch'); ?></div>
<?php echo Lang::$main['match'].Lang::$main['colon']; ?><input type="radio" name="ma" value="" id="ma-0" <?php echo !isset($f['ma']) ? 'checked="checked" ' : null; ?>/><label for="ma-0"><?php echo Lang::$main['allFilter']; ?></label><input type="radio" name="ma" value="1" id="ma-1" <?php echo isset($f['ma']) ? 'checked="checked" ' : null; ?>/><label for="ma-1"><?php echo Lang::$main['oneFilter']; ?></label> <?php echo Lang::main('match').Lang::main('colon'); ?><input type="radio" name="ma" value="" id="ma-0" <?php echo !isset($f['ma']) ? 'checked="checked" ' : null; ?>/><label for="ma-0"><?php echo Lang::main('allFilter'); ?></label><input type="radio" name="ma" value="1" id="ma-1" <?php echo isset($f['ma']) ? 'checked="checked" ' : null; ?>/><label for="ma-1"><?php echo Lang::main('oneFilter'); ?></label>
</div> </div>
<div class="pad3"></div> <div class="pad3"></div>
<div class="text"> <div class="text">
<h3 class="first"><a id="fi_weight_toggle" href="javascript:;" class="disclosure-off" onclick="return g_disclose($WH.ge('statweight-disclosure'), this)"><?php echo Lang::$main['createWS']; ?></a></h3> <h3 class="first"><a id="fi_weight_toggle" href="javascript:;" class="disclosure-off" onclick="return g_disclose($WH.ge('statweight-disclosure'), this)"><?php echo Lang::main('createWS'); ?></a></h3>
</div> </div>
<div id="statweight-disclosure" style="display: none"> <div id="statweight-disclosure" style="display: none">
<div id="statweight-help"> <div id="statweight-help">
<div><a href="?help=stat-weighting" target="_blank" id="statweight-help" class="icon-help"><?php echo Lang::$main['help']; ?></a></div> <div><a href="?help=stat-weighting" target="_blank" id="statweight-help" class="icon-help"><?php echo Lang::main('help'); ?></a></div>
</div> </div>
<table> <table>
<tr> <tr>
<td><?php echo Lang::$main['preset'].Lang::$main['colon']; ?></td> <td><?php echo Lang::main('preset').Lang::main('colon'); ?></td>
<td id="fi_presets"></td> <td id="fi_presets"></td>
</tr> </tr>
<tr> <tr>
<td class="padded"><?php echo Lang::$item['gems'].Lang::$main['colon']; ?></td> <td class="padded"><?php echo Lang::item('gems').Lang::main('colon'); ?></td>
<td class="padded"> <td class="padded">
<select name="gm"> <select name="gm">
<option<?php echo !isset($f['gm']) ? ' selected' : null; ?>></option> <option<?php echo !isset($f['gm']) ? ' selected' : null; ?>></option>
<option value="2"<?php echo (isset($f['gm']) && $f['gm'] == 2 ? ' selected' : null).'>'.Lang::$item['quality'][2]; ?></option> <option value="2"<?php echo (isset($f['gm']) && $f['gm'] == 2 ? ' selected' : null).'>'.Lang::item('quality', 2); ?></option>
<option value="3"<?php echo (isset($f['gm']) && $f['gm'] == 3 ? ' selected' : null).'>'.Lang::$item['quality'][3]; ?></option> <option value="3"<?php echo (isset($f['gm']) && $f['gm'] == 3 ? ' selected' : null).'>'.Lang::item('quality', 3); ?></option>
<option value="4"<?php echo (isset($f['gm']) && $f['gm'] == 4 ? ' selected' : null).'>'.Lang::$item['quality'][4]; ?></option> <option value="4"<?php echo (isset($f['gm']) && $f['gm'] == 4 ? ' selected' : null).'>'.Lang::item('quality', 4); ?></option>
</select> </select>
&nbsp; <input type="checkbox" name="jc" value="1" id="jc" <?php echo isset($f['jc']) && $f['jc'] == 1 ? 'checked="checked" ' : null; ?>/><label for="jc"><?php echo sprintf(Lang::$main['jcGemsOnly'], ' class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, LANG.tooltip_jconlygems, 0, 0, \'q\')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"'); ?></label> &nbsp; <input type="checkbox" name="jc" value="1" id="jc" <?php echo isset($f['jc']) && $f['jc'] == 1 ? 'checked="checked" ' : null; ?>/><label for="jc"><?php echo sprintf(Lang::main('jcGemsOnly'), ' class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, LANG.tooltip_jconlygems, 0, 0, \'q\')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"'); ?></label>
</td> </td>
</tr> </tr>
</table> </table>
<div id="fi_weight" class="criteria" style="display: none"><div></div></div> <div id="fi_weight" class="criteria" style="display: none"><div></div></div>
<div><a href="javascript:;" id="fi_addweight" onclick="fi_addCriterion(this); return false" style="display: none"><?php echo Lang::$main['addWeight']; ?></a></div> <div><a href="javascript:;" id="fi_addweight" onclick="fi_addCriterion(this); return false" style="display: none"><?php echo Lang::main('addWeight'); ?></a></div>
<div class="pad2"></div> <div class="pad2"></div>
<small><?php echo Lang::$main['cappedHint']; ?></small> <small><?php echo Lang::main('cappedHint'); ?></small>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
<div class="padded"> <div class="padded">
<?php <?php
echo Lang::$main['groupBy'].Lang::$main['colon']."\n"; echo Lang::main('groupBy').Lang::main('colon')."\n";
foreach (Lang::$main['gb'] as $k => $str): foreach (Lang::main('gb') as $k => $str):
if ($k): if ($k):
echo ' <input type="radio" name="gb" value="'.$k.'" id="gb-'.$str[1].'"'.(!empty($f['gb']) && $f['gb'] == $k ? ' checked="checked"' : null).'/><label for="gb-'.$str[1].'">'.$str[0]."</label>\n"; echo ' <input type="radio" name="gb" value="'.$k.'" id="gb-'.$str[1].'"'.(!empty($f['gb']) && $f['gb'] == $k ? ' checked="checked"' : null).'/><label for="gb-'.$str[1].'">'.$str[0]."</label>\n";
else: else:
@@ -166,8 +166,8 @@ endforeach;
<div class="clear"></div> <div class="clear"></div>
<div class="padded"> <div class="padded">
<input type="submit" value="<?php echo Lang::$main['applyFilter']; ?>" /> <input type="submit" value="<?php echo Lang::main('applyFilter'); ?>" />
<input type="reset" value="<?php echo Lang::$main['resetForm']; ?>" /> <input type="reset" value="<?php echo Lang::main('resetForm'); ?>" />
</div> </div>
<input type="hidden" name="upg"<?php echo !empty($f['upg']) ? ' value="'.$f['upg'].'"' : null; ?>/> <input type="hidden" name="upg"<?php echo !empty($f['upg']) ? ' value="'.$f['upg'].'"' : null; ?>/>

View File

@@ -54,28 +54,28 @@ endforeach;
if ($this->unavailable): if ($this->unavailable):
?> ?>
<div class="pad"></div> <div class="pad"></div>
<b style="color: red"><?php echo Lang::$itemset['_unavailable']; ?></b> <b style="color: red"><?php echo Lang::itemset('_unavailable'); ?></b>
<?php endif; ?> <?php endif; ?>
<h3><?php echo Lang::$itemset['_setBonuses'].$this->bonusExt; ?></h3> <h3><?php echo Lang::itemset('_setBonuses').$this->bonusExt; ?></h3>
<?php echo " ".Lang::$itemset['_conveyBonus']."\n"; ?> <?php echo " ".Lang::itemset('_conveyBonus')."\n"; ?>
<ul> <ul>
<?php <?php
foreach ($this->spells as $i => $s): foreach ($this->spells as $i => $s):
echo ' <li><div>'.$s['bonus'].' '.Lang::$itemset['_pieces'].Lang::$main['colon'].'<a href="?spell='.$s['id'].'">'.$s['desc']."</a></div></li>\n"; echo ' <li><div>'.$s['bonus'].' '.Lang::itemset('_pieces').Lang::main('colon').'<a href="?spell='.$s['id'].'">'.$s['desc']."</a></div></li>\n";
endforeach; endforeach;
?> ?>
</ul> </ul>
<h2 class="clear"><?php echo Lang::$itemset['summary']; ?></h2> <h2 class="clear"><?php echo Lang::itemset('summary'); ?></h2>
<div id="summary-generic"></div> <div id="summary-generic"></div>
<script type="text/javascript">//<![CDATA[ <script type="text/javascript">//<![CDATA[
new Summary({ id: 'itemset', template: 'itemset', parent: 'summary-generic', groups: <?php echo json_encode($this->compare['items'], JSON_NUMERIC_CHECK).', level: '.$this->compare['level']; ?>}); new Summary({ id: 'itemset', template: 'itemset', parent: 'summary-generic', groups: <?php echo json_encode($this->compare['items'], JSON_NUMERIC_CHECK).', level: '.$this->compare['level']; ?>});
//]]></script> //]]></script>
<h2 class="clear"><?php echo Lang::$main['related']; ?></h2> <h2 class="clear"><?php echo Lang::main('related'); ?></h2>
</div> </div>
<?php <?php

View File

@@ -16,12 +16,12 @@ $this->brick('pageTemplate', ['fi' => empty($f['query']) ? null : ['query' => $f
<div id="fi" style="display: <?php echo empty($f['query']) ? 'none' : 'block' ?>;"> <div id="fi" style="display: <?php echo empty($f['query']) ? 'none' : 'block' ?>;">
<form action="?itemsets&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)"> <form action="?itemsets&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
<div class="rightpanel"> <div class="rightpanel">
<div style="float: left"><?php echo Lang::$item['_quality'].Lang::$main['colon']; ?></div> <div style="float: left"><?php echo Lang::item('_quality').Lang::main('colon'); ?></div>
<small><a href="javascript:;" onclick="document.forms['fi'].elements['qu[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::$main['clear']; ?></a></small> <small><a href="javascript:;" onclick="document.forms['fi'].elements['qu[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::main('clear'); ?></a></small>
<div class="clear"></div> <div class="clear"></div>
<select name="qu[]" size="7" multiple="multiple" class="rightselect" style="background-color: #181818"> <select name="qu[]" size="7" multiple="multiple" class="rightselect" style="background-color: #181818">
<?php <?php
foreach (Lang::$item['quality'] as $i => $str): foreach (Lang::item('quality') as $i => $str):
echo ' <option value="'.$i.'" class="q'.$i.'"'.(isset($f['qu']) && in_array($i, (array)$f['qu']) ? ' selected' : null).'>'.$str."</option>\n"; echo ' <option value="'.$i.'" class="q'.$i.'"'.(isset($f['qu']) && in_array($i, (array)$f['qu']) ? ' selected' : null).'>'.$str."</option>\n";
endforeach; endforeach;
?> ?>
@@ -29,12 +29,12 @@ endforeach;
</div> </div>
<div class="rightpanel2"> <div class="rightpanel2">
<div style="float: left"><?php echo Lang::$game['type'].Lang::$main['colon']; ?></div> <div style="float: left"><?php echo Lang::game('type').Lang::main('colon'); ?></div>
<small><a href="javascript:;" onclick="document.forms['fi'].elements['ty[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::$main['clear']; ?></a></small> <small><a href="javascript:;" onclick="document.forms['fi'].elements['ty[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::main('clear'); ?></a></small>
<div class="clear"></div> <div class="clear"></div>
<select name="ty[]" size="7" multiple="multiple" class="rightselect"> <select name="ty[]" size="7" multiple="multiple" class="rightselect">
<?php <?php
foreach (Lang::$itemset['types'] as $i => $str): foreach (Lang::itemset('types') as $i => $str):
if ($str): if ($str):
echo ' <option value="'.$i.'"'.(isset($f['ty']) && in_array($i, (array)$f['ty']) ? ' selected' : null).'>'.$str."</option>\n"; echo ' <option value="'.$i.'"'.(isset($f['ty']) && in_array($i, (array)$f['ty']) ? ' selected' : null).'>'.$str."</option>\n";
endif; endif;
@@ -45,23 +45,23 @@ endforeach;
<table> <table>
<tr> <tr>
<td><?php echo Util::ucFirst(Lang::$main['name']).Lang::$main['colon']; ?></td> <td><?php echo Util::ucFirst(Lang::main('name')).Lang::main('colon'); ?></td>
<td colspan="3">&nbsp;<input type="text" name="na" size="30" <?php echo isset($f['na']) ? 'value="'.Util::htmlEscape($f['na']).'" ' : null; ?>/></td> <td colspan="3">&nbsp;<input type="text" name="na" size="30" <?php echo isset($f['na']) ? 'value="'.Util::htmlEscape($f['na']).'" ' : null; ?>/></td>
</tr><tr> </tr><tr>
<td class="padded"><?php echo Lang::$game['level'].Lang::$main['colon']; ?></td> <td class="padded"><?php echo Lang::game('level').Lang::main('colon'); ?></td>
<td class="padded">&nbsp;<input type="text" name="minle" maxlength="3" class="smalltextbox2" <?php echo isset($f['minle']) ? 'value="'.$f['minle'].'" ' : null; ?>/> - <input type="text" name="maxle" maxlength="3" class="smalltextbox2" <?php echo isset($f['maxle']) ? 'value="'.$f['maxle'].'" ' : null; ?>/></td> <td class="padded">&nbsp;<input type="text" name="minle" maxlength="3" class="smalltextbox2" <?php echo isset($f['minle']) ? 'value="'.$f['minle'].'" ' : null; ?>/> - <input type="text" name="maxle" maxlength="3" class="smalltextbox2" <?php echo isset($f['maxle']) ? 'value="'.$f['maxle'].'" ' : null; ?>/></td>
<td class="padded" width="100%"> <td class="padded" width="100%">
<table><tr> <table><tr>
<td>&nbsp;&nbsp;&nbsp;<?php echo Lang::$main['_reqLevel'].Lang::$main['colon']; ?></td> <td>&nbsp;&nbsp;&nbsp;<?php echo Lang::main('_reqLevel').Lang::main('colon'); ?></td>
<td>&nbsp;<input type="text" name="minrl" maxlength="2" class="smalltextbox" <?php echo isset($f['minrl']) ? 'value="'.$f['minrl'].'" ' : null; ?>/> - <input type="text" name="maxrl" maxlength="2" class="smalltextbox" <?php echo isset($f['maxrl']) ? 'value="'.$f['maxrl'].'" ' : null; ?>/></td> <td>&nbsp;<input type="text" name="minrl" maxlength="2" class="smalltextbox" <?php echo isset($f['minrl']) ? 'value="'.$f['minrl'].'" ' : null; ?>/> - <input type="text" name="maxrl" maxlength="2" class="smalltextbox" <?php echo isset($f['maxrl']) ? 'value="'.$f['maxrl'].'" ' : null; ?>/></td>
</tr></table> </tr></table>
</td> </td>
</tr><tr> </tr><tr>
<td class="padded"><?php echo Util::ucFirst(Lang::$game['class']).Lang::$main['colon']; ?></td> <td class="padded"><?php echo Util::ucFirst(Lang::game('class')).Lang::main('colon'); ?></td>
<td class="padded">&nbsp;<select name="cl"> <td class="padded">&nbsp;<select name="cl">
<option></option> <option></option>
<?php <?php
foreach (Lang::$game['cl'] as $i => $str): foreach (Lang::game('cl') as $i => $str):
if ($str): if ($str):
echo ' <option value="'.$i.'"'.(isset($f['cl']) && $i == $f['cl'] ? ' selected' : null).'>'.$str."</option>\n"; echo ' <option value="'.$i.'"'.(isset($f['cl']) && $i == $f['cl'] ? ' selected' : null).'>'.$str."</option>\n";
endif; endif;
@@ -70,11 +70,11 @@ endforeach;
</select></td> </select></td>
<td class="padded"> <td class="padded">
<table><tr> <table><tr>
<td>&nbsp;&nbsp;&nbsp;<?php echo Lang::$itemset['_tag'].Lang::$main['colon']; ?></td> <td>&nbsp;&nbsp;&nbsp;<?php echo Lang::itemset('_tag').Lang::main('colon'); ?></td>
<td>&nbsp;<select name="ta"> <td>&nbsp;<select name="ta">
<option></option> <option></option>
<?php <?php
foreach (Lang::$itemset['notes'] as $i => $str): foreach (Lang::itemset('notes') as $i => $str):
if ($str): if ($str):
echo ' <option value="'.$i.'"'.(isset($f['ta']) && $i == $f['ta'] ? ' selected' : null).'>'.$str."</option>\n"; echo ' <option value="'.$i.'"'.(isset($f['ta']) && $i == $f['ta'] ? ' selected' : null).'>'.$str."</option>\n";
endif; endif;
@@ -87,18 +87,18 @@ endforeach;
</table> </table>
<div id="fi_criteria" class="padded criteria"><div></div></div> <div id="fi_criteria" class="padded criteria"><div></div></div>
<div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false"><?php echo Lang::$main['addFilter']; ?></a></div> <div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false"><?php echo Lang::main('addFilter'); ?></a></div>
<div class="padded2"> <div class="padded2">
<div style="float: right"><?php echo Lang::$main['refineSearch']; ?></div> <div style="float: right"><?php echo Lang::main('refineSearch'); ?></div>
<?php echo Lang::$main['match'].Lang::$main['colon']; ?><input type="radio" name="ma" value="" id="ma-0" <?php echo !isset($f['ma']) ? 'checked="checked" ' : null ?>/><label for="ma-0"><?php echo Lang::$main['allFilter']; ?></label><input type="radio" name="ma" value="1" id="ma-1" <?php echo isset($f['ma']) ? 'checked="checked" ' : null ?> /><label for="ma-1"><?php echo Lang::$main['oneFilter']; ?></label> <?php echo Lang::main('match').Lang::main('colon'); ?><input type="radio" name="ma" value="" id="ma-0" <?php echo !isset($f['ma']) ? 'checked="checked" ' : null ?>/><label for="ma-0"><?php echo Lang::main('allFilter'); ?></label><input type="radio" name="ma" value="1" id="ma-1" <?php echo isset($f['ma']) ? 'checked="checked" ' : null ?> /><label for="ma-1"><?php echo Lang::main('oneFilter'); ?></label>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
<div class="padded"> <div class="padded">
<input type="submit" value="<?php echo Lang::$main['applyFilter']; ?>" /> <input type="submit" value="<?php echo Lang::main('applyFilter'); ?>" />
<input type="reset" value="<?php echo Lang::$main['resetForm']; ?>" /> <input type="reset" value="<?php echo Lang::main('resetForm'); ?>" />
</div> </div>
</form> </form>

View File

@@ -15,33 +15,33 @@
<div class="text"> <div class="text">
<div style="text-align: center"> <div style="text-align: center">
<select id="maps-ek" onchange="ma_ChooseZone(this)" class="zone-picker" style="margin: 0"> <select id="maps-ek" onchange="ma_ChooseZone(this)" class="zone-picker" style="margin: 0">
<option value="0" style="color: #bbbbbb"><?php echo Lang::$maps['EasternKingdoms']; ?></option> <option value="0" style="color: #bbbbbb"><?php echo Lang::maps('EasternKingdoms'); ?></option>
</select> </select>
<select id="maps-kalimdor" onchange="ma_ChooseZone(this)" class="zone-picker"> <select id="maps-kalimdor" onchange="ma_ChooseZone(this)" class="zone-picker">
<option value="0" style="color: #bbbbbb"><?php echo Lang::$maps['Kalimdor']; ?></option> <option value="0" style="color: #bbbbbb"><?php echo Lang::maps('Kalimdor'); ?></option>
</select> </select>
<select id="maps-outland" onchange="ma_ChooseZone(this)" class="zone-picker"> <select id="maps-outland" onchange="ma_ChooseZone(this)" class="zone-picker">
<option value="0" style="color: #bbbbbb"><?php echo Lang::$maps['Outland']; ?></option> <option value="0" style="color: #bbbbbb"><?php echo Lang::maps('Outland'); ?></option>
</select> </select>
<select id="maps-northrend" onchange="ma_ChooseZone(this)" class="zone-picker"> <select id="maps-northrend" onchange="ma_ChooseZone(this)" class="zone-picker">
<option value="0" style="color: #bbbbbb"><?php echo Lang::$maps['Northrend']; ?></option> <option value="0" style="color: #bbbbbb"><?php echo Lang::maps('Northrend'); ?></option>
</select> </select>
<div style="padding-bottom: 4px"></div> <div style="padding-bottom: 4px"></div>
<select onchange="ma_ChooseZone(this)" class="zone-picker"> <select onchange="ma_ChooseZone(this)" class="zone-picker">
<option value="0" style="color: #bbbbbb"><?php echo Lang::$maps['Instances']; ?></option> <option value="0" style="color: #bbbbbb"><?php echo Lang::maps('Instances'); ?></option>
<optgroup label="<?php echo Lang::$maps['Dungeons']; ?>" id="maps-dungeons"></optgroup> <optgroup label="<?php echo Lang::maps('Dungeons'); ?>" id="maps-dungeons"></optgroup>
<optgroup label="<?php echo Lang::$maps['Raids']; ?>" id="maps-raids"></optgroup> <optgroup label="<?php echo Lang::maps('Raids'); ?>" id="maps-raids"></optgroup>
</select> </select>
<select onchange="ma_ChooseZone(this)" class="zone-picker"> <select onchange="ma_ChooseZone(this)" class="zone-picker">
<option value="0" style="color: #bbbbbb"><?php echo Lang::$maps['More']; ?></option> <option value="0" style="color: #bbbbbb"><?php echo Lang::maps('More'); ?></option>
<optgroup label="<?php echo Lang::$maps['Battlegrounds']; ?>" id="maps-battlegrounds"></optgroup> <optgroup label="<?php echo Lang::maps('Battlegrounds'); ?>" id="maps-battlegrounds"></optgroup>
<optgroup label="<?php echo Lang::$maps['Miscellaneous']; ?>"> <optgroup label="<?php echo Lang::maps('Miscellaneous'); ?>">
<option value="-1"><?php echo Lang::$maps['Azeroth']; ?></option> <option value="-1"><?php echo Lang::maps('Azeroth'); ?></option>
<option value="-3"><?php echo Lang::$maps['EasternKingdoms']; ?></option> <option value="-3"><?php echo Lang::maps('EasternKingdoms'); ?></option>
<option value="-6"><?php echo Lang::$maps['Kalimdor']; ?></option> <option value="-6"><?php echo Lang::maps('Kalimdor'); ?></option>
<option value="-2"><?php echo Lang::$maps['Outland']; ?></option> <option value="-2"><?php echo Lang::maps('Outland'); ?></option>
<option value="-5"><?php echo Lang::$maps['Northrend']; ?></option> <option value="-5"><?php echo Lang::maps('Northrend'); ?></option>
<option value="-4"><?php echo Lang::$maps['CosmicMap']; ?></option> <option value="-4"><?php echo Lang::maps('CosmicMap'); ?></option>
</optgroup> </optgroup>
</select> </select>
</div> </div>
@@ -49,8 +49,8 @@
<div id="mapper-generic"></div> <div id="mapper-generic"></div>
<div class="pad"></div> <div class="pad"></div>
<div style="text-align: center; font-size: 13px"> <div style="text-align: center; font-size: 13px">
<a href="javascript:;" style="margin-right: 2em" id="link-to-this-map"><?php echo Lang::$maps['linkToThisMap']; ?></a> <a href="javascript:;" style="margin-right: 2em" id="link-to-this-map"><?php echo Lang::maps('linkToThisMap'); ?></a>
<a href="javascript:;" onclick="myMapper.setCoords([])" onmousedown="return false"><?php echo Lang::$maps['clear']; ?></a> <a href="javascript:;" onclick="myMapper.setCoords([])" onmousedown="return false"><?php echo Lang::maps('clear'); ?></a>
</div> </div>
</div> </div>
<script type="text/javascript">ma_Init();</script> <script type="text/javascript">ma_Init();</script>

View File

@@ -21,12 +21,12 @@
$this->brick('article'); $this->brick('article');
if ($this->accessory): if ($this->accessory):
echo ' <div>'.Lang::$npc['accessoryFor'].' '; echo ' <div>'.Lang::npc('accessoryFor').' ';
$n = count($this->accessory); $n = count($this->accessory);
foreach ($this->accessory as $i => $ac): foreach ($this->accessory as $i => $ac):
if ($n > 1 && $i > 0): if ($n > 1 && $i > 0):
echo ($i == $n - 1) ? Lang::$main['and'] : ', '; echo ($i == $n - 1) ? Lang::main('and') : ', ';
endif; endif;
echo '<a href="?npc='.$ac[0].'">'.$ac[1].'</a>'; echo '<a href="?npc='.$ac[0].'">'.$ac[1].'</a>';
endforeach; endforeach;
@@ -35,19 +35,19 @@ if ($this->accessory):
endif; endif;
if (is_array($this->position)): if (is_array($this->position)):
echo ' <div>'.Lang::$npc['difficultyPH'].' <a href="?npc='.$this->position[0].'">'.$this->position[1]."</a>.</div>\n"; echo ' <div>'.Lang::npc('difficultyPH').' <a href="?npc='.$this->position[0].'">'.$this->position[1]."</a>.</div>\n";
?> ?>
<div class="pad"></div> <div class="pad"></div>
<?php <?php
elseif (!empty($this->map)): elseif (!empty($this->map)):
$this->brick('mapper'); $this->brick('mapper');
else: else:
echo ' '.Lang::$npc['unkPosition']."\n"; echo ' '.Lang::npc('unkPosition')."\n";
endif; endif;
if ($this->quotes[0]): if ($this->quotes[0]):
?> ?>
<h3><a class="disclosure-off" onclick="return g_disclose($WH.ge('quotes-generic'), this)"><?php echo Lang::$npc['quotes'].'&nbsp;('.$this->quotes[1]; ?>)</a></h3> <h3><a class="disclosure-off" onclick="return g_disclose($WH.ge('quotes-generic'), this)"><?php echo Lang::npc('quotes').'&nbsp;('.$this->quotes[1]; ?>)</a></h3>
<div id="quotes-generic" style="display: none"><ul> <div id="quotes-generic" style="display: none"><ul>
<?php <?php
foreach ($this->quotes[0] as $group): foreach ($this->quotes[0] as $group):
@@ -59,9 +59,9 @@ if ($this->quotes[0]):
$last = end($group); $last = end($group);
foreach ($group as $itr): foreach ($group as $itr):
$_ = ($itr['type'] != 4 ? $this->name.' '.Lang::$npc['textTypes'][$itr['type']].Lang::$main['colon'].($itr['lang'] ? '['.$itr['lang'].']' : null) : null).$itr['text']; $_ = ($itr['type'] != 4 ? $this->name.' '.Lang::npc('textTypes', $itr['type']).Lang::main('colon').($itr['lang'] ? '['.$itr['lang'].']' : null) : null).$itr['text'];
echo '<div><span class="s'.$itr['type'].'">'.($itr['range'] ? sprintf(Util::$dfnString, Lang::$npc['textRanges'][$itr['range']], $_) : $_).'</span></div>'; echo '<div><span class="s'.$itr['type'].'">'.($itr['range'] ? sprintf(Util::$dfnString, Lang::npc('textRanges', $itr['range']), $_) : $_).'</span></div>';
echo ($itr == $last) ? null : "</li>\n<li>"; echo ($itr == $last) ? null : "</li>\n<li>";
endforeach; endforeach;
@@ -79,9 +79,9 @@ endif;
if ($this->reputation): if ($this->reputation):
?> ?>
<h3><?php echo Lang::$main['gains']; ?></h3> <h3><?php echo Lang::main('gains'); ?></h3>
<?php <?php
echo Lang::$npc['gainsDesc'].Lang::$main['colon']; echo Lang::npc('gainsDesc').Lang::main('colon');
foreach ($this->reputation as $set): foreach ($this->reputation as $set):
if (count($this->reputation) > 1): if (count($this->reputation) > 1):
@@ -91,8 +91,8 @@ if ($this->reputation):
echo '<ul>'; echo '<ul>';
foreach ($set[1] as $itr): foreach ($set[1] as $itr):
echo '<li><div'.($itr['qty'] < 0 ? ' class="reputation-negative-amount"' : null).'><span>'.$itr['qty'].'</span> '.Lang::$npc['repWith'] . echo '<li><div'.($itr['qty'] < 0 ? ' class="reputation-negative-amount"' : null).'><span>'.$itr['qty'].'</span> '.Lang::npc('repWith') .
' <a href="?faction='.$itr['id'].'">'.$itr['name'].'</a>'.($itr['cap'] && $itr['qty'] > 0 ? '&nbsp;('.sprintf(Lang::$npc['stopsAt'], $itr['cap']).')' : null).'</div></li>'; ' <a href="?faction='.$itr['id'].'">'.$itr['name'].'</a>'.($itr['cap'] && $itr['qty'] > 0 ? '&nbsp;('.sprintf(Lang::npc('stopsAt'), $itr['cap']).')' : null).'</div></li>';
endforeach; endforeach;
echo '</ul>'; echo '</ul>';
@@ -103,7 +103,7 @@ if ($this->reputation):
endforeach; endforeach;
endif; endif;
?> ?>
<h2 class="clear"><?php echo Lang::$main['related']; ?></h2> <h2 class="clear"><?php echo Lang::main('related'); ?></h2>
</div> </div>
<?php <?php

View File

@@ -16,12 +16,12 @@ $this->brick('pageTemplate', ['fi' => empty($f['query']) ? null : ['query' => $f
<div id="fi" style="display: <?php echo empty($f['query']) ? 'none' : 'block' ?>;"> <div id="fi" style="display: <?php echo empty($f['query']) ? 'none' : 'block' ?>;">
<form action="?npcs<?php echo $this->subCat; ?>&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)"> <form action="?npcs<?php echo $this->subCat; ?>&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
<div class="rightpanel"> <div class="rightpanel">
<div style="float: left"><?php echo Lang::$npc['classification'].Lang::$main['colon']; ?></div> <div style="float: left"><?php echo Lang::npc('classification').Lang::main('colon'); ?></div>
<small><a href="javascript:;" onclick="document.forms['fi'].elements['cl[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::$main['clear']; ?></a></small> <small><a href="javascript:;" onclick="document.forms['fi'].elements['cl[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::main('clear'); ?></a></small>
<div class="clear"></div> <div class="clear"></div>
<select name="cl[]" size="5" multiple="multiple" class="rightselect" style="width: 9.5em"> <select name="cl[]" size="5" multiple="multiple" class="rightselect" style="width: 9.5em">
<?php <?php
foreach (Lang::$npc['rank'] as $i => $str): foreach (Lang::npc('rank') as $i => $str):
if ($str): if ($str):
echo ' <option value="'.$i.'"'.(isset($f['cl']) && in_array($i, (array)$f['cl']) ? ' selected' : null).'>'.$str."</option>\n"; echo ' <option value="'.$i.'"'.(isset($f['cl']) && in_array($i, (array)$f['cl']) ? ' selected' : null).'>'.$str."</option>\n";
endif; endif;
@@ -31,11 +31,11 @@ endforeach;
</div> </div>
<?php if ($this->petFamPanel): ?> <?php if ($this->petFamPanel): ?>
<div class="rightpanel2"> <div class="rightpanel2">
<div style="float: left"><?php echo Lang::$npc['petFamily'].Lang::$main['colon']; ?></div><small><a href="javascript:;" onclick="document.forms['fi'].elements['fa[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::$main['clear']; ?></a></small> <div style="float: left"><?php echo Lang::npc('petFamily').Lang::main('colon'); ?></div><small><a href="javascript:;" onclick="document.forms['fi'].elements['fa[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::main('clear'); ?></a></small>
<div class="clear"></div> <div class="clear"></div>
<select name="fa[]" size="7" multiple="multiple" class="rightselect"> <select name="fa[]" size="7" multiple="multiple" class="rightselect">
<?php <?php
foreach (Lang::$game['fa'] as $i => $str): foreach (Lang::game('fa') as $i => $str):
if ($str): if ($str):
echo ' <option value="'.$i.'"'.(isset($f['fa']) && in_array($i, (array)$f['fa']) ? ' selected' : null).'>'.$str."</option>\n"; echo ' <option value="'.$i.'"'.(isset($f['fa']) && in_array($i, (array)$f['fa']) ? ' selected' : null).'>'.$str."</option>\n";
endif; endif;
@@ -46,20 +46,20 @@ endforeach;
<?php endif; ?> <?php endif; ?>
<table> <table>
<tr> <tr>
<td><?php echo Util::ucFirst(Lang::$main['name']).Lang::$main['colon']; ?></td> <td><?php echo Util::ucFirst(Lang::main('name')).Lang::main('colon'); ?></td>
<td colspan="2"> <td colspan="2">
<table><tr> <table><tr>
<td>&nbsp;<input type="text" name="na" size="30" <?php echo isset($f['na']) ? 'value="'.Util::htmlEscape($f['na']).'" ' : null; ?>/></td> <td>&nbsp;<input type="text" name="na" size="30" <?php echo isset($f['na']) ? 'value="'.Util::htmlEscape($f['na']).'" ' : null; ?>/></td>
<td>&nbsp; <input type="checkbox" name="ex" value="on" id="npc-ex" <?php echo isset($f['ex']) ? 'checked="checked" ' : null; ?>/></td> <td>&nbsp; <input type="checkbox" name="ex" value="on" id="npc-ex" <?php echo isset($f['ex']) ? 'checked="checked" ' : null; ?>/></td>
<td><label for="npc-ex"><span class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, LANG.tooltip_extendednpcsearch, 0, 0, 'q')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"><?php echo Lang::$main['extSearch']; ?></span></label></td> <td><label for="npc-ex"><span class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, LANG.tooltip_extendednpcsearch, 0, 0, 'q')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"><?php echo Lang::main('extSearch'); ?></span></label></td>
</tr></table> </tr></table>
</td> </td>
</tr><tr> </tr><tr>
<td class="padded"><?php echo Lang::$game['level'].Lang::$main['colon']; ?></td> <td class="padded"><?php echo Lang::game('level').Lang::main('colon'); ?></td>
<td class="padded">&nbsp;<input type="text" name="minle" maxlength="2" class="smalltextbox" <?php echo isset($f['minle']) ? 'value="'.$f['minle'].'" ' : null; ?>/> - <input type="text" name="maxle" maxlength="2" class="smalltextbox" <?php echo isset($f['maxle']) ? 'value="'.$f['maxle'].'" ' : null; ?>/></td> <td class="padded">&nbsp;<input type="text" name="minle" maxlength="2" class="smalltextbox" <?php echo isset($f['minle']) ? 'value="'.$f['minle'].'" ' : null; ?>/> - <input type="text" name="maxle" maxlength="2" class="smalltextbox" <?php echo isset($f['maxle']) ? 'value="'.$f['maxle'].'" ' : null; ?>/></td>
<td class="padded" width="100%"> <td class="padded" width="100%">
<table><tr> <table><tr>
<td>&nbsp;&nbsp;&nbsp;<?php echo Lang::$npc['react'].Lang::$main['colon']; ?></td> <td>&nbsp;&nbsp;&nbsp;<?php echo Lang::npc('react').Lang::main('colon'); ?></td>
<td>&nbsp;<select name="ra" onchange="fi_dropdownSync(this)" onkeyup="fi_dropdownSync(this)" style="background-color: #181818"<?php echo isset($f['ra']) ? ' class="q'.($f['ra'] == 1 ? '2' : ($f['ra'] == -1 ? '10' : null)).'"' : null; ?>> <td>&nbsp;<select name="ra" onchange="fi_dropdownSync(this)" onkeyup="fi_dropdownSync(this)" style="background-color: #181818"<?php echo isset($f['ra']) ? ' class="q'.($f['ra'] == 1 ? '2' : ($f['ra'] == -1 ? '10' : null)).'"' : null; ?>>
<option></option> <option></option>
<option value="1" class="q2"<?php echo isset($f['ra']) && $f['ra'] == 1 ? ' selected' : null; ?>>A</option> <option value="1" class="q2"<?php echo isset($f['ra']) && $f['ra'] == 1 ? ' selected' : null; ?>>A</option>
@@ -79,18 +79,18 @@ endforeach;
</table> </table>
<div id="fi_criteria" class="padded criteria"><div></div></div> <div id="fi_criteria" class="padded criteria"><div></div></div>
<div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false"><?php echo Lang::$main['addFilter']; ?></a></div> <div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false"><?php echo Lang::main('addFilter'); ?></a></div>
<div class="padded2 clear"> <div class="padded2 clear">
<div style="float: right"><?php echo Lang::$main['refineSearch']; ?></div> <div style="float: right"><?php echo Lang::main('refineSearch'); ?></div>
<?php echo Lang::$main['match'].Lang::$main['colon']; ?><input type="radio" name="ma" value="" id="ma-0" <?php echo !isset($f['ma']) ? 'checked="checked" ' : null ?>/><label for="ma-0"><?php echo Lang::$main['allFilter']; ?></label><input type="radio" name="ma" value="1" id="ma-1" <?php echo isset($f['ma']) ? 'checked="checked" ' : null ?> /><label for="ma-1"><?php echo Lang::$main['oneFilter']; ?></label> <?php echo Lang::main('match').Lang::main('colon'); ?><input type="radio" name="ma" value="" id="ma-0" <?php echo !isset($f['ma']) ? 'checked="checked" ' : null ?>/><label for="ma-0"><?php echo Lang::main('allFilter'); ?></label><input type="radio" name="ma" value="1" id="ma-1" <?php echo isset($f['ma']) ? 'checked="checked" ' : null ?> /><label for="ma-1"><?php echo Lang::main('oneFilter'); ?></label>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
<div class="padded"> <div class="padded">
<input type="submit" value="<?php echo Lang::$main['applyFilter']; ?>" /> <input type="submit" value="<?php echo Lang::main('applyFilter'); ?>" />
<input type="reset" value="<?php echo Lang::$main['resetForm']; ?>" /> <input type="reset" value="<?php echo Lang::main('resetForm'); ?>" />
</div> </div>
</form> </form>

View File

@@ -23,13 +23,13 @@ $this->brick('article');
if (!empty($this->map)): if (!empty($this->map)):
$this->brick('mapper'); $this->brick('mapper');
else: else:
echo Lang::$gameObject['unkPosition']; echo Lang::gameObject('unkPosition');
endif; endif;
$this->brick('book'); $this->brick('book');
?> ?>
<h2 class="clear"><?php echo Lang::$main['related']; ?></h2> <h2 class="clear"><?php echo Lang::main('related'); ?></h2>
</div> </div>
<?php <?php

View File

@@ -16,22 +16,22 @@ $this->brick('pageTemplate', ['fi' => empty($f['query']) ? null : ['query' => $f
<div id="fi" style="display: <?php echo empty($f['query']) ? 'none' : 'block' ?>;"> <div id="fi" style="display: <?php echo empty($f['query']) ? 'none' : 'block' ?>;">
<form action="?objects<?php echo $this->subCat; ?>&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)"> <form action="?objects<?php echo $this->subCat; ?>&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
<table> <table>
<tr><td><?php echo Util::ucFirst(Lang::$main['name']).Lang::$main['colon']; ?></td><td>&nbsp;<input type="text" name="na" size="30" <?php echo isset($f['na']) ? 'value="'.Util::htmlEscape($f['na']).'" ' : null; ?>/></td></tr> <tr><td><?php echo Util::ucFirst(Lang::main('name')).Lang::main('colon'); ?></td><td>&nbsp;<input type="text" name="na" size="30" <?php echo isset($f['na']) ? 'value="'.Util::htmlEscape($f['na']).'" ' : null; ?>/></td></tr>
</table> </table>
<div id="fi_criteria" class="padded criteria"><div></div></div> <div id="fi_criteria" class="padded criteria"><div></div></div>
<div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false"><?php echo Lang::$main['addFilter']; ?></a></div> <div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false"><?php echo Lang::main('addFilter'); ?></a></div>
<div class="padded2 clear"> <div class="padded2 clear">
<div style="float: right"><?php echo Lang::$main['refineSearch']; ?></div> <div style="float: right"><?php echo Lang::main('refineSearch'); ?></div>
<?php echo Lang::$main['match'].Lang::$main['colon']; ?><input type="radio" name="ma" value="" id="ma-0" <?php echo !isset($f['ma']) ? 'checked="checked" ' : null ?>/><label for="ma-0"><?php echo Lang::$main['allFilter']; ?></label><input type="radio" name="ma" value="1" id="ma-1" <?php echo isset($f['ma']) ? 'checked="checked" ' : null ?> /><label for="ma-1"><?php echo Lang::$main['oneFilter']; ?></label> <?php echo Lang::main('match').Lang::main('colon'); ?><input type="radio" name="ma" value="" id="ma-0" <?php echo !isset($f['ma']) ? 'checked="checked" ' : null ?>/><label for="ma-0"><?php echo Lang::main('allFilter'); ?></label><input type="radio" name="ma" value="1" id="ma-1" <?php echo isset($f['ma']) ? 'checked="checked" ' : null ?> /><label for="ma-1"><?php echo Lang::main('oneFilter'); ?></label>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
<div class="padded"> <div class="padded">
<input type="submit" value="<?php echo Lang::$main['applyFilter']; ?>" /> <input type="submit" value="<?php echo Lang::main('applyFilter'); ?>" />
<input type="reset" value="<?php echo Lang::$main['resetForm']; ?>" /> <input type="reset" value="<?php echo Lang::main('resetForm'); ?>" />
</div> </div>
</form> </form>

View File

@@ -11,41 +11,41 @@
?> ?>
<div class="text"> <div class="text">
<h1><?php echo Lang::$main['_cpHead']; ?></h1> <h1><?php echo Lang::main('_cpHead'); ?></h1>
<p><?php echo Lang::$main['_cpHint']; ?></p> <p><?php echo Lang::main('_cpHint'); ?></p>
<div class="pad"></div> <div class="pad"></div>
<p><?php echo Lang::$main['_cpHelp']; ?></p> <p><?php echo Lang::main('_cpHelp'); ?></p>
<div class="profiler-home"> <div class="profiler-home">
<div> <div>
<h2><?php echo Util::ucFirst(Lang::$main['name']).Lang::$main['colon']; ?></h2> <h2><?php echo Util::ucFirst(Lang::main('name')).Lang::main('colon'); ?></h2>
<input type="text" name="na" value="" /> <input type="text" name="na" value="" />
</div> </div>
<div> <div>
<h2><?php echo Lang::$main['region'].Lang::$main['colon']; ?></h2> <h2><?php echo Lang::main('region').Lang::main('colon'); ?></h2>
<input type="radio" name="rg" value="us" id="rg-1" checked="checked" /><label for="rg-1" class="profiler-button profiler-option-left selected"><em><i>US &amp; Oceanic</i></em></label> <input type="radio" name="rg" value="us" id="rg-1" checked="checked" /><label for="rg-1" class="profiler-button profiler-option-left selected"><em><i>US &amp; Oceanic</i></em></label>
<input type="radio" name="rg" value="eu" id="rg-2" /><label for="rg-2" class="profiler-button profiler-option-right"><em><i>Europe</i></em></label> <input type="radio" name="rg" value="eu" id="rg-2" /><label for="rg-2" class="profiler-button profiler-option-right"><em><i>Europe</i></em></label>
</div> </div>
<div> <div>
<h2><?php echo Lang::$main['realm'].Lang::$main['colon']; ?></h2> <h2><?php echo Lang::main('realm').Lang::main('colon'); ?></h2>
<input type="text" name="sv" autocomplete="off" /> <input type="text" name="sv" autocomplete="off" />
<div class="profiler-autocomplete"></div> <div class="profiler-autocomplete"></div>
</div> </div>
<div class="profiler-buttons"> <div class="profiler-buttons">
<a href="javascript:;" class="profiler-button" id="profiler-lookup"><em><?php echo Lang::$main['viewCharacter']; ?></em></a> <a href="javascript:;" class="profiler-button" id="profiler-lookup"><em><?php echo Lang::main('viewCharacter'); ?></em></a>
<a href="javascript:;" class="profiler-button" id="profiler-search"><em><?php echo Lang::$main['searchButton']; ?></em></a> <a href="javascript:;" class="profiler-button" id="profiler-search"><em><?php echo Lang::main('searchButton'); ?></em></a>
</div> </div>
</div> </div>
<div class="clear pad3"></div> <div class="clear pad3"></div>
<p><?php echo Lang::$main['_cpFooter']; ?></p> <p><?php echo Lang::main('_cpFooter'); ?></p>
</div> </div>
<script type="text/javascript">//<![CDATA[ <script type="text/javascript">//<![CDATA[

View File

@@ -17,12 +17,12 @@ $this->brick('pageTemplate');
<div id="fi" style="display: <?php echo empty($f['query']) ? 'none' : 'block' ?>;"><form <div id="fi" style="display: <?php echo empty($f['query']) ? 'none' : 'block' ?>;"><form
action="?profiles&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)"> action="?profiles&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
<div class="rightpanel"> <div class="rightpanel">
<div style="float: left"><?php echo Util::ucFirst(Lang::$game['class']).Lang::$main['colon']; ?></div> <div style="float: left"><?php echo Util::ucFirst(Lang::game('class')).Lang::main('colon'); ?></div>
<small><a href="javascript:;" onclick="document.forms['fi'].elements['cl[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::$main['clear']; ?></a></small> <small><a href="javascript:;" onclick="document.forms['fi'].elements['cl[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::main('clear'); ?></a></small>
<div class="clear"></div> <div class="clear"></div>
<select name="cl[]" size="7" multiple="multiple" class="rightselect" style="background-color: #181818"> <select name="cl[]" size="7" multiple="multiple" class="rightselect" style="background-color: #181818">
<?php <?php
foreach (Lang::$game['cl'] as $k => $str): foreach (Lang::game('cl') as $k => $str):
if ($str): if ($str):
echo ' <option class="c'.$k.'" value="'.$k.'"'.(isset($f['cl']) && in_array($k, (array)$f['cl']) ? ' selected' : null).'>'.$str."</option>\n"; echo ' <option class="c'.$k.'" value="'.$k.'"'.(isset($f['cl']) && in_array($k, (array)$f['cl']) ? ' selected' : null).'>'.$str."</option>\n";
endif; endif;
@@ -32,12 +32,12 @@ endforeach;
</div> </div>
<div class="rightpanel2"> <div class="rightpanel2">
<div style="float: left"><?php echo Util::ucFirst(Lang::$game['race']).Lang::$main['colon']; ?></div> <div style="float: left"><?php echo Util::ucFirst(Lang::game('race')).Lang::main('colon'); ?></div>
<small><a href="javascript:;" onclick="document.forms['fi'].elements['ra[]'].selectedIndex = -1; pr_onChangeRace(); return false" onmousedown="return false"><?php echo Lang::$main['clear']; ?></a></small> <small><a href="javascript:;" onclick="document.forms['fi'].elements['ra[]'].selectedIndex = -1; pr_onChangeRace(); return false" onmousedown="return false"><?php echo Lang::main('clear'); ?></a></small>
<div class="clear"></div> <div class="clear"></div>
<select name="ra[]" size="7" multiple="multiple" class="rightselect" onchange="pr_onChangeRace()"> <select name="ra[]" size="7" multiple="multiple" class="rightselect" onchange="pr_onChangeRace()">
<?php <?php
foreach (Lang::$game['ra'] as $k => $str): foreach (Lang::game('ra') as $k => $str):
if ($str && $k > 0): if ($str && $k > 0):
echo ' <option value="'.$k.'"'.(isset($f['ra']) && in_array($k, (array)$f['ra']) ? ' selected' : null).'>'.$str."</option>\n"; echo ' <option value="'.$k.'"'.(isset($f['ra']) && in_array($k, (array)$f['ra']) ? ' selected' : null).'>'.$str."</option>\n";
endif; endif;
@@ -49,47 +49,47 @@ endforeach;
<table> <table>
<tr> <tr>
<td><?php echo Util::ucFirst(Lang::$main['name']).Lang::$main['colon']; ?></td> <td><?php echo Util::ucFirst(Lang::main('name')).Lang::main('colon'); ?></td>
<td colspan="3"> <td colspan="3">
<table><tr> <table><tr>
<td>&nbsp;<input type="text" name="na" size="30" <?php echo isset($f['na']) ? 'value="'.Util::htmlEscape($f['na']).'" ' : null; ?>/></td> <td>&nbsp;<input type="text" name="na" size="30" <?php echo isset($f['na']) ? 'value="'.Util::htmlEscape($f['na']).'" ' : null; ?>/></td>
<td>&nbsp; <input type="checkbox" name="ex" value="on" id="profile-ex" <?php echo isset($f['ex']) ? 'checked="checked"' : null; ?>/></td> <td>&nbsp; <input type="checkbox" name="ex" value="on" id="profile-ex" <?php echo isset($f['ex']) ? 'checked="checked"' : null; ?>/></td>
<td><label for="profile-ex"><span class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, LANG.tooltip_exactprofilesearch, 0, 0, 'q')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"><?php echo Lang::$main['exactMatch']; ?></span></label></td> <td><label for="profile-ex"><span class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, LANG.tooltip_exactprofilesearch, 0, 0, 'q')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"><?php echo Lang::main('exactMatch'); ?></span></label></td>
</tr></table> </tr></table>
</td> </td>
</tr><tr> </tr><tr>
<td class="padded"><?php echo Lang::$main['region'].Lang::$main['colon']; ?></td> <td class="padded"><?php echo Lang::main('region').Lang::main('colon'); ?></td>
<td class="padded">&nbsp;<select name="rg" onchange="pr_onChangeRegion(this.form, null, null)"> <td class="padded">&nbsp;<select name="rg" onchange="pr_onChangeRegion(this.form, null, null)">
<option></option> <option></option>
<option value="us">US & Oceanic</option> <option value="us">US & Oceanic</option>
<option value="eu" selected="selected">Europe</option> <option value="eu" selected="selected">Europe</option>
</select>&nbsp;</td> </select>&nbsp;</td>
<td style="width:50px;" class="padded">&nbsp;&nbsp;&nbsp;<?php echo Lang::$main['realm'].Lang::$main['colon']; ?></td> <td style="width:50px;" class="padded">&nbsp;&nbsp;&nbsp;<?php echo Lang::main('realm').Lang::main('colon'); ?></td>
<td class="padded">&nbsp;<select name="sv"><option></option></select><input type="hidden" name="bg" value="" /></td> <td class="padded">&nbsp;<select name="sv"><option></option></select><input type="hidden" name="bg" value="" /></td>
</tr><tr> </tr><tr>
<td class="padded"><?php echo Lang::$main['side'].lang::$main['colon']; ?></td> <td class="padded"><?php echo Lang::main('side').Lang::main('colon'); ?></td>
<td class="padded" style="width:80px;">&nbsp;<select name="si"> <td class="padded" style="width:80px;">&nbsp;<select name="si">
<option></option> <option></option>
<option value="1"><?php echo Lang::$game['si'][1]; ?></option> <option value="1"><?php echo Lang::game('si', 1); ?></option>
<option value="2"><?php echo Lang::$game['si'][2]; ?></option> <option value="2"><?php echo Lang::game('si', 2); ?></option>
</select></td> </select></td>
<td class="padded">&nbsp;&nbsp;&nbsp;<?php echo Lang::$game['level'].Lang::$main['colon']; ?></td> <td class="padded">&nbsp;&nbsp;&nbsp;<?php echo Lang::game('level').Lang::main('colon'); ?></td>
<td class="padded">&nbsp;<input type="text" name="minle" maxlength="3" class="smalltextbox" <?php echo isset($f['minle']) ? 'value="'.$f['minle'].'" ' : null; ?>/> - <input type="text" name="maxle" maxlength="3" class="smalltextbox" <?php echo isset($f['maxle']) ? 'value="'.$f['maxle'].'" ' : null; ?>/></td> <td class="padded">&nbsp;<input type="text" name="minle" maxlength="3" class="smalltextbox" <?php echo isset($f['minle']) ? 'value="'.$f['minle'].'" ' : null; ?>/> - <input type="text" name="maxle" maxlength="3" class="smalltextbox" <?php echo isset($f['maxle']) ? 'value="'.$f['maxle'].'" ' : null; ?>/></td>
</tr> </tr>
</table> </table>
<div id="fi_criteria" class="padded criteria"><div></div></div> <div id="fi_criteria" class="padded criteria"><div></div></div>
<div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false"><?php echo Lang::$main['addFilter']; ?></a></div> <div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false"><?php echo Lang::main('addFilter'); ?></a></div>
<div class="padded2"> <div class="padded2">
<?php echo Lang::$main['match'].Lang::$main['colon']; ?><input type="radio" name="ma" value="" id="ma-0" <?php echo !isset($f['ma']) ? 'checked="checked" ' : null; ?>/><label for="ma-0"><?php echo Lang::$main['allFilter']; ?></label><input type="radio" name="ma" value="1" id="ma-1" <?php echo isset($f['ma']) ? 'checked="checked" ' : null; ?>/><label for="ma-1"><?php echo Lang::$main['oneFilter']; ?></label> <?php echo Lang::main('match').Lang::main('colon'); ?><input type="radio" name="ma" value="" id="ma-0" <?php echo !isset($f['ma']) ? 'checked="checked" ' : null; ?>/><label for="ma-0"><?php echo Lang::main('allFilter'); ?></label><input type="radio" name="ma" value="1" id="ma-1" <?php echo isset($f['ma']) ? 'checked="checked" ' : null; ?>/><label for="ma-1"><?php echo Lang::main('oneFilter'); ?></label>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
<div class="padded"> <div class="padded">
<input type="submit" value="<?php echo Lang::$main['applyFilter']; ?>" /> <input type="submit" value="<?php echo Lang::main('applyFilter'); ?>" />
<input type="reset" value="<?php echo Lang::$main['resetForm']; ?>" /> <input type="reset" value="<?php echo Lang::main('resetForm'); ?>" />
</div> </div>
</form> </form>

View File

@@ -18,17 +18,17 @@
<h1><?php echo $this->name; ?></h1> <h1><?php echo $this->name; ?></h1>
<?php if ($this->unavailable): ?> <?php if ($this->unavailable): ?>
<div class="pad"></div> <div class="pad"></div>
<b style="color: red"><?php echo Lang::$quest['unavailable']; ?></b> <b style="color: red"><?php echo Lang::quest('unavailable'); ?></b>
<?php <?php
endif; endif;
if ($this->objectives): if ($this->objectives):
echo $this->objectives."\n"; echo $this->objectives."\n";
elseif ($this->requestItems): elseif ($this->requestItems):
echo ' <h3>'.Lang::$quest['progress']."</h3>\n"; echo ' <h3>'.Lang::quest('progress')."</h3>\n";
echo $this->requestItems."\n"; echo $this->requestItems."\n";
elseif ($this->offerReward): elseif ($this->offerReward):
echo ' <h3>'.Lang::$quest['completion']."</h3>\n"; echo ' <h3>'.Lang::quest('completion')."</h3>\n";
echo $this->offerReward."\n"; echo $this->offerReward."\n";
endif; endif;
@@ -37,7 +37,7 @@ if ($e = $this->end):
<table class="iconlist"> <table class="iconlist">
<tr><th><p style="height: 26px; width: 30px;">&nbsp;</p></th><td><?php echo $e; ?></td></tr> <tr><th><p style="height: 26px; width: 30px;">&nbsp;</p></th><td><?php echo $e; ?></td></tr>
<?php if ($s = $this->suggestedPl): ?> <?php if ($s = $this->suggestedPl): ?>
<tr><th><p style="height: 26px; width: 30px;">&nbsp;</p></th><td><?php echo Lang::$quest['suggestedPl'].lang::$main['colon'].$s; ?></td></tr> <tr><th><p style="height: 26px; width: 30px;">&nbsp;</p></th><td><?php echo Lang::quest('suggestedPl').Lang::main('colon').$s; ?></td></tr>
<?php endif; ?> <?php endif; ?>
</table> </table>
<div class="pad"></div> <div class="pad"></div>
@@ -46,7 +46,7 @@ endif;
if ($o = $this->objectiveList): if ($o = $this->objectiveList):
if ($e = $this->end): if ($e = $this->end):
echo ' '.Lang::$quest['providedItem'].Lang::$main['colon']."\n"; echo ' '.Lang::quest('providedItem').Lang::main('colon')."\n";
endif; endif;
?> ?>
<table class="iconlist"> <table class="iconlist">
@@ -88,7 +88,7 @@ if ($o = $this->objectiveList):
endforeach; endforeach;
if ($this->suggestedPl && !$this->end): if ($this->suggestedPl && !$this->end):
echo ' <tr><th><p style="height: 26px; width: 30px;">&nbsp;</p></th><td>'.Lang::$quest['suggestedPl'].lang::$main['colon'].$this->suggestedPl."</td></tr>\n"; echo ' <tr><th><p style="height: 26px; width: 30px;">&nbsp;</p></th><td>'.Lang::quest('suggestedPl').Lang::main('colon').$this->suggestedPl."</td></tr>\n";
endif; endif;
?> ?>
</table> </table>
@@ -108,19 +108,19 @@ endif;
$this->brick('mapper'); $this->brick('mapper');
if ($this->details): if ($this->details):
echo ' <h3>'.Lang::$quest['description']."</h3>\n" . $this->details."\n"; echo ' <h3>'.Lang::quest('description')."</h3>\n" . $this->details."\n";
endif; endif;
if ($this->requestItems && $this->objectives): if ($this->requestItems && $this->objectives):
?> ?>
<h3><a href="javascript:;" class="disclosure-off" onclick="return g_disclose($WH.ge('disclosure-progress'), this)"><?php echo Lang::$quest['progress']; ?></a></h3> <h3><a href="javascript:;" class="disclosure-off" onclick="return g_disclose($WH.ge('disclosure-progress'), this)"><?php echo Lang::quest('progress'); ?></a></h3>
<div id="disclosure-progress" style="display: none"><?php echo $this->requestItems; ?></div> <div id="disclosure-progress" style="display: none"><?php echo $this->requestItems; ?></div>
<?php <?php
endif; endif;
if ($this->offerReward && ($this->requestItems || $this->objectives)): if ($this->offerReward && ($this->requestItems || $this->objectives)):
?> ?>
<h3><a href="javascript:;" class="disclosure-off" onclick="return g_disclose($WH.ge('disclosure-completion'), this)"><?php echo Lang::$quest['completion']; ?></a></h3> <h3><a href="javascript:;" class="disclosure-off" onclick="return g_disclose($WH.ge('disclosure-completion'), this)"><?php echo Lang::quest('completion'); ?></a></h3>
<div id="disclosure-completion" style="display: none"><?php echo $this->offerReward; ?></div> <div id="disclosure-completion" style="display: none"><?php echo $this->offerReward; ?></div>
<?php <?php
endif; endif;
@@ -128,10 +128,10 @@ endif;
if ($r = $this->rewards): if ($r = $this->rewards):
$offset = 0; $offset = 0;
echo ' <h3>'.Lang::$main['rewards']."</h3>\n"; echo ' <h3>'.Lang::main('rewards')."</h3>\n";
if (!empty($r['choice'])): if (!empty($r['choice'])):
$this->brick('rewards', ['rewTitle' => Lang::$quest['chooseItems'], 'rewards' => $r['choice'], 'offset' => $offset]); $this->brick('rewards', ['rewTitle' => Lang::quest('chooseItems'), 'rewards' => $r['choice'], 'offset' => $offset]);
$offset += count($r['choice']); $offset += count($r['choice']);
endif; endif;
@@ -141,10 +141,10 @@ if ($r = $this->rewards):
endif; endif;
if (!empty($r['spells']['learn'])): if (!empty($r['spells']['learn'])):
$this->brick('rewards', ['rewTitle' => Lang::$quest['spellLearn'], 'rewards' => $r['spells']['learn'], 'offset' => $offset, 'extra' => $r['spells']['extra']]); $this->brick('rewards', ['rewTitle' => Lang::quest('spellLearn'), 'rewards' => $r['spells']['learn'], 'offset' => $offset, 'extra' => $r['spells']['extra']]);
$offset += count($r['spells']['learn']); $offset += count($r['spells']['learn']);
elseif (!empty($r['spells']['cast'])): elseif (!empty($r['spells']['cast'])):
$this->brick('rewards', ['rewTitle' => Lang::$quest['spellCast'], 'rewards' => $r['spells']['cast'], 'offset' => $offset, 'extra' => $r['spells']['extra']]); $this->brick('rewards', ['rewTitle' => Lang::quest('spellCast'), 'rewards' => $r['spells']['cast'], 'offset' => $offset, 'extra' => $r['spells']['extra']]);
$offset += count($r['spells']['cast']); $offset += count($r['spells']['cast']);
endif; endif;
endif; endif;
@@ -155,7 +155,7 @@ if ($r = $this->rewards):
endif; endif;
$addData = ['rewards' => !empty($r['items']) ? $r['items'] : null, 'offset' => $offset, 'extra' => !empty($r['money']) ? $r['money'] : null]; $addData = ['rewards' => !empty($r['items']) ? $r['items'] : null, 'offset' => $offset, 'extra' => !empty($r['money']) ? $r['money'] : null];
$addData['rewTitle'] = empty($r['choice']) ? Lang::$quest['receiveItems'] : Lang::$quest['receiveAlso']; $addData['rewTitle'] = empty($r['choice']) ? Lang::quest('receiveItems') : Lang::quest('receiveAlso');
$this->brick('rewards', $addData); $this->brick('rewards', $addData);
endif; endif;
@@ -163,26 +163,26 @@ if ($r = $this->rewards):
endif; endif;
if ($g = $this->gains): if ($g = $this->gains):
echo ' <h3>'.Lang::$main['gains']."</h3>\n"; echo ' <h3>'.Lang::main('gains')."</h3>\n";
echo ' '.Lang::$quest['gainsDesc'].Lang::$main['colon']."\n"; echo ' '.Lang::quest('gainsDesc').Lang::main('colon')."\n";
echo " <ul>\n"; echo " <ul>\n";
if (!empty($g['xp'])): if (!empty($g['xp'])):
echo ' <li><div>'.number_format($g['xp']).' '.Lang::$quest['experience']."</div></li>\n"; echo ' <li><div>'.number_format($g['xp']).' '.Lang::quest('experience')."</div></li>\n";
endif; endif;
if (!empty($g['rep'])): if (!empty($g['rep'])):
foreach ($g['rep'] as $r): foreach ($g['rep'] as $r):
echo ' <li><div>'.($r['qty'] < 0 ? '<b class="q10">'.$r['qty'].'</b>' : $r['qty']).' '.Lang::$npc['repWith'].' <a href="?faction='.$r['id'].'">'.$r['name']."</a></div></li>\n"; echo ' <li><div>'.($r['qty'] < 0 ? '<b class="q10">'.$r['qty'].'</b>' : $r['qty']).' '.Lang::npc('repWith').' <a href="?faction='.$r['id'].'">'.$r['name']."</a></div></li>\n";
endforeach; endforeach;
endif; endif;
if (!empty($g['title'])): if (!empty($g['title'])):
echo ' <li><div>'.sprintf(Lang::$quest['theTitle'], $g['title'])."</div></li>\n"; echo ' <li><div>'.sprintf(Lang::quest('theTitle'), $g['title'])."</div></li>\n";
endif; endif;
if (!empty($g['tp'])): if (!empty($g['tp'])):
echo ' <li><div>'.$g['tp'].' '.Lang::$quest['bonusTalents']."</div></li>\n"; echo ' <li><div>'.$g['tp'].' '.Lang::quest('bonusTalents')."</div></li>\n";
endif; endif;
echo " </ul>\n"; echo " </ul>\n";
@@ -195,7 +195,7 @@ if (!empty($this->transfer)):
endif; endif;
?> ?>
<h2 class="clear"><?php echo Lang::$main['related']; ?></h2> <h2 class="clear"><?php echo Lang::main('related'); ?></h2>
</div> </div>
<?php <?php

View File

@@ -16,11 +16,11 @@ $this->brick('pageTemplate', ['fi' => empty($f['query']) ? null : ['query' => $f
<div id="fi" style="display: <?php echo empty($f['query']) ? 'none' : 'block' ?>;"> <div id="fi" style="display: <?php echo empty($f['query']) ? 'none' : 'block' ?>;">
<form action="?quests<?php echo $this->subCat; ?>&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)"> <form action="?quests<?php echo $this->subCat; ?>&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
<div class="rightpanel"> <div class="rightpanel">
<div style="float: left"><?php echo Lang::$game['type'].Lang::$main['colon']; ?></div><small><a href="javascript:;" onclick="document.forms['fi'].elements['ty[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::$main['clear']; ?></a></small> <div style="float: left"><?php echo Lang::game('type').Lang::main('colon'); ?></div><small><a href="javascript:;" onclick="document.forms['fi'].elements['ty[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::main('clear'); ?></a></small>
<div class="clear"></div> <div class="clear"></div>
<select name="ty[]" size="6" multiple="multiple" class="rightselect"> <select name="ty[]" size="6" multiple="multiple" class="rightselect">
<?php <?php
foreach (Lang::$quest['questInfo'] as $i => $str): foreach (Lang::quest('questInfo') as $i => $str):
echo ' <option value="'.$i.'"'.(isset($f['ty']) && in_array($i, (array)$f['ty']) ? ' selected' : null).'>'.$str."</option>\n"; echo ' <option value="'.$i.'"'.(isset($f['ty']) && in_array($i, (array)$f['ty']) ? ' selected' : null).'>'.$str."</option>\n";
endforeach; endforeach;
?> ?>
@@ -29,31 +29,31 @@ endforeach;
<table> <table>
<tr> <tr>
<td><?php echo Util::ucFirst(Lang::$main['name']).Lang::$main['colon']; ?></td> <td><?php echo Util::ucFirst(Lang::main('name')).Lang::main('colon'); ?></td>
<td colspan="3"> <td colspan="3">
<table><tr> <table><tr>
<td>&nbsp;<input type="text" name="na" size="30" <?php echo isset($f['na']) ? 'value="'.Util::htmlEscape($f['na']).'" ' : null; ?>/></td> <td>&nbsp;<input type="text" name="na" size="30" <?php echo isset($f['na']) ? 'value="'.Util::htmlEscape($f['na']).'" ' : null; ?>/></td>
<td>&nbsp; <input type="checkbox" name="ex" value="on" id="quest-ex" <?php echo isset($f['ex']) ? 'checked ' : null; ?>/></td> <td>&nbsp; <input type="checkbox" name="ex" value="on" id="quest-ex" <?php echo isset($f['ex']) ? 'checked ' : null; ?>/></td>
<td><label for="quest-ex"><span class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, LANG.tooltip_extendedquestsearch, 0, 0, 'q')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"><?php echo Lang::$main['extSearch']; ?></span></label></td> <td><label for="quest-ex"><span class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, LANG.tooltip_extendedquestsearch, 0, 0, 'q')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"><?php echo Lang::main('extSearch'); ?></span></label></td>
</tr></table> </tr></table>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="padded"><?php echo Lang::$game['level'].Lang::$main['colon']; ?></td> <td class="padded"><?php echo Lang::game('level').Lang::main('colon'); ?></td>
<td class="padded">&nbsp;<input type="text" name="minle" maxlength="2" class="smalltextbox" <?php echo isset($f['minle']) ? 'value="'.$f['minle'].'" ' : null; ?>/> - <input type="text" name="maxle" maxlength="2" class="smalltextbox" <?php echo isset($f['maxle']) ? 'value="'.$f['maxle'].'" ' : null; ?>/></td> <td class="padded">&nbsp;<input type="text" name="minle" maxlength="2" class="smalltextbox" <?php echo isset($f['minle']) ? 'value="'.$f['minle'].'" ' : null; ?>/> - <input type="text" name="maxle" maxlength="2" class="smalltextbox" <?php echo isset($f['maxle']) ? 'value="'.$f['maxle'].'" ' : null; ?>/></td>
<td class="padded" width="100%"> <td class="padded" width="100%">
<table><tr> <table><tr>
<td>&nbsp;&nbsp;&nbsp;<?php echo Lang::$main['_reqLevel'].Lang::$main['colon']; ?></td> <td>&nbsp;&nbsp;&nbsp;<?php echo Lang::main('_reqLevel').Lang::main('colon'); ?></td>
<td>&nbsp;<input type="text" name="minrl" maxlength="2" class="smalltextbox" <?php echo isset($f['minrl']) ? 'value="'.$f['minrl'].'" ' : null; ?>/> - <input type="text" name="maxrl" maxlength="2" class="smalltextbox" <?php echo isset($f['maxrl']) ? 'value="'.$f['maxrl'].'" ' : null; ?>/></td> <td>&nbsp;<input type="text" name="minrl" maxlength="2" class="smalltextbox" <?php echo isset($f['minrl']) ? 'value="'.$f['minrl'].'" ' : null; ?>/> - <input type="text" name="maxrl" maxlength="2" class="smalltextbox" <?php echo isset($f['maxrl']) ? 'value="'.$f['maxrl'].'" ' : null; ?>/></td>
</tr></table> </tr></table>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="padded"><?php echo Lang::$main['side'].Lang::$main['colon']; ?></td> <td class="padded"><?php echo Lang::main('side').Lang::main('colon'); ?></td>
<td class="padded" colspan="3">&nbsp;<select name="si"> <td class="padded" colspan="3">&nbsp;<select name="si">
<option></option> <option></option>
<?php <?php
foreach (Lang::$game['si'] as $i => $str): foreach (Lang::game('si') as $i => $str):
echo ' <option value="'.$i.'"'.(isset($f['si']) && $i == $f['si'] ? ' selected' : null).'>'.$str."</option>\n"; echo ' <option value="'.$i.'"'.(isset($f['si']) && $i == $f['si'] ? ' selected' : null).'>'.$str."</option>\n";
endforeach; endforeach;
?> ?>
@@ -61,18 +61,18 @@ endforeach;
</tr> </tr>
</table> </table>
<div id="fi_criteria" class="padded criteria"><div></div></div> <div id="fi_criteria" class="padded criteria"><div></div></div>
<div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false"><?php echo Lang::$main['addFilter']; ?></a></div> <div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false"><?php echo Lang::main('addFilter'); ?></a></div>
<div class="padded2 clear"> <div class="padded2 clear">
<div style="float: right"><?php echo Lang::$main['refineSearch']; ?></div> <div style="float: right"><?php echo Lang::main('refineSearch'); ?></div>
<?php echo Lang::$main['match'].Lang::$main['colon']; ?><input type="radio" name="ma" value="" id="ma-0" <?php echo !isset($f['ma']) ? 'checked="checked" ' : null ?>/><label for="ma-0"><?php echo Lang::$main['allFilter']; ?></label><input type="radio" name="ma" value="1" id="ma-1" <?php echo isset($f['ma']) ? 'checked="checked" ' : null ?> /><label for="ma-1"><?php echo Lang::$main['oneFilter']; ?></label> <?php echo Lang::main('match').Lang::main('colon'); ?><input type="radio" name="ma" value="" id="ma-0" <?php echo !isset($f['ma']) ? 'checked="checked" ' : null ?>/><label for="ma-0"><?php echo Lang::main('allFilter'); ?></label><input type="radio" name="ma" value="1" id="ma-1" <?php echo isset($f['ma']) ? 'checked="checked" ' : null ?> /><label for="ma-1"><?php echo Lang::main('oneFilter'); ?></label>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
<div class="padded"> <div class="padded">
<input type="submit" value="<?php echo Lang::$main['applyFilter']; ?>" /> <input type="submit" value="<?php echo Lang::main('applyFilter'); ?>" />
<input type="reset" value="<?php echo Lang::$main['resetForm']; ?>" /> <input type="reset" value="<?php echo Lang::main('resetForm'); ?>" />
</div> </div>
</form> </form>

View File

@@ -16,8 +16,8 @@ if (isset($this->error)):
<div class="pad3"></div> <div class="pad3"></div>
<div class="inputbox"> <div class="inputbox">
<h1><?php echo Lang::$main['prepError']; ?></h1> <h1><?php echo Lang::main('prepError'); ?></h1>
<div id="inputbox-error"><?php echo $this->error; ?><br><a href="<?php echo $this->destType ? '?'.Util::$typeStrings[$this->destType].'='.$this->destTypeId : 'javascript:history.back();'; ?>"><?php echo Lang::$main['back']; ?></a></div> <div id="inputbox-error"><?php echo $this->error; ?><br><a href="<?php echo $this->destType ? '?'.Util::$typeStrings[$this->destType].'='.$this->destTypeId : 'javascript:history.back();'; ?>"><?php echo Lang::main('back'); ?></a></div>
<?php <?php
else: else:
?> ?>
@@ -29,15 +29,15 @@ else:
?> ?>
<div id="ss-container" style="float:right;"></div> <div id="ss-container" style="float:right;"></div>
<div id="img-edit-form"> <div id="img-edit-form">
<span><?php echo Lang::$main['cropHint']; ?></span> <span><?php echo Lang::main('cropHint'); ?></span>
<div class="pad"></div> <div class="pad"></div>
<b><?php echo Lang::$main['caption'].Lang::$main['colon']; ?></b><br> <b><?php echo Lang::main('caption').Lang::main('colon'); ?></b><br>
<form action="?screenshot=finalize" method="post"> <form action="?screenshot=finalize" method="post">
<textarea style="resize: none;" name="screenshotcaption" cols="27" rows="4"><?php echo $this->caption; ?></textarea> <textarea style="resize: none;" name="screenshotcaption" cols="27" rows="4"><?php echo $this->caption; ?></textarea>
<div class="text-counter">text counter ph</div> <div class="text-counter">text counter ph</div>
<div style="clear:right;"></div> <div style="clear:right;"></div>
<input type="hidden" id="selection" name="selection" value=""></input> <input type="hidden" id="selection" name="selection" value=""></input>
<input type="submit" value="<?php echo Lang::$main['ssSubmit']; ?>"></input> <input type="submit" value="<?php echo Lang::main('ssSubmit'); ?>"></input>
</form> </form>
</div> </div>
<script type="text/javascript">//<![CDATA[ <script type="text/javascript">//<![CDATA[

View File

@@ -14,9 +14,9 @@ $this->brick('pageTemplate');
<a href="<?php echo Util::$wowheadLink; ?>" class="button-red"><em><b><i>Wowhead</i></b><span>Wowhead</span></em></a> <a href="<?php echo Util::$wowheadLink; ?>" class="button-red"><em><b><i>Wowhead</i></b><span>Wowhead</span></em></a>
<?php <?php
if ($this->lvTabs): if ($this->lvTabs):
echo ' <h1>'.Lang::$main['foundResult'].' <i>'.Util::htmlEscape($this->search).'</i>'; echo ' <h1>'.Lang::main('foundResult').' <i>'.Util::htmlEscape($this->search).'</i>';
if ($this->invalid): if ($this->invalid):
echo '<span class="sub">'.sprintf(Lang::$main['ignoredTerms'], implode(', ', $this->invalid)).'</span>'; echo '<span class="sub">'.sprintf(Lang::main('ignoredTerms'), implode(', ', $this->invalid)).'</span>';
endif; endif;
echo "</h1>\n"; echo "</h1>\n";
?> ?>
@@ -25,16 +25,16 @@ if ($this->lvTabs):
$this->brick('lvTabs'); $this->brick('lvTabs');
else: else:
echo ' <h1>'.Lang::$main['noResult'].' <i>'.Util::htmlEscape($this->search).'</i>'; echo ' <h1>'.Lang::main('noResult').' <i>'.Util::htmlEscape($this->search).'</i>';
if ($this->invalid): if ($this->invalid):
echo '<span class="sub">'.sprintf(Lang::$main['ignoredTerms'], implode(', ', $this->invalid)).'</span>'; echo '<span class="sub">'.sprintf(Lang::main('ignoredTerms'), implode(', ', $this->invalid)).'</span>';
endif; endif;
echo "</h1>\n"; echo "</h1>\n";
?> ?>
<div class="search-noresults"></div> <div class="search-noresults"></div>
<?php <?php
echo ' '.Lang::$main['tryAgain']."\n"; echo ' '.Lang::main('tryAgain')."\n";
endif; endif;
?> ?>
<div class="clear"></div> <div class="clear"></div>

View File

@@ -35,7 +35,7 @@ if ($this->reagents[1]):
echo " <div style=\"float: left\">\n"; echo " <div style=\"float: left\">\n";
endif; endif;
?> ?>
<h3><?php echo Lang::$spell['tools']; ?></h3> <h3><?php echo Lang::spell('tools'); ?></h3>
<table class="iconlist"> <table class="iconlist">
<?php <?php
foreach ($this->tools as $i => $t): foreach ($this->tools as $i => $t):
@@ -69,7 +69,7 @@ if (!empty($this->transfer)):
endif; endif;
?> ?>
<h3><?php echo Lang::$spell['_spellDetails']; ?></h3> <h3><?php echo Lang::spell('_spellDetails'); ?></h3>
<table class="grid" id="spelldetails"> <table class="grid" id="spelldetails">
<colgroup> <colgroup>
@@ -85,46 +85,46 @@ endif;
<td style="height: 0; padding: 0; border: 0" colspan="2"></td> <td style="height: 0; padding: 0; border: 0" colspan="2"></td>
</tr> </tr>
<tr> <tr>
<th style="border-left: 0; border-top: 0"><?php echo Lang::$game['duration']; ?></th> <th style="border-left: 0; border-top: 0"><?php echo Lang::game('duration'); ?></th>
<td width="100%" style="border-top: 0"><?php echo !empty($this->duration) ? $this->duration : '<span class="q0">'.Lang::$main['n_a'].'</span>'; ?></td> <td width="100%" style="border-top: 0"><?php echo !empty($this->duration) ? $this->duration : '<span class="q0">'.Lang::main('n_a').'</span>'; ?></td>
</tr> </tr>
<tr> <tr>
<th style="border-left: 0"><?php echo Lang::$game['school']; ?></th> <th style="border-left: 0"><?php echo Lang::game('school'); ?></th>
<td><?php echo User::isInGroup(U_GROUP_STAFF) ? sprintf(Util::$dfnString, $this->school[0], $this->school[1]) : $this->school[1]; ?></td> <td><?php echo User::isInGroup(U_GROUP_STAFF) ? sprintf(Util::$dfnString, $this->school[0], $this->school[1]) : $this->school[1]; ?></td>
</tr> </tr>
<tr> <tr>
<th style="border-left: 0"><?php echo Lang::$game['mechanic']; ?></th> <th style="border-left: 0"><?php echo Lang::game('mechanic'); ?></th>
<td width="100%" style="border-top: 0"><?php echo !empty($this->mechanic) ? $this->mechanic : '<span class="q0">'.Lang::$main['n_a'].'</span>'; ?></td> <td width="100%" style="border-top: 0"><?php echo !empty($this->mechanic) ? $this->mechanic : '<span class="q0">'.Lang::main('n_a').'</span>'; ?></td>
</tr> </tr>
<tr> <tr>
<th style="border-left: 0"><?php echo Lang::$game['dispelType']; ?></th> <th style="border-left: 0"><?php echo Lang::game('dispelType'); ?></th>
<td width="100%" style="border-top: 0"><?php echo !empty($this->dispel) ? $this->dispel : '<span class="q0">'.Lang::$main['n_a'].'</span>'; ?></td> <td width="100%" style="border-top: 0"><?php echo !empty($this->dispel) ? $this->dispel : '<span class="q0">'.Lang::main('n_a').'</span>'; ?></td>
</tr> </tr>
<tr> <tr>
<th style="border-bottom: 0; border-left: 0"><?php echo Lang::$spell['_gcdCategory']; ?></th> <th style="border-bottom: 0; border-left: 0"><?php echo Lang::spell('_gcdCategory'); ?></th>
<td style="border-bottom: 0"><?php echo !empty($this->gcdCat) ? $this->gcdCat : '<span class="q0">'.Lang::$main['n_a'].'</span>'; ?></td> <td style="border-bottom: 0"><?php echo !empty($this->gcdCat) ? $this->gcdCat : '<span class="q0">'.Lang::main('n_a').'</span>'; ?></td>
</tr> </tr>
</table> </table>
</td> </td>
</tr> </tr>
<tr> <tr>
<th style="border-top: 0"><?php echo Lang::$spell['_cost']; ?></th> <th style="border-top: 0"><?php echo Lang::spell('_cost'); ?></th>
<td style="border-top: 0"><?php echo !empty($this->powerCost) ? $this->powerCost : Lang::$spell['_none']; ?></td> <td style="border-top: 0"><?php echo !empty($this->powerCost) ? $this->powerCost : Lang::spell('_none'); ?></td>
</tr> </tr>
<tr> <tr>
<th><?php echo Lang::$spell['_range']; ?></th> <th><?php echo Lang::spell('_range'); ?></th>
<td><?php echo $this->range.' '.Lang::$spell['_distUnit'].' <small>('.$this->rangeName; ?>)</small></td> <td><?php echo $this->range.' '.Lang::spell('_distUnit').' <small>('.$this->rangeName; ?>)</small></td>
</tr> </tr>
<tr> <tr>
<th><?php echo Lang::$spell['_castTime']; ?></th> <th><?php echo Lang::spell('_castTime'); ?></th>
<td><?php echo $this->castTime; ?></td> <td><?php echo $this->castTime; ?></td>
</tr> </tr>
<tr> <tr>
<th><?php echo Lang::$spell['_cooldown']; ?></th> <th><?php echo Lang::spell('_cooldown'); ?></th>
<td><?php echo !empty($this->cooldown) ? $this->cooldown : '<span class="q0">'.Lang::$main['n_a'].'</span>'; ?></td> <td><?php echo !empty($this->cooldown) ? $this->cooldown : '<span class="q0">'.Lang::main('n_a').'</span>'; ?></td>
</tr> </tr>
<tr> <tr>
<th><dfn title="<?php echo Lang::$spell['_globCD'].'">'.Lang::$spell['_gcd']; ?></dfn></th> <th><dfn title="<?php echo Lang::spell('_globCD').'">'.Lang::spell('_gcd'); ?></dfn></th>
<td><?php echo $this->gcd; ?></td> <td><?php echo $this->gcd; ?></td>
</tr> </tr>
<?php <?php
@@ -132,13 +132,13 @@ endif;
if (!in_array(array_values($this->scaling), [[-1, -1, 0, 0], [0, 0, 0, 0]])): if (!in_array(array_values($this->scaling), [[-1, -1, 0, 0], [0, 0, 0, 0]])):
?> ?>
<tr> <tr>
<th><?php echo Lang::$spell['_scaling']; ?></th> <th><?php echo Lang::spell('_scaling'); ?></th>
<td colspan="3"> <td colspan="3">
<?php <?php
foreach ($this->scaling as $k => $s): foreach ($this->scaling as $k => $s):
if ($s > 0): if ($s > 0):
echo ' '.sprintf(Lang::$spell['scaling'][$k], $s * 100)."<br>\n"; echo ' '.sprintf(Lang::spell('scaling', $k), $s * 100)."<br>\n";
endif; endif;
endforeach; endforeach;
?> ?>
@@ -150,7 +150,7 @@ endif;
if (!empty($this->stances)): if (!empty($this->stances)):
?> ?>
<tr> <tr>
<th><?php echo Lang::$spell['_forms']; ?></th> <th><?php echo Lang::spell('_forms'); ?></th>
<td colspan="3"><?php echo $this->stances; ?></td> <td colspan="3"><?php echo $this->stances; ?></td>
</tr> </tr>
<?php <?php
@@ -159,7 +159,7 @@ endif;
if (!empty($this->items)): if (!empty($this->items)):
?> ?>
<tr> <tr>
<th><?php echo Lang::$game['requires2']; ?></th> <th><?php echo Lang::game('requires2'); ?></th>
<td colspan="3"><?php echo User::isInGroup(U_GROUP_STAFF) ? sprintf(Util::$dfnString, implode(' | ', $this->items[0]), $this->items[1]) : $this->items[1]; ?></td> <td colspan="3"><?php echo User::isInGroup(U_GROUP_STAFF) ? sprintf(Util::$dfnString, implode(' | ', $this->items[0]), $this->items[1]) : $this->items[1]; ?></td>
</tr> </tr>
<?php <?php
@@ -168,29 +168,29 @@ endif;
foreach ($this->effects as $i => $e): foreach ($this->effects as $i => $e):
?> ?>
<tr> <tr>
<th><?php echo Lang::$spell['_effect'].' #'.($i + 1); ?></th> <th><?php echo Lang::spell('_effect').' #'.($i + 1); ?></th>
<td colspan="3" style="line-height: 17px"> <td colspan="3" style="line-height: 17px">
<?php <?php
echo ' '.$e['name'].'<small>' . echo ' '.$e['name'].'<small>' .
(isset($e['value']) ? '<br>'.Lang::$spell['_value'] .Lang::$main['colon'].$e['value'] : null) . (isset($e['value']) ? '<br>'.Lang::spell('_value') .Lang::main('colon').$e['value'] : null) .
(isset($e['radius']) ? '<br>'.Lang::$spell['_radius'] .Lang::$main['colon'].$e['radius'].' '.Lang::$spell['_distUnit'] : null) . (isset($e['radius']) ? '<br>'.Lang::spell('_radius') .Lang::main('colon').$e['radius'].' '.Lang::spell('_distUnit') : null) .
(isset($e['interval']) ? '<br>'.Lang::$spell['_interval'].Lang::$main['colon'].$e['interval'] : null) . (isset($e['interval']) ? '<br>'.Lang::spell('_interval').Lang::main('colon').$e['interval'] : null) .
(isset($e['mechanic']) ? '<br>'.Lang::$game['mechanic'] .Lang::$main['colon'].$e['mechanic'] : null); (isset($e['mechanic']) ? '<br>'.Lang::game('mechanic') .Lang::main('colon').$e['mechanic'] : null);
if (isset($e['procData'])): if (isset($e['procData'])):
echo '<br>'; echo '<br>';
if ($e['procData'][0] < 0): if ($e['procData'][0] < 0):
echo sprintf(Lang::$spell['ppm'], -$e['procData'][0]); echo sprintf(Lang::spell('ppm'), -$e['procData'][0]);
elseif ($e['procData'][0] < 100.0): elseif ($e['procData'][0] < 100.0):
echo Lang::$spell['procChance'].Lang::$main['colon'].$e['procData'][0].'%'; echo Lang::spell('procChance').Lang::main('colon').$e['procData'][0].'%';
endif; endif;
if ($e['procData'][1]): if ($e['procData'][1]):
if ($e['procData'][0] < 100.0): if ($e['procData'][0] < 100.0):
echo '<br>'; echo '<br>';
endif; endif;
echo sprintf(Lang::$game['cooldown'], $e['procData'][1]); echo sprintf(Lang::game('cooldown'), $e['procData'][1]);
endif; endif;
endif; endif;
@@ -224,7 +224,7 @@ endforeach;
?> ?>
</table> </table>
<h2 class="clear"><?php echo Lang::$main['related']; ?></h2> <h2 class="clear"><?php echo Lang::main('related'); ?></h2>
</div> </div>
<?php <?php

View File

@@ -16,12 +16,12 @@ $this->brick('pageTemplate', ['fi' => empty($f['query']) ? null : ['query' => $f
<div id="fi" style="display: <?php echo empty($f['query']) ? 'none' : 'block' ?>;"> <div id="fi" style="display: <?php echo empty($f['query']) ? 'none' : 'block' ?>;">
<form action="?spells<?php echo $this->subCat; ?>&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)"> <form action="?spells<?php echo $this->subCat; ?>&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
<div class="rightpanel"> <div class="rightpanel">
<div style="float: left"><?php echo Lang::$game['school'].Lang::$main['colon']; ?></div> <div style="float: left"><?php echo Lang::game('school').Lang::main('colon'); ?></div>
<small><a href="javascript:;" onclick="document.forms['fi'].elements['sc[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::$main['clear']; ?></a></small> <small><a href="javascript:;" onclick="document.forms['fi'].elements['sc[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::main('clear'); ?></a></small>
<div class="clear"></div> <div class="clear"></div>
<select name="sc[]" size="7" multiple="multiple" class="rightselect" style="width: 8em"> <select name="sc[]" size="7" multiple="multiple" class="rightselect" style="width: 8em">
<?php <?php
foreach (Lang::$game['sc'] as $i => $str): foreach (Lang::game('sc') as $i => $str):
if ($str): if ($str):
echo ' <option value="'.$i.'"'.(isset($f['sc']) && in_array($i, (array)$f['sc']) ? ' selected' : null).'>'.$str."</option>\n"; echo ' <option value="'.$i.'"'.(isset($f['sc']) && in_array($i, (array)$f['sc']) ? ' selected' : null).'>'.$str."</option>\n";
endif; endif;
@@ -31,12 +31,12 @@ endforeach;
</div> </div>
<?php if ($f['classPanel']): ?> <?php if ($f['classPanel']): ?>
<div class="rightpanel2"> <div class="rightpanel2">
<div style="float: left"><?php echo Util::ucFirst(Lang::$game['class']).Lang::$main['colon']; ?></div> <div style="float: left"><?php echo Util::ucFirst(Lang::game('class')).Lang::main('colon'); ?></div>
<small><a href="javascript:;" onclick="document.forms['fi'].elements['cl[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::$main['clear']; ?></a></small> <small><a href="javascript:;" onclick="document.forms['fi'].elements['cl[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::main('clear'); ?></a></small>
<div class="clear"></div> <div class="clear"></div>
<select name="cl[]" size="8" multiple="multiple" class="rightselect" style="width: 8em; background-color: #181818"> <select name="cl[]" size="8" multiple="multiple" class="rightselect" style="width: 8em; background-color: #181818">
<?php <?php
foreach (Lang::$game['cl'] as $i => $str): foreach (Lang::game('cl') as $i => $str):
if ($str): if ($str):
echo ' <option value="'.$i.'"'.(isset($f['cl']) && in_array($i, (array)$f['cl']) ? ' selected' : null).' class="c'.$i.'">'.$str."</option>\n"; echo ' <option value="'.$i.'"'.(isset($f['cl']) && in_array($i, (array)$f['cl']) ? ' selected' : null).' class="c'.$i.'">'.$str."</option>\n";
endif; endif;
@@ -50,12 +50,12 @@ endif;
if ($f['glyphPanel']): if ($f['glyphPanel']):
?> ?>
<div class="rightpanel2"> <div class="rightpanel2">
<div style="float: left"><?php echo Util::ucFirst(Lang::$game['glyphType']).Lang::$main['colon']; ?></div> <div style="float: left"><?php echo Util::ucFirst(Lang::game('glyphType')).Lang::main('colon'); ?></div>
<small><a href="javascript:;" onclick="document.forms['fi'].elements['gl[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::$main['clear']; ?></a></small> <small><a href="javascript:;" onclick="document.forms['fi'].elements['gl[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::main('clear'); ?></a></small>
<div class="clear"></div> <div class="clear"></div>
<select name="gl[]" size="2" multiple="multiple" class="rightselect" style="width: 8em"> <select name="gl[]" size="2" multiple="multiple" class="rightselect" style="width: 8em">
<?php <?php
foreach (Lang::$game['gl'] as $i => $str): foreach (Lang::game('gl') as $i => $str):
if ($str): if ($str):
echo ' <option value="'.$i.'"'.(isset($f['gl']) && in_array($i, (array)$f['gl']) ? ' selected' : null).'>'.$str."</option>\n"; echo ' <option value="'.$i.'"'.(isset($f['gl']) && in_array($i, (array)$f['gl']) ? ' selected' : null).'>'.$str."</option>\n";
endif; endif;
@@ -66,29 +66,29 @@ endforeach;
<?php endif; ?> <?php endif; ?>
<table> <table>
<tr> <tr>
<td><?php echo Util::ucFirst(Lang::$main['name']).Lang::$main['colon']; ?></td> <td><?php echo Util::ucFirst(Lang::main('name')).Lang::main('colon'); ?></td>
<td colspan="2"> <td colspan="2">
<table><tr> <table><tr>
<td>&nbsp;<input type="text" name="na" size="30" <?php echo isset($f['na']) ? 'value="'.Util::htmlEscape($f['na']).'" ' : null; ?>/></td> <td>&nbsp;<input type="text" name="na" size="30" <?php echo isset($f['na']) ? 'value="'.Util::htmlEscape($f['na']).'" ' : null; ?>/></td>
<td>&nbsp; <input type="checkbox" name="ex" value="on" id="spell-ex" <?php echo isset($f['ex']) ? 'checked="checked" ' : null; ?>/></td> <td>&nbsp; <input type="checkbox" name="ex" value="on" id="spell-ex" <?php echo isset($f['ex']) ? 'checked="checked" ' : null; ?>/></td>
<td><label for="spell-ex"><span class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, LANG.tooltip_extendedspellsearch, 0, 0, 'q')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"><?php echo Lang::$main['extSearch']; ?></span></label></td> <td><label for="spell-ex"><span class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, LANG.tooltip_extendedspellsearch, 0, 0, 'q')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"><?php echo Lang::main('extSearch'); ?></span></label></td>
</tr></table> </tr></table>
</td> </td>
</tr><tr> </tr><tr>
<td class="padded"><?php echo Lang::$game['level'].Lang::$main['colon']; ?></td> <td class="padded"><?php echo Lang::game('level').Lang::main('colon'); ?></td>
<td class="padded">&nbsp;<input type="text" name="minle" maxlength="2" class="smalltextbox" <?php echo isset($f['minle']) ? 'value="'.$f['minle'].'" ' : null; ?>/> - <input type="text" name="maxle" maxlength="2" class="smalltextbox" <?php echo isset($f['maxle']) ? 'value="'.$f['maxle'].'" ' : null; ?>/></td> <td class="padded">&nbsp;<input type="text" name="minle" maxlength="2" class="smalltextbox" <?php echo isset($f['minle']) ? 'value="'.$f['minle'].'" ' : null; ?>/> - <input type="text" name="maxle" maxlength="2" class="smalltextbox" <?php echo isset($f['maxle']) ? 'value="'.$f['maxle'].'" ' : null; ?>/></td>
<td class="padded"> <td class="padded">
<table cellpadding="0" cellspacing="0" border="0"><tr> <table cellpadding="0" cellspacing="0" border="0"><tr>
<td>&nbsp;&nbsp;&nbsp;<?php echo Lang::$game['reqSkillLevel'].Lang::$main['colon']; ?></td> <td>&nbsp;&nbsp;&nbsp;<?php echo Lang::game('reqSkillLevel').Lang::main('colon'); ?></td>
<td>&nbsp;<input type="text" name="minrs" maxlength="3" class="smalltextbox2" <?php echo isset($f['minrs']) ? 'value="'.$f['minrs'].'" ' : null; ?>/> - <input type="text" name="maxrs" maxlength="3" class="smalltextbox2" <?php echo isset($f['maxrs']) ? 'value="'.$f['maxrs'].'" ' : null; ?>/></td> <td>&nbsp;<input type="text" name="minrs" maxlength="3" class="smalltextbox2" <?php echo isset($f['minrs']) ? 'value="'.$f['minrs'].'" ' : null; ?>/> - <input type="text" name="maxrs" maxlength="3" class="smalltextbox2" <?php echo isset($f['maxrs']) ? 'value="'.$f['maxrs'].'" ' : null; ?>/></td>
</tr></table> </tr></table>
</td> </td>
</tr><tr> </tr><tr>
<td class="padded"><?php echo Util::ucFirst(Lang::$game['race']).Lang::$main['colon']; ?></td> <td class="padded"><?php echo Util::ucFirst(Lang::game('race')).Lang::main('colon'); ?></td>
<td class="padded">&nbsp;<select name="ra"> <td class="padded">&nbsp;<select name="ra">
<option></option> <option></option>
<?php <?php
foreach (Lang::$game['ra'] as $i => $str): foreach (Lang::game('ra') as $i => $str):
if ($str && $i > 0): if ($str && $i > 0):
echo ' <option value="'.$i.'"'.(isset($f['ra']) && $f['ra'] == $i ? ' selected' : null).'>'.$str."</option>\n"; echo ' <option value="'.$i.'"'.(isset($f['ra']) && $f['ra'] == $i ? ' selected' : null).'>'.$str."</option>\n";
endif; endif;
@@ -97,11 +97,11 @@ endforeach;
</select></td> </select></td>
<td class="padded"></td> <td class="padded"></td>
</tr><tr> </tr><tr>
<td class="padded"><?php echo Lang::$game['mechAbbr'].Lang::$main['colon']; ?></td> <td class="padded"><?php echo Lang::game('mechAbbr').Lang::main('colon'); ?></td>
<td class="padded">&nbsp;<select name="me"> <td class="padded">&nbsp;<select name="me">
<option></option> <option></option>
<?php <?php
foreach (Lang::$game['me'] as $i => $str): foreach (Lang::game('me') as $i => $str):
if ($str): if ($str):
echo ' <option value="'.$i.'"'.(isset($f['me']) && $f['me'] == $i ? ' selected' : null).'>'.$str."</option>\n"; echo ' <option value="'.$i.'"'.(isset($f['me']) && $f['me'] == $i ? ' selected' : null).'>'.$str."</option>\n";
endif; endif;
@@ -110,11 +110,11 @@ endforeach;
</select></td> </select></td>
<td> <td>
<table cellpadding="0" cellspacing="0" border="0"><tr> <table cellpadding="0" cellspacing="0" border="0"><tr>
<td class="padded">&nbsp;&nbsp;&nbsp;<?php echo Lang::$game['dispelType'].Lang::$main['colon']; ?></td> <td class="padded">&nbsp;&nbsp;&nbsp;<?php echo Lang::game('dispelType').Lang::main('colon'); ?></td>
<td class="padded">&nbsp;<select name="dt"> <td class="padded">&nbsp;<select name="dt">
<option></option> <option></option>
<?php <?php
foreach (Lang::$game['dt'] as $i => $str): foreach (Lang::game('dt') as $i => $str):
if ($str): if ($str):
echo ' <option value="'.$i.'"'.(isset($f['dt']) && $f['dt'] == $i ? ' selected' : null).'>'.$str."</option>\n"; echo ' <option value="'.$i.'"'.(isset($f['dt']) && $f['dt'] == $i ? ' selected' : null).'>'.$str."</option>\n";
endif; endif;
@@ -127,18 +127,18 @@ endforeach;
</table> </table>
<div id="fi_criteria" class="padded criteria"><div></div></div> <div id="fi_criteria" class="padded criteria"><div></div></div>
<div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false"><?php echo Lang::$main['addFilter']; ?></a></div> <div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false"><?php echo Lang::main('addFilter'); ?></a></div>
<div class="padded2"> <div class="padded2">
<div style="float: right"><?php echo Lang::$main['refineSearch']; ?></div> <div style="float: right"><?php echo Lang::main('refineSearch'); ?></div>
<?php echo Lang::$main['match'].Lang::$main['colon']; ?><input type="radio" name="ma" value="" id="ma-0" <?php echo !isset($f['ma']) ? 'checked="checked" ' : null ?>/><label for="ma-0"><?php echo Lang::$main['allFilter']; ?></label><input type="radio" name="ma" value="1" id="ma-1" <?php echo isset($f['ma']) ? 'checked="checked" ' : null ?> /><label for="ma-1"><?php echo Lang::$main['oneFilter']; ?></label> <?php echo Lang::main('match').Lang::main('colon'); ?><input type="radio" name="ma" value="" id="ma-0" <?php echo !isset($f['ma']) ? 'checked="checked" ' : null ?>/><label for="ma-0"><?php echo Lang::main('allFilter'); ?></label><input type="radio" name="ma" value="1" id="ma-1" <?php echo isset($f['ma']) ? 'checked="checked" ' : null ?> /><label for="ma-1"><?php echo Lang::main('oneFilter'); ?></label>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
<div class="padded"> <div class="padded">
<input type="submit" value="<?php echo Lang::$main['applyFilter']; ?>" /> <input type="submit" value="<?php echo Lang::main('applyFilter'); ?>" />
<input type="reset" value="<?php echo Lang::$main['resetForm']; ?>" /> <input type="reset" value="<?php echo Lang::main('resetForm'); ?>" />
</div> </div>
</form> </form>

View File

@@ -12,7 +12,7 @@
<div id="<?php echo $this->tcType; ?>-classes"> <div id="<?php echo $this->tcType; ?>-classes">
<div id="<?php echo $this->tcType; ?>-classes-outer"> <div id="<?php echo $this->tcType; ?>-classes-outer">
<div id="<?php echo $this->tcType; ?>-classes-inner"><p><?php echo ($this->tcType == 'tc' ? Lang::$main['chooseClass'] : Lang::$main['chooseFamily']) . Lang::$main['colon']; ?></p></div> <div id="<?php echo $this->tcType; ?>-classes-inner"><p><?php echo ($this->tcType == 'tc' ? Lang::main('chooseClass') : Lang::main('chooseFamily')) . Lang::main('colon'); ?></p></div>
</div> </div>
</div> </div>
<div id="<?php echo $this->tcType; ?>-itself"></div> <div id="<?php echo $this->tcType; ?>-itself"></div>

View File

@@ -15,7 +15,7 @@ if (isset($this->typeStr)):
<div class="inputbox"> <div class="inputbox">
<h1><?php echo Util::ucFirst($this->typeStr).' #'.$this->typeId; ?></h1> <h1><?php echo Util::ucFirst($this->typeStr).' #'.$this->typeId; ?></h1>
<div id="inputbox-error"><?php echo sprintf(Lang::$main['pageNotFound'], $this->typeStr); ?></div> <div id="inputbox-error"><?php echo sprintf(Lang::main('pageNotFound'), $this->typeStr); ?></div>
<?php <?php
else: else:
?> ?>