back_recharge
lvxinran 2020-07-05 05:56:07 +08:00
commit 3934507fe8
8 changed files with 31 additions and 9 deletions

View File

@ -149,8 +149,8 @@ public enum ErrorCode implements IErrorCode {
NO_FRIEND_APPLY(115,"暂无可添加好友"),
NO_USE_SAME_HERO(116,"不可上阵重复英雄"),
DAILY_ALREADY_PASS(117,"已通关,不可重复挑战"),
DAILY_NO_OPEN(118,"进入副本条件不足")
DAILY_NO_OPEN(118,"进入副本条件不足"),
HAD_TAKE_REWARD(124,"奖励已领取")
;

View File

@ -116,6 +116,7 @@ public interface BIReason {
int UNLOAD_SOUL_REWARD = 67;//脱下魂印
int ARENA_BOX_REWARD = 68;//竞技场宝箱奖励

View File

@ -1,6 +1,7 @@
package com.ljsd.jieling.handler.Expedition;
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.RedisUtil;
import com.ljsd.jieling.exception.ErrorCode;
@ -234,19 +235,22 @@ public class EndExpeditionBattleRequest extends BaseHandler<Expedition.EndExpedi
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());
if (sExpeditionNodeConfig == null) {
throw new ErrorCodeException(ErrorCode.CFG_NULL);
}
CommonProto.Drop.Builder drop;
if(sExpeditionNodeConfig.getreward()!=null){
drop = ItemUtil.drop(user, sExpeditionNodeConfig.getreward(),1,0,BIReason.EXPEDITION_DROP_REWARD);
if(sExpeditionFloorConfig.getReward()!=null&&sExpeditionNodeConfig.getReward()!=0){
drop = ItemUtil.drop(user, sExpeditionFloorConfig.getReward(),sExpeditionNodeConfig.getReward(),0,BIReason.EXPEDITION_DROP_REWARD);
}else {
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
Set<CommonProto.ExpeditionNodeInfo> nodeInfos = ExpeditionLogic.openLay(user,nodeInfo.getLay(),nodeId);
//更新节点

View File

@ -9,6 +9,7 @@ import com.ljsd.jieling.util.KeyGenUtils;
import com.ljsd.jieling.util.UUIDEnum;
import config.SCHero;
import config.SCHeroRankUpConfig;
import config.SItem;
import manager.STableManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -59,7 +60,8 @@ public class Hero extends MongoBase {
this.id = KeyGenUtils.produceIdByModule(UUIDEnum.HERO, uid);
this.templateId = heroTid;
this.level = initStar;
this.star =hero.getStar() ;
int[] heroStar = SItem.getsItemMap().get(heroTid).getHeroStar();
this.star =heroStar[1] ;
this.equipByPositionMap = new HashMap<>();
this.soulEquipByPositionMap = hero.soulEquipByPositionMap;
this.breakId = hero.breakId;

View File

@ -220,10 +220,16 @@ public class ExpeditionLogic {
//生成新英雄的血量信息
Map<String, Double> heroHP = user.getExpeditionManager().getHeroHPWithChange();
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);
}
}
for (Map.Entry<String, Hero> entry : heroMapTemp.entrySet()) {
if (!heroHP.keySet().contains(entry.getKey())) {
heroHP.put(entry.getKey(), 1d);
}
}
//移除已经删除的hero
Set<String> removeId = heroHP.keySet().stream().filter(k -> {
if(heroMap.keySet().contains(k))
@ -476,6 +482,7 @@ public class ExpeditionLogic {
try {
ints = MathUtils.randomFromWeight(cfg.getHolyProbability());
}catch (Exception e){
break;
// e.printStackTrace();
}
Map<Integer, Integer> type2holy2weight = STableManager.getFigureConfig(CommonStaticConfig.class).getType2holy2weight(ints);

View File

@ -1384,6 +1384,7 @@ public class GuildLogic {
Family.GuildHelpInfoIndication.Builder build = Family.GuildHelpInfoIndication.newBuilder();
for (Map.Entry<Integer, Integer> entry : user.getGuildMyInfo().getGuidHelpInfo().entrySet()) {
//通知前端清除公会成员援助信息
build.setUid(user.getId());
build.addGuildHelpInfo(CommonProto.GuildHelpInfo.newBuilder().setType(entry.getKey()).setNum(-1));
}
GuildLogic.sendIndicationToMember(GuilidManager.guildInfoMap.get(user.getPlayerInfoManager().getGuildId()), MessageTypeProto.MessageType.GuildHelpInfoIndication,build.build());

View File

@ -40,6 +40,8 @@ public class SChampionshipSetting implements BaseConfig {
private int knockoutGroup;
private int guessRatio;
@Override
public void init() throws Exception {
@ -110,4 +112,8 @@ public class SChampionshipSetting implements BaseConfig {
public int getSettleTime() {
return settleTime;
}
public int getGuessRatio() {
return guessRatio;
}
}

View File

@ -3,6 +3,7 @@ package config;
import manager.STableManager;
import manager.Table;
import java.util.Map;
@Table(name ="ExpeditionNodeConfig")
public class SExpeditionNodeConfig implements BaseConfig {
@ -11,7 +12,7 @@ public class SExpeditionNodeConfig implements BaseConfig {
private int type;
private int[] reward;
private float reward;
private int poolId;
@ -34,7 +35,7 @@ public class SExpeditionNodeConfig implements BaseConfig {
return type;
}
public int[] getreward() {
public float getReward() {
return reward;
}