/** * 玩家注册时初始化 */ public function initialize() { // 用于给各个字段赋默认初始值 $this->day7 = JsonUtil::decode(JsonUtil::encode(array('tasks' => ObjectInit(), 'dianshu' => 0))); $this->Tasks = ObjectInit(); $this->AchiTasks = ObjectInit(); $this->maxItemNum = GameConfig::primordial_data()->User_Private_MaxItem_num; //100; $this->currentId = 0; $this->ItemNum = 0; $this->GemUpgrage = 0; $this->ItemUpgrage = 0; $this->herojinhua = 0; $this->heroshengji = 0; $this->heroshengjie = 0; $this->heroshengxing = 0; $this->TiliTime = now(); $this->LoginDays = ArrayInit(); $this->LoginTaskComplete = 0; $this->usedTokens = ArrayInit(); } // }