TASK【ID1006427】【ID1006428】【大闹天宫优化】 BUG【ID1008042】【大闹天宫】招募的四星卡,初始是五星,没技能
parent
9532f3e6a8
commit
eba32c1b52
|
@ -149,8 +149,8 @@ public enum ErrorCode implements IErrorCode {
|
||||||
NO_FRIEND_APPLY(115,"暂无可添加好友"),
|
NO_FRIEND_APPLY(115,"暂无可添加好友"),
|
||||||
NO_USE_SAME_HERO(116,"不可上阵重复英雄"),
|
NO_USE_SAME_HERO(116,"不可上阵重复英雄"),
|
||||||
DAILY_ALREADY_PASS(117,"已通关,不可重复挑战"),
|
DAILY_ALREADY_PASS(117,"已通关,不可重复挑战"),
|
||||||
DAILY_NO_OPEN(118,"进入副本条件不足")
|
DAILY_NO_OPEN(118,"进入副本条件不足"),
|
||||||
|
HAD_TAKE_REWARD(124,"奖励已领取")
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
|
@ -116,6 +116,7 @@ public interface BIReason {
|
||||||
|
|
||||||
|
|
||||||
int UNLOAD_SOUL_REWARD = 67;//脱下魂印
|
int UNLOAD_SOUL_REWARD = 67;//脱下魂印
|
||||||
|
int ARENA_BOX_REWARD = 68;//竞技场宝箱奖励
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.ljsd.jieling.handler.Expedition;
|
package com.ljsd.jieling.handler.Expedition;
|
||||||
|
|
||||||
import com.ljsd.fight.CheckFight;
|
import com.ljsd.fight.CheckFight;
|
||||||
|
import com.ljsd.jieling.config.clazzStaticCfg.CommonStaticConfig;
|
||||||
import com.ljsd.jieling.db.redis.RedisKey;
|
import com.ljsd.jieling.db.redis.RedisKey;
|
||||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||||
import com.ljsd.jieling.exception.ErrorCode;
|
import com.ljsd.jieling.exception.ErrorCode;
|
||||||
|
@ -234,19 +235,22 @@ public class EndExpeditionBattleRequest extends BaseHandler<Expedition.EndExpedi
|
||||||
Expedition.ExpeditionNodeInfoIndication.Builder builder = Expedition.ExpeditionNodeInfoIndication.newBuilder();
|
Expedition.ExpeditionNodeInfoIndication.Builder builder = Expedition.ExpeditionNodeInfoIndication.newBuilder();
|
||||||
|
|
||||||
|
|
||||||
|
int orDefault = STableManager.getFigureConfig(CommonStaticConfig.class).leve2num.getOrDefault(expeditionManager.getExpeditionLeve()-1, 0)-1;
|
||||||
|
SExpeditionFloorConfig sExpeditionFloorConfig = STableManager.getConfig(SExpeditionFloorConfig.class).get(orDefault + oldlay);
|
||||||
|
|
||||||
SExpeditionNodeConfig sExpeditionNodeConfig = STableManager.getConfig(SExpeditionNodeConfig.class).get(nodeInfo.getType());
|
SExpeditionNodeConfig sExpeditionNodeConfig = STableManager.getConfig(SExpeditionNodeConfig.class).get(nodeInfo.getType());
|
||||||
if (sExpeditionNodeConfig == null) {
|
if (sExpeditionNodeConfig == null) {
|
||||||
throw new ErrorCodeException(ErrorCode.CFG_NULL);
|
throw new ErrorCodeException(ErrorCode.CFG_NULL);
|
||||||
}
|
}
|
||||||
CommonProto.Drop.Builder drop;
|
CommonProto.Drop.Builder drop;
|
||||||
if(sExpeditionNodeConfig.getreward()!=null){
|
if(sExpeditionFloorConfig.getReward()!=null&&sExpeditionNodeConfig.getReward()!=0){
|
||||||
drop = ItemUtil.drop(user, sExpeditionNodeConfig.getreward(),1,0,BIReason.EXPEDITION_DROP_REWARD);
|
drop = ItemUtil.drop(user, sExpeditionFloorConfig.getReward(),sExpeditionNodeConfig.getReward(),0,BIReason.EXPEDITION_DROP_REWARD);
|
||||||
}else {
|
}else {
|
||||||
drop = CommonProto.Drop.newBuilder();
|
drop = CommonProto.Drop.newBuilder();
|
||||||
}
|
}
|
||||||
|
|
||||||
//试炼和贪婪节点胜利直接通过
|
//试炼和贪婪节点胜利直接通过
|
||||||
if (ExpeditionLogic.isHardNode(nodeInfo.getType())) {
|
if (ExpeditionLogic.isHardNode(nodeInfo.getType())||(ExpeditionLogic.isBattleNode(nodeInfo.getType())&&(null==nodeInfo.getHolyEquipId()||nodeInfo.getHolyEquipId().size()==0))) {
|
||||||
//updata node
|
//updata node
|
||||||
Set<CommonProto.ExpeditionNodeInfo> nodeInfos = ExpeditionLogic.openLay(user,nodeInfo.getLay(),nodeId);
|
Set<CommonProto.ExpeditionNodeInfo> nodeInfos = ExpeditionLogic.openLay(user,nodeInfo.getLay(),nodeId);
|
||||||
//更新节点
|
//更新节点
|
||||||
|
|
|
@ -9,6 +9,7 @@ import com.ljsd.jieling.util.KeyGenUtils;
|
||||||
import com.ljsd.jieling.util.UUIDEnum;
|
import com.ljsd.jieling.util.UUIDEnum;
|
||||||
import config.SCHero;
|
import config.SCHero;
|
||||||
import config.SCHeroRankUpConfig;
|
import config.SCHeroRankUpConfig;
|
||||||
|
import config.SItem;
|
||||||
import manager.STableManager;
|
import manager.STableManager;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -59,7 +60,8 @@ public class Hero extends MongoBase {
|
||||||
this.id = KeyGenUtils.produceIdByModule(UUIDEnum.HERO, uid);
|
this.id = KeyGenUtils.produceIdByModule(UUIDEnum.HERO, uid);
|
||||||
this.templateId = heroTid;
|
this.templateId = heroTid;
|
||||||
this.level = initStar;
|
this.level = initStar;
|
||||||
this.star =hero.getStar() ;
|
int[] heroStar = SItem.getsItemMap().get(heroTid).getHeroStar();
|
||||||
|
this.star =heroStar[1] ;
|
||||||
this.equipByPositionMap = new HashMap<>();
|
this.equipByPositionMap = new HashMap<>();
|
||||||
this.soulEquipByPositionMap = hero.soulEquipByPositionMap;
|
this.soulEquipByPositionMap = hero.soulEquipByPositionMap;
|
||||||
this.breakId = hero.breakId;
|
this.breakId = hero.breakId;
|
||||||
|
|
|
@ -220,10 +220,16 @@ public class ExpeditionLogic {
|
||||||
//生成新英雄的血量信息
|
//生成新英雄的血量信息
|
||||||
Map<String, Double> heroHP = user.getExpeditionManager().getHeroHPWithChange();
|
Map<String, Double> heroHP = user.getExpeditionManager().getHeroHPWithChange();
|
||||||
for (Map.Entry<String, Hero> entry : heroMap.entrySet()) {
|
for (Map.Entry<String, Hero> entry : heroMap.entrySet()) {
|
||||||
if (!heroHP.keySet().contains(entry.getKey())&&!heroMapTemp.keySet().contains(entry.getKey())) {
|
if (!heroHP.keySet().contains(entry.getKey())) {
|
||||||
heroHP.put(entry.getKey(), 1d);
|
heroHP.put(entry.getKey(), 1d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (Map.Entry<String, Hero> entry : heroMapTemp.entrySet()) {
|
||||||
|
if (!heroHP.keySet().contains(entry.getKey())) {
|
||||||
|
heroHP.put(entry.getKey(), 1d);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//移除已经删除的hero
|
//移除已经删除的hero
|
||||||
Set<String> removeId = heroHP.keySet().stream().filter(k -> {
|
Set<String> removeId = heroHP.keySet().stream().filter(k -> {
|
||||||
if(heroMap.keySet().contains(k))
|
if(heroMap.keySet().contains(k))
|
||||||
|
@ -476,6 +482,7 @@ public class ExpeditionLogic {
|
||||||
try {
|
try {
|
||||||
ints = MathUtils.randomFromWeight(cfg.getHolyProbability());
|
ints = MathUtils.randomFromWeight(cfg.getHolyProbability());
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
break;
|
||||||
// e.printStackTrace();
|
// e.printStackTrace();
|
||||||
}
|
}
|
||||||
Map<Integer, Integer> type2holy2weight = STableManager.getFigureConfig(CommonStaticConfig.class).getType2holy2weight(ints);
|
Map<Integer, Integer> type2holy2weight = STableManager.getFigureConfig(CommonStaticConfig.class).getType2holy2weight(ints);
|
||||||
|
|
|
@ -40,6 +40,8 @@ public class SChampionshipSetting implements BaseConfig {
|
||||||
|
|
||||||
private int knockoutGroup;
|
private int knockoutGroup;
|
||||||
|
|
||||||
|
private int guessRatio;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init() throws Exception {
|
public void init() throws Exception {
|
||||||
|
@ -110,4 +112,8 @@ public class SChampionshipSetting implements BaseConfig {
|
||||||
public int getSettleTime() {
|
public int getSettleTime() {
|
||||||
return settleTime;
|
return settleTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getGuessRatio() {
|
||||||
|
return guessRatio;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -3,6 +3,7 @@ package config;
|
||||||
import manager.STableManager;
|
import manager.STableManager;
|
||||||
import manager.Table;
|
import manager.Table;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Table(name ="ExpeditionNodeConfig")
|
@Table(name ="ExpeditionNodeConfig")
|
||||||
public class SExpeditionNodeConfig implements BaseConfig {
|
public class SExpeditionNodeConfig implements BaseConfig {
|
||||||
|
@ -11,7 +12,7 @@ public class SExpeditionNodeConfig implements BaseConfig {
|
||||||
|
|
||||||
private int type;
|
private int type;
|
||||||
|
|
||||||
private int[] reward;
|
private float reward;
|
||||||
|
|
||||||
private int poolId;
|
private int poolId;
|
||||||
|
|
||||||
|
@ -34,7 +35,7 @@ public class SExpeditionNodeConfig implements BaseConfig {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int[] getreward() {
|
public float getReward() {
|
||||||
return reward;
|
return reward;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue