SpellDetailPage/Source

* do not acces sources directly
 * fixes source display in infobox
This commit is contained in:
Sarjuuk
2025-04-01 23:10:24 +02:00
parent db1d3ccace
commit 2689fba992

View File

@@ -272,10 +272,13 @@ class SpellPage extends GenericPage
}
// accquisition.. 10: starter spell; 7: discovery
if (isset($this->subject->sources[$this->subject->id][10]))
$infobox[] = Lang::spell('starter');
else if (isset($this->subject->sources[$this->subject->id][7]))
$infobox[] = Lang::spell('discovered');
if ($this->subject->getSources($s))
{
if (in_array(SRC_STARTER, $s))
$infobox[] = Lang::spell('starter');
else if (in_array(SRC_DISCOVERY, $s))
$infobox[] = Lang::spell('discovered');
}
// training cost
if ($cost = $this->subject->getField('trainingCost'))