예제 #1
0
 /**
  * Constructor. Use \iveeCore\Type::getById() to instantiate InventorBlueprint objects instead.
  * 
  * @param int $id of the InventorBlueprint object
  * 
  * @return \iveeCore\InventorBlueprint
  * @throws \iveeCore\Exceptions\TypeIdNotFoundException if typeID is not found
  */
 protected function __construct($id)
 {
     parent::__construct($id);
     $sdeClass = Config::getIveeClassName('SDE');
     $sde = $sdeClass::instance();
     //query for inventable blueprints, probability and decryptorGroupID
     $res = $sde->query("SELECT iap.productTypeID, iap.probability, COALESCE(valueInt, valueFloat) as decryptorGroupID\n            FROM dgmTypeAttributes as dta\n            JOIN industryActivityMaterials as iam ON iam.materialTypeID = dta.typeID\n            JOIN industryActivityProbabilities as iap ON iap.typeID = iam.typeID\n            WHERE attributeID = 1115\n            AND iam.activityID = 8\n            AND iap.activityID = 8\n            AND iam.typeID = " . $this->id . ';');
     if ($res->num_rows < 1) {
         self::throwException('TypeIdNotFoundException', "Inventor data for blueprintID=" . $this->id . " not found");
     }
     while ($row = $res->fetch_assoc()) {
         $this->inventsBlueprintIDs[(int) $row['productTypeID']] = 1;
         $this->inventionProbability = (double) $row['probability'];
         $this->decryptorGroupID = (int) $row['decryptorGroupID'];
     }
     //get the mapping for skills to datacore or interface
     $res = $sde->query("SELECT COALESCE(valueInt, valueFloat) as skillID, it.groupID\n            FROM dgmTypeAttributes as dta\n            JOIN invTypes as it ON it.typeID = dta.typeID\n            WHERE dta.attributeID = 182\n            AND groupID IN (333, 716)\n            AND COALESCE(valueInt, valueFloat) IN (" . implode(', ', array_keys($this->getSkillMapForActivity(ProcessData::ACTIVITY_INVENTING)->getSkills())) . ");");
     $this->datacoreSkillIDs = array();
     while ($row = $res->fetch_assoc()) {
         if ($row['groupID'] == 333) {
             $this->datacoreSkillIDs[] = $row['skillID'];
         } elseif ($row['groupID'] == 716) {
             $this->encryptionSkillID = $row['skillID'];
         }
     }
 }
예제 #2
0
 /**
  * Constructor. Use iveeCore\Type::getById() to instantiate InventorBlueprint objects instead.
  *
  * @param int $id of the InventorBlueprint object
  *
  * @throws \iveeCore\Exceptions\TypeIdNotFoundException if typeId is not found
  */
 protected function __construct($id)
 {
     parent::__construct($id);
     $sdeClass = Config::getIveeClassName('SDE');
     $sde = $sdeClass::instance();
     $this->loadInventionStats($sde);
     $this->loadSkillToDatacoreInterface($sde);
 }
예제 #3
0
 /**
  * Constructor. Use \iveeCore\Type::getById() to instantiate REBlueprint objects instead.
  *
  * @param int $id of the REBlueprint object
  *
  * @return \iveeCore\REBlueprint
  * @throws \iveeCore\Exceptions\TypeIdNotFoundException if the typeID is not found
  */
 protected function __construct($id)
 {
     //call parent constructor
     parent::__construct($id);
     $sdeClass = Config::getIveeClassName('SDE');
     $sde = $sdeClass::instance();
     //get Relics this REBlueprint can be reverse-engineered from
     $res = $sde->query("SELECT typeID\n            FROM industryActivityProducts\n            WHERE activityID = 7\n            AND productTypeID = " . $this->id . ';');
     if ($res->num_rows < 1) {
         self::throwException('TypeIdNotFoundException', "Reverse Engineering data for REBlueprint ID=" . $this->id . " not found");
     }
     while ($row = $res->fetch_assoc()) {
         $this->reverseEngineeredFromRelicIDs[] = (int) $row['typeID'];
     }
     //get the raceID of the product
     $res = $sde->query("SELECT raceID\n            FROM invTypes\n            WHERE typeID = " . $this->productId . ';');
     if ($res->num_rows < 1) {
         self::throwException('TypeIdNotFoundException', "Reverse Engineering data for REBlueprint ID=" . $this->id . " not found");
     }
     //lookup decryptor based on race
     while ($row = $res->fetch_assoc()) {
         $this->reverseEngineeringDecryptorID = static::$raceDecryptor[(int) $row['raceID']];
     }
 }
 public function __construct($key)
 {
     parent::__construct($key);
 }