buff类型回滚
parent
cfd88aa051
commit
aa9fee7c60
|
@ -2894,11 +2894,11 @@ public class MapLogic {
|
|||
trialInfo.setQuitMapId(0);
|
||||
trialInfo.setEnergy(0);
|
||||
trialInfo.setTimes(openTimeOfFuntionCacheByType.getTimes());
|
||||
List<Long> initBuff = new ArrayList<>();
|
||||
List<Integer> initBuff = new ArrayList<>();
|
||||
//先出奖励层
|
||||
trialInfo.setFloor(trialInfo.getFloor()%10000);
|
||||
if(trialInfo.getHighestTower()!=0&&trialInfo.getFloor()<=trialInfo.getHighestTower()){
|
||||
initBuff.add((long) STrialSetting.sTrialSetting.getBaseBuff());
|
||||
initBuff.add(STrialSetting.sTrialSetting.getBaseBuff());
|
||||
}
|
||||
trialInfo.setBuffIds(initBuff);
|
||||
trialInfo.setFloor(trialInfo.getHighestTower()-7>1?trialInfo.getHighestTower()-7:1);
|
||||
|
@ -3284,9 +3284,9 @@ public class MapLogic {
|
|||
}
|
||||
int optionId = STableManager.getConfig(SEventPointConfig.class).get(cell.getEventId()).getOption()[0];
|
||||
SOptionConfig sOptionConfig = SOptionConfig.sOptionConfigMap.get(optionId);
|
||||
List<Long> buffIds = mapManager.getTrialInfo().getBuffIds();
|
||||
List<Integer> buffIds = mapManager.getTrialInfo().getBuffIds();
|
||||
for(int[] values:sOptionConfig.getBehaviorTypeValues()){
|
||||
for(long value:values){
|
||||
for(int value:values){
|
||||
buffIds.add(value);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -813,7 +813,7 @@ public class MapManager extends MongoBase {
|
|||
updateString("trialInfo.killCount",count);
|
||||
}
|
||||
|
||||
public void updateTrialBuffIds(List<Long> ids){
|
||||
public void updateTrialBuffIds(List<Integer> ids){
|
||||
trialInfo.setBuffIds(ids);
|
||||
updateString("trialInfo.buffIds",ids);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ public class TrialInfo extends MongoBase {
|
|||
|
||||
private Set<Integer> towerReceivedReward = new HashSet<>();
|
||||
|
||||
private List<Long> buffIds = new ArrayList<>();
|
||||
private List<Integer> buffIds = new ArrayList<>();
|
||||
|
||||
private MapGameInfo mapGameInfo = new MapGameInfo();
|
||||
|
||||
|
@ -131,11 +131,11 @@ public class TrialInfo extends MongoBase {
|
|||
this.killCount = killCount;
|
||||
}
|
||||
|
||||
public List<Long> getBuffIds() {
|
||||
public List<Integer> getBuffIds() {
|
||||
return buffIds;
|
||||
}
|
||||
|
||||
public void setBuffIds(List<Long> buffIds) {
|
||||
public void setBuffIds(List<Integer> buffIds) {
|
||||
this.buffIds = buffIds;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@ public class FiftyOneBehavior extends BaseBehavior {
|
|||
@Override
|
||||
public boolean process(int optionId, User user, int[][] behaviorTypeValues, MapInfoProto.EventUpdateResponse.Builder eventUpdateResponse) throws Exception {
|
||||
MapManager mapManager = user.getMapManager();
|
||||
List<Long> buffIds = mapManager.getTrialInfo().getBuffIds();
|
||||
List<Integer> buffIds = mapManager.getTrialInfo().getBuffIds();
|
||||
for(int[] values:behaviorTypeValues){
|
||||
for(long value:values){
|
||||
for(int value:values){
|
||||
buffIds.add(value);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -240,9 +240,9 @@ public class SituationLogic {
|
|||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
}
|
||||
Map<Integer,List<Long>> buffMap = new HashMap<>();
|
||||
Map<Integer,List<Integer>> buffMap = new HashMap<>();
|
||||
for(int[] buffid:sRaceTowerConfig.getAttribute()){
|
||||
buffMap.computeIfAbsent(buffid[0],n->new ArrayList<>()).add((long) buffid[1]);
|
||||
buffMap.computeIfAbsent(buffid[0],n->new ArrayList<>()).add(buffid[1]);
|
||||
}
|
||||
//组装战斗数据
|
||||
PVEFightEvent pveFightEvent = new PVEFightEvent(user.getId(), formation, 20, "", GameFightType.DailyChallenge, sRaceTowerConfig.getMonsterId(), 3);
|
||||
|
@ -294,7 +294,7 @@ public class SituationLogic {
|
|||
// user.getUserMissionManager().onGameEvent(user, GameEvent.DAILY_CHALLENGE,sDailyChallengeConfig.getType());
|
||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),builder.build());
|
||||
}
|
||||
public static FightResult getFightForSituation(FightEvent fightEvent,Map<Integer,List<Long>> buffInfo){
|
||||
public static FightResult getFightForSituation(FightEvent fightEvent,Map<Integer,List<Integer>> buffInfo){
|
||||
PVEFightEvent pveFightEvent = (PVEFightEvent)fightEvent;
|
||||
User userInMem = UserManager.getUserInMem(pveFightEvent.getAttackUid());
|
||||
CommonProto.FightTeamInfo fightTeamInfo = FightUtil.getFightTeamInfoWithSomeBuff(userInMem, pveFightEvent.getTeamId(),pveFightEvent.getAttackBloodMap(),buffInfo);
|
||||
|
|
|
@ -179,8 +179,8 @@ public class GuildChallengeLogic {
|
|||
int buffIndex = guildInfo.getBuffIndex();
|
||||
int buffOverTime = guildInfo.getBuffOverTime();
|
||||
if(buffOverTime>TimeUtils.nowInt()&&buffIndex!=0){
|
||||
List<Long> buffList = new ArrayList<>();
|
||||
buffList.add((long) config.getAttributePromote()[buffIndex-1]);
|
||||
List<Integer> buffList = new ArrayList<>();
|
||||
buffList.add(config.getAttributePromote()[buffIndex-1]);
|
||||
pveFightEvent.setBuffIds(buffList);
|
||||
}
|
||||
if(guildInfo.getBossHpRemain()!=0&&guildInfo.getBossHpRemain()!=-1){
|
||||
|
|
|
@ -67,11 +67,11 @@ public class CombatLogic {
|
|||
|
||||
|
||||
public Map<Integer,Long> bufferOneHeroAttrAfterEat(Map<Integer,Long> value,int foodId) {
|
||||
List<Long> foodIds = new ArrayList<>();
|
||||
foodIds.add((long) foodId);
|
||||
List<Integer> foodIds = new ArrayList<>();
|
||||
foodIds.add(foodId);
|
||||
return bufferOneHeroAttrAfterEat(value,foodIds);
|
||||
}
|
||||
public Map<Integer,Long> bufferOneHeroAttrAfterEat(Map<Integer,Long> value,List<Long> foodIds){
|
||||
public Map<Integer,Long> bufferOneHeroAttrAfterEat(Map<Integer,Long> value,List<Integer> foodIds){
|
||||
Map<Integer,Integer> effectValueMap = new HashMap<>();
|
||||
for(long foodId:foodIds){
|
||||
SFoodsConfig sFoodsConfig = STableManager.getConfig(SFoodsConfig.class).get(foodId);
|
||||
|
@ -253,6 +253,7 @@ public class CombatLogic {
|
|||
int adventureRefresh = gameSetting.getAdventureRefresh();
|
||||
int times = timeDuration / adventureRefresh;
|
||||
ItemMap itemObj = new ItemMap();
|
||||
ItemMap itemRandomObj = new ItemMap();
|
||||
CommonProto.Drop.Builder baseBuilder = CommonProto.Drop.newBuilder();
|
||||
CommonProto.Drop.Builder randomBuilder = CommonProto.Drop.newBuilder();
|
||||
int fightId = mainLevelManager.getFightId();
|
||||
|
@ -267,12 +268,12 @@ public class CombatLogic {
|
|||
}
|
||||
int[] randomRewardMin = targetMainLevelConfig.getRandomRewardMin();
|
||||
ItemUtil.combineRewardByMainLine(user,false, true, randomRewardMin, times,itemObj,BIReason.ADVENTURE_BASE_REWARD);
|
||||
ItemUtil.combineRewardByMainLine(user,true, false,targetMainLevelConfig.getRandomReward(), times,itemObj,BIReason.ADVENTURE_RANDOM_REWARDD);
|
||||
itemObj.setEquipMap(equipAutoCombine(itemObj.getEquipMap()));
|
||||
ItemUtil.combineRewardByMainLine(user,true, false,targetMainLevelConfig.getRandomReward(), times,itemRandomObj,BIReason.ADVENTURE_RANDOM_REWARDD);
|
||||
itemRandomObj.setEquipMap(equipAutoCombine(itemRandomObj.getEquipMap()));
|
||||
//清除无用活动道具
|
||||
removeNoUseItem(user,itemObj.getItemMap());
|
||||
removeNoUseItem(user,itemRandomObj.getItemMap());
|
||||
ItemUtil.drop(user,baseBuilder,itemObj,BIReason.ADVENTURE_BASE_REWARD);
|
||||
ItemUtil.drop(user,randomBuilder,itemObj,BIReason.ADVENTURE_RANDOM_REWARDD);
|
||||
ItemUtil.drop(user,randomBuilder,itemRandomObj,BIReason.ADVENTURE_RANDOM_REWARDD);
|
||||
Map<Integer, CommonProto.Drop> result = new HashMap<>(2);
|
||||
result.put(1,baseBuilder.build());
|
||||
result.put(2,randomBuilder.build());
|
||||
|
|
|
@ -11,7 +11,7 @@ public class FightEvent {
|
|||
private GameFightType fightType;
|
||||
private Map<String, Integer> attackBloodMap;
|
||||
private List<Long> monsterRemainHp;
|
||||
private List<Long> buffIds;
|
||||
private List<Integer> buffIds;
|
||||
|
||||
public FightEvent(int attackUid, int teamId,int mostTime,String frams, GameFightType fightType) {
|
||||
this.attackUid = attackUid;
|
||||
|
@ -57,11 +57,11 @@ public class FightEvent {
|
|||
this.monsterRemainHp = monsterRemainHp;
|
||||
}
|
||||
|
||||
public List<Long> getBuffIds() {
|
||||
public List<Integer> getBuffIds() {
|
||||
return buffIds;
|
||||
}
|
||||
|
||||
public void setBuffIds(List<Long> buffIds) {
|
||||
public void setBuffIds(List<Integer> buffIds) {
|
||||
this.buffIds = buffIds;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,9 +39,9 @@ import java.util.Map;
|
|||
|
||||
public class FightUtil {
|
||||
|
||||
public static CommonProto.FightTeamInfo makePersonFightData(User player,int teamId,Map<String, Integer> attackBloodMap,List<Long> buffIds){
|
||||
public static CommonProto.FightTeamInfo makePersonFightData(User player,int teamId,Map<String, Integer> attackBloodMap,List<Integer> buffIds){
|
||||
if(buffIds!=null){
|
||||
Map<Integer,List<Long>> map = new HashMap<>();
|
||||
Map<Integer,List<Integer>> map = new HashMap<>();
|
||||
for(int i = 1;i <=4;i++){
|
||||
map.put(i,buffIds);
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ public class FightUtil {
|
|||
List<CommonProto.FightUnitInfo> heroFightInfos = new ArrayList<>();
|
||||
List<TeamPosHeroInfo> teamPosHeroInfos = user.getTeamPosManager().getTeamPosForHero().get(teamId);
|
||||
Map<String, TrailHero> heroInfo = user.getMapManager().getTrialInfo().getHeroInfo();
|
||||
List<Long> buffIds = user.getMapManager().getTrialInfo().getBuffIds();
|
||||
List<Integer> buffIds = user.getMapManager().getTrialInfo().getBuffIds();
|
||||
for (TeamPosHeroInfo teamPosHeroInfo : teamPosHeroInfos) {
|
||||
if (heroInfo.isEmpty()||!heroInfo.containsKey(teamPosHeroInfo.getHeroId())) {
|
||||
continue;
|
||||
|
@ -336,7 +336,7 @@ public class FightUtil {
|
|||
.build();
|
||||
}
|
||||
//
|
||||
public static CommonProto.FightTeamInfo getFightTeamInfoWithSomeBuff(User user, int teamId, Map<String, Integer> attackBloodMap,Map<Integer,List<Long>> buffInfo) {
|
||||
public static CommonProto.FightTeamInfo getFightTeamInfoWithSomeBuff(User user, int teamId, Map<String, Integer> attackBloodMap,Map<Integer,List<Integer>> buffInfo) {
|
||||
user.getTeamPosManager().setCurTeamPosId(teamId);
|
||||
List<CommonProto.FightUnitInfo> heroFightInfos = new ArrayList<>();
|
||||
List<TeamPosHeroInfo> teamPosHeroInfos = user.getTeamPosManager().getTeamPosForHero().get(teamId);
|
||||
|
|
|
@ -640,8 +640,8 @@ public class ItemUtil {
|
|||
sendToFront.add(CBean2Proto.getItem(item,-1));
|
||||
if(sItem.getItemType()==GlobalItemType.EQUIP){
|
||||
if(reason!=BIReason.EQUIP_UNLOAD_REWARD&&reason!=BIReason.DECOMPOS_HERO_REWARD&&reason!=BIReason.UPHERO_DECOMPOS_HERO_REWARD){
|
||||
user.getUserMissionManager().onGameEvent(user,GameEvent.GET_EQUIP,sItem.getId(),itemNum);
|
||||
ReportUtil.onReportEvent(user,ReportEventEnum.GET_EQUIP.getType(),sItem.getId(),itemNum,reason);
|
||||
user.getUserMissionManager().onGameEvent(user,GameEvent.GET_EQUIP,sItem.getId(),(int)itemNum);
|
||||
ReportUtil.onReportEvent(user,ReportEventEnum.GET_EQUIP.getType(),sItem.getId(),(int)itemNum,reason);
|
||||
}
|
||||
} else if (sItem.getItemType() == GlobalItemType.SOUL_MARK) {
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.GOT_SOUL_MARK, sItem.getId(), itemNum);
|
||||
|
|
Loading…
Reference in New Issue