Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
71f01bc239
|
|
@ -1509,7 +1509,7 @@ public class MapLogic {
|
||||||
CommonProto.Drop.Builder dropBuilder = ItemUtil.drop(user, sChallengeMapConfig.getSweepingAward(), 1, 0, BIReason.MAP_SWEEP_REWARD);
|
CommonProto.Drop.Builder dropBuilder = ItemUtil.drop(user, sChallengeMapConfig.getSweepingAward(), 1, 0, BIReason.MAP_SWEEP_REWARD);
|
||||||
mapSweepResponse.addDrop(dropBuilder);
|
mapSweepResponse.addDrop(dropBuilder);
|
||||||
}
|
}
|
||||||
user.getUserMissionManager().onGameEvent(user, GameEvent.STORY_FIGHT, mapManager.getCurMapId(),1,count);
|
user.getUserMissionManager().onGameEvent(user, GameEvent.STORY_FIGHT, mapId,1,count);
|
||||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), mapSweepResponse.build(), true);
|
MessageUtil.sendMessage(session, 1, messageType.getNumber(), mapSweepResponse.build(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2039,7 +2039,7 @@ public class MapLogic {
|
||||||
int x = scMap1.getGroups()[randomIndex][0];
|
int x = scMap1.getGroups()[randomIndex][0];
|
||||||
int y = scMap1.getGroups()[randomIndex][1];
|
int y = scMap1.getGroups()[randomIndex][1];
|
||||||
int xy = CellUtil.xy2Pos(x, y);
|
int xy = CellUtil.xy2Pos(x, y);
|
||||||
MapPointConfig mapPointConfig = MapPointConfig.scMapEventMap.get(sTrialConfig.getRandomMonsterType()[0][1]);
|
MapPointConfig mapPointConfig = MapPointConfig.scMapEventMap.get(sTrialConfig.getRandomMonsterType()[1][1]);
|
||||||
if (mapPointConfig == null) {
|
if (mapPointConfig == null) {
|
||||||
LOGGER.info("====initTrialMap()====mapPointConfig == null======>{}", scMap1.getEvent());
|
LOGGER.info("====initTrialMap()====mapPointConfig == null======>{}", scMap1.getEvent());
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -84,14 +84,16 @@ public class SweepLogic {
|
||||||
boolean change = false;
|
boolean change = false;
|
||||||
List<CommonProto.Drop> dropList = new CopyOnWriteArrayList<>();
|
List<CommonProto.Drop> dropList = new CopyOnWriteArrayList<>();
|
||||||
for (int i = 0 ; i < sweepTimes ;i++){
|
for (int i = 0 ; i < sweepTimes ;i++){
|
||||||
|
if (targetItem!= 0){
|
||||||
|
Item item = user.getItemManager().getItem(targetItem);
|
||||||
|
if(item!=null && item.getItemNum()>=targetNum){
|
||||||
|
sweepTimes=i;
|
||||||
|
change = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, sLevelDifficultyConfig.getRandomReward(), 1, 0, BIReason.LEVELDIFFICULTY_SWEEP_REWARD);
|
CommonProto.Drop.Builder drop = ItemUtil.drop(user, sLevelDifficultyConfig.getRandomReward(), 1, 0, BIReason.LEVELDIFFICULTY_SWEEP_REWARD);
|
||||||
dropList.add(drop.build());
|
dropList.add(drop.build());
|
||||||
Item item = user.getItemManager().getItem(targetItem);
|
|
||||||
if(item!=null && item.getItemNum()>=targetNum){
|
|
||||||
sweepTimes=i;
|
|
||||||
change = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if(change){
|
if(change){
|
||||||
cost = MapLogic.getInstance().getCost(sLevelDifficultyConfig, sweepTimes);
|
cost = MapLogic.getInstance().getCost(sLevelDifficultyConfig, sweepTimes);
|
||||||
|
|
@ -99,6 +101,7 @@ public class SweepLogic {
|
||||||
//扣除道具
|
//扣除道具
|
||||||
ItemUtil.itemCost(user, cost,BIReason.SWEEP_FIGHT_CONSUME,fightId);
|
ItemUtil.itemCost(user, cost,BIReason.SWEEP_FIGHT_CONSUME,fightId);
|
||||||
MapLogic.getInstance().userLevelUp(user,sLevelDifficultyConfig.getExp() * sweepTimes);
|
MapLogic.getInstance().userLevelUp(user,sLevelDifficultyConfig.getExp() * sweepTimes);
|
||||||
|
LOGGER.info("sweepFight=>uid={},sweepTimes={},exp={}",uid,sweepTimes,sLevelDifficultyConfig.getExp());
|
||||||
FightInfoProto.SweepRightResponse.Builder builder = FightInfoProto.SweepRightResponse.newBuilder();
|
FightInfoProto.SweepRightResponse.Builder builder = FightInfoProto.SweepRightResponse.newBuilder();
|
||||||
builder.addAllDrop(dropList);
|
builder.addAllDrop(dropList);
|
||||||
levelDifficulty.setChallengeTimes(levelDifficulty.getChallengeTimes() +sweepTimes);
|
levelDifficulty.setChallengeTimes(levelDifficulty.getChallengeTimes() +sweepTimes);
|
||||||
|
|
|
||||||
|
|
@ -82,13 +82,16 @@ public class UserMissionManager extends MongoBase {
|
||||||
|
|
||||||
|
|
||||||
public void calCumulationDataResult(User user, MissionType missionType, Map<GameMisionType, List<MissionStateChangeInfo>> missionTypeEnumListMap , Object...parm) throws Exception {
|
public void calCumulationDataResult(User user, MissionType missionType, Map<GameMisionType, List<MissionStateChangeInfo>> missionTypeEnumListMap , Object...parm) throws Exception {
|
||||||
CumulationData.Result result = dailyCumulationData.updateData(missionType, parm);
|
if(!dailyMissionIdsType.getDoingMissionIds().isEmpty()){
|
||||||
if(result!=null){
|
CumulationData.Result result = dailyCumulationData.updateData(missionType, parm);
|
||||||
dailyMissionIdsType.calCumulationDataResult(user,result,missionTypeEnumListMap.get(GameMisionType.DAILYMISSION),dailyCumulationData);
|
if(result!=null){
|
||||||
updateString("dailyCumulationData",dailyCumulationData);
|
dailyMissionIdsType.calCumulationDataResult(user,result,missionTypeEnumListMap.get(GameMisionType.DAILYMISSION),dailyCumulationData);
|
||||||
updateString("dailyMissionIdsType",dailyMissionIdsType);
|
updateString("dailyCumulationData",dailyCumulationData);
|
||||||
|
updateString("dailyMissionIdsType",dailyMissionIdsType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
result = cumulationData.updateData(missionType, parm);
|
|
||||||
|
CumulationData.Result result = cumulationData.updateData(missionType, parm);
|
||||||
if(result!=null){
|
if(result!=null){
|
||||||
vipMissionIdsType.calCumulationDataResult(user,result,missionTypeEnumListMap.get(GameMisionType.VIPMISSION),cumulationData);
|
vipMissionIdsType.calCumulationDataResult(user,result,missionTypeEnumListMap.get(GameMisionType.VIPMISSION),cumulationData);
|
||||||
updateString("cumulationData",cumulationData);
|
updateString("cumulationData",cumulationData);
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,17 @@ public class CombatLogic {
|
||||||
for(int[] effectPara : effectParas){
|
for(int[] effectPara : effectParas){
|
||||||
int effectId = effectPara[0];
|
int effectId = effectPara[0];
|
||||||
int effectValue = effectPara[1];
|
int effectValue = effectPara[1];
|
||||||
|
SPropertyConfig sPropertyConfig = SPropertyConfig.getsPropertyConfigByPID(effectId);
|
||||||
|
if( sPropertyConfig.getStyle() == GlobalsDef.PERCENT_TYPE){
|
||||||
|
if(effectId == HeroAttributeEnum.CurHpExtra.getPropertyId()){
|
||||||
|
effectId = HeroAttributeEnum.CurHP.getPropertyId();
|
||||||
|
effectValue = value.get(HeroAttributeEnum.Hp.getPropertyId()) * effectValue/10000;
|
||||||
|
}else{
|
||||||
|
effectId = sPropertyConfig.getTargetPropertyId();
|
||||||
|
effectValue = value.get(effectId) * effectValue/10000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(!value.containsKey(effectId)){
|
if(!value.containsKey(effectId)){
|
||||||
value.put(effectId,effectValue);
|
value.put(effectId,effectValue);
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -83,8 +94,6 @@ public class CombatLogic {
|
||||||
finalValue =1;
|
finalValue =1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
value.put( effectId,finalValue );
|
value.put( effectId,finalValue );
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ public enum HeroAttributeEnum {
|
||||||
DifferDemonsReduceFactor(59),
|
DifferDemonsReduceFactor(59),
|
||||||
AntiCritDamageFactor(60),
|
AntiCritDamageFactor(60),
|
||||||
DifferDemonsBocusFactor(66),
|
DifferDemonsBocusFactor(66),
|
||||||
|
CurHpExtra(67),
|
||||||
FireDamageBonusFactor(101),
|
FireDamageBonusFactor(101),
|
||||||
WindDamageBonusFactor(102),
|
WindDamageBonusFactor(102),
|
||||||
WaterDamageBonusFactor(103),
|
WaterDamageBonusFactor(103),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue