/** * Returns array with Ranged weapon haste value * @category Character class * @access private * @return array **/ private function GetCharacterRangedHaste() { $player_stats = array(); $rating = $this->SetRating(); $rangedSkillID = Mangos::GetSkillIDFromItemID($this->GetDataField(PLAYER_VISIBLE_ITEM_18_ENTRYID)); if ($rangedSkillID == SKILL_UNARMED) { $player_stats['value'] = 0; $player_stats['hasteRating'] = 0; $player_stats['hastePercent'] = 0; } else { $player_stats['value'] = round(Utils::GetFloatValue($this->GetDataField(UNIT_FIELD_RANGEDATTACKTIME), 2) / 1000, 2); $player_stats['hasteRating'] = round($this->GetDataField(PLAYER_FIELD_COMBAT_RATING_1 + 18)); $player_stats['hastePercent'] = round($player_stats['hasteRating'] / Utils::GetRatingCoefficient($rating, 19), 2); } unset($rating, $rangedSkillID); return $player_stats; }