Structure/Types

* move distributed constant values to object
 * move reused iterators and checks to object
This commit is contained in:
Sarjuuk
2022-03-21 15:20:31 +01:00
parent e109a6deed
commit 33a870ef78
126 changed files with 970 additions and 885 deletions

View File

@@ -10,7 +10,7 @@ class RacePage extends GenericPage
{
use TrDetailPage;
protected $type = TYPE_RACE;
protected $type = Type::CHR_RACE;
protected $typeId = 0;
protected $tpl = 'detail-page-generic';
protected $path = [0, 13];
@@ -72,14 +72,14 @@ class RacePage extends GenericPage
// leader
if ($_ = $this->subject->getField('leader'))
{
$this->extendGlobalIds(TYPE_NPC, $_);
$this->extendGlobalIds(Type::NPC, $_);
$infobox[] = Lang::race('racialLeader').Lang::main('colon').'[npc='.$_.']';
}
// start area
if ($_ = $this->subject->getField('startAreaId'))
{
$this->extendGlobalIds(TYPE_ZONE, $_);
$this->extendGlobalIds(Type::ZONE, $_);
$infobox[] = Lang::race('startZone').Lang::main('colon').'[zone='.$_.']';
}