NPCs/Fixup
* fix exception when displaying NPC with elemental resistances in base version but not difficulty modes
This commit is contained in:
parent
d79742d599
commit
95ee9d2c25
1 changed files with 4 additions and 1 deletions
|
|
@ -1006,10 +1006,13 @@ class NpcBaseResponse extends TemplateResponse implements ICache
|
|||
$modes['ranged'][] = sprintf($modeRow, $m, Lang::nf($ranged[0]).' - '.Lang::nf($ranged[1]));
|
||||
}
|
||||
|
||||
// todo: resistances can be present/missing in either $stats or $modes
|
||||
// should be handled separately..?
|
||||
|
||||
if ($modes)
|
||||
foreach ($stats as $k => $v)
|
||||
if ($v)
|
||||
$stats[$k] = sprintf($hint, implode('[/tr][tr]', $modes[$k]), $v, $k);
|
||||
$stats[$k] = isset($modes[$k]) ? sprintf($hint, implode('[/tr][tr]', $modes[$k]), $v, $k) : $v;
|
||||
|
||||
return $stats;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue