竞技场重写8版,去除第一名拍脸
parent
2a9b4f755c
commit
45d941793b
|
@ -22,7 +22,7 @@ public class ArenaFunction implements FunctionManager {
|
|||
ArenaLogic.getInstance().newArenaSendAdvancedSeason();
|
||||
// 在线玩家拍脸
|
||||
for (ISession session : OnlineUserManager.sessionMap.values()) {
|
||||
ArenaLogic.getInstance().newArenaFirstPush(session);
|
||||
// ArenaLogic.getInstance().newArenaFirstPush(session);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -388,7 +388,7 @@ public class RedisKey {
|
|||
public static final String NEW_ARENA_RANK = "NEW_ARENA_RANK"; //新竞技场排行榜
|
||||
public static final String NEW_ARENA_PLAYER = "NEW_ARENA_PLAYER";//新竞技场玩家信息
|
||||
public static final String NEW_ARENA_RESET = "NEW_ARENA_RESET";//新竞技场重置标记
|
||||
public static final String NEW_ARENA_FIRST_PUSH = "NEW_ARENA_FIRST_PUSH";//竞技场第一名推送标记
|
||||
// public static final String NEW_ARENA_FIRST_PUSH = "NEW_ARENA_FIRST_PUSH";//竞技场第一名推送标记
|
||||
|
||||
|
||||
//进程排行 合区统一
|
||||
|
|
|
@ -2,8 +2,6 @@ package com.ljsd.jieling.kefu;
|
|||
|
||||
import com.ljsd.GameApplication;
|
||||
import com.ljsd.jieling.db.mongo.MongoUtil;
|
||||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||
import com.ljsd.jieling.logic.activity.crossService.CrossServiceLogic;
|
||||
import com.ljsd.jieling.logic.arena.ArenaLogic;
|
||||
import com.ljsd.jieling.logic.dao.ArenaManager;
|
||||
|
@ -11,11 +9,9 @@ import com.ljsd.jieling.logic.dao.arena.ArenaInfo;
|
|||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.rank.NewArenaRank;
|
||||
import com.ljsd.jieling.logic.rank.RankEnum;
|
||||
import com.ljsd.jieling.util.CBean2Proto;
|
||||
import config.SArenaLevel;
|
||||
import config.SArenaRoom;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import rpc.protocols.CommonProto;
|
||||
import util.TimeUtils;
|
||||
|
||||
import java.util.*;
|
||||
|
@ -56,18 +52,6 @@ public class Cmd_arenafalsedata extends GmAbstract {
|
|||
if (users.isEmpty()){
|
||||
return;
|
||||
}
|
||||
RedisUtil redisUtil = RedisUtil.getInstence();
|
||||
SArenaRoom sArenaRoom = SArenaRoom.getMap().get(roomId);
|
||||
if (sArenaRoom.getCrossServer() == 1){
|
||||
// 拍脸首推
|
||||
User first = users.get(0);
|
||||
CommonProto.ArenaPersonInfo personInfo = redisUtil.getmapvalue(RedisKey.NEW_ARENA_FIRST_PUSH, ArenaLogic.FIRST_PUSH, CommonProto.ArenaPersonInfo.class);
|
||||
if (personInfo == null){
|
||||
redisUtil.putmap(RedisKey.NEW_ARENA_FIRST_PUSH, ArenaLogic.FIRST_PUSH, CBean2Proto.getNewArenaPlayerProto(first.getId(), roomId));
|
||||
redisUtil.expireMills(RedisKey.NEW_ARENA_FIRST_PUSH, TimeUtils.ONE_MINUTE * 100);
|
||||
LOGGER.info("竞技场假数据,第一拍脸,uid:{},房间id:{}",first.getId(),roomId);
|
||||
}
|
||||
}
|
||||
|
||||
NewArenaRank rank = (NewArenaRank) RankEnum.toRank(RankEnum.NEW_ARENA_RANK.getType());
|
||||
for (User user : users) {
|
||||
|
|
|
@ -1231,21 +1231,21 @@ public class ArenaLogic {
|
|||
/**
|
||||
* 竞技场赛季结束第一名拍脸推送
|
||||
*/
|
||||
public void newArenaFirstPush(ISession session){
|
||||
RedisUtil redisUtil = RedisUtil.getInstence();
|
||||
CommonProto.ArenaPersonInfo personInfo = redisUtil.getmapvalue(RedisKey.NEW_ARENA_FIRST_PUSH, FIRST_PUSH, CommonProto.ArenaPersonInfo.class);
|
||||
if (personInfo == null){
|
||||
return;
|
||||
}
|
||||
String uid = String.valueOf(session.getUid());
|
||||
Integer mark = redisUtil.getmapvalue(RedisKey.NEW_ARENA_FIRST_PUSH, uid, Integer.class);
|
||||
if (mark != null){
|
||||
return;
|
||||
}
|
||||
ArenaInfoProto.NewArenaFirstIndication.Builder builder = ArenaInfoProto.NewArenaFirstIndication.newBuilder().setPlayer(personInfo);
|
||||
MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.NewArenaFirstIndication_VALUE, builder.build(), true);
|
||||
redisUtil.putmap(RedisKey.NEW_ARENA_FIRST_PUSH, uid, 1);
|
||||
}
|
||||
// public void newArenaFirstPush(ISession session){
|
||||
// RedisUtil redisUtil = RedisUtil.getInstence();
|
||||
// CommonProto.ArenaPersonInfo personInfo = redisUtil.getmapvalue(RedisKey.NEW_ARENA_FIRST_PUSH, FIRST_PUSH, CommonProto.ArenaPersonInfo.class);
|
||||
// if (personInfo == null){
|
||||
// return;
|
||||
// }
|
||||
// String uid = String.valueOf(session.getUid());
|
||||
// Integer mark = redisUtil.getmapvalue(RedisKey.NEW_ARENA_FIRST_PUSH, uid, Integer.class);
|
||||
// if (mark != null){
|
||||
// return;
|
||||
// }
|
||||
// ArenaInfoProto.NewArenaFirstIndication.Builder builder = ArenaInfoProto.NewArenaFirstIndication.newBuilder().setPlayer(personInfo);
|
||||
// MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.NewArenaFirstIndication_VALUE, builder.build(), true);
|
||||
// redisUtil.putmap(RedisKey.NEW_ARENA_FIRST_PUSH, uid, 1);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取当前时间至竞技场结束时间
|
||||
|
@ -1512,12 +1512,12 @@ public class ArenaLogic {
|
|||
ranking++;
|
||||
}
|
||||
// 第一拍脸
|
||||
if (roomId == maxHighRoomId){
|
||||
CommonProto.ArenaPersonInfo personInfo = CBean2Proto.getNewArenaPlayerProto(firstUid, roomId);
|
||||
redisUtil.putmap(RedisKey.NEW_ARENA_FIRST_PUSH, FIRST_PUSH, personInfo);
|
||||
// 拍脸保存到6天23小时后
|
||||
redisUtil.expireMills(RedisKey.NEW_ARENA_FIRST_PUSH, TimeUtils.DAY * 7 - TimeUtils.ONE_HOUR * 3);
|
||||
}
|
||||
// if (roomId == maxHighRoomId){
|
||||
// CommonProto.ArenaPersonInfo personInfo = CBean2Proto.getNewArenaPlayerProto(firstUid, roomId);
|
||||
// redisUtil.putmap(RedisKey.NEW_ARENA_FIRST_PUSH, FIRST_PUSH, personInfo);
|
||||
// // 拍脸保存到6天23小时后
|
||||
// redisUtil.expireMills(RedisKey.NEW_ARENA_FIRST_PUSH, TimeUtils.DAY * 7 - TimeUtils.ONE_HOUR * 3);
|
||||
// }
|
||||
}
|
||||
try {
|
||||
MongoUtil.getInstence().lastUpdate();
|
||||
|
|
|
@ -52,7 +52,7 @@ public class TrainingLogic {
|
|||
builder.addInfos(proto);
|
||||
}
|
||||
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.TrainingArchitectureInfoResponse_VALUE, builder.build(), true);
|
||||
ArenaLogic.getInstance().newArenaFirstPush(iSession);//每次登陆请求
|
||||
// ArenaLogic.getInstance().newArenaFirstPush(iSession);//每次登陆请求
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue