|
@@ -544,11 +544,10 @@ class FightProc {
|
|
|
if (ctx()->gates->GateList->$gateId->pass == 0) {
|
|
|
ctx()->gates->GateList->$gateId->pass = 1;
|
|
|
TaskProc::Day7TaskReset($gateId); # 刷新七日任务
|
|
|
- $maxGateId= ctx()->gates->maxPassGateId();
|
|
|
- if($maxGateId > 0){
|
|
|
+ $maxGateId = ctx()->gates->maxPassGateId();
|
|
|
+ if ($maxGateId > 0) {
|
|
|
self::Ranking_MainGateIndex($maxGateId);
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
TaskProc::OnPassGate_X($gateId); # 刷新任务进度: 通关第X关
|
|
|
|
|
@@ -572,7 +571,7 @@ class FightProc {
|
|
|
ctx()->base()->Add_Gold($waveMo->rewardGold); # 金币奖励
|
|
|
# 图纸奖励: 数量min-max, 部位随机
|
|
|
if (strlen($waveMo->rewardTuZhi) > 0 && str_contains($waveMo->rewardTuZhi, '-')) {
|
|
|
- list($tz_min, $tz_max) = str_split($waveMo->rewardTuZhi); # 图纸数量
|
|
|
+ list($tz_min, $tz_max) = explode($waveMo->rewardTuZhi, '-'); # 图纸数量
|
|
|
$tz_n = rand($tz_min, $tz_max);
|
|
|
# 图纸部位数据源 1001, 1002, 1003, 1004, 1005, 1006
|
|
|
for ($i = 0; $i < $tz_n; $i++) {
|
|
@@ -583,14 +582,14 @@ class FightProc {
|
|
|
}
|
|
|
# 宝石奖励: 数量min-max;品质:权重,品质:权重...
|
|
|
if (strlen($waveMo->rewardGem) > 0) {
|
|
|
- list($gs_num, $gs_props) = str_split($waveMo->rewardGem, ';');
|
|
|
- list($gem_min, $gem_max) = str_split($gs_num); # 宝石数量
|
|
|
+ list($gs_num, $gs_props) = explode($waveMo->rewardGem, ';');
|
|
|
+ list($gem_min, $gem_max) = explode($gs_num, '-'); # 宝石数量
|
|
|
$gem_n = rand($gem_min, $gem_max);
|
|
|
- $arr = str_split($gs_props, ",");
|
|
|
+ $arr = explode($gs_props, ",");
|
|
|
$pool = array();
|
|
|
$n = 0;
|
|
|
foreach ($arr as $str) {
|
|
|
- list($qual, $props) = str_split($str, ':');
|
|
|
+ list($qual, $props) = explode($str, ':');
|
|
|
$pool[] = array('q' => $qual, 'p' => $props);
|
|
|
$n += $props;
|
|
|
}
|
|
@@ -703,10 +702,10 @@ class FightProc {
|
|
|
*/
|
|
|
public static function Ranking_MainGateIndex($maxGateIndex) {
|
|
|
$memKey = MemKey_GameRun::Rank_MainGateIndex_Zone_zset(req()->zoneid);
|
|
|
- $mem = gMem();
|
|
|
-
|
|
|
- $uid = req()->uid;
|
|
|
- $arr = array();
|
|
|
+ $mem = gMem();
|
|
|
+
|
|
|
+ $uid = req()->uid;
|
|
|
+ $arr = array();
|
|
|
$arr["$uid"] = $maxGateIndex;
|
|
|
$mem->zadd($memKey, $arr);
|
|
|
|
|
@@ -851,13 +850,13 @@ class FightProc {
|
|
|
|
|
|
$memKey = MemKey_GameRun::RankReward_FightPower_Zone_hash(req()->zoneid);
|
|
|
foreach ($rewards as $fightPower => $mo) {
|
|
|
- if ($power >= $fightPower && !gMem()->hexists($memKey, $fightPower)) {
|
|
|
+ if ($power >= $fightPower && !gMem()->hexists($memKey, $fightPower)) {
|
|
|
$ins_rank = new Ins_rank();
|
|
|
$ins_rank->uid = req()->uid;
|
|
|
$ins_rank->name = ctx()->baseInfo->name;
|
|
|
$ins_rank->headImg = ctx()->baseInfo->headImg;
|
|
|
$ins_rank->score = $fightPower;
|
|
|
- gMem()->hset($memKey, $fightPower,$ins_rank);
|
|
|
+ gMem()->hset($memKey, $fightPower, $ins_rank);
|
|
|
}
|
|
|
}
|
|
|
}
|