|
@@ -255,21 +255,22 @@ class PVPProc {
|
|
|
$numNewLog = 0; // todo: 真正查询是否有新战报
|
|
|
$matches = self::getNewMatches($pvp, $uid, $zoneid); # 获得新的匹配对手
|
|
|
|
|
|
- if ($pvp->haventReward_season > 0 && $pvp->haventReward_season < $seasonId) { # 尚未发放上赛季奖励
|
|
|
+ if ($pvp->haventReward_season >= 0 && $pvp->haventReward_season < $seasonId) { # 尚未发放上赛季奖励
|
|
|
$haventKey = MemKey_GameRun::Game_PVPScoreByZoneSeason_zset($zoneid, $pvp->haventReward_season);
|
|
|
// todo:发放上赛季奖励邮件
|
|
|
$rank = self::_getRank_by_uid($uid, $haventKey); # 查询上赛季排名
|
|
|
if ($rank <= self::pvpMaxRank) { # 防御未上榜
|
|
|
foreach (GameConfig::pvp_rankreward() as $cfg) {
|
|
|
- $cfg = new \sm_pvp_rankreward();
|
|
|
+ isEditor() and $cfg = new \sm_pvp_rankreward();
|
|
|
if ($rank >= $cfg->minRank && $rank <= $cfg->maxRank) { # 找到对应的名次段
|
|
|
EmailProc::SendPvpRankReward_Season($zoneid, $uid, $rank); # 发放奖励邮件(竞技币)
|
|
|
}
|
|
|
}
|
|
|
+ UserProc::updateUserInfo();
|
|
|
}
|
|
|
- $pvp->haventReward_season = $seasonId; # 更新待发奖赛季
|
|
|
}
|
|
|
- if ($pvp->haventReward_tsDay > 0 && $pvp->haventReward_tsDay < tsDay()) { # 尚未发放昨天奖励
|
|
|
+ $pvp->haventReward_season = $seasonId; # 更新待发奖赛季
|
|
|
+ if ($pvp->haventReward_tsDay == tsDay() - 1) { # 尚未发放昨天奖励
|
|
|
$haventKey_day = MemKey_GameRun::Game_PVPScoreByZone_zset_Day($zoneid, $pvp->haventReward_tsDay);
|
|
|
if (!gMem()->exists($haventKey_day) && $pvp->haventReward_tsDay == tsDay() - 1) { # 昨天的积分记录不存在
|
|
|
gMem()->zcopy($key, $haventKey_day); # 复制一份当前积分作为昨天的截止积分榜
|
|
@@ -279,14 +280,16 @@ class PVPProc {
|
|
|
$rank = self::_getRank_by_uid($uid, $haventKey_day); # 查询上一天排名
|
|
|
if ($rank <= self::pvpMaxRank) { # 防御未上榜
|
|
|
foreach (GameConfig::pvp_rankreward() as $cfg) {
|
|
|
- $cfg = new \sm_pvp_rankreward();
|
|
|
+ isEditor() and $cfg = new \sm_pvp_rankreward();
|
|
|
if ($rank >= $cfg->minRank && $rank <= $cfg->maxRank) { # 找到对应的名次段
|
|
|
EmailProc::SendPvpRankReward_Lastday($zoneid, $uid, $rank); # 发放奖励邮件(竞技币)
|
|
|
}
|
|
|
}
|
|
|
+ UserProc::updateUserInfo();
|
|
|
}
|
|
|
- $pvp->haventReward_tsDay = tsDay(); # 更新待发放奖励日期
|
|
|
}
|
|
|
+ $pvp->haventReward_tsDay = tsDay(); # 更新待发放奖励日期
|
|
|
+ $req->userInfo->game->pvp = $pvp;
|
|
|
|
|
|
// 组装 返回值结构
|
|
|
$ret = array(
|
|
@@ -607,7 +610,6 @@ class PVPProc {
|
|
|
array_pop($mPlayerUIDs); # 那多一个人,踢掉一个
|
|
|
}
|
|
|
|
|
|
-
|
|
|
$bPlayerUIDs = self::array_random_assoc($bPlayerUIDs, 1);
|
|
|
$mPlayerUIDs = self::array_random_assoc($mPlayerUIDs, 2);
|
|
|
$aPlayerUIDs = self::array_random_assoc($aPlayerUIDs, 1);
|