/** * Sum heal bonuses from jewels * * @param stdClass $data Data object * * @return float */ public static function sumHealBonusJewels(stdClass $data) { //limit max juwels to 3 self::limit($data, array('oldJewels', 'newJewels'), 3); $bonus = 0; $bonus += $data->oldJewels * BONUS_JEWELS_OLD; $bonus += $data->newJewels * BONUS_JEWELS_NEW; $bonus += $data->specialRings * BONUS_JEWELS_SPECIAL_RING; if ($data->necklaceBonus) { $bonus += MISC::getNecklaceBonusValue($data->necklaceBonus); } if ($data->broochBonus1) { $bonus += BONUS_BROOCH_1; } if ($data->broochBonus2) { $bonus += BONUS_BROOCH_2; } if ($data->jewelSet1) { $bonus += BONUS_JEWELS_SET_1; } if ($data->jewelSet2_1) { $bonus += BONUS_JEWELS_SET_2_1; } if ($data->jewelSet2_2) { $bonus += BONUS_JEWELS_SET_2_2; } return $bonus; }