玉虚论道二版
parent
d6ffd5e348
commit
65045c93d9
|
|
@ -14,8 +14,6 @@ import org.springframework.stereotype.Component;
|
|||
import rpc.protocols.MessageTypeProto;
|
||||
import rpc.protocols.PlayerInfoProto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class GetPlayerOneTeamInfo extends BaseHandler<PlayerInfoProto.GetPlayerOneTeamInfoRequest> {
|
||||
@Override
|
||||
|
|
@ -27,40 +25,28 @@ public class GetPlayerOneTeamInfo extends BaseHandler<PlayerInfoProto.GetPlayerO
|
|||
public void processWithProto(ISession iSession, PlayerInfoProto.GetPlayerOneTeamInfoRequest proto) throws Exception {
|
||||
|
||||
PlayerInfoProto.GetPlayerOneTeamInfoResponse oneTeamInfo = null;
|
||||
int teamId = proto.getTeamId();
|
||||
if(proto.getServerId()==0){
|
||||
//本服其他功能
|
||||
if(teamId==0 && proto.getCrossteamIdList()!=null){
|
||||
//跨服玉虚论道
|
||||
oneTeamInfo = PlayerLogic.getInstance().getCrossOneTeamInfo( proto.getPlayerId(),null,proto.getCrossteamIdList());
|
||||
}else{
|
||||
oneTeamInfo = PlayerLogic.getInstance().getOneTeamInfo( proto.getPlayerId(), teamId);
|
||||
}
|
||||
|
||||
oneTeamInfo = PlayerLogic.getInstance().getOneTeamInfo( proto.getPlayerId(), proto.getTeamId());
|
||||
}else{
|
||||
//跨服
|
||||
if(proto.getPlayerId()<1000){
|
||||
//机器人
|
||||
|
||||
CrossArenaEnemy info = RedisUtil.getInstence().getMapEntry(RedisKey.CROSS_ARENA_ROBOT_INFO, String.valueOf(GlobleSystemLogic.getInstence().getCrossGroup()), String.valueOf(proto.getPlayerId()), CrossArenaEnemy.class);
|
||||
|
||||
if(info==null){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
if(teamId == 0 && proto.getCrossteamIdList() != null){
|
||||
//跨服玉虚论道
|
||||
oneTeamInfo = PlayerLogic.getInstance().getCrossOneTeamInfo( proto.getPlayerId(),info,proto.getCrossteamIdList());
|
||||
}else{
|
||||
oneTeamInfo = PlayerLogic.getInstance().getOneTeamInfo(info.getEnemyId(),teamId,info);
|
||||
}
|
||||
oneTeamInfo = PlayerLogic.getInstance().getOneTeamInfo(info.getEnemyId(),proto.getTeamId(),info);
|
||||
}else{
|
||||
//真人
|
||||
if(teamId == 0 && proto.getCrossteamIdList() != null){
|
||||
//跨服玉虚论道
|
||||
oneTeamInfo = PlayerLogic.getInstance().getCrossOneTeamInfo(proto.getPlayerId(),proto.getCrossteamIdList());
|
||||
}else{
|
||||
oneTeamInfo = PlayerLogic.getInstance().getCrossOneTeamInfo(proto.getPlayerId(),teamId);
|
||||
}
|
||||
oneTeamInfo = PlayerLogic.getInstance().getCrossOneTeamInfo(proto.getPlayerId(),proto.getTeamId());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
MessageUtil.sendMessage(iSession,1, MessageTypeProto.MessageType.GET_PLAYER_ONE_TEAM_INFO_RESPONSE.getNumber(),oneTeamInfo,true);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -98,6 +98,9 @@ public class CrossServiceLogic {
|
|||
if (query == null){
|
||||
insert(arenaOfUser);
|
||||
} else {
|
||||
arenaOfUser.getPlayerManager().setCrossYuxulundaoNewScore(query.getPlayerManager().getCrossYuxulundaoNewScore());
|
||||
arenaOfUser.getPlayerManager().setCrossYuxulundaoOldScore( query.getPlayerManager().getCrossYuxulundaoOldScore());
|
||||
arenaOfUser.getPlayerManager().setCrossYxldMaxLevel(arenaOfUser.getPlayerManager().getCrossYxldMaxLevel());
|
||||
update(arenaOfUser);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ public class CrossYuxulundaoLogic {
|
|||
return;
|
||||
}
|
||||
String rkey = RedisUtil.getInstence().getKey(RedisKey.CROSS_YUXULUNDAO_RANK, Integer.toString(crossGroup));
|
||||
Set<String> arenaRank = RedisUtil.getInstence().getReverseZset(rkey, 0, 1);
|
||||
Set<String> arenaRank = RedisUtil.getInstence().getReverseZset(rkey, 0, -1);
|
||||
List<Integer> arenaRankfilt = arenaRank.stream().mapToInt(n -> Integer.parseInt(n)).filter(n -> n > 1000).boxed().collect(Collectors.toList());
|
||||
for (int i = 0; i < arenaRankfilt.size(); i++) {
|
||||
SMServerRankReward config = SMServerRankReward.getIdByScore(i + 1);
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import com.ljsd.jieling.globals.Global;
|
|||
import com.ljsd.jieling.jbean.ActivityMission;
|
||||
import com.ljsd.jieling.ktbeans.ReportEventEnum;
|
||||
import com.ljsd.jieling.ktbeans.ReportUtil;
|
||||
import com.ljsd.jieling.logic.GlobleSystemLogic;
|
||||
import com.ljsd.jieling.logic.activity.ActivityLogic;
|
||||
import com.ljsd.jieling.logic.activity.ActivityType;
|
||||
import com.ljsd.jieling.logic.activity.crossService.CrossServiceLogic;
|
||||
|
|
@ -687,10 +688,19 @@ public class PlayerLogic {
|
|||
}
|
||||
|
||||
public CommonProto.TeamOneInfo.Builder getYuxuRobotTeamInfo(SArenaRobotConfig sArenaRobotConfig,List<Integer> crossTeamId){
|
||||
int crossGroup = GlobleSystemLogic.getInstence().getCrossGroup();
|
||||
if (crossGroup == -1) {
|
||||
return CommonProto.TeamOneInfo.newBuilder();
|
||||
}
|
||||
//TODO
|
||||
Map<Integer, Integer> groupValues = RedisUtil.getInstence().getMapValues(RedisKey.SERVER_SPLIT_INFO, "", Integer.class, Integer.class);
|
||||
List<Integer> groupList = groupValues.entrySet().stream().filter(n -> n.getValue() == crossGroup).map(keyVal -> keyVal.getKey()).collect(Collectors.toList());
|
||||
int server = new Random().nextInt(groupList.size());
|
||||
|
||||
CommonProto.TeamOneInfo.Builder oneInfo = CommonProto.TeamOneInfo.newBuilder()
|
||||
.setLevel(sArenaRobotConfig.getRobotLevel())
|
||||
.setName(sArenaRobotConfig.getRobotName())
|
||||
.setUid(sArenaRobotConfig.getId()).setCrossTeamScore(sArenaRobotConfig.getMsScroe()).setServerName("S10");
|
||||
.setUid(sArenaRobotConfig.getId()).setCrossTeamScore(sArenaRobotConfig.getMsScroe()).setServerName(String.valueOf(groupList.get(server)));
|
||||
|
||||
//CommonProto.TeamOneTeamInfo.Builder teamInfo = CommonProto.TeamOneTeamInfo.newBuilder();
|
||||
if(sArenaRobotConfig.getDifferDemonsId()!=null){
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ public class MinuteTask extends Thread {
|
|||
int hour = calendar.get(Calendar.HOUR_OF_DAY);
|
||||
int minute = calendar.get(Calendar.MINUTE);
|
||||
int w = calendar.get(Calendar.DAY_OF_WEEK) - 1;
|
||||
if(w == 1 &&hour == 23 && minute ==50){
|
||||
if(w == 0 &&hour == 23 && minute ==50){
|
||||
LOGGER.info("everySundaySpecialClockTask yuxulundao send reward start ...");
|
||||
//玉虚论道23.50分执行
|
||||
CrossYuxulundaoLogic.getInstance().sendReward();
|
||||
|
|
|
|||
Loading…
Reference in New Issue