Items/Filter

fixed error, when appending empty upg= to query
NPC/Text
  handled rare case of uppercase string-placeholders
This commit is contained in:
Sarjuuk
2015-07-05 19:13:11 +02:00
parent 09e0886cdd
commit ed67493bb8
2 changed files with 5 additions and 2 deletions

View File

@@ -232,7 +232,7 @@ class ItemsPage extends GenericPage
if (isset($this->filter['sl'])) // skip lookups for unselected slots
$groups = array_intersect($groups, (array)$this->filter['sl']);
if (isset($this->filter['upg'])) // skip lookups for slots we dont have items to upgrade for
if (!empty($this->filter['upg'])) // skip lookups for slots we dont have items to upgrade for
$groups = array_intersect($groups, (array)$this->filter['upg']);
if ($groups)
@@ -416,7 +416,7 @@ class ItemsPage extends GenericPage
}
// reformat for use in template
if (isset($this->filter['upg']))
if (!empty($this->filter['upg']))
$this->filter['upg'] = implode(':', array_keys($this->filter['upg']));
// whoops, we have no data? create emergency content

View File

@@ -957,6 +957,9 @@ class NpcPage extends GenericPage
if (in_array($t['type'], [2, 16]) && strpos($msg, '%s') === false)
$msg = '%s '.$msg;
// fixup: bad case-insensivity
$msg = str_replace('%S', '%s', $msg);
$line = array(
'range' => $t['range'],
'type' => 2, // [type: 0, 12] say: yellow-ish