|
@@ -88,8 +88,8 @@ class FightProc {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
my_Assert($amt > 0, "消耗元宝数量配置出错!");
|
|
my_Assert($amt > 0, "消耗元宝数量配置出错!");
|
|
- my_Assert(ctx()->base()->Consume_Cash($amt), ErrCode::notenough_cash_msg);
|
|
|
|
- ctx()->privateData()->skillLockerNumber = $cnt;
|
|
|
|
|
|
+ my_Assert(ctx()->base(true)->Consume_Cash($amt), ErrCode::notenough_cash_msg);
|
|
|
|
+ ctx()->privateData(true)->skillLockerNumber = $cnt;
|
|
UserProc::updateUserInfo();
|
|
UserProc::updateUserInfo();
|
|
return Resp::ok();
|
|
return Resp::ok();
|
|
}
|
|
}
|
|
@@ -99,7 +99,7 @@ class FightProc {
|
|
*/
|
|
*/
|
|
static function LockSkill() {
|
|
static function LockSkill() {
|
|
list($skillTypeId) = req()->paras; # 技能类型ID
|
|
list($skillTypeId) = req()->paras; # 技能类型ID
|
|
- $pri = ctx()->privateData();
|
|
|
|
|
|
+ $pri = ctx()->privateData(true);
|
|
// my_Assert(in_array($skillTypeId, $pri->skillUnlockRecord), "技能尚未解锁!");
|
|
// my_Assert(in_array($skillTypeId, $pri->skillUnlockRecord), "技能尚未解锁!");
|
|
if (in_array($skillTypeId, $pri->skillReLocked)) { # 解封
|
|
if (in_array($skillTypeId, $pri->skillReLocked)) { # 解封
|
|
StlUtil::arrayRemove($pri->skillReLocked, $skillTypeId);
|
|
StlUtil::arrayRemove($pri->skillReLocked, $skillTypeId);
|
|
@@ -116,7 +116,7 @@ class FightProc {
|
|
*/
|
|
*/
|
|
static function ResetChallange_RedMask() {
|
|
static function ResetChallange_RedMask() {
|
|
|
|
|
|
- ctx()->privateState->challange_RedMask = 1;
|
|
|
|
|
|
+ ctx()->privateData(true)->challange_RedMask = 1;
|
|
UserProc::updateUserInfo();
|
|
UserProc::updateUserInfo();
|
|
return Resp::ok();
|
|
return Resp::ok();
|
|
}
|
|
}
|
|
@@ -142,9 +142,9 @@ class FightProc {
|
|
//TaskProc::Day7TaskReset();
|
|
//TaskProc::Day7TaskReset();
|
|
UserProc::updateUserInfo();
|
|
UserProc::updateUserInfo();
|
|
return Resp::ok(array("task" => ctx()->task,
|
|
return Resp::ok(array("task" => ctx()->task,
|
|
- 'privateState'=> ctx()->privateState,
|
|
|
|
- // 'funUnlockRecord' => ctx()->privateState->funUnlockRecord,
|
|
|
|
- // 'funUnlockRecord_2' => ctx()->privateState->funUnlockRecord_2,
|
|
|
|
|
|
+ 'privateState' => ctx()->privateState,
|
|
|
|
+ // 'funUnlockRecord' => ctx()->privateState->funUnlockRecord,
|
|
|
|
+ // 'funUnlockRecord_2' => ctx()->privateState->funUnlockRecord_2,
|
|
));
|
|
));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -390,7 +390,7 @@ class FightProc {
|
|
}
|
|
}
|
|
ctx()->gates()->TowerGateInfo()->TodayChanNum--; # 增加次数
|
|
ctx()->gates()->TowerGateInfo()->TodayChanNum--; # 增加次数
|
|
} else { # 主线剧情
|
|
} else { # 主线剧情
|
|
- my_Assert(ctx()->base()->Consume_tili($mo->cost_tili), ErrCode::notenough_tili);
|
|
|
|
|
|
+ my_Assert(ctx()->base(true)->Consume_tili($mo->cost_tili), ErrCode::notenough_tili);
|
|
}
|
|
}
|
|
UserProc::updateUserInfo();
|
|
UserProc::updateUserInfo();
|
|
return Resp::ok(array("tili" => ctx()->baseInfo->tili, "tili_ts" => ctx()->baseInfo->tili_ts));
|
|
return Resp::ok(array("tili" => ctx()->baseInfo->tili, "tili_ts" => ctx()->baseInfo->tili_ts));
|
|
@@ -450,9 +450,9 @@ class FightProc {
|
|
} else {
|
|
} else {
|
|
list($type, $num) = explode(':', glc()->tower_refreshCost); # 二级货币类型(1:金币,2:元宝):数量
|
|
list($type, $num) = explode(':', glc()->tower_refreshCost); # 二级货币类型(1:金币,2:元宝):数量
|
|
if ($type == 1) { # 金币
|
|
if ($type == 1) { # 金币
|
|
- my_Assert(ctx()->base()->Consume_Gold($num), ErrCode::notenough_gold_msg);
|
|
|
|
|
|
+ my_Assert(ctx()->base(true)->Consume_Gold($num), ErrCode::notenough_gold_msg);
|
|
} else if ($type == 2) { # 元宝
|
|
} else if ($type == 2) { # 元宝
|
|
- my_Assert(ctx()->base()->Consume_Cash($num), ErrCode::notenough_cash_msg);
|
|
|
|
|
|
+ my_Assert(ctx()->base(true)->Consume_Cash($num), ErrCode::notenough_cash_msg);
|
|
} else {
|
|
} else {
|
|
Err(ErrCode::err_const_no, "检查刷新扣费配置信息!");
|
|
Err(ErrCode::err_const_no, "检查刷新扣费配置信息!");
|
|
}
|
|
}
|
|
@@ -482,7 +482,7 @@ class FightProc {
|
|
$arr = explode(',', glc()->Relive_cost);
|
|
$arr = explode(',', glc()->Relive_cost);
|
|
my_Assert($reliveNum >= 0 && $reliveNum <= Count($arr), ErrCode::paras_err); # 参数范围>0
|
|
my_Assert($reliveNum >= 0 && $reliveNum <= Count($arr), ErrCode::paras_err); # 参数范围>0
|
|
$amt = $arr[$reliveNum];
|
|
$amt = $arr[$reliveNum];
|
|
- my_Assert(ctx()->base()->Consume_Cash($amt), ErrCode::notenought_yuanbao);
|
|
|
|
|
|
+ my_Assert(ctx()->base(true)->Consume_Cash($amt), ErrCode::notenought_yuanbao);
|
|
UserProc::updateUserInfo();
|
|
UserProc::updateUserInfo();
|
|
return Resp::ok();
|
|
return Resp::ok();
|
|
}
|
|
}
|
|
@@ -685,8 +685,8 @@ class FightProc {
|
|
//ctx()->base()->Add_Exp($waveMo->rewardExp); # 指挥官经验
|
|
//ctx()->base()->Add_Exp($waveMo->rewardExp); # 指挥官经验
|
|
$newLevel = ctx()->baseInfo->level;
|
|
$newLevel = ctx()->baseInfo->level;
|
|
if ($oldLevel != $newLevel) {
|
|
if ($oldLevel != $newLevel) {
|
|
- ctx()->privateState->oldLevel = $oldLevel;
|
|
|
|
- ctx()->privateState->upLevel = $newLevel;
|
|
|
|
|
|
+ ctx()->privateData(true)->oldLevel = $oldLevel;
|
|
|
|
+ ctx()->privateData(true)->upLevel = $newLevel;
|
|
}
|
|
}
|
|
|
|
|
|
//ctx()->base()->Add_Gold($waveMo->rewardGold); # 金币奖励
|
|
//ctx()->base()->Add_Gold($waveMo->rewardGold); # 金币奖励
|
|
@@ -821,8 +821,8 @@ class FightProc {
|
|
}
|
|
}
|
|
|
|
|
|
if ($tag && !in_array($id, ctx()->privateState->funUnlockRecord_2)) {
|
|
if ($tag && !in_array($id, ctx()->privateState->funUnlockRecord_2)) {
|
|
- ctx()->privateState->funUnlockRecord[] = $id;
|
|
|
|
- ctx()->privateState->funUnlockRecord_2[] = $id;
|
|
|
|
|
|
+ ctx()->privateData(true)->funUnlockRecord[] = $id;
|
|
|
|
+ ctx()->privateData(true)->funUnlockRecord_2[] = $id;
|
|
self::SubFunDateInit_FunUnlock($id);
|
|
self::SubFunDateInit_FunUnlock($id);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -847,8 +847,8 @@ class FightProc {
|
|
}
|
|
}
|
|
|
|
|
|
if ($tag && !in_array($id, ctx()->privateState->funUnlockRecord_2)) {
|
|
if ($tag && !in_array($id, ctx()->privateState->funUnlockRecord_2)) {
|
|
- ctx()->privateState->funUnlockRecord[] = $id;
|
|
|
|
- ctx()->privateState->funUnlockRecord_2[] = $id;
|
|
|
|
|
|
+ ctx()->privateData(true)->funUnlockRecord[] = $id;
|
|
|
|
+ ctx()->privateData(true)->funUnlockRecord_2[] = $id;
|
|
self::SubFunDateInit_FunUnlock($id);
|
|
self::SubFunDateInit_FunUnlock($id);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -871,8 +871,8 @@ class FightProc {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if ($tag && !in_array($id, ctx()->privateState->funUnlockRecord_2)) {
|
|
if ($tag && !in_array($id, ctx()->privateState->funUnlockRecord_2)) {
|
|
- ctx()->privateState->funUnlockRecord[] = $id;
|
|
|
|
- ctx()->privateState->funUnlockRecord_2[] = $id;
|
|
|
|
|
|
+ ctx()->privateData(true)->funUnlockRecord[] = $id;
|
|
|
|
+ ctx()->privateData(true)->funUnlockRecord_2[] = $id;
|
|
self::SubFunDateInit_FunUnlock($id);
|
|
self::SubFunDateInit_FunUnlock($id);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -907,8 +907,8 @@ class FightProc {
|
|
}
|
|
}
|
|
|
|
|
|
if ($tag && !in_array($id, ctx()->privateState->funUnlockRecord_2)) {
|
|
if ($tag && !in_array($id, ctx()->privateState->funUnlockRecord_2)) {
|
|
- ctx()->privateState->funUnlockRecord[] = $id;
|
|
|
|
- ctx()->privateState->funUnlockRecord_2[] = $id;
|
|
|
|
|
|
+ ctx()->privateData(true)->funUnlockRecord[] = $id;
|
|
|
|
+ ctx()->privateData(true)->funUnlockRecord_2[] = $id;
|
|
self::SubFunDateInit_FunUnlock($id);
|
|
self::SubFunDateInit_FunUnlock($id);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -991,15 +991,15 @@ class FightProc {
|
|
if ($mo->type == 1 && $mo->id == Enum_SubFunType::Day7_Happy) {
|
|
if ($mo->type == 1 && $mo->id == Enum_SubFunType::Day7_Happy) {
|
|
TaskProc::Day7TaskReset();
|
|
TaskProc::Day7TaskReset();
|
|
}
|
|
}
|
|
- if($mo->type == 2 && $mo->id == Enum_SubFunType::DailyTask){
|
|
|
|
|
|
+ if ($mo->type == 2 && $mo->id == Enum_SubFunType::DailyTask) {
|
|
TaskProc::DailyTaskReset(true);
|
|
TaskProc::DailyTaskReset(true);
|
|
}
|
|
}
|
|
-
|
|
|
|
- if($mo->type == 2 && $mo->id == Enum_SubFunType::WeekTask){
|
|
|
|
- TaskProc::WeekTaskReset(true);
|
|
|
|
|
|
+
|
|
|
|
+ if ($mo->type == 2 && $mo->id == Enum_SubFunType::WeekTask) {
|
|
|
|
+ TaskProc::WeekTaskReset(true);
|
|
}
|
|
}
|
|
-
|
|
|
|
- if($mo->type == 5 && $mo->id == Enum_SubFunType::Day7_Sign){
|
|
|
|
|
|
+
|
|
|
|
+ if ($mo->type == 5 && $mo->id == Enum_SubFunType::Day7_Sign) {
|
|
ActiveProc::DailyResetDay7Task(true);
|
|
ActiveProc::DailyResetDay7Task(true);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1011,7 +1011,7 @@ class FightProc {
|
|
static function SubFunDateInit_Config() {
|
|
static function SubFunDateInit_Config() {
|
|
$dic = GameConfig::subfun_unlock();
|
|
$dic = GameConfig::subfun_unlock();
|
|
foreach ($dic as $id => $mo) {
|
|
foreach ($dic as $id => $mo) {
|
|
- if ($mo->type == 3 && $mo->id == Enum_SubFunType::LimitTsSale && ctx()->privateState->nextDayLogin == 0 && now()>= $mo->startTs) {
|
|
|
|
|
|
+ if ($mo->type == 3 && $mo->id == Enum_SubFunType::LimitTsSale && ctx()->privateState->nextDayLogin == 0 && now() >= $mo->startTs) {
|
|
ActiveProc::ResetLimitTsBuy();
|
|
ActiveProc::ResetLimitTsBuy();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1039,7 +1039,7 @@ class FightProc {
|
|
$unlockId = $strList[1];
|
|
$unlockId = $strList[1];
|
|
|
|
|
|
if ($unlockType == 1 && $unlockId == $gateIndex && $resultType == true && ctx()->gates->GateList->$gateId->pass == 0 && !in_array($mo->typeId, ctx()->privateState->skillUnlockRecord)) {
|
|
if ($unlockType == 1 && $unlockId == $gateIndex && $resultType == true && ctx()->gates->GateList->$gateId->pass == 0 && !in_array($mo->typeId, ctx()->privateState->skillUnlockRecord)) {
|
|
- ctx()->privateState->skillUnlockRecord[] = $mo->typeId;
|
|
|
|
|
|
+ ctx()->privateData(true)->skillUnlockRecord[] = $mo->typeId;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1070,7 +1070,7 @@ class FightProc {
|
|
$isUnlock = ctx()->heros->Dic->$heroId->isUnlock;
|
|
$isUnlock = ctx()->heros->Dic->$heroId->isUnlock;
|
|
|
|
|
|
if ($unlockId == $heroTypeId && $isUnlock == 0 && !in_array($mo->typeId, ctx()->privateState->skillUnlockRecord)) {
|
|
if ($unlockId == $heroTypeId && $isUnlock == 0 && !in_array($mo->typeId, ctx()->privateState->skillUnlockRecord)) {
|
|
- ctx()->privateState->skillUnlockRecord[] = $mo->typeId;
|
|
|
|
|
|
+ ctx()->privateData(true)->skillUnlockRecord[] = $mo->typeId;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1108,7 +1108,7 @@ class FightProc {
|
|
}
|
|
}
|
|
|
|
|
|
if ($num == $unlockId && !in_array($mo->typeId, ctx()->privateState->skillUnlockRecord)) {
|
|
if ($num == $unlockId && !in_array($mo->typeId, ctx()->privateState->skillUnlockRecord)) {
|
|
- ctx()->privateState->skillUnlockRecord[] = $mo->typeId;
|
|
|
|
|
|
+ ctx()->privateData(true)->skillUnlockRecord[] = $mo->typeId;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1132,7 +1132,7 @@ class FightProc {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
if ($unlockId == $curLevel && !in_array($mo->typeId, ctx()->privateState->skillUnlockRecord)) {
|
|
if ($unlockId == $curLevel && !in_array($mo->typeId, ctx()->privateState->skillUnlockRecord)) {
|
|
- ctx()->privateState->skillUnlockRecord[] = $mo->typeId;
|
|
|
|
|
|
+ ctx()->privateData(true)->skillUnlockRecord[] = $mo->typeId;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1382,7 +1382,7 @@ class FightProc {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- ctx()->privateState->redTip_RewardMainGateRank = $isExistFinishReward;
|
|
|
|
|
|
+ ctx()->privateData(true)->redTip_RewardMainGateRank = $isExistFinishReward;
|
|
return $isExistFinishReward;
|
|
return $isExistFinishReward;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1397,7 +1397,7 @@ class FightProc {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- ctx()->privateState->redTip_RewardFightPowerRank = $isExistFinishReward;
|
|
|
|
|
|
+ ctx()->privateData(true)->redTip_RewardFightPowerRank = $isExistFinishReward;
|
|
return $isExistFinishReward;
|
|
return $isExistFinishReward;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1458,7 +1458,7 @@ class FightProc {
|
|
$memKey = MemKey_GameRun::RankReward_MainGateIndex_Zone_hash(req()->zoneid);
|
|
$memKey = MemKey_GameRun::RankReward_MainGateIndex_Zone_hash(req()->zoneid);
|
|
if (gMem()->hexists($memKey, $gateId)) {
|
|
if (gMem()->hexists($memKey, $gateId)) {
|
|
StoreProc::AddMultiItemInStore($mo->reward);
|
|
StoreProc::AddMultiItemInStore($mo->reward);
|
|
- ctx()->privateState->rankReward_drawed_MainGate[] = $gateId;
|
|
|
|
|
|
+ ctx()->privateData(true)->rankReward_drawed_MainGate[] = $gateId;
|
|
|
|
|
|
TaskProc::OnRankPrize_Num();
|
|
TaskProc::OnRankPrize_Num();
|
|
}
|
|
}
|
|
@@ -1484,7 +1484,7 @@ class FightProc {
|
|
$memKey = MemKey_GameRun::RankReward_FightPower_Zone_hash(req()->zoneid);
|
|
$memKey = MemKey_GameRun::RankReward_FightPower_Zone_hash(req()->zoneid);
|
|
if (gMem()->hexists($memKey, $fightPower)) {
|
|
if (gMem()->hexists($memKey, $fightPower)) {
|
|
StoreProc::AddMultiItemInStore($mo->reward);
|
|
StoreProc::AddMultiItemInStore($mo->reward);
|
|
- ctx()->privateState->rankReward_drawed_fightPower[] = $fightPower;
|
|
|
|
|
|
+ ctx()->privateData(true)->rankReward_drawed_fightPower[] = $fightPower;
|
|
TaskProc::OnFightRankPrize_Num();
|
|
TaskProc::OnFightRankPrize_Num();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1507,7 +1507,7 @@ class FightProc {
|
|
if (!in_array($gateId, ctx()->privateState->rankReward_drawed_MainGate)) {
|
|
if (!in_array($gateId, ctx()->privateState->rankReward_drawed_MainGate)) {
|
|
$mo = GameConfig::rank_passgatereward_getItem($gateId);
|
|
$mo = GameConfig::rank_passgatereward_getItem($gateId);
|
|
StoreProc::AddMultiItemInStore($mo->reward);
|
|
StoreProc::AddMultiItemInStore($mo->reward);
|
|
- ctx()->privateState->rankReward_drawed_MainGate[] = $gateId;
|
|
|
|
|
|
+ ctx()->privateData(true)->rankReward_drawed_MainGate[] = $gateId;
|
|
TaskProc::OnRankPrize_Num();
|
|
TaskProc::OnRankPrize_Num();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1518,7 +1518,7 @@ class FightProc {
|
|
if (!in_array($fightPower, ctx()->privateState->rankReward_drawed_fightPower)) {
|
|
if (!in_array($fightPower, ctx()->privateState->rankReward_drawed_fightPower)) {
|
|
$mo = GameConfig::rank_fightpowerreward_getItem($fightPower);
|
|
$mo = GameConfig::rank_fightpowerreward_getItem($fightPower);
|
|
StoreProc::AddMultiItemInStore($mo->reward);
|
|
StoreProc::AddMultiItemInStore($mo->reward);
|
|
- ctx()->privateState->rankReward_drawed_fightPower[] = $fightPower;
|
|
|
|
|
|
+ ctx()->privateData(true)->rankReward_drawed_fightPower[] = $fightPower;
|
|
TaskProc::OnFightRankPrize_Num();
|
|
TaskProc::OnFightRankPrize_Num();
|
|
}
|
|
}
|
|
}
|
|
}
|