USERID = $user_id;
}
private function getDressedItems()
{
try {
$this->DB = db::c()->query('SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot > 0', $this->USERID);
} catch (Exception $e) {
echo '
Не прогрузилась таблица inventory (*) для класса DressedItems.
';
}
}
protected function getBonusesFromDressedItems()
{
try {
$query = << 0
SQL;
$this->DBSUM = db::c()->query($query, $this->USERID)->fetch_assoc();
} catch (Exception $e) {
echo 'Не прогрузилась таблица inventory (SUM) для класса DressedItems:' . $e . '
';
}
}
public function getItemsInSlots()
{
if (!$this->DB) {
//$this->getDressedItems();
self::getDressedItems();
}
while ($row = $this->DB->fetch_assoc()) {
$dressed_item[$row['dressed_slot']] = $row;
$this->dressedItem[$row['dressed_slot']] = $row;
}
}
protected function getBonuses()
{
if (!$this->DBSUM) {
self::getBonusesFromDressedItems();
}
return $this->DBSUM;
}
public function getStrengthBonus()
{
//return $this->getBonuses()['sum_strength'];
return self::getBonuses()['sum_strength'];
}
public function getDexterityBonus()
{
return $this->getBonuses()['sum_dexterity'];
}
public function getIntuitionBonus()
{
return $this->getBonuses()['sum_intuition'];
}
public function getEnduranceBonus()
{
return $this->getBonuses()['sum_endurance'];
}
public function getIntelliganceBonus()
{
return $this->getBonuses()['sum_intelligence'];
}
public function getWisdomBonus()
{
return $this->getBonuses()['sum_wisdom'];
}
public function getAccuracyBonus()
{
return $this->getBonuses()['sum_accuracy'];
}
public function getEvasionBonus()
{
return $this->getBonuses()['sum_evasion'];
}
public function getCriticalsBonus()
{
return $this->getBonuses()['sum_criticals'];
}
}