/**
* 玩家注册时初始化
*/
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 = 1;
$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->BoxCoolDownTime = now();
$this->BoxLock = 0;
$this->LoginDays = ArrayInit();
$this->LoginTaskComplete = 0;
$this->lottery = new UserLotteryModel;
$this->usedTokens = ArrayInit();
//
$con = GameConfig::day7();
foreach ($con as $k => $v) {
$this->day7->tasks->$k = json_decode('{"state":1}');
}
// var_dump($this->day7);
//
//
$conTasks = GameConfig::task();
foreach ($conTasks as $k => $v) {
$this->Tasks->$k = json_decode('{"state":1}');
}
//
//
// $AchiTasks = GameConfig::task_achi();
// foreach ($AchiTasks as $k => $v) {
// $this->AchiTasks->$k = json_decode(json_encode(array(
// 'state' => 1,
// 'extData' => 0
// )));
// }
//
}
//
}