|
@@ -309,7 +309,7 @@ class FightProc {
|
|
* @return type
|
|
* @return type
|
|
*/
|
|
*/
|
|
public static function GateChallengeRewards() {
|
|
public static function GateChallengeRewards() {
|
|
- list($finalLayer) = req()->paras; # 战斗结束时的层数
|
|
|
|
|
|
+ list($finalLayer, $killedMonster, $killedBoss) = req()->paras; # 战斗结束时的层数
|
|
|
|
|
|
$lastLayer = ctx()->gates()->TowerGateInfo()->CurLayer;
|
|
$lastLayer = ctx()->gates()->TowerGateInfo()->CurLayer;
|
|
$arr = GameConfig::waves_getItemArray(self::TowerGateId);
|
|
$arr = GameConfig::waves_getItemArray(self::TowerGateId);
|
|
@@ -468,7 +468,7 @@ class FightProc {
|
|
//// StoreProc::AddMultiItemInStore($gateMo->reward_fail); # 发放失败奖励(2024.5.30 过期)
|
|
//// StoreProc::AddMultiItemInStore($gateMo->reward_fail); # 发放失败奖励(2024.5.30 过期)
|
|
// }
|
|
// }
|
|
|
|
|
|
- StoreProc::AddMultiItemInStore($pickups); # 战场拾取道具直接入背包
|
|
|
|
|
|
+ StoreProc::AddMultiItemInStore($pickups); # 战场拾取道具直接入背包
|
|
ctx()->base()->Add_Gold($gold); # 战场拾取的金币直接入背包
|
|
ctx()->base()->Add_Gold($gold); # 战场拾取的金币直接入背包
|
|
//ctx()->base()->Add_Exp($exp);
|
|
//ctx()->base()->Add_Exp($exp);
|
|
$waveMo = GameConfig::waveItem_getItem($gateId, $finalLayer);
|
|
$waveMo = GameConfig::waveItem_getItem($gateId, $finalLayer);
|
|
@@ -512,7 +512,7 @@ class FightProc {
|
|
$gemId = $item['q'] * 100000 + rand(1, 6) * 1000;
|
|
$gemId = $item['q'] * 100000 + rand(1, 6) * 1000;
|
|
SystemProc::GetGem_GreaterOrangeQual_MainGate(req()->zoneid, ctx()->baseInfo->name, Ins_GateInfo::gateNum($gateId), $gateMo->gateName, $gemId); //广播
|
|
SystemProc::GetGem_GreaterOrangeQual_MainGate(req()->zoneid, ctx()->baseInfo->name, Ins_GateInfo::gateNum($gateId), $gateMo->gateName, $gemId); //广播
|
|
//StoreProc::PutGemInStore($gemId); # 发放宝石并退出本次投色子
|
|
//StoreProc::PutGemInStore($gemId); # 发放宝石并退出本次投色子
|
|
- //$pickups .= ";$gemId,1";
|
|
|
|
|
|
+ //$pickups .= ";$gemId,1";
|
|
StoreProc::AddMultiItemInStore("$gemId,1");
|
|
StoreProc::AddMultiItemInStore("$gemId,1");
|
|
|
|
|
|
break;
|
|
break;
|
|
@@ -541,70 +541,6 @@ class FightProc {
|
|
return Resp::ok($ret);
|
|
return Resp::ok($ret);
|
|
}
|
|
}
|
|
|
|
|
|
-// /**
|
|
|
|
-// * [6801]关卡战斗结算
|
|
|
|
-// * @return type
|
|
|
|
-// */
|
|
|
|
-// public static function Settle_bak() {
|
|
|
|
-// list($resultType, $gateId, $gold, $curTs, $pickups) = req()->paras;
|
|
|
|
-// # 客户端需要增加参数: killmonserNum,killBosssNum, finalHpPercent(最终血量百分比)
|
|
|
|
-// $gateMo = GameConfig::gate_getItem($gateId);
|
|
|
|
-// my_Assert($gateMo != null, ErrCode::err_const_no);
|
|
|
|
-// my_Assert(StlUtil::dictHasProperty(ctx()->gates->GateList, $gateId), ErrCode::gate_NoUserGateInfo);
|
|
|
|
-// $gateInfo = ctx()->gates->GateList->$gateId;
|
|
|
|
-// $ts = $gateInfo->MaxSeconds;
|
|
|
|
-// if ($curTs >= $ts) {
|
|
|
|
-// $gateInfo->MaxSeconds = $curTs;
|
|
|
|
-// }
|
|
|
|
-// if ($resultType) { # 胜利
|
|
|
|
-// if (ctx()->gates->GateList->$gateId->pass == 0) {
|
|
|
|
-// ctx()->gates->GateList->$gateId->pass = 1;
|
|
|
|
-// TaskProc::Day7TaskReset($gateId);
|
|
|
|
-// }
|
|
|
|
-// TaskProc::OnPassGate_X($gateId);
|
|
|
|
-// StoreProc::AddMultiItemInStore($gateMo->reward_win);
|
|
|
|
-// if (Ins_GateInfo::GateTypeFromId($gateId) == Enum_GateType::MainStoryGate) {
|
|
|
|
-// ctx()->gates->UnlockNextPlotGate();
|
|
|
|
-// $dic = GameConfig::gate();
|
|
|
|
-// $index = 0; # 挑战关卡解锁逻辑. -gwang 2024年4月15日
|
|
|
|
-// foreach ($dic as $id => $item) {
|
|
|
|
-// if (Ins_GateInfo::GateTypeFromId($id) == Enum_GateType::MainChallengeGate && $item->challengeGateId == $gateId) {
|
|
|
|
-// $index += 1;
|
|
|
|
-// $gate = new Ins_GateInfo();
|
|
|
|
-// $gate->GateId = $id;
|
|
|
|
-// ctx()->gates->GateList->$id = $gate;
|
|
|
|
-// }
|
|
|
|
-// if ($index >= 3) {
|
|
|
|
-// break;
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// } else {
|
|
|
|
-//
|
|
|
|
-// }
|
|
|
|
-// } else { # 失败
|
|
|
|
-// StoreProc::AddMultiItemInStore($gateMo->reward_fail);
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// StoreProc::AddMultiItemInStore($pickups); # 战场拾取道具
|
|
|
|
-// ctx()->baseInfo->Add_Gold($gold);
|
|
|
|
-// //ctx()->baseInfo->Add_Exp($exp);
|
|
|
|
-//
|
|
|
|
-// if (Ins_GateInfo::GateTypeFromId($gateId) == Enum_GateType::MainStoryGate) {
|
|
|
|
-// TaskProc::OnFightNumMainGate();
|
|
|
|
-// } else if (Ins_GateInfo::GateTypeFromId($gateId) == Enum_GateType::MainChallengeGate) {
|
|
|
|
-// TaskProc::OnFightNumChallengeGate();
|
|
|
|
-// }
|
|
|
|
-// TaskProc::OnKillCommonNumMonster(1000);
|
|
|
|
-// TaskProc::OnKillleaderNumMonster(500);
|
|
|
|
-//
|
|
|
|
-// UserProc::updateUserInfo();
|
|
|
|
-// $ret = array(
|
|
|
|
-// 'gates' => ctx()->gates,
|
|
|
|
-// 'store' => ctx()->store,
|
|
|
|
-// 'task' => ctx()->task,
|
|
|
|
-// );
|
|
|
|
-// return Resp::ok($ret);
|
|
|
|
-// }
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="排行榜">
|
|
// <editor-fold defaultstate="collapsed" desc="排行榜">
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1102,7 +1038,7 @@ class FightProc {
|
|
if ($parasVal != 0) {
|
|
if ($parasVal != 0) {
|
|
$heroAttck += $parasVal;
|
|
$heroAttck += $parasVal;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
if ($per_hp != 0) {
|
|
if ($per_hp != 0) {
|
|
$heroHp = round($heroHp + $heroHp * $per_hp);
|
|
$heroHp = round($heroHp + $heroHp * $per_hp);
|
|
}
|
|
}
|