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
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;
}
@@ -404,13 +404,13 @@ class AjaxHandler
$val *= -1;
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'])
$result = ['error' => 1, 'message' => Lang::$main['genericError']];
$result = ['error' => 1, 'message' => Lang::main('genericError')];
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)
break;
@@ -425,7 +425,7 @@ class AjaxHandler
if (!$ok)
{
$result = ['error' => 1, 'message' => Lang::$main['genericError']];
$result = ['error' => 1, 'message' => Lang::main('genericError')];
break;
}
@@ -481,7 +481,7 @@ class AjaxHandler
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"
$result = Lang::$main['genericError'];
$result = Lang::main('genericError');
break;
case 'show-replies':
$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.'.';
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']))
$result = CommunityContent::getCommentReplies($this->post['commentId']);
else
$result = Lang::$main['genericError'];
$result = Lang::main('genericError');
break;
case 'edit-reply': // also returns all replies on success
@@ -508,7 +508,7 @@ class AjaxHandler
$result = 'You are not allowed to reply.';
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)
$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
);
$result = $ok ? CommunityContent::getCommentReplies($this->post['commentId']) : Lang::$main['genericError'];
$result = $ok ? CommunityContent::getCommentReplies($this->post['commentId']) : Lang::main('genericError');
break;
case 'detach-reply':
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
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;
// link to quest
case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST:
@@ -209,7 +209,7 @@ class AchievementList extends BaseType
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>';
}
if ($description || $criteria)

View File

@@ -549,10 +549,10 @@ trait spawnHelper
{
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'])
$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];
@@ -573,26 +573,26 @@ trait spawnHelper
$label = [];
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'])
$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 ($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)
$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'])
{
$_ = [];
for ($i = 0; $i < 4; $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 = '??';
$type = $this->curTpl['type'];
$row3 = [Lang::$game['level']];
$row3 = [Lang::game('level')];
$fam = $this->curTpl['family'];
if (!($this->curTpl['typeFlags'] & 0x4))
@@ -71,9 +71,9 @@ class CreatureList extends BaseType
$row3[] = $level;
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 .= '<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>';
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')]));
if (!$fac->error)

View File

@@ -487,7 +487,7 @@ class ItemList extends BaseType
// heroic tag
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)
if ($_ = $this->curTpl['map'])
@@ -505,44 +505,44 @@ class ItemList extends BaseType
// conjured
if ($_flags & ITEM_FLAG_CONJURED)
$x .= '<br />'.Lang::$item['conjured'];
$x .= '<br />'.Lang::item('conjured');
// bonding
if ($_flags & ITEM_FLAG_ACCOUNTBOUND)
$x .= '<br /><!--bo-->'.Lang::$item['bonding'][0];
$x .= '<br /><!--bo-->'.Lang::item('bonding', 0);
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
if ($this->curTpl['maxCount'] > 0)
{
$x .= '<br />'.Lang::$item['unique'];
$x .= '<br />'.Lang::item('unique');
if ($this->curTpl['maxCount'] > 1)
$x .= ' ('.$this->curTpl['maxCount'].')';
}
else if ($_flags & ITEM_FLAG_UNIQUEEQUIPPED)
$x .= '<br />'.Lang::$item['uniqueEquipped'];
$x .= '<br />'.Lang::item('uniqueEquipped');
else if ($this->curTpl['itemLimitCategory'])
{
$limit = DB::Aowow()->selectRow("SELECT * FROM ?_itemlimitcategory WHERE id = ?", $this->curTpl['itemLimitCategory']);
$x .= '<br />'.($limit['isGem'] ? Lang::$item['uniqueEquipped'] : Lang::$item['unique']).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
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
if ($hId = $this->curTpl['holidayId'])
{
$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
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)
if ($this->curTpl['slots'] > 0)
@@ -551,9 +551,9 @@ class ItemList extends BaseType
// word order differs <_<
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
$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]))
@@ -561,20 +561,20 @@ class ItemList extends BaseType
$x .= '<table width="100%"><tr>';
// Class
$x .= '<td>'.Lang::$item['inventoryType'][$_slot].'</td>';
$x .= '<td>'.Lang::item('inventoryType', $_slot).'</td>';
// Subclass
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)
$x .= '<th>'.Lang::$item['weaponSubClass'][$_subClass].'</th>';
$x .= '<th>'.Lang::item('weaponSubClass', $_subClass).'</th>';
else if ($_class == ITEM_CLASS_AMMUNITION)
$x .= '<th>'.Lang::$item['projectileSubClass'][$_subClass].'</th>';
$x .= '<th>'.Lang::item('projectileSubClass', $_subClass).'</th>';
$x .= '</tr></table>';
}
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
$x .= '<br />';
@@ -585,29 +585,29 @@ class ItemList extends BaseType
$dps = $speed ? ($dmgmin1 + $dmgmax1) / (2 * $speed) : 0;
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)
{
if ($_class == ITEM_CLASS_WEAPON)
{
$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 .= '<th>'.Lang::$item['speed'].' <!--spd-->'.number_format($speed, 2).'</th>';
$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 .= '</tr></table>';
}
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
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)
$x .= '<!--dps-->('.number_format($dps, 1).' '.Lang::$item['dps'].')<br />';
$x .= '<!--dps-->('.number_format($dps, 1).' '.Lang::item('dps').')<br />';
// display FeralAttackPower if set
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
@@ -617,14 +617,14 @@ class ItemList extends BaseType
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()"';
$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)
$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
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)
if ($geId = $this->curTpl['gemEnchantmentId'])
@@ -647,10 +647,10 @@ class ItemList extends BaseType
case 2: // requires less <color> than (<value> || <comparecolor>) gems
case 5: // requires at least <color> than (<value> || <comparecolor>) gems
$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;
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;
}
}
@@ -660,7 +660,7 @@ class ItemList extends BaseType
// Random Enchantment - if random enchantment is set, prepend stats from it
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']))
$x .= $randEnchant;
@@ -675,7 +675,7 @@ class ItemList extends BaseType
// base stat
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
$green[] = $this->parseRating($type, $qty, $interactive, $causesScaling);
}
@@ -683,7 +683,7 @@ class ItemList extends BaseType
// magic resistances
foreach (Util::$resistanceFields as $j => $rowName)
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
if (isset($enhance['e']))
@@ -735,7 +735,7 @@ class ItemList extends BaseType
$col = $pop ? 1 : 0;
$hasMatch &= $pop ? (($gems[$pop]['colorMask'] & (1 << $colorId)) ? 1 : 0) : 0;
$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)
$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']);
$col = $pop ? 1 : 0;
$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)
$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'])
{
$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
if ($dur = $this->curTpl['durability'])
$x .= Lang::$item['durability'].' '.$dur.' / '.$dur.'<br />';
$x .= Lang::item('durability').' '.$dur.' / '.$dur.'<br />';
// required classes
if ($classes = Lang::getClassString($this->curTpl['requiredClass'], $jsg, $__))
@@ -776,7 +776,7 @@ class ItemList extends BaseType
if (empty($this->jsGlobals[TYPE_CLASS][$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
@@ -786,30 +786,30 @@ class ItemList extends BaseType
if (empty($this->jsGlobals[TYPE_RACE][$js]))
$this->jsGlobals[TYPE_RACE][$js] = $js;
if ($races != Lang::$game['ra'][0]) // not "both", but display combinations like: troll, dwarf
$x .= Lang::$game['races'].Lang::$main['colon'].$races.'<br />';
if ($races != Lang::game('ra', 0)) // not "both", but display combinations like: troll, dwarf
$x .= Lang::game('races').Lang::main('colon').$races.'<br />';
}
// required honorRank (not used anymore)
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..?
// what the f..
// required level
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)
$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
if (!empty($this->getExtendedCost([], $reqRating)[$this->id]) && $reqRating)
$x .= sprintf(Lang::$item['reqRating'], $reqRating).'<br />';
$x .= sprintf(Lang::item('reqRating'), $reqRating).'<br />';
// item level
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
if ($reqSkill = $this->curTpl['requiredSkill'])
@@ -818,22 +818,22 @@ class ItemList extends BaseType
if ($this->curTpl['requiredSkillRank'] > 0)
$_ .= ' ('.$this->curTpl['requiredSkillRank'].')';
$x .= sprintf(Lang::$game['requires'], $_).'<br />';
$x .= sprintf(Lang::game('requires'), $_).'<br />';
}
// required spell
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
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
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)
$x .= '<span class="q2">'.Lang::$item['openClick'].'</span><br />';
$x .= '<span class="q2">'.Lang::item('openClick').'</span><br />';
// upper table: done
if (!$subOf)
@@ -851,7 +851,7 @@ class ItemList extends BaseType
if ($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];
}
@@ -879,7 +879,7 @@ class ItemList extends BaseType
$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
{
$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'))
$xSet .= ' ('.$_.')';
@@ -959,7 +959,7 @@ class ItemList extends BaseType
$setSpells[$i] = $setSpells[$j];
$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)
$xSet .= '<br />';
}
@@ -974,7 +974,7 @@ class ItemList extends BaseType
{
$xCraft = '';
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
if ($_class == ITEM_CLASS_RECIPE || $this->curTpl['bagFamily'] == 16)
@@ -998,7 +998,7 @@ class ItemList extends BaseType
foreach ($reagents->iterate() as $__)
$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
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))
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
if (isset($xCraft))
@@ -1032,7 +1032,7 @@ class ItemList extends BaseType
$x .= implode('<br />', $xMisc);
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)
$x .= '</td></tr></table>';
@@ -1277,10 +1277,10 @@ class ItemList extends BaseType
$reqLvl = $this->curTpl['requiredLevel'] > 1 ? $this->curTpl['requiredLevel'] : MAX_LEVEL;
$level = min(max($reqLvl, $ssdLvl), MAX_LEVEL);
if (!Lang::$item['statType'][$type]) // unknown rating
return sprintf(Lang::$item['statType'][count(Lang::$item['statType']) - 1], $type, $value);
if (!Lang::item('statType', $type)) // unknown rating
return sprintf(Lang::item('statType', count(Lang::item('statType')) - 1), $type, $value);
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
{
$scaling = true;
@@ -1290,7 +1290,7 @@ class ItemList extends BaseType
else
$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>';
else if ($d = $this->getField('description'))
$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>';
return $x;

View File

@@ -281,10 +281,10 @@ class QuestList extends BaseType
$x = '';
if ($level)
{
$level = sprintf(Lang::$quest['questLevel'], $level);
$level = sprintf(Lang::quest('questLevel'), $level);
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>';
}
@@ -329,10 +329,10 @@ class QuestList extends BaseType
if ($_ = $this->getField('rewardOrReqMoney'))
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)
$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>';

View File

@@ -503,19 +503,19 @@ class SpellList extends BaseType
// minRange exists; show as range
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
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"
else if ($this->curTpl['rangeMaxHostile'] == 5)
return Lang::$spell['meleeRange'];
return Lang::spell('meleeRange');
// hardcode "unlimited range"
else if ($this->curTpl['rangeMaxHostile'] == 50000)
return Lang::$spell['unlimRange'];
return Lang::spell('unlimRange');
// regular case
else
return sprintf(Lang::$spell['range'], $this->curTpl['rangeMaxHostile']);
return sprintf(Lang::spell('range'), $this->curTpl['rangeMaxHostile']);
}
public function createPowerCostForCurrent()
@@ -527,29 +527,29 @@ class SpellList extends BaseType
// power cost: pct over static
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)
$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))
{ // Blood 2|1 - Unholy 2|1 - Frost 2|1
$runes = [];
if ($_ = (($rCost & 0x300) >> 8))
$runes[] = $_.' '.Lang::$spell['powerRunes'][2];
$runes[] = $_.' '.Lang::spell('powerRunes', 2);
if ($_ = (($rCost & 0x030) >> 4))
$runes[] = $_.' '.Lang::$spell['powerRunes'][1];
$runes[] = $_.' '.Lang::spell('powerRunes', 1);
if ($_ = ($rCost & 0x003))
$runes[] = $_.' '.Lang::$spell['powerRunes'][0];
$runes[] = $_.' '.Lang::spell('powerRunes', 0);
$str .= implode(', ', $runes);
}
// append periodic cost
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)
if ($this->curTpl['powerCostPerLevel'] > 0)
$str .= sprintf(Lang::$spell['costPerLevel'], $this->curTpl['powerCostPerLevel']);
$str .= sprintf(Lang::spell('costPerLevel'), $this->curTpl['powerCostPerLevel']);
return $str;
}
@@ -557,25 +557,25 @@ class SpellList extends BaseType
public function createCastTimeForCurrent($short = true, $noInstant = true)
{
if ($this->curTpl['interruptFlagsChannel'])
return Lang::$spell['channeled'];
return Lang::spell('channeled');
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))
else if ($noInstant && !in_array($this->curTpl['typeCat'], [11, 7, -3, -6, -8, 0]) && !($this->curTpl['cuFlags'] & SPELL_CU_TALENTSPELL))
return '';
// SPELL_ATTR0_ABILITY instant ability.. yeah, wording thing only (todo (low): rule is imperfect)
else if ($this->curTpl['damageClass'] != 1 || $this->curTpl['attributes0'] & 0x10)
return Lang::$spell['instantPhys'];
return Lang::spell('instantPhys');
else // instant cast
return Lang::$spell['instantMagic'];
return Lang::spell('instantMagic');
}
private function createCooldownForCurrent()
{
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'])
return sprintf(Lang::$game['cooldown'], Util::formatTime($this->curTpl['recoveryCategory'], true));
return sprintf(Lang::game('cooldown'), Util::formatTime($this->curTpl['recoveryCategory'], true));
else
return '';
}
@@ -686,17 +686,17 @@ class SpellList extends BaseType
// if (character level is set manually (profiler only))
// $pl = $PL = $this->charLevel;
$PlayerName = Lang::$main['name'];
$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'];
$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'];
$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'];
$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'];
$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'];
$PlayerName = Lang::main('name');
$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');
$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');
$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');
$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');
$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');
$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';
@@ -815,7 +815,7 @@ class SpellList extends BaseType
$base = $this->getField('duration');
if ($base <= 0)
return Lang::$spell['untilCanceled'];
return Lang::spell('untilCanceled');
if ($op && is_numeric($oparg) && is_numeric($base))
eval("\$base = $base $op $oparg;");
@@ -948,9 +948,9 @@ class SpellList extends BaseType
eval("\$min = $min $op $oparg;");
if ($this->interactive)
return $modStrMin.$min . (!$equal ? Lang::$game['valueDelim'] . $modStrMax.$max : null);
return $modStrMin.$min . (!$equal ? Lang::game('valueDelim') . $modStrMax.$max : null);
else
return $min . (!$equal ? Lang::$game['valueDelim'] . $max : null);
return $min . (!$equal ? Lang::game('valueDelim') . $max : null);
case 'q': // EffectMiscValue
case 'Q':
if ($lookup)
@@ -1008,9 +1008,9 @@ class SpellList extends BaseType
else if ($rType && $equal && $aura == 189)
return '<!--rtg'.$rType.'-->'.$min.'&nbsp;<small>('.Util::setRatingLevel($this->charLevel, $rType, $min).')</small>';
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
return $min . (!$equal ? Lang::$game['valueDelim'] . $max : null);
return $min . (!$equal ? Lang::game('valueDelim') . $max : null);
case 't': // Periode
case 'T':
if ($lookup)
@@ -1056,7 +1056,7 @@ class SpellList extends BaseType
return $base;
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>';
// 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 .= '</tr></table>';
@@ -1469,7 +1469,7 @@ Lasts 5 min. $?$gte($pl,68)[][Cannot be used on items level 138 and higher.]
// duration
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>';
@@ -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)
$stances = '';
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)
$reqItems = '';
@@ -1576,7 +1576,7 @@ Lasts 5 min. $?$gte($pl,68)[][Cannot be used on items level 138 and higher.]
if ($tools)
{
$_ = Lang::$spell['tools'].':<br/><div class="indent q1">';
$_ = Lang::spell('tools').':<br/><div class="indent q1">';
while ($tool = array_pop($tools))
{
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)
{
$_ = Lang::$spell['reagents'].':<br/><div class="indent q1">';
$_ = Lang::spell('reagents').':<br/><div class="indent q1">';
while ($reagent = array_pop($reagents))
{
$_ .= '<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)
$xTmp[] = Lang::$game['requires2'].' '.$reqItems;
$xTmp[] = Lang::game('requires2').' '.$reqItems;
if ($desc[0])
$xTmp[] = '<span class="q">'.$desc[0].'</span>';

View File

@@ -156,7 +156,7 @@ class TitleList extends BaseType
public function getHtmlizedName($gender = GENDER_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() { }

View File

@@ -813,45 +813,45 @@ class Util
if ($short)
{
if ($_ = round($s['d'] / 364))
return $_." ".Lang::$timeUnits['ab'][0];
return $_." ".Lang::timeUnits('ab', 0);
if ($_ = round($s['d'] / 30))
return $_." ".Lang::$timeUnits['ab'][1];
return $_." ".Lang::timeUnits('ab', 1);
if ($_ = round($s['d'] / 7))
return $_." ".Lang::$timeUnits['ab'][2];
return $_." ".Lang::timeUnits('ab', 2);
if ($_ = round($s['d']))
return $_." ".Lang::$timeUnits['ab'][3];
return $_." ".Lang::timeUnits('ab', 3);
if ($_ = round($s['h']))
return $_." ".Lang::$timeUnits['ab'][4];
return $_." ".Lang::timeUnits('ab', 4);
if ($_ = round($s['m']))
return $_." ".Lang::$timeUnits['ab'][5];
return $_." ".Lang::timeUnits('ab', 5);
if ($_ = round($s['s'] + $s['ms'] / 1000, 2))
return $_." ".Lang::$timeUnits['ab'][6];
return $_." ".Lang::timeUnits('ab', 6);
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
{
$_ = $s['d'] + $s['h'] / 24;
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
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
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'])
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'])
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'])
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'])
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'])
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);
$pairs = array(
'$c' => '&lt;'.Lang::$game['class'].'&gt;',
'$C' => '&lt;'.Lang::$game['class'].'&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;',
'$c' => '&lt;'.Lang::game('class').'&gt;',
'$C' => '&lt;'.Lang::game('class').'&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;',
'$b' => '<br />',
'$B' => '<br />',
'|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)))
$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')

View File

@@ -2,28 +2,28 @@
class Lang
{
public static $timeUnits;
public static $main;
public static $account;
public static $mail;
public static $game;
private static $timeUnits;
private static $main;
private static $account;
private static $mail;
private static $game;
public static $achievement;
public static $class;
public static $currency;
public static $event;
public static $faction;
public static $gameObject;
public static $item;
public static $itemset;
public static $maps;
public static $npc;
public static $pet;
public static $quest;
public static $skill;
public static $spell;
public static $title;
public static $zone;
private static $achievement;
private static $class;
private static $currency;
private static $event;
private static $faction;
private static $gameObject;
private static $item;
private static $itemset;
private static $maps;
private static $npc;
private static $pet;
private static $quest;
private static $skill;
private static $spell;
private static $title;
private static $zone;
public static function load($loc)
{
@@ -44,13 +44,19 @@ class Lang
public static function __callStatic($name, $args)
{
if (!isset(self::$$name))
{
Util::addNote(U_GROUP_STAFF, 'Lang: tried to use undefined property Lang::$'.$name);
return null;
}
$var = self::$$name;
foreach ($args as $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;
}
$var = $var[$key];
}
@@ -64,13 +70,13 @@ class Lang
$tmp = [];
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)
$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)
$tmp[] = self::$main['unavailable'];
$tmp[] = self::main('unavailable');
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]';
@@ -106,7 +112,7 @@ class Lang
if (!in_array($prop, [1, 2, 3, 4, 9, 16, 20]))
continue;
$name = Lang::$spell['lockType'][$prop];
$name = self::spell('lockType', $prop);
if (!$name)
continue;
@@ -131,7 +137,7 @@ class Lang
else
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;
@@ -141,7 +147,7 @@ class Lang
{
$_ = Util::getReputationLevelForPoints($pts);
return self::$game['rep'][$_];
return self::game('rep', $_);
}
public static function getRequiredItems($class, $mask, $short = true)
@@ -164,16 +170,16 @@ class Lang
if ($class == ITEM_CLASS_WEAPON && ($mask & 0x1DE5FF) == 0x1DE5FF)
return '';
foreach (Lang::$spell['subClassMasks'] as $m => $str)
foreach (self::spell('subClassMasks') as $m => $str)
if ($mask == $m)
return $str;
}
if ($class == ITEM_CLASS_MISC) // yeah hardcoded.. sue me!
return Lang::$spell['cat'][-5];
return self::spell('cat', -5);
$tmp = [];
$strs = Lang::$spell[$class == ITEM_CLASS_ARMOR ? 'armorSubClass' : 'weaponSubClass'];
$strs = self::spell($class == ITEM_CLASS_ARMOR ? 'armorSubClass' : 'weaponSubClass');
foreach ($strs as $k => $str)
if ($mask & (1 << $k) && $str)
$tmp[] = $str;
@@ -192,7 +198,7 @@ class Lang
{
if ($stanceMask & (1 << ($i - 1)))
{
$tmp[] = self::$game['st'][$i];
$tmp[] = self::game('st', $i);
$stanceMask &= ~(1 << ($i - 1));
}
$i++;
@@ -211,7 +217,7 @@ class Lang
{
if ($schoolMask & (1 << $i))
{
$tmp[] = self::$game['sc'][$i];
$tmp[] = self::game('sc', $i);
$schoolMask &= ~(1 << $i);
}
$i++;
@@ -236,7 +242,7 @@ class Lang
{
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));
}
$i++;
@@ -263,7 +269,7 @@ class Lang
if (!$raceMask)
{
$side |= SIDE_BOTH;
return self::$game['ra'][0];
return self::game('ra', 0);
}
if ($raceMask & RACE_MASK_HORDE)
@@ -273,16 +279,16 @@ class Lang
$side |= SIDE_ALLIANCE;
if ($raceMask == RACE_MASK_HORDE)
return self::$game['ra'][-2];
return self::game('ra', -2);
if ($raceMask == RACE_MASK_ALLIANCE)
return self::$game['ra'][-1];
return self::game('ra', -1);
while ($raceMask)
{
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));
}
$i++;

View File

@@ -78,7 +78,7 @@ class AccountPage extends GenericPage
if ($this->createRecoverPass($nStep)) // location-header after final step
header('Location: ?account=signin', true, 302);
$this->head = sprintf(Lang::$account['recoverPass'], $nStep);
$this->head = sprintf(Lang::account('recoverPass'), $nStep);
break;
case 'forgotusername':
if (CFG_AUTH_MODE != AUTH_MODE_SELF) // only recover own accounts
@@ -90,16 +90,16 @@ class AccountPage extends GenericPage
if ($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']))
$this->error = Lang::$account['emailNotFound'];
$this->error = Lang::account('emailNotFound');
else if ($err = $this->doRecoverUser())
$this->error = $err;
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;
case 'signin':
$this->tpl = 'acc-signIn';
@@ -131,7 +131,7 @@ class AccountPage extends GenericPage
else
{
$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'])))
@@ -142,12 +142,12 @@ class AccountPage extends GenericPage
Util::gainSiteReputation($newId, SITEREP_ACTION_REGISTER);
$this->text = sprintf(Lang::$account['accActivated'], $_GET['token']);
$this->text = sprintf(Lang::account('accActivated'), $_GET['token']);
}
else
$this->next = $this->getNext();
$this->head = sprintf(Lang::$account['register'], $nStep);
$this->head = sprintf(Lang::account('register'), $nStep);
break;
case 'signout':
User::destroy();
@@ -159,7 +159,7 @@ class AccountPage extends GenericPage
protected function generateTitle()
{
$this->title = [Lang::$account['title']];
$this->title = [Lang::account('title')];
}
protected function generatePath() { }
@@ -177,17 +177,17 @@ class AccountPage extends GenericPage
/***********/
$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['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['email']. Lang::$main['colon'].$user['email'];
$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('lastIP'). Lang::main('colon').$user['prevIP'];
$infobox[] = Lang::account('email'). Lang::main('colon').$user['email'];
$groups = [];
foreach (Lang::$account['groups'] as $idx => $key)
foreach (Lang::account('groups') as $idx => $key)
if ($idx >= 0 && $user['userGroups'] & (1 << $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[] = Util::ucFirst(Lang::$main['siteRep']).Lang::$main['colon'].User::getReputation();
$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[] = Util::ucFirst(Lang::main('siteRep')).Lang::main('colon').User::getReputation();
$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 (!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']))
$this->error = Lang::$account['emailNotFound'];
$this->error = Lang::account('emailNotFound');
else if ($err = $this->doRecoverPass())
$this->error = $err;
else
{
$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
@@ -330,17 +330,17 @@ Markup.printHtml("description text here", "description-generic", { allow: Markup
{
// check username
if (!User::isValidName($this->_post['username']))
return Lang::$account['userNotFound'];
return Lang::account('userNotFound');
// check password
if (!User::isValidPass($this->_post['password']))
return Lang::$account['wrongPass'];
return Lang::account('wrongPass');
switch (User::Auth($this->_post['username'], $this->_post['password']))
{
case AUTH_OK:
if (!User::$ip)
return Lang::$main['intError'];
return Lang::main('intError');
// 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 = ?',
@@ -356,22 +356,22 @@ Markup.printHtml("description text here", "description-generic", { allow: Markup
case AUTH_BANNED:
if (User::init())
User::save();
return Lang::$account['accBanned'];
return Lang::account('accBanned');
case AUTH_WRONGUSER:
User::destroy();
return Lang::$account['userNotFound'];
return Lang::account('userNotFound');
case AUTH_WRONGPASS:
User::destroy();
return Lang::$account['wrongPass'];
return Lang::account('wrongPass');
case AUTH_ACC_INACTIVE:
User::destroy();
return Lang::$account['accInactive'];
return Lang::account('accInactive');
case AUTH_IPBANNED:
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:
User::destroy();
return Lang::$main['intError'];
return Lang::main('intError');
default:
return;
}
@@ -381,34 +381,34 @@ Markup.printHtml("description text here", "description-generic", { allow: Markup
{
// check username
if (!User::isValidName($this->_post['username'], $e))
return Lang::$account[$e == 1 ? 'errNameLength' : 'errNameChars'];
return Lang::account($e == 1 ? 'errNameLength' : 'errNameChars');
// check password
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'])
return Lang::$account['passMismatch'];
return Lang::account('passMismatch');
// check email
if (!Util::isValidEmail($this->_post['email']))
return Lang::$account['emailInvalid'];
return Lang::account('emailInvalid');
// check ip
if (!User::$ip)
return Lang::$main['intError'];
return Lang::main('intError');
// limit account creation
$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())
{
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
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..
$token = Util::createHash();
@@ -425,8 +425,8 @@ Markup.printHtml("description text here", "description-generic", { allow: Markup
$token
);
if (!$id) // something went wrong
return Lang::$main['intError'];
else if ($_ = $this->sendMail(Lang::$mail['accConfirm'][0], sprintf(Lang::$mail['accConfirm'][1], $token), CFG_ACCOUNT_CREATE_SAVE_DECAY))
return Lang::main('intError');
else if ($_ = $this->sendMail(Lang::mail('accConfirm', 0), sprintf(Lang::mail('accConfirm', 1), $token), CFG_ACCOUNT_CREATE_SAVE_DECAY))
{
// success:: update ip-bans
if (!$ip || $ip['unbanDate'] < time())
@@ -444,16 +444,16 @@ Markup.printHtml("description text here", "description-generic", { allow: Markup
return $_;
// 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()
{
if ($this->_post['password'] != $this->_post['c_password'])
return Lang::$account['passCheckFail'];
return Lang::account('passCheckFail');
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()',
$this->_post['token'],
@@ -461,13 +461,13 @@ Markup.printHtml("description text here", "description-generic", { allow: Markup
ACC_STATUS_RECOVER_PASS
);
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))
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))
return Lang::$main['intError'];
return Lang::main('intError');
}
private function doRecoverUser()
@@ -476,35 +476,35 @@ Markup.printHtml("description text here", "description-generic", { allow: Markup
return $_;
// 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)
{
if (!$type)
return Lang::$main['intError'];
return Lang::main('intError');
// 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))
return sprintf(lang::$account['isRecovering'], Util::formatTime($_ * 1000));
return sprintf(Lang::account('isRecovering'), Util::formatTime($_ * 1000));
// create new token and write to db
$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']))
return Lang::$main['intError'];
return Lang::main('intError');
}
private function sendMail($subj, $msg, $delay = 300)
{
// send recovery mail
$subj = CFG_NAME_SHORT.Lang::$main['colon'] . $subj;
$msg .= "\r\n\r\n".sprintf(Lang::$mail['tokenExpires'], Util::formatTime($delay * 1000))."\r\n";
$subj = CFG_NAME_SHORT.Lang::main('colon') . $subj;
$msg .= "\r\n\r\n".sprintf(Lang::mail('tokenExpires'), Util::formatTime($delay * 1000))."\r\n";
$header = 'From: '.CFG_CONTACT_EMAIL . "\r\n" .
'Reply-To: '.CFG_CONTACT_EMAIL . "\r\n" .
'X-Mailer: PHP/' . phpversion();
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)

View File

@@ -44,7 +44,7 @@ class AchievementPage extends GenericPage
$this->subject = new AchievementList(array(['id', $this->typeId]));
if ($this->subject->error)
$this->notFound(Lang::$game['achievement']);
$this->notFound(Lang::game('achievement'));
$this->extendGlobalData($this->subject->getJSGlobals(GLOBALINFO_REWARDS));
@@ -68,7 +68,7 @@ class AchievementPage extends GenericPage
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()
@@ -81,7 +81,7 @@ class AchievementPage extends GenericPage
// points
if ($_ = $this->subject->getField('points'))
$infobox[] = Lang::$achievement['points'].Lang::$main['colon'].'[achievementpoints='.$_.']';
$infobox[] = Lang::achievement('points').Lang::main('colon').'[achievementpoints='.$_.']';
// location
// todo (low)
@@ -90,13 +90,13 @@ class AchievementPage extends GenericPage
switch ($this->subject->getField('faction'))
{
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;
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;
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
@@ -178,7 +178,7 @@ class AchievementPage extends GenericPage
$bar = new TitleList(array(['id', $foo]));
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);
@@ -190,13 +190,13 @@ class AchievementPage extends GenericPage
if (!$altAcv->error)
{
$this->transfer = sprintf(
Lang::$achievement['_transfer'],
Lang::achievement('_transfer'),
$altAcv->id,
1, // quality
$altAcv->getField('iconString'),
$altAcv->getField('name', true),
$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,
'text' => $crtName,
);
$tmp['extraText'] = Lang::$achievement['slain'];
$tmp['extraText'] = Lang::achievement('slain');
break;
// link to area (by map)
case ACHIEVEMENT_CRITERIA_TYPE_WIN_BG:
@@ -326,7 +326,7 @@ class AchievementPage extends GenericPage
break;
// link to title - todo (low): crosslink
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;
// link to achivement (/w icon)
case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ACHIEVEMENT:
@@ -491,7 +491,7 @@ class AchievementPage extends GenericPage
}
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;
}

View File

@@ -47,7 +47,7 @@ class AchievementsPage extends GenericPage
parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::$game['achievements']);
$this->name = Util::ucFirst(Lang::game('achievements'));
$this->subCat = $pageParam ? '='.$pageParam : '';
}
@@ -121,12 +121,12 @@ class AchievementsPage extends GenericPage
);
// sort for dropdown-menus in filter
asort(Lang::$game['si']);
asort(Lang::game('si'));
}
protected function generateTitle()
{
array_unshift($this->title, Util::ucFirst(Lang::$game['achievements']));
array_unshift($this->title, Util::ucFirst(Lang::game('achievements')));
if ($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]));
if ($this->subject->error)
$this->notFound(Lang::$game['class']);
$this->notFound(Lang::game('class'));
$this->name = $this->subject->getField('name', true);
}
@@ -38,7 +38,7 @@ class ClassPage extends GenericPage
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()
@@ -56,27 +56,27 @@ class ClassPage extends GenericPage
// hero class
if ($this->subject->getField('flags') & 0x40)
$infobox[] = '[tooltip=tooltip_heroclass]'.Lang::$game['heroClass'].'[/tooltip]';
$infobox[] = '[tooltip=tooltip_heroclass]'.Lang::game('heroClass').'[/tooltip]';
// resource
if ($this->typeId == 11) // special Druid case
$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=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]';
$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=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]';
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
$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 = [];
for ($i = 0; $i < 4; $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)
$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
$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]';
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);
$this->name = Util::ucFirst(Lang::$game['classes']);
$this->name = Util::ucFirst(Lang::game('classes'));
}
protected function generateContent()
@@ -38,7 +38,7 @@ class ClassesPage extends GenericPage
protected function generateTitle()
{
array_unshift($this->title, Util::ucFirst(Lang::$game['classes']));
array_unshift($this->title, Util::ucFirst(Lang::game('classes')));
}
protected function generatePath() {}

View File

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

View File

@@ -23,7 +23,7 @@ class CurrenciesPage extends GenericPage
parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::$game['currencies']);
$this->name = Util::ucFirst(Lang::game('currencies'));
}
protected function generateContent()
@@ -48,7 +48,7 @@ class CurrenciesPage extends GenericPage
{
array_unshift($this->title, $this->name);
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()

View File

@@ -25,7 +25,7 @@ class CurrencyPage extends GenericPage
$this->subject = new CurrencyList(array(['id', $this->typeId]));
if ($this->subject->error)
$this->notFound(Lang::$game['currency']);
$this->notFound(Lang::game('currency'));
$this->name = $this->subject->getField('name', true);
}
@@ -37,7 +37,7 @@ class CurrencyPage extends GenericPage
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()
@@ -53,9 +53,9 @@ class CurrencyPage extends GenericPage
$infobox = Lang::getInfoBoxForFlags($this->subject->getField('cuFlags'));
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
$infobox[] = Lang::$currency['cap'].Lang::$main['colon'].'75\'000';
$infobox[] = Lang::currency('cap').Lang::main('colon').'75\'000';
/****************/
/* Main Content */

View File

@@ -30,7 +30,7 @@ class EventPage extends GenericPage
$this->subject = new WorldEventList($conditions);
if ($this->subject->error)
$this->notFound(Lang::$game['event']);
$this->notFound(Lang::game('event'));
$this->hId = $this->subject->getField('holidayId');
$this->eId = $this->subject->getField('eventBak');
@@ -56,7 +56,7 @@ class EventPage extends GenericPage
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()
@@ -73,12 +73,12 @@ class EventPage extends GenericPage
if ($_ = $this->subject->getField('bossCreature'))
{
$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
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 */
@@ -274,19 +274,19 @@ class EventPage extends GenericPage
// 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
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
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
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]';

View File

@@ -23,7 +23,7 @@ class EventsPage extends GenericPage
parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::$game['events']);
$this->name = Util::ucFirst(Lang::game('events'));
}
protected function generateContent()
@@ -72,7 +72,7 @@ class EventsPage extends GenericPage
{
array_unshift($this->title, $this->name);
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()

View File

@@ -25,7 +25,7 @@ class FactionPage extends GenericPage
$this->subject = new FactionList(array(['id', $this->typeId]));
if ($this->subject->error)
$smarty->notFound(Lang::$game['faction']);
$smarty->notFound(Lang::game('faction'));
$this->name = $this->subject->getField('name', true);
}
@@ -43,7 +43,7 @@ class FactionPage extends GenericPage
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()
@@ -60,7 +60,7 @@ class FactionPage extends GenericPage
{
$this->extendGlobalIds(TYPE_NPC, $ids);
$qmStr = Lang::$faction['quartermaster'].Lang::$main['colon'];
$qmStr = Lang::faction('quartermaster').Lang::main('colon');
if (count($ids) == 1)
$qmStr .= '[npc='.$ids[0].']';
@@ -78,7 +78,7 @@ class FactionPage extends GenericPage
// side if any
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 */
@@ -117,10 +117,10 @@ class FactionPage extends GenericPage
$buff = '';
foreach ($spillover->iterate() as $spillId => $__)
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)
$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)
@@ -134,12 +134,12 @@ class FactionPage extends GenericPage
switch ($k)
{
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_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 '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 '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_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 '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;
}
$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->getField('name', true),
$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);
$this->name = Util::ucFirst(Lang::$game['factions']);
$this->name = Util::ucFirst(Lang::game('factions'));
}
protected function generateContent()
@@ -71,11 +71,11 @@ class FactionsPage extends GenericPage
switch (count($this->category))
{
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);
break;
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;
}
}

View File

@@ -285,7 +285,7 @@ class GenericPage
$this->infobox = $article['quickInfo'];
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->type = -99; // get error-article
$this->typeId = 0;
$this->title[] = Lang::$main['errPageTitle'];
$this->name = Lang::$main['errPageTitle'];
$this->title[] = Lang::main('errPageTitle');
$this->name = Lang::main('errPageTitle');
$this->addArticle();

View File

@@ -59,7 +59,7 @@ class ItemPage extends genericPage
$this->subject = new ItemList($conditions);
if ($this->subject->error)
$this->notFound(Lang::$game['item']);
$this->notFound(Lang::game('item'));
if (!is_numeric($param))
$this->typeId = $this->subject->id;
@@ -106,7 +106,7 @@ class ItemPage extends genericPage
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()
@@ -133,16 +133,16 @@ class ItemPage extends genericPage
// itemlevel
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
if ($_flags & ITEM_FLAG_ACCOUNTBOUND)
$infobox[] = Lang::$item['accountWide'];
$infobox[] = Lang::item('accountWide');
// side
if ($si = $this->subject->json[$this->typeId]['side'])
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
if (!$_slot)
@@ -158,29 +158,29 @@ class ItemPage extends genericPage
if ($this->subject->getField('spellCharges'.$i) >= 0)
continue;
$tt = '[tooltip=tooltip_consumedonuse]'.Lang::$item['consumable'].'[/tooltip]';
$tt = '[tooltip=tooltip_consumedonuse]'.Lang::item('consumable').'[/tooltip]';
break;
}
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
if ($hId = $this->subject->getField('holidayId'))
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
if ($tId = $this->subject->getField('totemCategory'))
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
if (!empty($this->subject->getExtendedCost([], $_reqRating)[$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 = [];
$costList = [];
foreach ($vendors as $npcId => $data)
@@ -225,16 +225,16 @@ class ItemPage extends genericPage
}
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)
$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)
{
$res = [];
$i = 0;
$len = 0;
$parts = explode(' ', sprintf(Lang::$item['reqRating'], $_reqRating));
$parts = explode(' ', sprintf(Lang::item('reqRating'), $_reqRating));
foreach ($parts as $p)
{
$res[$i][] = $p;
@@ -255,17 +255,17 @@ class ItemPage extends genericPage
// repair cost
if ($_ = $this->subject->getField('repairPrice'))
$infobox[] = Lang::$item['repairCost'].Lang::$main['colon'].'[money='.$_.']';
$infobox[] = Lang::item('repairCost').Lang::main('colon').'[money='.$_.']';
// avg auction buyout
if (in_array($this->subject->getField('bonding'), [0, 2, 3]))
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
if ($_flags & ITEM_FLAG_OPENABLE)
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 ($_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
$_ = 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
$infobox[] = Lang::$item['cantDisenchant'];
$infobox[] = Lang::item('cantDisenchant');
}
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)
$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)
$infobox[] = '[tooltip=tooltip_deprecated]'.Lang::$item['deprecated'].'[/tooltip]';
$infobox[] = '[tooltip=tooltip_deprecated]'.Lang::item('deprecated').'[/tooltip]';
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)
$infobox[] = '[tooltip=tooltip_partyloot]'.Lang::$item['partyLoot'].'[/tooltip]';
$infobox[] = '[tooltip=tooltip_partyloot]'.Lang::item('partyLoot').'[/tooltip]';
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)
$infobox[] = '[tooltip=tooltip_smartloot]'.Lang::$item['smartLoot'].'[/tooltip]';
$infobox[] = '[tooltip=tooltip_smartloot]'.Lang::item('smartLoot').'[/tooltip]';
if ($_flags & ITEM_FLAG_INDESTRUCTIBLE)
$infobox[] = Lang::$item['indestructible'];
$infobox[] = Lang::item('indestructible');
if ($_flags & ITEM_FLAG_USABLE_ARENA)
$infobox[] = Lang::$item['useInArena'];
$infobox[] = Lang::item('useInArena');
if ($_flags & ITEM_FLAG_USABLE_SHAPED)
$infobox[] = Lang::$item['useInShape'];
$infobox[] = Lang::item('useInShape');
// cant roll need
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
if ($_bagFamily & 0x0100)
$infobox[] = Lang::$item['atKeyring'];
$infobox[] = Lang::item('atKeyring');
/****************/
/* Main Content */
@@ -389,13 +389,13 @@ class ItemPage extends genericPage
if (!$altItem->error)
{
$this->transfer = sprintf(
Lang::$item['_transfer'],
Lang::item('_transfer'),
$altItem->id,
$altItem->getField('quality'),
$altItem->getField('iconString'),
$altItem->getField('name', true),
$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
$xml->addChild('level', $this->subject->getField('itemLevel'));
// 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
$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'));
// 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'));
// icon + displayId
$xml->addChild('icon', $this->subject->getField('iconString'))->addAttribute('displayId', $this->subject->getField('displayId'));
// 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
$xml->addChild('htmlTooltip')->addCData($this->subject->renderTooltip());

View File

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

View File

@@ -29,7 +29,7 @@ class ItemsetPage extends GenericPage
$this->subject = new ItemsetList(array(['id', $this->typeId]));
if ($this->subject->error)
$this->notFound(Lang::$game['itemset']);
$this->notFound(Lang::game('itemset'));
$this->name = $this->subject->getField('name', true);
$this->extendGlobalData($this->subject->getJSGlobals());
@@ -49,7 +49,7 @@ class ItemsetPage extends GenericPage
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()
@@ -66,19 +66,19 @@ class ItemsetPage extends GenericPage
// unavailable (todo (low): set data)
if ($this->subject->getField('cuFlags') & CUSTOM_UNAVAILABLE)
$infobox[] = Lang::$main['unavailable'];
$infobox[] = Lang::main('unavailable');
// holiday
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);
}
// itemLevel
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');
if ($min < $max)
@@ -91,21 +91,21 @@ class ItemsetPage extends GenericPage
if ($cl = Lang::getClassString($this->subject->getField('classMask'), $jsg, $qty, false))
{
$this->extendGlobalIds(TYPE_CLASS, $jsg);
$t = $qty == 1 ? Lang::$game['class'] : Lang::$game['classes'];
$infobox[] = Util::ucFirst($t).Lang::$main['colon'].$cl;
$t = $qty == 1 ? Lang::game('class') : Lang::game('classes');
$infobox[] = Util::ucFirst($t).Lang::main('colon').$cl;
}
// required level
if ($lvl = $this->subject->getField('reqLevel'))
$infobox[] = sprintf(Lang::$game['reqLevel'], $lvl);
$infobox[] = sprintf(Lang::game('reqLevel'), $lvl);
// type
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
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 */
@@ -186,12 +186,12 @@ class ItemsetPage extends GenericPage
$skill = '';
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'));
$skill = ' &ndash; <small><b>'.sprintf(Lang::$game['requires'], $spellLink).'</b></small>';
$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>';
}
$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->infobox = $infobox ? '[ul][li]'.implode('[/li][li]', $infobox).'[/li][/ul]' : null;
$this->pieces = $pieces;

View File

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

View File

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

View File

@@ -43,7 +43,7 @@ class MorePage extends GenericPage
$this->error();
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->typeId = $_[1];

View File

@@ -30,7 +30,7 @@ class NpcPage extends GenericPage
$this->subject = new CreatureList(array(['id', $this->typeId]));
if ($this->subject->error)
$this->notFound(Lang::$game['npc']);
$this->notFound(Lang::game('npc'));
$this->name = $this->subject->getField('name', true);
$this->subname = $this->subject->getField('subname', true);
@@ -46,7 +46,7 @@ class NpcPage extends GenericPage
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()
@@ -116,7 +116,7 @@ class NpcPage extends GenericPage
foreach ($_ as $i => $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
@@ -130,13 +130,13 @@ class NpcPage extends GenericPage
else // Boss Level
$level = '??';
$infobox[] = Lang::$game['level'].Lang::$main['colon'].$level;
$infobox[] = Lang::game('level').Lang::main('colon').$level;
// Classification
if ($_ = $this->subject->getField('rank')) // != NPC_RANK_NORMAL
{
$str = $_typeFlags & 0x4 ? '[span class=icon-boss]'.Lang::$npc['rank'][$_].'[/span]' : Lang::$npc['rank'][$_];
$infobox[] = Lang::$npc['classification'].Lang::$main['colon'].$str;
$str = $_typeFlags & 0x4 ? '[span class=icon-boss]'.Lang::npc('rank', $_).'[/span]' : Lang::npc('rank', $_);
$infobox[] = Lang::npc('classification').Lang::main('colon').$str;
}
// Reaction
@@ -146,32 +146,32 @@ class NpcPage extends GenericPage
if ($r == -1) return 10;
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
$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
if ($_typeFlags & 0x1)
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
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
if ($this->subject->getField('vehicleId'))
$infobox[] = Lang::$npc['vehicle'];
$infobox[] = Lang::npc('vehicle');
// AI
if (User::isInGroup(U_GROUP_EMPLOYEE))
{
if ($_ = $this->subject->getField('scriptName'))
$infobox[] = 'Script'.Lang::$main['colon'].$_;
$infobox[] = 'Script'.Lang::main('colon').$_;
else if ($_ = $this->subject->getField('aiName'))
$infobox[] = 'AI'.Lang::$main['colon'].$_;
$infobox[] = 'AI'.Lang::main('colon').$_;
}
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]';
// 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 = $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 = $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 = $this->subject->getBaseStats('melee');
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
$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 = $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
{
@@ -263,7 +263,7 @@ class NpcPage extends GenericPage
if ($dId != $id)
continue;
$m = Lang::$npc['modes'][$mapType][$mode];
$m = Lang::npc('modes', $mapType, $mode);
// Health
$health = $_altNPCs->getBaseStats('health');
@@ -280,7 +280,7 @@ class NpcPage extends GenericPage
// Melee Damage
$melee = $_altNPCs->getBaseStats('melee');
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
$modes['melee'][] = sprintf($modeRow, $m, $_nf($melee[0]).' - '.$_nf($melee[1]));
@@ -298,7 +298,7 @@ class NpcPage extends GenericPage
// < 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 */
@@ -759,7 +759,7 @@ class NpcPage extends GenericPage
foreach ($data as $id => &$d)
$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));
@@ -768,7 +768,7 @@ class NpcPage extends GenericPage
'data' => $data,
'params' => array(
'extraCols' => $xCols,
'name' => Lang::$npc['accessory'],
'name' => Lang::npc('accessory'),
'id' => 'accessory'
)
);
@@ -840,7 +840,7 @@ class NpcPage extends GenericPage
'qty' => $row['qty'],
'name' => $factions->getField('name', true),
'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'])
@@ -862,7 +862,7 @@ class NpcPage extends GenericPage
// base NPC
if ($base = $this->getRepForId($this->typeId, $spilledParents))
$reputation[] = [Lang::$npc['modes'][1][0], $base];
$reputation[] = [Lang::npc('modes', 1, 0), $base];
// difficulty dummys
if ($dummyIds)
@@ -876,7 +876,7 @@ class NpcPage extends GenericPage
// apply by difficulty
foreach ($alt as $mode => $dat)
$reputation[] = [Lang::$npc['modes'][$mapType][$mode], $dat];
$reputation[] = [Lang::npc('modes', $mapType, $mode), $dat];
}
// get spillover factions and apply
@@ -907,7 +907,7 @@ class NpcPage extends GenericPage
'id' => $spId,
'qty' => $spilledParents[$row['spillover']][0],
'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(
'range' => $t['range'],
'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),
);

View File

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

View File

@@ -37,7 +37,7 @@ class ObjectPage extends GenericPage
$this->subject = new GameObjectList(array(['id', $this->typeId]));
if ($this->subject->error)
$this->notFound(Lang::$game['gameObject']);
$this->notFound(Lang::game('gameObject'));
$this->name = $this->subject->getField('name', true);
}
@@ -49,7 +49,7 @@ class ObjectPage extends GenericPage
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()
@@ -70,7 +70,7 @@ class ObjectPage extends GenericPage
foreach ($_ as $i => $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
@@ -80,19 +80,19 @@ class ObjectPage extends GenericPage
if ($r == -1) return 10;
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
switch ($this->subject->getField('typeCat'))
{
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;
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;
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;
default: // requires key .. maybe
{
@@ -104,7 +104,7 @@ class ObjectPage extends GenericPage
continue;
$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
@@ -117,7 +117,7 @@ class ObjectPage extends GenericPage
if ($_ = $this->subject->getField('linkedTrap'))
{
$this->extendGlobalIds(TYPE_OBJECT, $_);
$infobox[] = Lang::$gameObject['trap'].Lang::$main['colon'].'[object='.$_.']';
$infobox[] = Lang::gameObject('trap').Lang::main('colon').'[object='.$_.']';
}
// trap for
@@ -125,20 +125,20 @@ class ObjectPage extends GenericPage
if (!$trigger->error)
{
$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
if ($_ = $this->subject->getField('spellFocusId'))
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]
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])
$buff .= Lang::$game['valueDelim'].$_[1];
$buff .= Lang::game('valueDelim').$_[1];
// 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;
@@ -150,13 +150,13 @@ class ObjectPage extends GenericPage
if ($_ = $this->subject->getField('mStone'))
{
$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];
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'))
{
$buff = Lang::$gameObject['capturePoint'];
$buff = Lang::gameObject('capturePoint');
if ($_[2] > 1 || $_[0])
$buff .= Lang::$main['colon'].'[ul]';
$buff .= Lang::main('colon').'[ul]';
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])
$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])
$buff .= '[li]'.sprintf(Lang::$spell['range'], $_[4]).'[/li]';
$buff .= '[li]'.sprintf(Lang::spell('range'), $_[4]).'[/li]';
if ($_[2] > 1 || $_[0])
$buff .= '[/ul]';
@@ -190,9 +190,9 @@ class ObjectPage extends GenericPage
if (User::isInGroup(U_GROUP_EMPLOYEE))
{
if ($_ = $this->subject->getField('ScriptName'))
$infobox[] = 'Script'.Lang::$main['colon'].$_;
$infobox[] = 'Script'.Lang::main('colon').$_;
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);
$this->name = Util::ucFirst(Lang::$game['gameObjects']);
$this->name = Util::ucFirst(Lang::game('gameObjects'));
$this->subCat = $pageParam ? '='.$pageParam : '';
}
@@ -78,7 +78,7 @@ class ObjectsPage extends GenericPage
{
array_unshift($this->title, $this->name);
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()

View File

@@ -26,7 +26,7 @@ class PetPage extends GenericPage
$this->subject = new PetList(array(['id', $this->typeId]));
if ($this->subject->error)
$this->notFound(Lang::$game['pet']);
$this->notFound(Lang::game('pet'));
$this->name = $this->subject->getField('name', true);
}
@@ -38,7 +38,7 @@ class PetPage extends GenericPage
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()
@@ -52,11 +52,11 @@ class PetPage extends GenericPage
$infobox = Lang::getInfoBoxForFlags($this->subject->getField('cuFlags'));
// 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
if ($this->subject->getField('exotic'))
$infobox[] = '[url=?spell=53270]'.Lang::$pet['exotic'].'[/url]';
$infobox[] = '[url=?spell=53270]'.Lang::pet('exotic').'[/url]';
/****************/
/* Main Content */

View File

@@ -23,7 +23,7 @@ class PetsPage extends GenericPage
parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::$game['pets']);
$this->name = Util::ucFirst(Lang::game('pets'));
}
protected function generateContent()
@@ -55,9 +55,9 @@ class PetsPage extends GenericPage
protected function generateTitle()
{
array_unshift($this->title, Util::ucFirst(Lang::$game['pets']));
array_unshift($this->title, Util::ucFirst(Lang::game('pets')));
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()

View File

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

View File

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

View File

@@ -30,7 +30,7 @@ class QuestPage extends GenericPage
$this->subject = new QuestList(array(['id', $this->typeId]));
if ($this->subject->error)
$this->notFound(Lang::$game['quest']);
$this->notFound(Lang::game('quest'));
$this->name = $this->subject->getField('name', true);
}
@@ -45,7 +45,7 @@ class QuestPage extends GenericPage
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()
@@ -66,12 +66,12 @@ class QuestPage extends GenericPage
if ($_ = $this->subject->getField('holidayId'))
{
$this->extendGlobalIds(TYPE_WORLDEVENT, $_);
$infobox[] = Lang::$game['eventShort'].Lang::$main['colon'].'[event='.$_.']';
$infobox[] = Lang::game('eventShort').Lang::main('colon').'[event='.$_.']';
}
// level
if ($_level > 0)
$infobox[] = Lang::$game['level'].Lang::$main['colon'].$_level;
$infobox[] = Lang::game('level').Lang::main('colon').$_level;
// reqlevel
if ($_minLevel)
@@ -80,7 +80,7 @@ class QuestPage extends GenericPage
if ($_ = $this->subject->getField('maxLevel'))
$lvl .= ' - '.$_;
$infobox[] = sprintf(Lang::$game['reqLevel'], $lvl);
$infobox[] = sprintf(Lang::game('reqLevel'), $lvl);
}
// loremaster (i dearly hope those flags cover every case...)
@@ -99,10 +99,10 @@ class QuestPage extends GenericPage
case 0:
break;
case 1:
$infobox[] = Lang::$quest['loremaster'].Lang::$main['colon'].'[achievement='.$loremaster->id.']';
$infobox[] = Lang::quest('loremaster').Lang::main('colon').'[achievement='.$loremaster->id.']';
break;
default:
$lm = Lang::$quest['loremaster'].Lang::$main['colon'].'[ul]';
$lm = Lang::quest('loremaster').Lang::main('colon').'[ul]';
foreach ($loremaster->iterate() as $id => $__)
$lm .= '[li][achievement='.$id.'][/li]';
@@ -114,41 +114,41 @@ class QuestPage extends GenericPage
// type (maybe expand uppon?)
$_ = [];
if ($_flags & QUEST_FLAG_DAILY)
$_[] = Lang::$quest['daily'];
$_[] = Lang::quest('daily');
else if ($_flags & QUEST_FLAG_WEEKLY)
$_[] = Lang::$quest['weekly'];
$_[] = Lang::quest('weekly');
else if ($_specialFlags & QUEST_FLAG_SPECIAL_MONTHLY)
$_[] = Lang::$quest['monthly'];
$_[] = Lang::quest('monthly');
if ($t = $this->subject->getField('type'))
$_[] = Lang::$quest['questInfo'][$t];
$_[] = Lang::quest('questInfo', $t);
if ($_)
$infobox[] = Lang::$game['type'].Lang::$main['colon'].implode(' ', $_);
$infobox[] = Lang::game('type').Lang::main('colon').implode(' ', $_);
// side
$_ = Lang::$main['side'].Lang::$main['colon'];
$_ = Lang::main('side').Lang::main('colon');
switch ($_side)
{
case 3: $infobox[] = $_.Lang::$game['si'][3]; 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 3: $infobox[] = $_.Lang::game('si', 3); 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;
}
// races
if ($_ = Lang::getRaceString($this->subject->getField('reqRaceMask'), $__, $jsg, $n, false))
{
$this->extendGlobalIds(TYPE_RACE, $jsg);
$t = $n == 1 ? Lang::$game['race'] : Lang::$game['races'];
$infobox[] = Util::ucFirst($t).Lang::$main['colon'].$_;
$t = $n == 1 ? Lang::game('race') : Lang::game('races');
$infobox[] = Util::ucFirst($t).Lang::main('colon').$_;
}
// classes
if ($_ = Lang::getClassString($this->subject->getField('reqClassMask'), $jsg, $n, false))
{
$this->extendGlobalIds(TYPE_CLASS, $jsg);
$t = $n == 1 ? Lang::$game['class'] : Lang::$game['classes'];
$infobox[] = Util::ucFirst($t).Lang::$main['colon'].$_;
$t = $n == 1 ? Lang::game('class') : Lang::game('classes');
$infobox[] = Util::ucFirst($t).Lang::main('colon').$_;
}
// profession / skill
@@ -159,17 +159,17 @@ class QuestPage extends GenericPage
if ($_ = $this->subject->getField('reqSkillPoints'))
$sk .= ' ('.$_.')';
$infobox[] = Lang::$quest['profession'].Lang::$main['colon'].$sk;
$infobox[] = Lang::quest('profession').Lang::main('colon').$sk;
}
// timer
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);
// 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 = [];
foreach ($startEnd as $se)
{
@@ -184,7 +184,7 @@ class QuestPage extends GenericPage
$infobox[] = implode('[br]', $s);
// 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 = [];
foreach ($startEnd as $se)
{
@@ -200,14 +200,14 @@ class QuestPage extends GenericPage
// Repeatable
if ($_flags & QUEST_FLAG_REPEATABLE || $_specialFlags & QUEST_FLAG_SPECIAL_REPEATABLE)
$infobox[] = Lang::$quest['repeatable'];
$infobox[] = Lang::quest('repeatable');
// 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
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))
if ($_level > 0)
@@ -232,7 +232,7 @@ class QuestPage extends GenericPage
$_[] = '[color=r4]'.($_level + 3 + ceil(12 * $_level / MAX_LEVEL)).'[/color]';
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]';
@@ -337,7 +337,7 @@ class QuestPage extends GenericPage
foreach ($extraLists as $el)
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 */
@@ -380,7 +380,7 @@ class QuestPage extends GenericPage
'name' => $olItemData->json[$pair[0]]['name'],
'qty' => $pair[1] > 1 ? $pair[1] : 0,
'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,
'name' => $pair[1] ?: Util::localizedString($olNPCData->getEntry($i), 'name'),
'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]
);
@@ -481,7 +481,7 @@ class QuestPage extends GenericPage
'typeStr' => Util::$typeStrings[TYPE_FACTION],
'id' => $i,
'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' => ''
);
}
@@ -496,17 +496,17 @@ class QuestPage extends GenericPage
'id' => $_,
'name' => SpellList::getName($_),
'qty' => 0,
'extraText' => '&nbsp;('.Lang::$quest['provided'].')'
'extraText' => '&nbsp;('.Lang::quest('provided').')'
);
}
// required money
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
if ($_ = $this->subject->getField('reqPlayerKills'))
$this->objectiveList[] = ['text' => Lang::$quest['playerSlain'].'&nbsp;('.$_.')'];
$this->objectiveList[] = ['text' => Lang::quest('playerSlain').'&nbsp;('.$_.')'];
/**********/
/* Mapper */
@@ -560,7 +560,7 @@ class QuestPage extends GenericPage
$altQuest->id,
$altQuest->getField('name', true),
$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);
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)
$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
if (!empty($this->subject->choices[$this->typeId][TYPE_ITEM]))
@@ -788,7 +788,7 @@ class QuestPage extends GenericPage
{
$extra = null;
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))
{
@@ -863,7 +863,7 @@ class QuestPage extends GenericPage
$letter = DB::Aowow()->selectRow('SELECT * FROM ?_mailtemplate WHERE id = ?d', $_);
$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,
'text' => $letter ? Util::parseHtmlText(Util::localizedString($letter, 'text')) : null,
'subject' => Util::parseHtmlText(Util::localizedString($letter, 'subject'))
@@ -876,7 +876,7 @@ class QuestPage extends GenericPage
if ($_ = CreatureList::getName($se['typeId']))
{
$mail['sender'] = sprintf(Lang::$quest['mailBy'], $se['typeId'], $_);
$mail['sender'] = sprintf(Lang::quest('mailBy'), $se['typeId'], $_);
break;
}
}

View File

@@ -26,7 +26,7 @@ class QuestsPage extends GenericPage
parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::$game['quests']);
$this->name = Util::ucFirst(Lang::game('quests'));
$this->subCat = $pageParam ? '='.$pageParam : '';
}
@@ -83,10 +83,10 @@ class QuestsPage extends GenericPage
array_unshift($this->title, $this->name);
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]))
{
$c0 = Lang::$quest['cat'][$this->category[0]];
$c0 = Lang::quest('cat', $this->category[0]);
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]));
if ($this->subject->error)
$this->notFound(Lang::$game['race']);
$this->notFound(Lang::game('race'));
$this->name = $this->subject->getField('name', true);
}
@@ -38,7 +38,7 @@ class RacePage extends GenericPage
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()
@@ -59,28 +59,28 @@ class RacePage extends GenericPage
// 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
if ($_ = $this->subject->getField('factionId'))
{
$fac = new FactionList(array(['ft.id', $_]));
$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
if ($_ = $this->subject->getField('leader'))
{
$this->extendGlobalIds(TYPE_NPC, $_);
$infobox[] = Lang::$class['racialLeader'].Lang::$main['colon'].'[npc='.$_.']';
$infobox[] = Lang::class('racialLeader').Lang::main('colon').'[npc='.$_.']';
}
// start area
if ($_ = $this->subject->getField('startAreaId'))
{
$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);
$this->name = Util::ucFirst(Lang::$game['races']);
$this->name = Util::ucFirst(Lang::game('races'));
}
protected function generateContent()
@@ -43,7 +43,7 @@ class RacesPage extends GenericPage
protected function generateTitle()
{
array_unshift($this->title, Util::ucFirst(Lang::$game['races']));
array_unshift($this->title, Util::ucFirst(Lang::game('races')));
}
protected function generatePath() {}

View File

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

View File

@@ -27,7 +27,7 @@ class SkillPage extends GenericPage
$this->subject = new SkillList(array(['id', $this->typeId]));
if ($this->subject->error)
$this->notFound(Lang::$game['skill']);
$this->notFound(Lang::game('skill'));
$this->name = $this->subject->getField('name', true);
$this->cat = $this->subject->getField('typeCat');
@@ -40,7 +40,7 @@ class SkillPage extends GenericPage
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()

View File

@@ -23,7 +23,7 @@ class SkillsPage extends GenericPage
parent::__construct($pageCall, $pageParam);
$this->name = Util::ucFirst(Lang::$game['skills']);
$this->name = Util::ucFirst(Lang::game('skills'));
}
protected function generateContent()
@@ -48,7 +48,7 @@ class SkillsPage extends GenericPage
protected function generateTitle()
{
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()

View File

@@ -33,7 +33,7 @@ class SpellPage extends GenericPage
$this->subject = new SpellList(array(['id', $this->typeId]));
if ($this->subject->error)
$this->notFound(Lang::$game['spell']);
$this->notFound(Lang::game('spell'));
$jsg = $this->subject->getJSGlobals(GLOBALINFO_ANY, $extra);
$this->extendGlobalData($jsg, $extra);
@@ -112,7 +112,7 @@ class SpellPage extends GenericPage
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()
@@ -137,19 +137,19 @@ class SpellPage extends GenericPage
if (!in_array($_cat, [-5, -6])) // not mount or vanity pet
{
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'))
$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
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);
$t = $n == 1 ? Lang::$game['race'] : Lang::$game['races'];
$infobox[] = '[li]'.Util::ucFirst($t).Lang::$main['colon'].$_.'[/li]';
$t = $n == 1 ? Lang::game('race') : Lang::game('races');
$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))
{
$this->extendGlobalIds(TYPE_CLASS, $jsg);
$t = $n == 1 ? Lang::$game['class'] : Lang::$game['classes'];
$infobox[] = '[li]'.Util::ucFirst($t).Lang::$main['colon'].$_.'[/li]';
$t = $n == 1 ? Lang::game('class') : Lang::game('classes');
$infobox[] = '[li]'.Util::ucFirst($t).Lang::main('colon').$_.'[/li]';
}
// spell focus
@@ -166,7 +166,7 @@ class SpellPage extends GenericPage
{
$bar = DB::Aowow()->selectRow('SELECT * FROM ?_spellfocusobject WHERE id = ?d', $_);
$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
@@ -180,7 +180,7 @@ class SpellPage extends GenericPage
{
$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'))
$bar .= ' ('.$_.')';
@@ -195,7 +195,7 @@ class SpellPage extends GenericPage
if (!$rSpell->error)
{
$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])
$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
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]))
$infobox[] = '[li]'.Lang::$spell['discovered'].'[/li]';
$infobox[] = '[li]'.Lang::spell('discovered').'[/li]';
// training cost
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
foreach ($this->difficulties as $n => $id)
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);
$infobox = $infobox ? '[ul]'.implode('', $infobox).'[/ul]' : '';
@@ -260,8 +260,8 @@ class SpellPage extends GenericPage
$this->gcd = Util::formatTime($this->subject->getField('startRecoveryTime'));
$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->dispel = Lang::$game['dt'][$this->subject->getField('dispelType')];
$this->mechanic = Lang::$game['me'][$this->subject->getField('mechanic')];
$this->dispel = Lang::game('dt', $this->subject->getField('dispelType'));
$this->mechanic = Lang::game('me', $this->subject->getField('mechanic'));
$this->unavailable = $this->subject->getField('cuFlags') & CUSTOM_UNAVAILABLE;
$this->redButtons = $redButtons;
@@ -285,13 +285,13 @@ class SpellPage extends GenericPage
if (!$altSpell->error)
{
$this->transfer = sprintf(
Lang::$spell['_transfer'],
Lang::spell('_transfer'),
$altSpell->id,
1, // quality
$altSpell->getField('iconString'),
$altSpell->getField('name', true),
$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)
if ($invType & 1 << $k && $str)
$_[] = $str;
$title[] = Lang::$item['slot'].Lang::$main['colon'].Util::asHex($invType);
$text .= ' '.Lang::$spell['_inSlot'].Lang::$main['colon'].implode(', ', $_);
$title[] = Lang::item('slot').Lang::main('colon').Util::asHex($invType);
$text .= ' '.Lang::spell('_inSlot').Lang::main('colon').implode(', ', $_);
}
return [$title, $text];
@@ -1538,7 +1538,7 @@ class SpellPage extends GenericPage
$foo['icon'] = array(
'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
);
@@ -1552,15 +1552,15 @@ class SpellPage extends GenericPage
$foo['radius'] = $this->subject->getField('effect'.$i.'RadiusMax');
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)
$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)
$foo['interval'] = Util::formatTime($this->subject->getField('effect'.$i.'Periode'));
if ($_ = $this->subject->getField('effect'.$i.'Mechanic'))
$foo['mechanic'] = Lang::$game['me'][$_];
$foo['mechanic'] = Lang::game('me', $_);
if (!empty($procData['chance']))
$foo['procData'] = array(
@@ -1581,37 +1581,37 @@ class SpellPage extends GenericPage
case 137: // Energize Pct
$_ = Lang::spell('powerTypes', $effMV);
if ($_ && User::isInGroup(U_GROUP_EMPLOYEE))
$_ = sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$effMV, $_);
$_ = sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_);
else if (!$_)
$_ = $effMV;
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'] .= ' ('.$_.')';
break;
case 16: // QuestComplete
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
$foo['name'] .= Lang::$main['colon'].Util::ucFirst(Lang::$game['quest']).' #'.$effMV;;
$foo['name'] .= Lang::main('colon').Util::ucFirst(Lang::game('quest')).' #'.$effMV;;
break;
case 28: // Summon
case 90: // Kill Credit
case 134: // Kill Credit2
$_ = Lang::$game['npc'].' #'.$effMV;
$_ = Lang::game('npc').' #'.$effMV;
if ($summon = $this->subject->getModelInfo($this->typeId))
{
$_ = '(<a href="?npc='.$summon['typeId'].'">'.$summon['displayName'].'</a>)';
$redButtons[BUTTON_VIEW3D] = ['type' => TYPE_NPC, 'displayId' => $summon['displayId']];
}
$foo['name'] .= Lang::$main['colon'].$_;
$foo['name'] .= Lang::main('colon').$_;
break;
case 33: // Open Lock
$_ = Lang::spell('lockType', $effMV);
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 (!$_)
$_ = $effMV;
@@ -1629,7 +1629,7 @@ class SpellPage extends GenericPage
case 126: // Steal Aura
$_ = Lang::game('dt', $effMV);
if ($_ && User::isInGroup(U_GROUP_EMPLOYEE))
$_ = sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$effMV, $_);
$_ = sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_);
else if (!$_)
$_ = $effMV;
@@ -1638,7 +1638,7 @@ class SpellPage extends GenericPage
case 39: // Learn Language
$_ = Lang::game('languages', $effMV);
if ($_ && User::isInGroup(U_GROUP_EMPLOYEE))
$_ = sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$effMV, $_);
$_ = sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_);
else if (!$_)
$_ = $effMV;
@@ -1651,22 +1651,22 @@ class SpellPage extends GenericPage
case 105: // Summon Object (slot 2)
case 106: // Summon Object (slot 3)
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))
{
$_ = '(<a href="?object='.$summon['typeId'].'">'.$summon['displayName'].'</a>)';
$redButtons[BUTTON_VIEW3D] = ['type' => TYPE_OBJECT, 'displayId' => $summon['displayId']];
}
$foo['name'] .= Lang::$main['colon'].$_;
$foo['name'] .= Lang::main('colon').$_;
break;
case 74: // Apply Glyph
if ($_ = DB::Aowow()->selectCell('SELECT spellId FROM ?_glyphproperties WHERE id = ?d', $effMV))
{
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
$foo['name'] .= Lang::$main['colon'].Util::ucFirst(Lang::$game['spell']).' #'.$effMV;
$foo['name'] .= Lang::main('colon').Util::ucFirst(Lang::game('spell')).' #'.$effMV;
}
else
$foo['name'] .= ' #'.$effMV;;
@@ -1674,14 +1674,14 @@ class SpellPage extends GenericPage
case 95: // Skinning
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 2: $_ = Lang::$game['ct'][4]; break; // Elemental (nature based, earth based)
case 3: $_ = Lang::$game['ct'][9]; break; // Mechanic
case 2: $_ = Lang::game('ct', 4); break; // Elemental (nature based, earth based)
case 3: $_ = Lang::game('ct', 9); break; // Mechanic
default; $_ = '';
}
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
$_ = $effMV;
@@ -1690,7 +1690,7 @@ class SpellPage extends GenericPage
case 108: // Dispel Mechanic
$_ = Lang::game('me', $effMV);
if ($_ && User::isInGroup(U_GROUP_EMPLOYEE))
$_ = sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$effMV, $_);
$_ = sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_);
else if (!$_)
$_ = $effMV;
@@ -1698,14 +1698,14 @@ class SpellPage extends GenericPage
break;
case 118: // Require Skill
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
$foo['name'] .= Lang::$main['colon'].Util::ucFirst(Lang::$game['skill']).' #'.$effMV;;
$foo['name'] .= Lang::main('colon').Util::ucFirst(Lang::game('skill')).' #'.$effMV;;
break;
case 146: // Activate Rune
$_ = Lang::spell('powerRunes', $effMV);
if ($_ && User::isInGroup(U_GROUP_EMPLOYEE))
$_ = sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$effMV, $_);
$_ = sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_);
else if (!$_)
$_ = $effMV;
@@ -1729,19 +1729,19 @@ class SpellPage extends GenericPage
{
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;
switch ($effAura)
{
case 17: // Mod Stealth Detection
if ($_ = Lang::spell('stealthType', $effMV))
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$effMV, $_) : $_;
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
break;
case 19: // Mod Invisibility Detection
if ($_ = Lang::spell('invisibilityType', $effMV))
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$effMV, $_) : $_;
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
break;
case 24: // Periodic Energize
@@ -1750,7 +1750,7 @@ class SpellPage extends GenericPage
case 85: // Mod Power Regeneration
case 110: // Mod Power Regeneration Pct
if ($_ = Lang::spell('powerTypes', $effMV))
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$effMV, $_) : $_;
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
break;
case 29: // Mod Stat
@@ -1764,10 +1764,10 @@ class SpellPage extends GenericPage
$_ = [];
for ($j = 0; $j < 5; $j++)
if ($mask & (1 << $j))
$_[] = Lang::$game['stats'][$j];
$_[] = Lang::game('stats', $j);
if ($_ = implode(', ', $_));
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$effMV, $_) : $_;
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
break;
case 36: // Shapeshift
@@ -1779,17 +1779,17 @@ class SpellPage extends GenericPage
);
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'])
$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;
case 37: // Effect immunity
if (isset(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;
@@ -1797,7 +1797,7 @@ class SpellPage extends GenericPage
if (isset(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;
@@ -1805,22 +1805,22 @@ class SpellPage extends GenericPage
case 178: // Mod Debuff Resistance
case 245: // Mod Aura Duration By Dispel
if ($_ = Lang::game('dt', $effMV))
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$effMV, $_) : $_;
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
break;
case 44: // Track Creature
if ($_ = Lang::game('ct', $effMV))
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$effMV, $_) : $_;
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
break;
case 45: // Track Resource
if ($_ = Lang::spell('lockType', $effMV))
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$effMV, $_) : $_;
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
break;
case 75: // Language
if ($_ = Lang::game('languages', $effMV))
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$effMV, $_) : $_;
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
break;
case 77: // Mechanic Immunity
@@ -1830,17 +1830,17 @@ class SpellPage extends GenericPage
case 255: // Mod Mechanic Damage Taken Pct
case 276: // Mod Mechanic Damage Done Percent
if ($_ = Lang::game('me', $effMV))
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].Util::asHex($effMV), $_) : $_;
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').Util::asHex($effMV), $_) : $_;
break;
case 147: // Mechanic Immunity Mask
$_ = [];
foreach (Lang::$game['me'] as $k => $str)
foreach (Lang::game('me') as $k => $str)
if ($effMV & (1 << $k - 1))
$_[] = $str;
if ($_ = implode(', ', $_))
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].Util::asHex($effMV), $_) : $_;
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').Util::asHex($effMV), $_) : $_;
break;
case 10: // Mod Threat
@@ -1880,7 +1880,7 @@ class SpellPage extends GenericPage
case 271: // Mod Damage Percent Taken Form Caster
case 310: // Mod Creature AoE Damage Avoidance
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;
case 30: // Mod Skill
@@ -1888,41 +1888,41 @@ class SpellPage extends GenericPage
if ($_ = SkillList::getName($effMV))
$bar = ' (<a href="?skill='.$effMV.'">'.SkillList::getName($effMV).'</a>)';
else
$bar = Lang::$main['colon'].Util::ucFirst(Lang::$game['skill']).' #'.$effMV;;
$bar = Lang::main('colon').Util::ucFirst(Lang::game('skill')).' #'.$effMV;;
break;
case 107: // Flat Modifier
case 108: // Pct Modifier
if ($_ = Lang::spell('spellModOp', $effMV))
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$effMV, $_) : $_;
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$effMV, $_) : $_;
break;
case 189: // Mod Rating
case 220: // Combat Rating From Stat
$_ = [];
foreach (Lang::$spell['combatRating'] as $k => $str)
foreach (Lang::spell('combatRating') as $k => $str)
if ((1 << $k) & $effMV)
$_[] = $str;
if ($_ = implode(', ', $_))
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].Util::asHex($effMV), $_) : $_;
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').Util::asHex($effMV), $_) : $_;
break;
case 168: // Mod Damage Done Versus
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))
$_[] = $str;
if ($_ = implode(', ', $_))
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].Util::asHex($effMV), $_) : $_;
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').Util::asHex($effMV), $_) : $_;
break;
case 249: // Convert Rune
$x = $this->subject->getField('effect'.$i.'MiscValueB');
if ($_ = Lang::spell('powerRunes', $x))
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::$spell['_value'].Lang::$main['colon'].$x, $_) : $_;
$bar = User::isInGroup(U_GROUP_EMPLOYEE) ? sprintf(Util::$dfnString, Lang::spell('_value').Lang::main('colon').$x, $_) : $_;
break;
case 78: // Mounted
@@ -1933,11 +1933,11 @@ class SpellPage extends GenericPage
$bar = ' (<a href="?npc='.$transform['typeId'].'">'.$transform['displayName'].'</a>)';
}
else
$bar = Lang::$main['colon'].Lang::$game['npc'].' #'.$effMV;;
$bar = Lang::main('colon').Lang::game('npc').' #'.$effMV;;
break;
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
case 190: // Mod Faction Reputation Gain
$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);
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)
$foo['name'] .= ' ['.$this->subject->getField('effect'.$i.'MiscValueB').']';
}
else if ($effAura > 0)
$foo['name'] .= Lang::$main['colon'].'Unknown Aura ('.$effAura.')';
$foo['name'] .= Lang::main('colon').'Unknown Aura ('.$effAura.')';
break;
}

View File

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

View File

@@ -25,7 +25,7 @@ class TalentPage extends GenericPage
parent::__construct($pageCall, $__);
$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()

View File

@@ -32,7 +32,7 @@ class TitlePage extends GenericPage
$this->subject = new TitleList(array(['id', $this->typeId]));
if ($this->subject->error)
$this->notFound(Lang::$game['title']);
$this->notFound(Lang::game('title'));
$this->name = $this->subject->getHtmlizedName();
$this->nameFixed = Util::ucFirst(trim(strtr($this->subject->getField('male', true), ['%s' => '', ',' => ''])));
@@ -45,7 +45,7 @@ class TitlePage extends GenericPage
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()
@@ -57,17 +57,17 @@ class TitlePage extends GenericPage
$infobox = Lang::getInfoBoxForFlags($this->subject->getField('cuFlags'));
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)
$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
$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'))
$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'))
$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 */
@@ -91,7 +91,7 @@ class TitlePage extends GenericPage
$altTitle->id,
$altTitle->getHtmlizedName(),
$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);
$this->name = Util::ucFirst(Lang::$game['titles']);
$this->name = Util::ucFirst(Lang::game('titles'));
}
protected function generateContent()
@@ -56,9 +56,9 @@ class TitlesPage extends GenericPage
protected function generateTitle()
{
array_unshift($this->title, Util::ucFirst(Lang::$game['titles']));
array_unshift($this->title, Util::ucFirst(Lang::game('titles')));
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()

View File

@@ -27,14 +27,14 @@ class UtilityPage extends GenericPage
$this->page = $pageCall;
$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->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
$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]))
$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)
{
@@ -154,7 +154,7 @@ class UtilityPage extends GenericPage
$xml .= "<item>\n".
"<title><![CDATA[".htmlentities($row['subject'])."]]></title>\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".
"<guid>".HOST_URL.'?go-to-comment&amp;id='.$row['id']."</guid>\n".
"<domain />\n".
@@ -171,12 +171,12 @@ class UtilityPage extends GenericPage
if ($this->page == 'most-comments')
{
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
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()

View File

@@ -24,7 +24,7 @@ class ZonePage extends GenericPage
$this->subject = new ZoneList(array(['id', $this->typeId]));
if ($this->subject->error)
$this->notFound(Lang::$game['zone']);
$this->notFound(Lang::game('zone'));
$this->name = $this->subject->getField('name', true);
}
@@ -41,7 +41,7 @@ class ZonePage extends GenericPage
// City
if ($this->subject->getField('flags') & 0x200000 && !$this->subject->getField('parentArea'))
$infobox[] = Lang::$zone['city'];
$infobox[] = Lang::zone('city');
// Level
if ($_ = $this->subject->getField('levelMin'))
@@ -49,7 +49,7 @@ class ZonePage extends GenericPage
if ($_ < $this->subject->getField('levelMax'))
$_ .= ' - '.$this->subject->getField('levelMax');
$infobox[] = Lang::$game['level'].Lang::$main['colon'].$_;
$infobox[] = Lang::game('level').Lang::main('colon').$_;
}
// required Level
@@ -65,18 +65,18 @@ class ZonePage extends GenericPage
else if ($_ == 4)
$__ = '[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
$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
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
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
// [li]Attunement: [quest=24712][/li]
@@ -462,7 +462,7 @@ class ZonePage extends GenericPage
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);
$this->name = Util::ucFirst(Lang::$game['zones']);
$this->name = Util::ucFirst(Lang::game('zones'));
}
protected function generateContent()
@@ -167,9 +167,9 @@ class ZonesPage extends GenericPage
if ($this->category)
{
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)):
?>
<div class="clear"></div>
<h3><?php echo Lang::$item['content']; ?></h3>
<h3><?php echo Lang::item('content'); ?></h3>
<div id="book-generic"></div>
<script>//<![CDATA[

View File

@@ -1,6 +1,6 @@
<div class="clear"></div>
<div class="text">
<h2><?php echo Lang::$main['contribute']; ?></h2>
<h2><?php echo Lang::main('contribute'); ?></h2>
</div>
<div id="tabs-contribute-generic" style="width: 50%"></div>
<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";
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['timeSQL'].'</td><td>'.Util::formatTime($this->mysql['time'] * 1000, true)."</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";
endif;
if ($this->time):
@@ -13,9 +13,9 @@ if (User::isInGroup(U_GROUP_EMPLOYEE) && ($this->time || isset($this->mysql) ||
endif;
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):
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;
echo " </table>\n";
@@ -28,7 +28,7 @@ endif;
<noscript>
<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>
<script type="text/javascript">DomContentLoaded.now()</script>

View File

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

View File

@@ -2,7 +2,7 @@
<?php
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>
<div class="infobox-spacer"></div>
<div id="infobox-contents0"></div>
@@ -15,7 +15,7 @@ endif;
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>
<div class="infobox-spacer"></div>
<div id="infobox-contents1"></div>
@@ -34,12 +34,12 @@ endif;
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>
<?php
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>
<?php
endif;

View File

@@ -1,6 +1,6 @@
<?php
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']):
echo ' <div class="book"><div class="page">'.$m['subject']."</div></div>\n";

View File

@@ -1,15 +1,15 @@
<?php
if (isset($this->map) && empty($this->map)):
echo Lang::$zone['noMap'];
echo Lang::zone('noMap');
elseif (!empty($this->map['data'])):
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']);
$i = 0;
foreach ($this->map['mapperData'] as $areaId => $areaData):
if ($n > 1 && $i++ > 0):
echo $i < $n ? ', ' : Lang::$main['and'];
echo $i < $n ? ', ' : Lang::main('and');
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'].')';

View File

@@ -1,4 +1,4 @@
<h3><?php echo Lang::$spell['reagents']; ?></h3>
<h3><?php echo Lang::spell('reagents'); ?></h3>
<?php
if ($enhanced):
@@ -168,8 +168,8 @@ if ($enhanced):
<tr>
<th></th>
<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',false);" value="<?php echo Lang::$spell['_collapseAll']; ?>">
<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'); ?>">
</th>
</tr>
<?php

View File

@@ -13,9 +13,9 @@ if (isset($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({' .
(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:
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;
@@ -28,46 +28,46 @@ if (isset($this->redButtons[BUTTON_VIEW3D])):
foreach ($b as $k => $v)
$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:
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;
// item comparison tool
if (isset($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:
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;
// item upgrade search
if (isset($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:
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;
// goto: talent calculator
if (isset($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:
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;
// goto: (sub-)forum
if (isset($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:
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;

View File

@@ -4,7 +4,7 @@ if (!isset($offset)) // in case we have m
$offset = 0;
if ($rewTitle):
echo $rewTitle.Lang::$main['colon'].(isset($extra) ? $extra : null);
echo $rewTitle.Lang::main('colon').(isset($extra) ? $extra : null);
endif;
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>
<div class="infobox-spacer"></div>
<table class="series">

View File

@@ -9,7 +9,7 @@ $hasBuff = !empty($this->jsGlobals[6][2][$this->typeId]['buff']); // not set wit
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>
<?php
endif;

View File

@@ -19,17 +19,17 @@
<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(); ?>)));
</script>
<h1 class="h1-icon"><?php echo Lang::$account['myAccount']; ?></h1>
<h1 class="h1-icon"><?php echo Lang::account('myAccount'); ?></h1>
<?php
// Banned-Minibox
if ($b = $this->banned):
?>
<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">
<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['reason'].'</b>'.Lang::$main['colon'].'<span class="msg-failure">'.($b['reason'] ?: Lang::$account['noReason']).'</span>'; ?></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('reason').'</b>'.Lang::main('colon').'<span class="msg-failure">'.($b['reason'] ?: Lang::account('noReason')).'</span>'; ?></div></li>
</ul>
</div>
<?php
@@ -37,7 +37,7 @@ if ($b = $this->banned):
else:
// profile editing
echo ' '.Lang::$account['editAccount']."\n";
echo ' '.Lang::account('editAccount')."\n";
?>
<ul class="last">

View File

@@ -67,20 +67,20 @@
<table align="center">
<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>
</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>
</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>
</tr>
<tr>
<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>
<input type="hidden" name="token" value="<?php echo $this->token; ?>" />
</table>
@@ -117,10 +117,10 @@
<div id="inputbox-error"><?php echo $this->error; ?></div>
<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>
<input type="submit" value="<?php echo Lang::$account['continue']; ?>" />
<input type="submit" value="<?php echo Lang::account('continue'); ?>" />
</div>
</div>

View File

@@ -32,37 +32,37 @@
<form action="?account=signin&amp;next=<?php echo $this->next; ?>" method="post" onsubmit="return inputBoxValidate(this)">
<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>
<table align="center">
<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>
</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>
</tr>
<tr>
<td align="right" valign="top"><input type="checkbox" name="remember_me" id="remember_me" value="yes" checked="checked" /></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>
<input type="submit" value="<?php echo Lang::$account['signIn']; ?>" />
<input type="submit" value="<?php echo Lang::account('signIn'); ?>" />
</td>
</tr>
</table>
<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>
</form>
<div class="pad3"></div>
<?php
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;
?>
<script type="text/javascript">$WH.ge('username-generic').focus()</script>

View File

@@ -87,27 +87,27 @@
<table align="center">
<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>
</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>
</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>
</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>
</tr>
<td align="right" valign="top"><input type="checkbox" name="remember_me" id="remember_me" value="yes" /></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>
<input type="submit" name="signup" value="<?php echo Lang::$account['continue']; ?>" />
<input type="submit" name="signup" value="<?php echo Lang::account('continue'); ?>" />
</td>
</tr>
</table>

View File

@@ -23,7 +23,7 @@ $this->brick('redButtons');
<?php
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;
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;
echo '</td></tr>';
@@ -79,12 +79,12 @@ endforeach;
<?php
if ($r = $this->rewards):
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]);
endif;
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):
echo ' <li><div>'.$i."</div></li>\n";
endforeach;
@@ -92,7 +92,7 @@ if ($r = $this->rewards):
endif;
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";
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>
<?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)">
<table>
<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">
<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="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>
</td>
</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">
<option></option>
<?php
foreach (Lang::$game['si'] as $i => $str):
foreach (Lang::game('si') as $i => $str):
if ($str):
echo ' <option value="'.$i.'" '.((isset($f['si']) && $f['si'] == $i) ? 'selected' : null).'>'.$str."</option>\n";
endif;
@@ -39,25 +39,25 @@ endforeach;
</select>
</td>
<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>
</tr></table></td>
</tr>
</table>
<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 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>
<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>
</div>
<div class="clear"></div>
<div class="padded">
<input type="submit" value="<?php echo Lang::$main['applyFilter']; ?>" />
<input type="reset" value="<?php echo Lang::$main['resetForm']; ?>" />
<input type="submit" value="<?php echo Lang::main('applyFilter'); ?>" />
<input type="reset" value="<?php echo Lang::main('resetForm'); ?>" />
</div>
</form>

View File

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

View File

@@ -43,7 +43,7 @@ endif;
if (isset($this->unavailable)):
?>
<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
endif;
@@ -52,7 +52,7 @@ if (!empty($this->transfer)):
endif;
?>
<h2 class="clear"><?php echo Lang::$main['related']; ?></h2>
<h2 class="clear"><?php echo Lang::main('related'); ?></h2>
</div>
<?php

View File

@@ -53,14 +53,14 @@
<div class="footer">
<div class="footer-links linklist">
<a href="?aboutus"><?php echo lang::$main['aboutUs']; ?></a>|
<a href="#" id="footer-links-language"><?php echo Lang::$main['language']; ?></a>
<a href="?aboutus"><?php echo Lang::main('aboutUs'); ?></a>|
<a href="#" id="footer-links-language"><?php echo Lang::main('language'); ?></a>
</div>
<div class="footer-copy">&#12484; 2014 Aowow</div>
</div>
<?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>
</html>

View File

@@ -25,7 +25,7 @@
if ($this->disabled):
?>
<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
endif;
@@ -36,7 +36,7 @@ endif;
if (!empty($this->subItems)):
?>
<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">
<ul>
@@ -44,7 +44,7 @@ if (!empty($this->subItems)):
foreach ($this->subItems['data'] as $k => $i):
if ($k < (count($this->subItems['data']) / 2)):
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;
endforeach;
?>
@@ -59,7 +59,7 @@ if (!empty($this->subItems)):
foreach ($this->subItems['data'] as $k => $i):
if ($k >= (count($this->subItems['data']) / 2)):
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;
endforeach;
?>
@@ -72,7 +72,7 @@ endif;
$this->brick('book');
?>
<h2 class="clear"><?php echo Lang::$main['related']; ?></h2>
<h2 class="clear"><?php echo Lang::main('related'); ?></h2>
</div>
<?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' ?>;">
<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 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>
<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>
<div class="clear"></div>
<select name="qu[]" size="7" multiple="multiple" class="rightselect" style="background-color: #181818">
<?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";
endforeach;
?>
@@ -32,8 +32,8 @@ endforeach;
if (!empty($f['slot'])):
?>
<div class="rightpanel2">
<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>
<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>
<div class="clear"></div>
<select name="sl[]" size="<?php echo min(count($f['slot']), 7); ?>" multiple="multiple" class="rightselect">
<?php
@@ -49,8 +49,8 @@ endif;
if (!empty($f['type'])):
?>
<div class="rightpanel2">
<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>
<select name="ty[]" size="<?php echo min(count($f['type']), 7); ?>" multiple="multiple" class="rightselect">
<?php
@@ -64,27 +64,27 @@ if (!empty($f['type'])):
<table>
<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></td>
</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">
<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>
</tr>
</table>
</td>
<td></td>
</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">
<option></option>
<?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";
endforeach;
?>
@@ -93,7 +93,7 @@ endforeach;
&nbsp;<select name="ub">
<option></option>
<?php
foreach (Lang::$game['cl'] as $k => $str):
foreach (Lang::game('cl') as $k => $str):
if ($str):
echo ' <option value="'.$k.'"'.(isset($f['ub']) && $k == $f['ub'] ? ' selected' : null).'>'.$str."</option>\n";
endif;
@@ -105,55 +105,55 @@ endforeach;
</table>
<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 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>
<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>
</div>
<div class="pad3"></div>
<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 id="statweight-disclosure" style="display: none">
<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>
<table>
<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>
</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">
<select name="gm">
<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="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="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="4"<?php echo (isset($f['gm']) && $f['gm'] == 4 ? ' selected' : null).'>'.Lang::item('quality', 4); ?></option>
</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>
</tr>
</table>
<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>
<small><?php echo Lang::$main['cappedHint']; ?></small>
<small><?php echo Lang::main('cappedHint'); ?></small>
</div>
<div class="clear"></div>
<div class="padded">
<?php
echo Lang::$main['groupBy'].Lang::$main['colon']."\n";
foreach (Lang::$main['gb'] as $k => $str):
echo Lang::main('groupBy').Lang::main('colon')."\n";
foreach (Lang::main('gb') as $k => $str):
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";
else:
@@ -166,8 +166,8 @@ endforeach;
<div class="clear"></div>
<div class="padded">
<input type="submit" value="<?php echo Lang::$main['applyFilter']; ?>" />
<input type="reset" value="<?php echo Lang::$main['resetForm']; ?>" />
<input type="submit" value="<?php echo Lang::main('applyFilter'); ?>" />
<input type="reset" value="<?php echo Lang::main('resetForm'); ?>" />
</div>
<input type="hidden" name="upg"<?php echo !empty($f['upg']) ? ' value="'.$f['upg'].'"' : null; ?>/>

View File

@@ -54,28 +54,28 @@ endforeach;
if ($this->unavailable):
?>
<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; ?>
<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>
<?php
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;
?>
</ul>
<h2 class="clear"><?php echo Lang::$itemset['summary']; ?></h2>
<h2 class="clear"><?php echo Lang::itemset('summary'); ?></h2>
<div id="summary-generic"></div>
<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']; ?>});
//]]></script>
<h2 class="clear"><?php echo Lang::$main['related']; ?></h2>
<h2 class="clear"><?php echo Lang::main('related'); ?></h2>
</div>
<?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' ?>;">
<form action="?itemsets&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
<div class="rightpanel">
<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>
<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>
<div class="clear"></div>
<select name="qu[]" size="7" multiple="multiple" class="rightselect" style="background-color: #181818">
<?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";
endforeach;
?>
@@ -29,12 +29,12 @@ endforeach;
</div>
<div class="rightpanel2">
<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>
<select name="ty[]" size="7" multiple="multiple" class="rightselect">
<?php
foreach (Lang::$itemset['types'] as $i => $str):
foreach (Lang::itemset('types') as $i => $str):
if ($str):
echo ' <option value="'.$i.'"'.(isset($f['ty']) && in_array($i, (array)$f['ty']) ? ' selected' : null).'>'.$str."</option>\n";
endif;
@@ -45,23 +45,23 @@ endforeach;
<table>
<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>
</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" width="100%">
<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>
</tr></table>
</td>
</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">
<option></option>
<?php
foreach (Lang::$game['cl'] as $i => $str):
foreach (Lang::game('cl') as $i => $str):
if ($str):
echo ' <option value="'.$i.'"'.(isset($f['cl']) && $i == $f['cl'] ? ' selected' : null).'>'.$str."</option>\n";
endif;
@@ -70,11 +70,11 @@ endforeach;
</select></td>
<td class="padded">
<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">
<option></option>
<?php
foreach (Lang::$itemset['notes'] as $i => $str):
foreach (Lang::itemset('notes') as $i => $str):
if ($str):
echo ' <option value="'.$i.'"'.(isset($f['ta']) && $i == $f['ta'] ? ' selected' : null).'>'.$str."</option>\n";
endif;
@@ -87,18 +87,18 @@ endforeach;
</table>
<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 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>
<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>
</div>
<div class="clear"></div>
<div class="padded">
<input type="submit" value="<?php echo Lang::$main['applyFilter']; ?>" />
<input type="reset" value="<?php echo Lang::$main['resetForm']; ?>" />
<input type="submit" value="<?php echo Lang::main('applyFilter'); ?>" />
<input type="reset" value="<?php echo Lang::main('resetForm'); ?>" />
</div>
</form>

View File

@@ -15,33 +15,33 @@
<div class="text">
<div style="text-align: center">
<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 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 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 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>
<div style="padding-bottom: 4px"></div>
<select onchange="ma_ChooseZone(this)" class="zone-picker">
<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['Raids']; ?>" id="maps-raids"></optgroup>
<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('Raids'); ?>" id="maps-raids"></optgroup>
</select>
<select onchange="ma_ChooseZone(this)" class="zone-picker">
<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['Miscellaneous']; ?>">
<option value="-1"><?php echo Lang::$maps['Azeroth']; ?></option>
<option value="-3"><?php echo Lang::$maps['EasternKingdoms']; ?></option>
<option value="-6"><?php echo Lang::$maps['Kalimdor']; ?></option>
<option value="-2"><?php echo Lang::$maps['Outland']; ?></option>
<option value="-5"><?php echo Lang::$maps['Northrend']; ?></option>
<option value="-4"><?php echo Lang::$maps['CosmicMap']; ?></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('Miscellaneous'); ?>">
<option value="-1"><?php echo Lang::maps('Azeroth'); ?></option>
<option value="-3"><?php echo Lang::maps('EasternKingdoms'); ?></option>
<option value="-6"><?php echo Lang::maps('Kalimdor'); ?></option>
<option value="-2"><?php echo Lang::maps('Outland'); ?></option>
<option value="-5"><?php echo Lang::maps('Northrend'); ?></option>
<option value="-4"><?php echo Lang::maps('CosmicMap'); ?></option>
</optgroup>
</select>
</div>
@@ -49,8 +49,8 @@
<div id="mapper-generic"></div>
<div class="pad"></div>
<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:;" onclick="myMapper.setCoords([])" onmousedown="return false"><?php echo Lang::$maps['clear']; ?></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>
</div>
</div>
<script type="text/javascript">ma_Init();</script>

View File

@@ -21,12 +21,12 @@
$this->brick('article');
if ($this->accessory):
echo ' <div>'.Lang::$npc['accessoryFor'].' ';
echo ' <div>'.Lang::npc('accessoryFor').' ';
$n = count($this->accessory);
foreach ($this->accessory as $i => $ac):
if ($n > 1 && $i > 0):
echo ($i == $n - 1) ? Lang::$main['and'] : ', ';
echo ($i == $n - 1) ? Lang::main('and') : ', ';
endif;
echo '<a href="?npc='.$ac[0].'">'.$ac[1].'</a>';
endforeach;
@@ -35,19 +35,19 @@ if ($this->accessory):
endif;
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>
<?php
elseif (!empty($this->map)):
$this->brick('mapper');
else:
echo ' '.Lang::$npc['unkPosition']."\n";
echo ' '.Lang::npc('unkPosition')."\n";
endif;
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>
<?php
foreach ($this->quotes[0] as $group):
@@ -59,9 +59,9 @@ if ($this->quotes[0]):
$last = end($group);
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>";
endforeach;
@@ -79,9 +79,9 @@ endif;
if ($this->reputation):
?>
<h3><?php echo Lang::$main['gains']; ?></h3>
<h3><?php echo Lang::main('gains'); ?></h3>
<?php
echo Lang::$npc['gainsDesc'].Lang::$main['colon'];
echo Lang::npc('gainsDesc').Lang::main('colon');
foreach ($this->reputation as $set):
if (count($this->reputation) > 1):
@@ -91,8 +91,8 @@ if ($this->reputation):
echo '<ul>';
foreach ($set[1] as $itr):
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>';
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>';
endforeach;
echo '</ul>';
@@ -103,7 +103,7 @@ if ($this->reputation):
endforeach;
endif;
?>
<h2 class="clear"><?php echo Lang::$main['related']; ?></h2>
<h2 class="clear"><?php echo Lang::main('related'); ?></h2>
</div>
<?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' ?>;">
<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 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>
<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>
<div class="clear"></div>
<select name="cl[]" size="5" multiple="multiple" class="rightselect" style="width: 9.5em">
<?php
foreach (Lang::$npc['rank'] as $i => $str):
foreach (Lang::npc('rank') as $i => $str):
if ($str):
echo ' <option value="'.$i.'"'.(isset($f['cl']) && in_array($i, (array)$f['cl']) ? ' selected' : null).'>'.$str."</option>\n";
endif;
@@ -31,11 +31,11 @@ endforeach;
</div>
<?php if ($this->petFamPanel): ?>
<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>
<select name="fa[]" size="7" multiple="multiple" class="rightselect">
<?php
foreach (Lang::$game['fa'] as $i => $str):
foreach (Lang::game('fa') as $i => $str):
if ($str):
echo ' <option value="'.$i.'"'.(isset($f['fa']) && in_array($i, (array)$f['fa']) ? ' selected' : null).'>'.$str."</option>\n";
endif;
@@ -46,20 +46,20 @@ endforeach;
<?php endif; ?>
<table>
<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">
<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="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>
</td>
</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" width="100%">
<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; ?>>
<option></option>
<option value="1" class="q2"<?php echo isset($f['ra']) && $f['ra'] == 1 ? ' selected' : null; ?>>A</option>
@@ -79,18 +79,18 @@ endforeach;
</table>
<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 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>
<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>
</div>
<div class="clear"></div>
<div class="padded">
<input type="submit" value="<?php echo Lang::$main['applyFilter']; ?>" />
<input type="reset" value="<?php echo Lang::$main['resetForm']; ?>" />
<input type="submit" value="<?php echo Lang::main('applyFilter'); ?>" />
<input type="reset" value="<?php echo Lang::main('resetForm'); ?>" />
</div>
</form>

View File

@@ -23,13 +23,13 @@ $this->brick('article');
if (!empty($this->map)):
$this->brick('mapper');
else:
echo Lang::$gameObject['unkPosition'];
echo Lang::gameObject('unkPosition');
endif;
$this->brick('book');
?>
<h2 class="clear"><?php echo Lang::$main['related']; ?></h2>
<h2 class="clear"><?php echo Lang::main('related'); ?></h2>
</div>
<?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' ?>;">
<form action="?objects<?php echo $this->subCat; ?>&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
<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>
<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 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>
<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>
</div>
<div class="clear"></div>
<div class="padded">
<input type="submit" value="<?php echo Lang::$main['applyFilter']; ?>" />
<input type="reset" value="<?php echo Lang::$main['resetForm']; ?>" />
<input type="submit" value="<?php echo Lang::main('applyFilter'); ?>" />
<input type="reset" value="<?php echo Lang::main('resetForm'); ?>" />
</div>
</form>

View File

@@ -11,41 +11,41 @@
?>
<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>
<p><?php echo Lang::$main['_cpHelp']; ?></p>
<p><?php echo Lang::main('_cpHelp'); ?></p>
<div class="profiler-home">
<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="" />
</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="eu" id="rg-2" /><label for="rg-2" class="profiler-button profiler-option-right"><em><i>Europe</i></em></label>
</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" />
<div class="profiler-autocomplete"></div>
</div>
<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-search"><em><?php echo Lang::$main['searchButton']; ?></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>
</div>
</div>
<div class="clear pad3"></div>
<p><?php echo Lang::$main['_cpFooter']; ?></p>
<p><?php echo Lang::main('_cpFooter'); ?></p>
</div>
<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
action="?profiles&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
<div class="rightpanel">
<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>
<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>
<div class="clear"></div>
<select name="cl[]" size="7" multiple="multiple" class="rightselect" style="background-color: #181818">
<?php
foreach (Lang::$game['cl'] as $k => $str):
foreach (Lang::game('cl') as $k => $str):
if ($str):
echo ' <option class="c'.$k.'" value="'.$k.'"'.(isset($f['cl']) && in_array($k, (array)$f['cl']) ? ' selected' : null).'>'.$str."</option>\n";
endif;
@@ -32,12 +32,12 @@ endforeach;
</div>
<div class="rightpanel2">
<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>
<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>
<div class="clear"></div>
<select name="ra[]" size="7" multiple="multiple" class="rightselect" onchange="pr_onChangeRace()">
<?php
foreach (Lang::$game['ra'] as $k => $str):
foreach (Lang::game('ra') as $k => $str):
if ($str && $k > 0):
echo ' <option value="'.$k.'"'.(isset($f['ra']) && in_array($k, (array)$f['ra']) ? ' selected' : null).'>'.$str."</option>\n";
endif;
@@ -49,47 +49,47 @@ endforeach;
<table>
<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">
<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="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>
</td>
</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)">
<option></option>
<option value="us">US & Oceanic</option>
<option value="eu" selected="selected">Europe</option>
</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>
</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">
<option></option>
<option value="1"><?php echo Lang::$game['si'][1]; ?></option>
<option value="2"><?php echo Lang::$game['si'][2]; ?></option>
<option value="1"><?php echo Lang::game('si', 1); ?></option>
<option value="2"><?php echo Lang::game('si', 2); ?></option>
</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>
</tr>
</table>
<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">
<?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 class="clear"></div>
<div class="padded">
<input type="submit" value="<?php echo Lang::$main['applyFilter']; ?>" />
<input type="reset" value="<?php echo Lang::$main['resetForm']; ?>" />
<input type="submit" value="<?php echo Lang::main('applyFilter'); ?>" />
<input type="reset" value="<?php echo Lang::main('resetForm'); ?>" />
</div>
</form>

View File

@@ -18,17 +18,17 @@
<h1><?php echo $this->name; ?></h1>
<?php if ($this->unavailable): ?>
<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
endif;
if ($this->objectives):
echo $this->objectives."\n";
elseif ($this->requestItems):
echo ' <h3>'.Lang::$quest['progress']."</h3>\n";
echo ' <h3>'.Lang::quest('progress')."</h3>\n";
echo $this->requestItems."\n";
elseif ($this->offerReward):
echo ' <h3>'.Lang::$quest['completion']."</h3>\n";
echo ' <h3>'.Lang::quest('completion')."</h3>\n";
echo $this->offerReward."\n";
endif;
@@ -37,7 +37,7 @@ if ($e = $this->end):
<table class="iconlist">
<tr><th><p style="height: 26px; width: 30px;">&nbsp;</p></th><td><?php echo $e; ?></td></tr>
<?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; ?>
</table>
<div class="pad"></div>
@@ -46,7 +46,7 @@ endif;
if ($o = $this->objectiveList):
if ($e = $this->end):
echo ' '.Lang::$quest['providedItem'].Lang::$main['colon']."\n";
echo ' '.Lang::quest('providedItem').Lang::main('colon')."\n";
endif;
?>
<table class="iconlist">
@@ -88,7 +88,7 @@ if ($o = $this->objectiveList):
endforeach;
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;
?>
</table>
@@ -108,19 +108,19 @@ endif;
$this->brick('mapper');
if ($this->details):
echo ' <h3>'.Lang::$quest['description']."</h3>\n" . $this->details."\n";
echo ' <h3>'.Lang::quest('description')."</h3>\n" . $this->details."\n";
endif;
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>
<?php
endif;
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>
<?php
endif;
@@ -128,10 +128,10 @@ endif;
if ($r = $this->rewards):
$offset = 0;
echo ' <h3>'.Lang::$main['rewards']."</h3>\n";
echo ' <h3>'.Lang::main('rewards')."</h3>\n";
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']);
endif;
@@ -141,10 +141,10 @@ if ($r = $this->rewards):
endif;
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']);
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']);
endif;
endif;
@@ -155,7 +155,7 @@ if ($r = $this->rewards):
endif;
$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);
endif;
@@ -163,26 +163,26 @@ if ($r = $this->rewards):
endif;
if ($g = $this->gains):
echo ' <h3>'.Lang::$main['gains']."</h3>\n";
echo ' '.Lang::$quest['gainsDesc'].Lang::$main['colon']."\n";
echo ' <h3>'.Lang::main('gains')."</h3>\n";
echo ' '.Lang::quest('gainsDesc').Lang::main('colon')."\n";
echo " <ul>\n";
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;
if (!empty($g['rep'])):
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;
endif;
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;
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;
echo " </ul>\n";
@@ -195,7 +195,7 @@ if (!empty($this->transfer)):
endif;
?>
<h2 class="clear"><?php echo Lang::$main['related']; ?></h2>
<h2 class="clear"><?php echo Lang::main('related'); ?></h2>
</div>
<?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' ?>;">
<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 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>
<select name="ty[]" size="6" multiple="multiple" class="rightselect">
<?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";
endforeach;
?>
@@ -29,31 +29,31 @@ endforeach;
<table>
<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">
<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="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>
</td>
</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" width="100%">
<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>
</tr></table>
</td>
</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">
<option></option>
<?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";
endforeach;
?>
@@ -61,18 +61,18 @@ endforeach;
</tr>
</table>
<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 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>
<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>
</div>
<div class="clear"></div>
<div class="padded">
<input type="submit" value="<?php echo Lang::$main['applyFilter']; ?>" />
<input type="reset" value="<?php echo Lang::$main['resetForm']; ?>" />
<input type="submit" value="<?php echo Lang::main('applyFilter'); ?>" />
<input type="reset" value="<?php echo Lang::main('resetForm'); ?>" />
</div>
</form>

View File

@@ -16,8 +16,8 @@ if (isset($this->error)):
<div class="pad3"></div>
<div class="inputbox">
<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>
<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>
<?php
else:
?>
@@ -29,15 +29,15 @@ else:
?>
<div id="ss-container" style="float:right;"></div>
<div id="img-edit-form">
<span><?php echo Lang::$main['cropHint']; ?></span>
<span><?php echo Lang::main('cropHint'); ?></span>
<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">
<textarea style="resize: none;" name="screenshotcaption" cols="27" rows="4"><?php echo $this->caption; ?></textarea>
<div class="text-counter">text counter ph</div>
<div style="clear:right;"></div>
<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>
</div>
<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>
<?php
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):
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;
echo "</h1>\n";
?>
@@ -25,16 +25,16 @@ if ($this->lvTabs):
$this->brick('lvTabs');
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):
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;
echo "</h1>\n";
?>
<div class="search-noresults"></div>
<?php
echo ' '.Lang::$main['tryAgain']."\n";
echo ' '.Lang::main('tryAgain')."\n";
endif;
?>
<div class="clear"></div>

View File

@@ -35,7 +35,7 @@ if ($this->reagents[1]):
echo " <div style=\"float: left\">\n";
endif;
?>
<h3><?php echo Lang::$spell['tools']; ?></h3>
<h3><?php echo Lang::spell('tools'); ?></h3>
<table class="iconlist">
<?php
foreach ($this->tools as $i => $t):
@@ -69,7 +69,7 @@ if (!empty($this->transfer)):
endif;
?>
<h3><?php echo Lang::$spell['_spellDetails']; ?></h3>
<h3><?php echo Lang::spell('_spellDetails'); ?></h3>
<table class="grid" id="spelldetails">
<colgroup>
@@ -85,46 +85,46 @@ endif;
<td style="height: 0; padding: 0; border: 0" colspan="2"></td>
</tr>
<tr>
<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>
<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>
</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>
</tr>
<tr>
<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>
<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>
</tr>
<tr>
<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>
<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>
</tr>
<tr>
<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>
<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>
</tr>
</table>
</td>
</tr>
<tr>
<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>
<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>
</tr>
<tr>
<th><?php echo Lang::$spell['_range']; ?></th>
<td><?php echo $this->range.' '.Lang::$spell['_distUnit'].' <small>('.$this->rangeName; ?>)</small></td>
<th><?php echo Lang::spell('_range'); ?></th>
<td><?php echo $this->range.' '.Lang::spell('_distUnit').' <small>('.$this->rangeName; ?>)</small></td>
</tr>
<tr>
<th><?php echo Lang::$spell['_castTime']; ?></th>
<th><?php echo Lang::spell('_castTime'); ?></th>
<td><?php echo $this->castTime; ?></td>
</tr>
<tr>
<th><?php echo Lang::$spell['_cooldown']; ?></th>
<td><?php echo !empty($this->cooldown) ? $this->cooldown : '<span class="q0">'.Lang::$main['n_a'].'</span>'; ?></td>
<th><?php echo Lang::spell('_cooldown'); ?></th>
<td><?php echo !empty($this->cooldown) ? $this->cooldown : '<span class="q0">'.Lang::main('n_a').'</span>'; ?></td>
</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>
</tr>
<?php
@@ -132,13 +132,13 @@ endif;
if (!in_array(array_values($this->scaling), [[-1, -1, 0, 0], [0, 0, 0, 0]])):
?>
<tr>
<th><?php echo Lang::$spell['_scaling']; ?></th>
<th><?php echo Lang::spell('_scaling'); ?></th>
<td colspan="3">
<?php
foreach ($this->scaling as $k => $s):
if ($s > 0):
echo ' '.sprintf(Lang::$spell['scaling'][$k], $s * 100)."<br>\n";
echo ' '.sprintf(Lang::spell('scaling', $k), $s * 100)."<br>\n";
endif;
endforeach;
?>
@@ -150,7 +150,7 @@ endif;
if (!empty($this->stances)):
?>
<tr>
<th><?php echo Lang::$spell['_forms']; ?></th>
<th><?php echo Lang::spell('_forms'); ?></th>
<td colspan="3"><?php echo $this->stances; ?></td>
</tr>
<?php
@@ -159,7 +159,7 @@ endif;
if (!empty($this->items)):
?>
<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>
</tr>
<?php
@@ -168,29 +168,29 @@ endif;
foreach ($this->effects as $i => $e):
?>
<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">
<?php
echo ' '.$e['name'].'<small>' .
(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['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['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['interval']) ? '<br>'.Lang::spell('_interval').Lang::main('colon').$e['interval'] : null) .
(isset($e['mechanic']) ? '<br>'.Lang::game('mechanic') .Lang::main('colon').$e['mechanic'] : null);
if (isset($e['procData'])):
echo '<br>';
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):
echo Lang::$spell['procChance'].Lang::$main['colon'].$e['procData'][0].'%';
echo Lang::spell('procChance').Lang::main('colon').$e['procData'][0].'%';
endif;
if ($e['procData'][1]):
if ($e['procData'][0] < 100.0):
echo '<br>';
endif;
echo sprintf(Lang::$game['cooldown'], $e['procData'][1]);
echo sprintf(Lang::game('cooldown'), $e['procData'][1]);
endif;
endif;
@@ -224,7 +224,7 @@ endforeach;
?>
</table>
<h2 class="clear"><?php echo Lang::$main['related']; ?></h2>
<h2 class="clear"><?php echo Lang::main('related'); ?></h2>
</div>
<?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' ?>;">
<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 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>
<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>
<div class="clear"></div>
<select name="sc[]" size="7" multiple="multiple" class="rightselect" style="width: 8em">
<?php
foreach (Lang::$game['sc'] as $i => $str):
foreach (Lang::game('sc') as $i => $str):
if ($str):
echo ' <option value="'.$i.'"'.(isset($f['sc']) && in_array($i, (array)$f['sc']) ? ' selected' : null).'>'.$str."</option>\n";
endif;
@@ -31,12 +31,12 @@ endforeach;
</div>
<?php if ($f['classPanel']): ?>
<div class="rightpanel2">
<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>
<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>
<div class="clear"></div>
<select name="cl[]" size="8" multiple="multiple" class="rightselect" style="width: 8em; background-color: #181818">
<?php
foreach (Lang::$game['cl'] as $i => $str):
foreach (Lang::game('cl') as $i => $str):
if ($str):
echo ' <option value="'.$i.'"'.(isset($f['cl']) && in_array($i, (array)$f['cl']) ? ' selected' : null).' class="c'.$i.'">'.$str."</option>\n";
endif;
@@ -50,12 +50,12 @@ endif;
if ($f['glyphPanel']):
?>
<div class="rightpanel2">
<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>
<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>
<div class="clear"></div>
<select name="gl[]" size="2" multiple="multiple" class="rightselect" style="width: 8em">
<?php
foreach (Lang::$game['gl'] as $i => $str):
foreach (Lang::game('gl') as $i => $str):
if ($str):
echo ' <option value="'.$i.'"'.(isset($f['gl']) && in_array($i, (array)$f['gl']) ? ' selected' : null).'>'.$str."</option>\n";
endif;
@@ -66,29 +66,29 @@ endforeach;
<?php endif; ?>
<table>
<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">
<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="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>
</td>
</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">
<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>
</tr></table>
</td>
</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">
<option></option>
<?php
foreach (Lang::$game['ra'] as $i => $str):
foreach (Lang::game('ra') as $i => $str):
if ($str && $i > 0):
echo ' <option value="'.$i.'"'.(isset($f['ra']) && $f['ra'] == $i ? ' selected' : null).'>'.$str."</option>\n";
endif;
@@ -97,11 +97,11 @@ endforeach;
</select></td>
<td class="padded"></td>
</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">
<option></option>
<?php
foreach (Lang::$game['me'] as $i => $str):
foreach (Lang::game('me') as $i => $str):
if ($str):
echo ' <option value="'.$i.'"'.(isset($f['me']) && $f['me'] == $i ? ' selected' : null).'>'.$str."</option>\n";
endif;
@@ -110,11 +110,11 @@ endforeach;
</select></td>
<td>
<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">
<option></option>
<?php
foreach (Lang::$game['dt'] as $i => $str):
foreach (Lang::game('dt') as $i => $str):
if ($str):
echo ' <option value="'.$i.'"'.(isset($f['dt']) && $f['dt'] == $i ? ' selected' : null).'>'.$str."</option>\n";
endif;
@@ -127,18 +127,18 @@ endforeach;
</table>
<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 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>
<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>
</div>
<div class="clear"></div>
<div class="padded">
<input type="submit" value="<?php echo Lang::$main['applyFilter']; ?>" />
<input type="reset" value="<?php echo Lang::$main['resetForm']; ?>" />
<input type="submit" value="<?php echo Lang::main('applyFilter'); ?>" />
<input type="reset" value="<?php echo Lang::main('resetForm'); ?>" />
</div>
</form>

View File

@@ -12,7 +12,7 @@
<div id="<?php echo $this->tcType; ?>-classes">
<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 id="<?php echo $this->tcType; ?>-itself"></div>

View File

@@ -15,7 +15,7 @@ if (isset($this->typeStr)):
<div class="inputbox">
<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
else:
?>