|
@@ -254,41 +254,41 @@ class PVPProc {
|
|
|
$fPower = HeroProc::CalcUserFightPower($zoneid, $uid, $req->userInfo->game); # 玩家总战力?还是当前防守队伍的战斗力?
|
|
|
$numNewLog = 0; // todo: 真正查询是否有新战报
|
|
|
$matches = self::getNewMatches($pvp, $uid, $zoneid); # 获得新的匹配对手
|
|
|
-
|
|
|
- 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) {
|
|
|
- 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 == 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); # 复制一份当前积分作为昨天的截止积分榜
|
|
|
- } else {
|
|
|
- // 不是昨天登录的, 且没有对应的数据 就不再复制当前数据了.直接未上榜处理
|
|
|
- }
|
|
|
- $rank = self::_getRank_by_uid($uid, $haventKey_day); # 查询上一天排名
|
|
|
- if ($rank <= self::pvpMaxRank) { # 防御未上榜
|
|
|
- foreach (GameConfig::pvp_rankreward() as $cfg) {
|
|
|
- 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->sendRewardEmail($zoneid, $uid, $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) {
|
|
|
+// 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 == 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); # 复制一份当前积分作为昨天的截止积分榜
|
|
|
+// } else {
|
|
|
+// // 不是昨天登录的, 且没有对应的数据 就不再复制当前数据了.直接未上榜处理
|
|
|
+// }
|
|
|
+// $rank = self::_getRank_by_uid($uid, $haventKey_day); # 查询上一天排名
|
|
|
+// if ($rank <= self::pvpMaxRank) { # 防御未上榜
|
|
|
+// foreach (GameConfig::pvp_rankreward() as $cfg) {
|
|
|
+// 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(); # 更新待发放奖励日期
|
|
|
$req->userInfo->game->pvp = $pvp;
|
|
|
UserProc::updateUserInfo();
|
|
|
// 组装 返回值结构
|