mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Misc/Notices
* fixed display of GemConditions on enchantment detail page * correctly initialize class and race masks for items
This commit is contained in:
@@ -64,7 +64,7 @@ audio processing may require [lame](https://sourceforge.net/projects/lame/files/
|
||||
> \<localeCode>/Interface/PvPRankBadges
|
||||
> \<localeCode>/Interface/FlavorImages
|
||||
> \<localeCode>/Interface/Calendar/Holidays/
|
||||
> \<localeCode>/Sounds/
|
||||
> \<localeCode>/Sound/
|
||||
|
||||
.. optionaly (for other uses):
|
||||
> \<localeCode>/Interface/GLUES/LOADINGSCREENS/
|
||||
|
||||
@@ -52,12 +52,14 @@ class ItemList extends BaseType
|
||||
|
||||
// unify those pesky masks
|
||||
$_ = &$_curTpl['requiredClass'];
|
||||
if ($_ < 0 || ($_ & CLASS_MASK_ALL) == CLASS_MASK_ALL)
|
||||
$_ &= CLASS_MASK_ALL;
|
||||
if ($_ < 0 || $_ == CLASS_MASK_ALL)
|
||||
$_ = 0;
|
||||
unset($_);
|
||||
|
||||
$_ = &$_curTpl['requiredRace'];
|
||||
if ($_ < 0 || ($_ & RACE_MASK_ALL) == RACE_MASK_ALL)
|
||||
$_ &= RACE_MASK_ALL;
|
||||
if ($_ < 0 || $_ == RACE_MASK_ALL)
|
||||
$_ = 0;
|
||||
unset($_);
|
||||
|
||||
@@ -1917,7 +1919,7 @@ class ItemListFilter extends Filter
|
||||
|
||||
public function createConditionsForWeights()
|
||||
{
|
||||
if (!$this->fiData['v']['wt'])
|
||||
if (empty($this->fiData['v']['wt']))
|
||||
return null;
|
||||
|
||||
$this->wtCnd = [];
|
||||
|
||||
@@ -151,19 +151,19 @@ class EnchantmentPage extends GenericPage
|
||||
return $foo;
|
||||
};
|
||||
|
||||
$bLink = $gemCnd['color'.$i] ? '<a href="?items=3&filter=ty='.$fiColors($gemCnd['color'.$i]).'">'.Lang::item('gemColors', $gemCnd['color'.$i] - 1).'</a>' : '';
|
||||
$cLink = $gemCnd['cmpColor'.$i] ? '<a href="?items=3&filter=ty='.$fiColors($gemCnd['cmpColor'.$i]).'">'.Lang::item('gemColors', $gemCnd['cmpColor'.$i] - 1).'</a>' : '';
|
||||
$bLink = $gemCnd['color'.$i] ? '<a class="tip" href="?items=3&filter=ty='.$fiColors($gemCnd['color'.$i]).'">'.Lang::item('gemColors', $gemCnd['color'.$i] - 1).'</a>' : '';
|
||||
$cLink = $gemCnd['cmpColor'.$i] ? '<a class="tip" href="?items=3&filter=ty='.$fiColors($gemCnd['cmpColor'.$i]).'">'.Lang::item('gemColors', $gemCnd['cmpColor'.$i] - 1).'</a>' : '';
|
||||
|
||||
switch ($gemCnd['comparator'.$i])
|
||||
{
|
||||
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], $bLink).'</span><br />';
|
||||
$x .= '<span class="q0">'.Lang::achievement('reqNumCrt').' '.Lang::item('gemConditions', $gemCnd['comparator'.$i], [$gemCnd['value'.$i], $bLink]).'</span><br />';
|
||||
break;
|
||||
case 3: // requires more <color> than (<value> || <comparecolor>) gems
|
||||
$link = '<a href="?items=3&filter=ty='.$fiColors($gemCnd['cmpColor'.$i]).'">'.Lang::item('gemColors', $gemCnd['cmpColor'.$i] - 1).'</a>';
|
||||
$x .= '<span class="q0">'.Lang::achievement('reqNumCrt').' '.sprintf(Lang::item('gemConditions', 3), $bLink, $cLink).'</span><br />';
|
||||
$x .= '<span class="q0">'.Lang::achievement('reqNumCrt').' '.Lang::item('gemConditions', $gemCnd['comparator'.$i], [$bLink, $cLink]).'</span><br />';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user