diff --git a/webapp/controller/HeroController.class.php b/webapp/controller/HeroController.class.php index f9c5e9ec..9b2e8ac3 100644 --- a/webapp/controller/HeroController.class.php +++ b/webapp/controller/HeroController.class.php @@ -37,8 +37,13 @@ class HeroController extends BaseAuthedController { public function heroList() { $heroList = array(); - Hero::getHeroList(function ($row) use(&$heroList) { + $userDb = myself()->_getOrmUserInfo(); + Hero::getHeroList(function ($row) use(&$heroList,$userDb) { $row['hero_uniid'] = $row['idx']; + $row['is_select'] = 0; + if ($row['idx'] == $userDb['hero_id']){ + $row['is_select'] = 1; + } array_push($heroList, $row); }); $this->_rspData(array(