예제 #1
0
 private function getHeroData(Hero $heroInformation, $heroLevel)
 {
     $data = array();
     $information = new Information();
     //set everything base on display with respect to hero
     $information->set('name', $heroInformation->getName() . '(Level ' . DotaResourceData::HERO_LEVEL_START . ')');
     $information->set('agi', $heroInformation->getBasicAgility());
     $information->set('str', $heroInformation->getBasicStrength());
     $information->set('int', $heroInformation->getBasicIntelligence());
     $information->set('minDamage', $heroInformation->getMinDamage());
     $information->set('maxDamage', $heroInformation->getMaxDamage());
     $information->set('hp', $heroInformation->getHp());
     $information->set('mana', $heroInformation->getMana());
     $data[] = $information;
     if ($heroLevel > 1) {
         $data[] = DotaResourceCalculator::getInstance()->getCalculatedHeroStats($heroInformation, $heroLevel);
     }
     return $data;
 }