|
|
@@ -96,6 +96,11 @@
|
|
|
*/
|
|
|
public $value;
|
|
|
|
|
|
+ /**
|
|
|
+ * @var int Number of item of this type owned.
|
|
|
+ */
|
|
|
+ public $amount;
|
|
|
+
|
|
|
/**
|
|
|
* Constructor.
|
|
|
*
|
|
|
@@ -109,31 +114,33 @@
|
|
|
|
|
|
global $db;
|
|
|
|
|
|
- $s =
|
|
|
- "SELECT " .
|
|
|
- " rune_craft.id AS id, " .
|
|
|
- " rune_craft.quality As quality, " .
|
|
|
- " rune_craft.rune AS rune, " .
|
|
|
- " rune_craft.stat AS stat, " .
|
|
|
- " rune_craft.value AS value, " .
|
|
|
- " k_rune_craft_type.name AS name, " .
|
|
|
- " k_rune_craft_type.gem AS gem, " .
|
|
|
- " k_rune_craft_type.inmemorial AS inmemorial, " .
|
|
|
- " k_rune_craft_type.ancient AS ancient, " .
|
|
|
- " k_rune_craft_range.min AS min, " .
|
|
|
- " k_rune_craft_range.max AS max " .
|
|
|
- "FROM " .
|
|
|
- " rune_craft, ".
|
|
|
- " k_rune_craft_type, " .
|
|
|
- " k_rune_craft_range " .
|
|
|
- "WHERE " .
|
|
|
- " rune_craft.id = $id AND " .
|
|
|
- " rune_craft.type = k_rune_craft_type.id AND " .
|
|
|
- " k_rune_craft_type.gem = k_rune_craft_range.gem AND " .
|
|
|
- " k_rune_craft_type.gem = k_rune_craft_range.gem AND " .
|
|
|
- " k_rune_craft_type.ancient = k_rune_craft_range.ancient AND " .
|
|
|
- " rune_craft.quality = k_rune_craft_range.quality AND " .
|
|
|
- " rune_craft.stat = k_rune_craft_range.stat;";
|
|
|
+ $s = "
|
|
|
+ SELECT
|
|
|
+ rune_craft.id AS id,
|
|
|
+ rune_craft.quality As quality,
|
|
|
+ rune_craft.rune AS rune,
|
|
|
+ rune_craft.stat AS stat,
|
|
|
+ rune_craft.value AS value,
|
|
|
+ rune_craft.amount AS amount,
|
|
|
+ k_rune_craft_type.name AS name,
|
|
|
+ k_rune_craft_type.gem AS gem,
|
|
|
+ k_rune_craft_type.inmemorial AS inmemorial,
|
|
|
+ k_rune_craft_type.ancient AS ancient,
|
|
|
+ k_rune_craft_range.min AS min,
|
|
|
+ k_rune_craft_range.max AS max
|
|
|
+ FROM
|
|
|
+ rune_craft,
|
|
|
+ k_rune_craft_type,
|
|
|
+ k_rune_craft_range
|
|
|
+ WHERE
|
|
|
+ rune_craft.id = $id AND
|
|
|
+ rune_craft.type = k_rune_craft_type.id AND
|
|
|
+ k_rune_craft_type.gem = k_rune_craft_range.gem AND
|
|
|
+ k_rune_craft_type.gem = k_rune_craft_range.gem AND
|
|
|
+ k_rune_craft_type.ancient = k_rune_craft_range.ancient AND
|
|
|
+ rune_craft.quality = k_rune_craft_range.quality AND
|
|
|
+ rune_craft.stat = k_rune_craft_range.stat;
|
|
|
+ ";
|
|
|
$q = $db->query($s);
|
|
|
$r = $q->fetchArray(SQLITE3_ASSOC);
|
|
|
if ($r){
|
|
|
@@ -155,6 +162,7 @@
|
|
|
$this->min = $r["min"];
|
|
|
$this->max = $r["max"];
|
|
|
$this->value = $r["value"];
|
|
|
+ $this->amount = $r["amount"];
|
|
|
}
|
|
|
}
|
|
|
|