mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
NPCs/Fixup
* fix exception when displaying NPC with elemental resistances in base version but not difficulty modes
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user