罗浮改版,机器人不再改名

grimm 2024-04-27 16:28:40 +08:00
parent 18ff8bb3ea
commit 654a73fd1a
5 changed files with 13 additions and 14 deletions

View File

@ -13,7 +13,7 @@ import util.MathUtils;
import java.util.*;
public class SArenaRobotStaticConfig extends AbstractClassStaticConfig {
private static TreeMap<Integer, LinkedList<Integer>> force2robotId;
private static TreeMap<Integer, LinkedList<Integer>> force2robotId;
@Override
public void registConfigs(Set<String> registConfigs) {
registConfigs.add(SArenaRobotConfig.class.getAnnotation(Table.class).name());
@ -110,9 +110,9 @@ public class SArenaRobotStaticConfig extends AbstractClassStaticConfig {
}
int[][] returnMaterials = STableManager.getFigureConfig(CommonStaticConfig.class).getGameSetting().getReturnMaterials();
Map<Integer, Map<Integer, SWorkShopTechnology>> sWorkTechMapByTechIdAndLevel = STableManager.getFigureConfig(CommonStaticConfig.class).getsWorkTechMapByTechIdAndLevelTmp();
Map<Integer, Map<Integer, SWorkShopTechnology>> sWorkTechMapByTechIdAndLevel = STableManager.getFigureConfig(CommonStaticConfig.class).getsWorkTechMapByTechIdAndLevelTmp();
for(Map<Integer, SWorkShopTechnology> item : sWorkTechMapByTechIdAndLevel.values()){
for(SWorkShopTechnology sWorkShopTechnology:item.values()){
for(SWorkShopTechnology sWorkShopTechnology : item.values()){
if(sWorkShopTechnology.getWillReturn() == null){
continue;
}
@ -123,12 +123,12 @@ public class SArenaRobotStaticConfig extends AbstractClassStaticConfig {
public static Integer getFloorForce2robotId(int force) {
Map.Entry<Integer,LinkedList<Integer>> entry = force2robotId.ceilingEntry(force);
if(null==entry){
LinkedList<Integer> value = force2robotId.lastEntry().getValue();
int num = MathUtils.randomInt(value.size());
return value.get(num);
LinkedList<Integer> value;
if(null == entry){
value = force2robotId.lastEntry().getValue();
}else {
value = entry.getValue();
}
LinkedList<Integer> value = entry.getValue();
int num = MathUtils.randomInt(value.size());
return value.get(num);
}

View File

@ -175,7 +175,7 @@ public class GetWorldArenaChallengeRequestHandler extends BaseHandler<WorldProto
battleRecord.setBlueEnemy(arenaEnemys);
int[][] reward = new int[1][];
LOGGER.info("罗浮争锋,{}挑战{},结果:{},敌我当前排名:{}-{}",user.getId(),challengeUid,result,myRank,challengeRank);
LOGGER.info("罗浮争锋,{}挑战{},结果:{},敌我当前排名:{}-{}",user.getId(),challengeUid,result,challengeRank,myRank);
//打赢
int newRank;
if (result > 0) {

View File

@ -46,7 +46,6 @@ public class GetPlayerOneTeamInfo extends BaseHandler<PlayerInfoProto.GetPlayerO
throw new ErrorTableException(168);//未找到机器人
}
oneTeamInfo = PlayerLogic.getInstance().getOneTeamInfo(info.getEnemyId(), teamId);
oneTeamInfo.getTeamInfo().toBuilder().setName(info.getRandomName());
}
}
// 真人

View File

@ -18,7 +18,6 @@ import com.ljsd.jieling.logic.dao.cross.CSPlayer;
import com.ljsd.jieling.logic.dao.root.User;
import com.ljsd.jieling.logic.dao.vo.LuofuWorships;
import com.ljsd.jieling.logic.mail.MailLogic;
import com.ljsd.jieling.logic.player.PlayerLogic;
import com.ljsd.jieling.logic.rank.RankContext;
import com.ljsd.jieling.logic.rank.RankEnum;
import com.ljsd.jieling.logic.rank.rankImpl.AbstractRank;
@ -253,10 +252,9 @@ public class LuofuLogic {
int serverIndex = random.nextInt(servers.size());
SArenaRobotConfig config = SArenaRobotConfig.getsArenaRobotConfigById(robotIds.get(robotIndex));
String robotName = PlayerLogic.getInstance().getRandomName2WithOutVerify();
String serverId = servers.get(serverIndex);
int showId = ToolsUtil.getShowId(type, robotIndex);
CrossArenaEnemy crossArenaEnemy = new CrossArenaEnemy(config.getId(),showId,serverId,random.nextBoolean(),robotName,config.getTotalForce(),config.getRobotLevel());
CrossArenaEnemy crossArenaEnemy = new CrossArenaEnemy(config.getId(),showId,serverId,random.nextBoolean(),config.getRobotName(),config.getTotalForce(),config.getRobotLevel());
robotInfo.put(String.valueOf(showId), crossArenaEnemy);
rank.addRank(showId, String.valueOf(type), robotNum - robotIndex);
@ -602,6 +600,9 @@ public class LuofuLogic {
int value = SSpecialConfig.getIntegerValue("ServerArena_Shikong");
int count = 0;
List<TeamPosHeroInfo> heroInfos = teamPosManager.getTeamPosForHero().get(teamId);
if (heroInfos == null || heroInfos.isEmpty()){
return false;
}
for (TeamPosHeroInfo heroInfo : heroInfos) {
Hero hero = heroManager.getHero(heroInfo.getHeroId());
if (hero == null){

View File

@ -3437,7 +3437,6 @@ public class HeroLogic {
attribute.put(id, attribute.getOrDefault(id, 0L) + num);
}
}
LOGGER.info("===助阵属性:{}",attribute);
combinedAttribute(attribute, heroAllAttribute);
return totalAdd;
}