|
@@ -57,14 +57,14 @@ class FightProc {
|
|
|
Err(ErrCode::cmd_err);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 6805 进化解锁
|
|
|
* @return type
|
|
|
*/
|
|
|
public static function EvolveUnlock() {
|
|
|
list($type, $id) = req()->paras;
|
|
|
-
|
|
|
+
|
|
|
if ($type == 1) {
|
|
|
$mo = GameConfig::evolve_getItem($id);
|
|
|
my_Assert($mo != null, ErrCode::err_const_no);
|
|
@@ -72,7 +72,6 @@ class FightProc {
|
|
|
my_Assert(ctx()->baseInfo->gold >= $mo->needGold_unlock, ErrCode::notenough_gold_msg);
|
|
|
ctx()->baseInfo->Consume_Gold($mo->needGold_unlock);
|
|
|
ctx()->gates->evolveMaxId_left = $id;
|
|
|
-
|
|
|
} else {
|
|
|
$dic = GameConfig::evolve();
|
|
|
foreach ($dic as $key => $value) {
|
|
@@ -92,10 +91,10 @@ class FightProc {
|
|
|
}
|
|
|
ctx()->gates->evolveMaxId_right = $id;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
UserProc::updateUserInfo();
|
|
|
$ret = array(
|
|
|
- 'gold'=> ctx()->baseInfo->gold,
|
|
|
+ 'gold' => ctx()->baseInfo->gold,
|
|
|
'items' => ctx()->store->items,
|
|
|
'evolveMaxId_right' => ctx()->gates->evolveMaxId_right,
|
|
|
'evolveMaxId_left' => ctx()->gates->evolveMaxId_left,
|
|
@@ -181,17 +180,17 @@ class FightProc {
|
|
|
$ret = array(
|
|
|
'tili' => ctx()->baseInfo->tili,
|
|
|
'tili_ts' => ctx()->baseInfo->tili_ts,
|
|
|
- 'xp'=> ctx()->baseInfo->xp,
|
|
|
- 'maxXp'=> ctx()->baseInfo->maxXp,
|
|
|
- 'level'=> ctx()->baseInfo->level,
|
|
|
+ 'xp' => ctx()->baseInfo->xp,
|
|
|
+ 'maxXp' => ctx()->baseInfo->maxXp,
|
|
|
+ 'level' => ctx()->baseInfo->level,
|
|
|
'fightSweepNum' => ctx()->gates->fightSweepNum,
|
|
|
//'prizeArr' => $prizeArr,
|
|
|
'store' => ctx()->store,
|
|
|
'task' => ctx()->task,
|
|
|
'reward' => StoreProc::$reward,
|
|
|
- 'reward_Gem' => StoreProc::$reward_Gem,
|
|
|
- 'oldLevel'=>$oldLevel,
|
|
|
- 'newLevel'=>$newLevel,
|
|
|
+ 'reward_Gem' => StoreProc::$reward_Gem,
|
|
|
+ 'oldLevel' => $oldLevel,
|
|
|
+ 'newLevel' => $newLevel,
|
|
|
);
|
|
|
return Resp::ok($ret);
|
|
|
}
|
|
@@ -327,8 +326,8 @@ class FightProc {
|
|
|
Err(ErrCode::err_const_no, "检查刷新扣费配置信息!");
|
|
|
}
|
|
|
}
|
|
|
- $t = ctx()->gates()->TowerGateInfo(); # 记忆技能刷新结果
|
|
|
- $t->RefreshSkillTimes++;
|
|
|
+ $t = ctx()->gates()->TowerGateInfo(); # 记忆技能刷新结果
|
|
|
+ $t->RefreshSkillTimes++;
|
|
|
$t->skill_zhudong = $li_zd;
|
|
|
$t->skill_beidong = $li_bd;
|
|
|
$t->skill_zhudong_lockState = $li_zds;
|
|
@@ -369,9 +368,10 @@ class FightProc {
|
|
|
TaskProc::OnFightNumChallengeGate();
|
|
|
TaskProc::OnKillCommonNumMonster($killedMonster);
|
|
|
TaskProc::OnKillleaderNumMonster($killedBoss);
|
|
|
+
|
|
|
if ($finalLayer > $lastLayer) {
|
|
|
foreach ($arr as $layerId => $layerMo) {
|
|
|
- if ($layerId >= $lastLayer && $layerId < $finalLayer) {
|
|
|
+ if ($layerMo->waveId >= $lastLayer && $layerMo->waveId < $finalLayer) {
|
|
|
my_Assert($layerMo != null, ErrCode::err_const_no);
|
|
|
StoreProc::AddMultiItemInStore($layerMo->rewards); # 发放奖励
|
|
|
}
|
|
@@ -528,7 +528,7 @@ class FightProc {
|
|
|
//ctx()->base()->Add_Exp($exp);
|
|
|
$waveMo = GameConfig::waveItem_getItem($gateId, $finalLayer);
|
|
|
my_Assert(null != $waveMo, ErrCode::err_const_no);
|
|
|
- $oldLevel = ctx()->baseInfo->level;
|
|
|
+ $oldLevel = ctx()->baseInfo->level;
|
|
|
ctx()->base()->Add_Exp($waveMo->rewardExp); # 指挥官经验
|
|
|
$newLevel = ctx()->baseInfo->level;
|
|
|
ctx()->base()->Add_Gold($waveMo->rewardGold); # 金币奖励
|
|
@@ -594,8 +594,8 @@ class FightProc {
|
|
|
//'rewardStr' => $pickups
|
|
|
'reward' => StoreProc::$reward,
|
|
|
'reward_Gem' => StoreProc::$reward_Gem,
|
|
|
- 'oldLevel'=>$oldLevel,
|
|
|
- 'newLevel'=>$newLevel,
|
|
|
+ 'oldLevel' => $oldLevel,
|
|
|
+ 'newLevel' => $newLevel,
|
|
|
);
|
|
|
return Resp::ok($ret);
|
|
|
}
|