iterate() as $__) { $data[$this->id] = array( 'id' => $this->id, 'name' => $this->getField('name', true), 'races' => $this->curTpl['raceMask'], 'roles' => $this->curTpl['roles'], 'weapon' => $this->curTpl['weaponTypeMask'], 'armor' => $this->curTpl['armorTypeMask'], 'power' => $this->curTpl['powerType'], ); if ($this->curTpl['expansion'] == 2) // todo (low): grr, move to db $data[$this->id]['hero'] = 1; if ($this->curTpl['expansion']) $data[$this->id]['expansion'] = $this->curTpl['expansion']; } return $data; } public function addGlobalsToJscript(&$template, $addMask = 0) { foreach ($this->iterate() as $__) $template->extendGlobalData(self::$type, [$this->id => ['name' => $this->getField('name', true)]]); } public function addRewardsToJScript(&$ref) { } public function renderTooltip() { } } ?>