|
@@ -14,38 +14,38 @@ namespace loyalsoft;
|
|
|
* @author c'y'zhao
|
|
|
*/
|
|
|
class Info_Heros extends Object_ext {
|
|
|
+
|
|
|
/**
|
|
|
* 当前的hero
|
|
|
*/
|
|
|
public $CurrentHeroId = 0;
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 所有的hero集合
|
|
|
* @var type
|
|
|
*/
|
|
|
public $Dic = null;
|
|
|
-
|
|
|
+
|
|
|
public function initialize() {
|
|
|
- $curHeroId = 1;//临时
|
|
|
+ $curHeroId = 1; //临时
|
|
|
$this->CurrentHeroId = $curHeroId;
|
|
|
$this->Dic = new \stdClass();
|
|
|
$insHero = new Ins_Hero();
|
|
|
$insHero->Id = $curHeroId;
|
|
|
$this->Dic->$curHeroId = $insHero;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public function __construct($arg = null) {
|
|
|
- if($tag == null){
|
|
|
- if($this->CurrentHeroId == 0 ){
|
|
|
- $curHeroId = 1;//临时
|
|
|
+ if ($arg == null) {
|
|
|
+ if ($this->CurrentHeroId == 0) {
|
|
|
+ $curHeroId = 1; //临时
|
|
|
$this->CurrentHeroId = $curHeroId;
|
|
|
$this->Dic = new \stdClass();
|
|
|
$insHero = new Ins_Hero();
|
|
|
$insHero->Id = $curHeroId;
|
|
|
$this->Dic->$curHeroId = $insHero;
|
|
|
}
|
|
|
-
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
parent::__construct($arg);
|
|
|
}
|
|
|
}
|