master_haizei01
parent
c1ff5f6ec8
commit
0e11a20dc9
|
@ -94,18 +94,18 @@ public class AllPeopleWelfareActivity extends AbstractActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addValue(int goodId, int count){
|
public static void addValue(int goodId, int count){
|
||||||
String key = RedisUtil.getInstence().getKeyNew(String.valueOf(GameApplication.serverId), RedisKey.ALL_PEOPLE_WELFARE_BUY_COUNT);
|
String key = RedisUtil.getInstence().getKeyNew(RedisKey.ALL_PEOPLE_WELFARE_BUY_COUNT, String.valueOf(GameApplication.serverId));
|
||||||
RedisUtil.getInstence().zsetAddOne(key, String.valueOf(goodId), count);
|
RedisUtil.getInstence().zsetAddOne(key, String.valueOf(goodId), count);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getValue(int goodId){
|
public static int getValue(int goodId){
|
||||||
String key = RedisUtil.getInstence().getKeyNew(String.valueOf(GameApplication.serverId), RedisKey.ALL_PEOPLE_WELFARE_BUY_COUNT);
|
String key = RedisUtil.getInstence().getKeyNew(RedisKey.ALL_PEOPLE_WELFARE_BUY_COUNT, String.valueOf(GameApplication.serverId));
|
||||||
Double zSetScore = RedisUtil.getInstence().getZSetScoreOrigin(key, String.valueOf(goodId));
|
Double zSetScore = RedisUtil.getInstence().getZSetScoreOrigin(key, String.valueOf(goodId));
|
||||||
return Optional.ofNullable(zSetScore).orElse(0d).intValue();
|
return Optional.ofNullable(zSetScore).orElse(0d).intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Map<Integer, Integer> getAllValue(){
|
public static Map<Integer, Integer> getAllValue(){
|
||||||
String key = RedisUtil.getInstence().getKeyNew(String.valueOf(GameApplication.serverId), RedisKey.ALL_PEOPLE_WELFARE_BUY_COUNT);
|
String key = RedisUtil.getInstence().getKeyNew(RedisKey.ALL_PEOPLE_WELFARE_BUY_COUNT, String.valueOf(GameApplication.serverId));
|
||||||
Set<ZSetOperations.TypedTuple<String>> tuples = RedisUtil.getInstence().getZsetRangeWithScore(key, 0, -1);
|
Set<ZSetOperations.TypedTuple<String>> tuples = RedisUtil.getInstence().getZsetRangeWithScore(key, 0, -1);
|
||||||
HashMap<Integer, Integer> result = new HashMap<>();
|
HashMap<Integer, Integer> result = new HashMap<>();
|
||||||
Iterator<ZSetOperations.TypedTuple<String>> iterator = tuples.iterator();
|
Iterator<ZSetOperations.TypedTuple<String>> iterator = tuples.iterator();
|
||||||
|
|
|
@ -9,7 +9,6 @@ import com.ljsd.jieling.logic.GlobleSystemLogic;
|
||||||
import com.ljsd.jieling.logic.activity.crossService.CrossServiceLogic;
|
import com.ljsd.jieling.logic.activity.crossService.CrossServiceLogic;
|
||||||
import com.ljsd.jieling.logic.dao.ArenaEnemy;
|
import com.ljsd.jieling.logic.dao.ArenaEnemy;
|
||||||
import com.ljsd.jieling.logic.dao.ArenaManager;
|
import com.ljsd.jieling.logic.dao.ArenaManager;
|
||||||
import com.ljsd.jieling.logic.dao.PlayerManager;
|
|
||||||
import com.ljsd.jieling.logic.dao.cross.CSPlayer;
|
import com.ljsd.jieling.logic.dao.cross.CSPlayer;
|
||||||
import com.ljsd.jieling.logic.dao.root.User;
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
import com.ljsd.jieling.logic.mail.MailLogic;
|
import com.ljsd.jieling.logic.mail.MailLogic;
|
||||||
|
@ -139,42 +138,42 @@ public class CrossYuxulundaoLogic {
|
||||||
/**
|
/**
|
||||||
* 赛季段位重置 发奖
|
* 赛季段位重置 发奖
|
||||||
*/
|
*/
|
||||||
public void resetSeason(User user) {
|
// public void resetSeason(User user) {
|
||||||
PlayerManager player = user.getPlayerInfoManager();
|
// PlayerManager player = user.getPlayerInfoManager();
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
// public void setMatchRivals(User user) {
|
||||||
|
// int crossGroup = GlobleSystemLogic.getInstence().getCrossGroup();
|
||||||
public void setMatchRivals(User user) {
|
// if (crossGroup == -1) {
|
||||||
int crossGroup = GlobleSystemLogic.getInstence().getCrossGroup();
|
// return;
|
||||||
if (crossGroup == -1) {
|
// }
|
||||||
return;
|
// Set<Integer> robotIds = new HashSet<>(5);
|
||||||
}
|
// ArenaManager arenaManager = user.getArenaManager();
|
||||||
Set<Integer> robotIds = new HashSet<>(5);
|
// int curLevel = arenaManager.getCrossYuxulundaoNewLevelId();//当前段位
|
||||||
ArenaManager arenaManager = user.getArenaManager();
|
// List<ArenaEnemy> arenaEnemies = new ArrayList<>(); //得存储
|
||||||
int curLevel = arenaManager.getCrossYuxulundaoNewLevelId();//当前段位
|
//
|
||||||
List<ArenaEnemy> arenaEnemies = new ArrayList<>(); //得存储
|
//
|
||||||
|
// Map<Integer, SMServerRankConfig> robotConfigMap = STableManager.getConfig(SMServerRankConfig.class);
|
||||||
|
// if (!robotConfigMap.containsKey(curLevel)) {
|
||||||
Map<Integer, SMServerRankConfig> robotConfigMap = STableManager.getConfig(SMServerRankConfig.class);
|
// return;
|
||||||
if (!robotConfigMap.containsKey(curLevel)) {
|
// }
|
||||||
return;
|
// int[] timePool = robotConfigMap.get(curLevel).getFitRobotPool();
|
||||||
}
|
// if (arenaManager.getCrossMatchTimes() < timePool[0]) {
|
||||||
int[] timePool = robotConfigMap.get(curLevel).getFitRobotPool();
|
// //匹配机器人
|
||||||
if (arenaManager.getCrossMatchTimes() < timePool[0]) {
|
// List<SArenaRobotConfig> robotConfig = STableManager.getConfig(SArenaRobotConfig.class).values().stream().filter(n -> n.getPoolId() == timePool[1]).collect(Collectors.toList());
|
||||||
//匹配机器人
|
// Collections.shuffle(robotConfig);
|
||||||
List<SArenaRobotConfig> robotConfig = STableManager.getConfig(SArenaRobotConfig.class).values().stream().filter(n -> n.getPoolId() == timePool[1]).collect(Collectors.toList());
|
// robotConfig.subList(0, 0).forEach(n -> robotIds.add(n.getId()));
|
||||||
Collections.shuffle(robotConfig);
|
// for (int robot : robotIds) {
|
||||||
robotConfig.subList(0, 0).forEach(n -> robotIds.add(n.getId()));
|
// arenaEnemies.add(new ArenaEnemy(robot, 1, 0));
|
||||||
for (int robot : robotIds) {
|
// }
|
||||||
arenaEnemies.add(new ArenaEnemy(robot, 1, 0));
|
// arenaManager.setCrossMatchTimes(arenaManager.getCrossMatchTimes() + 1);
|
||||||
}
|
// arenaManager.setArenaEnemies(arenaEnemies);
|
||||||
arenaManager.setCrossMatchTimes(arenaManager.getCrossMatchTimes() + 1);
|
// } else {
|
||||||
arenaManager.setArenaEnemies(arenaEnemies);
|
// //TODO 次数超过后怎么匹配真人 真人不足怎么办 匹配真人的规则
|
||||||
} else {
|
// }
|
||||||
//TODO 次数超过后怎么匹配真人 真人不足怎么办 匹配真人的规则
|
//
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 匹配实力相近队手
|
* 匹配实力相近队手
|
||||||
|
|
Loading…
Reference in New Issue