|
@@ -39,11 +39,11 @@ class ActiveProc {
|
|
$user = ctx();
|
|
$user = ctx();
|
|
|
|
|
|
my_Assert($user->privateState->day7_accumulate >= $typeId, ErrCode::active_day7_expired);
|
|
my_Assert($user->privateState->day7_accumulate >= $typeId, ErrCode::active_day7_expired);
|
|
- my_Assert(!in_array($day, $user->privateState->day7_drawed), ErrCode::active_hasgetted);
|
|
|
|
- $day_rwd = GameConfig::activity_day7_getItem($day); # 查询奖励数据
|
|
|
|
|
|
+ my_Assert(!in_array($typeId, $user->privateState->day7_accumulateDrawed), ErrCode::active_hasgetted);
|
|
|
|
+ $day_rwd = GameConfig::active_day7_accumulate_getItem($typeId); # 查询奖励数据
|
|
my_Assert(null != $day_rwd, ErrCode::err_const_no); # 防御找不到配置
|
|
my_Assert(null != $day_rwd, ErrCode::err_const_no); # 防御找不到配置
|
|
StoreProc::AddMultiItemInStore($day_rwd->reward); # 发放奖励
|
|
StoreProc::AddMultiItemInStore($day_rwd->reward); # 发放奖励
|
|
-
|
|
|
|
|
|
+ $user->privateState->day7_accumulateDrawed[] = $typeId;
|
|
|
|
|
|
ctx($user);
|
|
ctx($user);
|
|
UserProc::updateUserInfo(); # 回存
|
|
UserProc::updateUserInfo(); # 回存
|
|
@@ -81,7 +81,8 @@ class ActiveProc {
|
|
my_Assert(null != $day_rwd, ErrCode::err_const_no); # 防御找不到配置
|
|
my_Assert(null != $day_rwd, ErrCode::err_const_no); # 防御找不到配置
|
|
StoreProc::AddMultiItemInStore($day_rwd->reward); # 发放奖励
|
|
StoreProc::AddMultiItemInStore($day_rwd->reward); # 发放奖励
|
|
$user->privateState->day7_drawed[] = $day; # 添加领取记录
|
|
$user->privateState->day7_drawed[] = $day; # 添加领取记录
|
|
-
|
|
|
|
|
|
+ $user->privateState->day7_accumulate += 1;
|
|
|
|
+
|
|
ctx($user);
|
|
ctx($user);
|
|
UserProc::updateUserInfo(); # 回存
|
|
UserProc::updateUserInfo(); # 回存
|
|
return Resp::ok(array(
|
|
return Resp::ok(array(
|