/** * Parse the command information from the commands file. * * @param \pandaac\Exporter\Contracts\Reader $reader * @return \Illuminate\Support\Collection */ protected function command(Reader $reader) { if (!$reader->is('command')) { return false; } return new Collection($reader->attributes('cmd', 'group', 'acctype', 'log')); }
/** * Parse the group information from the groups file. * * @param \pandaac\Exporter\Contracts\Reader $reader * @return \Illuminate\Support\Collection */ protected function group(Reader $reader) { if (!$reader->is('group')) { return false; } return new Collection($reader->attributes('id', 'name', 'flags', 'access', 'maxdepotitems', 'maxvipentries')); }
/** * Parse the stage information from the stages file. * * @param \pandaac\Exporter\Contracts\Reader $reader * @return \Illuminate\Support\Collection */ protected function stage(Reader $reader) { if (!$reader->is('stage')) { return false; } return new Collection($reader->attributes('minlevel', 'maxlevel', 'multiplier')); }
/** * Parse the mount information from the mounts file. * * @param \pandaac\Exporter\Contracts\Reader $reader * @return \Illuminate\Support\Collection */ protected function mount(Reader $reader) { if (!$reader->is('mount')) { return false; } return new Collection($reader->attributes('id', 'clientid', 'name', 'speed', 'premium')); }
/** * Parse the vocation formula from the vocations file. * * @param \pandaac\Exporter\Contracts\Reader $reader * @return \Illuminate\Support\Collection */ protected function formula(Reader $reader) { if (!($reader->is('formula') and $reader->parent('vocation'))) { return false; } return new Collection($reader->attributes('meleeDamage', 'distDamage', 'defense', 'armor')); }
/** * Parse the outfit information from the outfits file. * * @param \pandaac\Exporter\Contracts\Reader $reader * @return \Illuminate\Support\Collection */ protected function outfit(Reader $reader) { if (!$reader->is('outfit')) { return false; } return new Collection($reader->attributes('type', 'looktype', 'name', 'premium', 'unlocked', 'enabled')); }
/** * Parse the mission states from the quests file. * * @param \pandaac\Exporter\Contracts\Reader $reader * @return \Illuminate\Support\Collection */ protected function missionState(Reader $reader) { if (!($reader->is('missionstate') and $reader->parent('mission'))) { return false; } return new Collection($reader->attributes('id', 'description')); }
/** * Handle every iteration of the parsing process. * * @param \pandaac\Exporter\Contracts\Reader $reader * @param \Illuminate\Support\Collection $collection * @return \Illuminate\Support\Collection */ public function iteration(Reader $reader, Collection $collection) { if (!$reader->is('monster')) { return $collection; } if (!($reader->isElement() or $reader->isAttribute() or $reader->isComment())) { return $collection; } // Monster information if ($iteration = $this->information($reader)) { $collection->push($iteration); } // Monster details if ($this->enabled('recursion') and $iteration = $this->details($reader, $collection)) { $monster = $collection->pop(); return $collection->push($iteration->put('paths', $monster)); } return $collection; }
/** * Parse the conjure spell vocations from the spells file. * * @param \pandaac\Exporter\Contracts\Reader $reader * @return \Illuminate\Support\Collection */ protected function conjureVocations(Reader $reader) { if (!($reader->is('vocation') and $reader->parent('conjure'))) { return false; } return new Collection($reader->attributes('name')); }
/** * Parse the item attribute properties information from the items file. * * @param \pandaac\Exporter\Contracts\Reader $reader * @return \Illuminate\Support\Collection */ protected function itemAttributeProperties(Reader $reader) { if (!($reader->is('attribute') and $reader->parent('attribute'))) { return false; } return new Collection($reader->attributes('key', 'value')); }
/** * Parse the loot information from the monster file. * * @param \pandaac\Exporter\Contracts\Reader $reader * @return \Illuminate\Support\Collection */ protected function loot(Reader $reader) { if (!$reader->is('item')) { return false; } return new Collection($reader->attributes('id', 'countmax', 'chance')); }