Exemplo n.º 1
0
 function loadArmor($ID)
 {
     //check ID is not blank and exists and such
     $db = DB::GetConn();
     $id_con = $db->quoteInto("ID = ?", $ID);
     $getQuery = "SELECT * FROM `Armor` WHERE {$id_con} limit 1;";
     $res = $db->query($getQuery);
     $obj = $res->fetchObject();
     return Armor::loadArmorFromObject($obj);
 }
Exemplo n.º 2
0
 public function __construct(\Weapon $weapon, \Armor $armor, array $rings = [], $hp = 100)
 {
     $this->hp = $hp;
     $this->damage = $weapon->getDamage();
     $this->cost += $weapon->getCost();
     $this->armor = $armor->getArmor();
     $this->cost += $armor->getCost();
     foreach ($rings as $ring) {
         $this->damage += $ring->getDamage();
         $this->armor += $ring->getArmor();
         $this->cost += $ring->getCost();
     }
 }
Exemplo n.º 3
0
 public function getProtection()
 {
     return parent::getProtection() + 6;
 }
Exemplo n.º 4
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::GOLD_BOOTS, $meta, $count, "Gold Boots");
 }
Exemplo n.º 5
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::CHAIN_HELMET, $meta, $count, "Chainmail Helmet");
 }
Exemplo n.º 6
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::LEATHER_PANTS, $meta, $count, "Leather Pants");
 }
Exemplo n.º 7
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::GOLD_CHESTPLATE, $meta, $count, "Gold Chestplate");
 }
Exemplo n.º 8
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::CHAIN_LEGGINGS, $meta, $count, "Chain Leggings");
 }
Exemplo n.º 9
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::IRON_BOOTS, $meta, $count, "Iron Boots");
 }
Exemplo n.º 10
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::LEATHER_CAP, $meta, $count, "Leather Cap");
 }
Exemplo n.º 11
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::LEATHER_TUNIC, $meta, $count, "Leather Tunic");
 }
Exemplo n.º 12
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::DIAMOND_HELMET, $meta, $count, "Diamond Helmet");
 }
Exemplo n.º 13
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::GOLD_LEGGINGS, $meta, $count, "Gold Leggings");
 }
Exemplo n.º 14
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::CHAIN_BOOTS, $meta, $count, "Chainmail Boots");
 }
Exemplo n.º 15
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::DIAMOND_CHESTPLATE, $meta, $count, "Diamond Chestplate");
 }
Exemplo n.º 16
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::DIAMOND_LEGGINGS, $meta, $count, "Diamond Leggings");
 }
Exemplo n.º 17
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::GOLD_HELMET, $meta, $count, "Gold Helmet");
 }
Exemplo n.º 18
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::DIAMOND_BOOTS, $meta, $count, "Diamond Boots");
 }
Exemplo n.º 19
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::IRON_LEGGINGS, $meta, $count, "Iron Leggings");
 }
Exemplo n.º 20
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::IRON_HELMET, $meta, $count, "Iron Helmet");
 }
Exemplo n.º 21
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::IRON_CHESTPLATE, $meta, $count, "Iron Chestplate");
 }