Misc/Notices

* fixed display of GemConditions on enchantment detail page
 * correctly initialize class and race masks for items
This commit is contained in:
Sarjuuk
2017-05-06 22:17:18 +02:00
parent 39e917927f
commit 33a1a45a63
3 changed files with 11 additions and 9 deletions

View File

@@ -64,7 +64,7 @@ audio processing may require [lame](https://sourceforge.net/projects/lame/files/
> \<localeCode>/Interface/PvPRankBadges > \<localeCode>/Interface/PvPRankBadges
> \<localeCode>/Interface/FlavorImages > \<localeCode>/Interface/FlavorImages
> \<localeCode>/Interface/Calendar/Holidays/ > \<localeCode>/Interface/Calendar/Holidays/
> \<localeCode>/Sounds/ > \<localeCode>/Sound/
.. optionaly (for other uses): .. optionaly (for other uses):
> \<localeCode>/Interface/GLUES/LOADINGSCREENS/ > \<localeCode>/Interface/GLUES/LOADINGSCREENS/

View File

@@ -51,13 +51,15 @@ class ItemList extends BaseType
$this->json[$this->id]['itemset'] = $miscData['pcsToSet'][$this->id]; $this->json[$this->id]['itemset'] = $miscData['pcsToSet'][$this->id];
// unify those pesky masks // unify those pesky masks
$_ = &$_curTpl['requiredClass']; $_ = &$_curTpl['requiredClass'];
if ($_ < 0 || ($_ & CLASS_MASK_ALL) == CLASS_MASK_ALL) $_ &= CLASS_MASK_ALL;
if ($_ < 0 || $_ == CLASS_MASK_ALL)
$_ = 0; $_ = 0;
unset($_); unset($_);
$_ = &$_curTpl['requiredRace']; $_ = &$_curTpl['requiredRace'];
if ($_ < 0 || ($_ & RACE_MASK_ALL) == RACE_MASK_ALL) $_ &= RACE_MASK_ALL;
if ($_ < 0 || $_ == RACE_MASK_ALL)
$_ = 0; $_ = 0;
unset($_); unset($_);
@@ -1917,7 +1919,7 @@ class ItemListFilter extends Filter
public function createConditionsForWeights() public function createConditionsForWeights()
{ {
if (!$this->fiData['v']['wt']) if (empty($this->fiData['v']['wt']))
return null; return null;
$this->wtCnd = []; $this->wtCnd = [];

View File

@@ -151,19 +151,19 @@ class EnchantmentPage extends GenericPage
return $foo; return $foo;
}; };
$bLink = $gemCnd['color'.$i] ? '<a href="?items=3&filter=ty='.$fiColors($gemCnd['color'.$i]).'">'.Lang::item('gemColors', $gemCnd['color'.$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 href="?items=3&filter=ty='.$fiColors($gemCnd['cmpColor'.$i]).'">'.Lang::item('gemColors', $gemCnd['cmpColor'.$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]) switch ($gemCnd['comparator'.$i])
{ {
case 2: // requires less <color> than (<value> || <comparecolor>) gems case 2: // requires less <color> than (<value> || <comparecolor>) gems
case 5: // requires at least <color> than (<value> || <comparecolor>) gems case 5: // requires at least <color> than (<value> || <comparecolor>) gems
$sp = (int)$gemCnd['value'.$i] > 1; $sp = (int)$gemCnd['value'.$i] > 1;
$x .= '<span class="q0">'.Lang::achievement('reqNumCrt').' '.sprintf(Lang::item('gemConditions', $gemCnd['comparator'.$i], $sp), $gemCnd['value'.$i], $bLink).'</span><br />'; $x .= '<span class="q0">'.Lang::achievement('reqNumCrt').' '.Lang::item('gemConditions', $gemCnd['comparator'.$i], [$gemCnd['value'.$i], $bLink]).'</span><br />';
break; break;
case 3: // requires more <color> than (<value> || <comparecolor>) gems 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>'; $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; break;
} }
} }