Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
181649ee07
|
@ -54,5 +54,13 @@ netty.writeTimeout=32
|
||||||
netty.allTimeout=35
|
netty.allTimeout=35
|
||||||
|
|
||||||
|
|
||||||
|
#core
|
||||||
|
services.core.ip=60.1.1.153
|
||||||
|
services.core.port=7900
|
||||||
|
services.core.area=1000
|
||||||
|
services.core.id=1
|
||||||
|
services.core.weight=5
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
logging.config = conf/logback-boot.xml
|
logging.config = conf/logback-boot.xml
|
|
@ -140,16 +140,15 @@ public class MapLogic {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int type = sChallengeConfig.getType();
|
int type = sChallengeConfig.getType();
|
||||||
Map<Integer, CrossInfo> crossInfoMap = mapManager.getCrossInfoMap();
|
|
||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
if (crossInfoMap.containsKey(mapId)) {
|
if (mapManager.getPlayGenMaps().contains(mapId)) {
|
||||||
if (crossInfoMap.get(mapId).getStars().contains(STAR_1)) {
|
boolean enough = ItemUtil.itemCost(user, new int[][]{{Global.GENERALSTORY_TICKET, 1}}, BIReason.MAP_ENTER_CONSUME, mapId);
|
||||||
boolean enough = ItemUtil.itemCost(user, new int[][]{{Global.GENERALSTORY_TICKET, 1}}, BIReason.MAP_ENTER_CONSUME, mapId);
|
if (!enough) {
|
||||||
if (!enough) {
|
MessageUtil.sendErrorResponse(iSession, 0, messageType.getNumber(), "no ticket");
|
||||||
MessageUtil.sendErrorResponse(iSession, 0, messageType.getNumber(), "no ticket");
|
return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
mapManager.updatePlayGenMaps(mapId);
|
||||||
}
|
}
|
||||||
}else if(type == 3){
|
}else if(type == 3){
|
||||||
boolean enough = ItemUtil.itemCost(user, new int[][]{{Global.HEROSTORY_TICKET, 1}},BIReason.MAP_ENTER_CONSUME,mapId);
|
boolean enough = ItemUtil.itemCost(user, new int[][]{{Global.HEROSTORY_TICKET, 1}},BIReason.MAP_ENTER_CONSUME,mapId);
|
||||||
|
@ -1491,23 +1490,22 @@ public class MapLogic {
|
||||||
MessageUtil.sendErrorResponse(session, 0, messageType.getNumber(), "");
|
MessageUtil.sendErrorResponse(session, 0, messageType.getNumber(), "");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//todo vip
|
SChallengeConfig sChallengeConfig = SChallengeConfig.sChallengeConfigs.get(mapId);
|
||||||
/* SChallengeSetting sChallengeSetting = SChallengeSetting.challengeSetting;
|
int type = sChallengeConfig.getType();
|
||||||
int dailyLimitPrivilege = sChallengeSetting.getDailyLimitPrivilege();
|
if(type==3 || type==1){
|
||||||
VipPrivilegeType.
|
SChallengeMapConfig sChallengeMapConfig = SChallengeMapConfig.integerSChallengeMapConfigMap.get(mapId);
|
||||||
if (mapManager.getDayFightCount() + count > sChallengeSetting.getLimit() + mapManager.getBuyFightCount()) {
|
MapInfoProto.MapSweepResponse.Builder mapSweepResponse = MapInfoProto.MapSweepResponse.newBuilder();
|
||||||
LOGGER.info("sweep over max count: {}", (mapManager.getDayFightCount() + count));
|
for (int i = 0; i < count; i++) {
|
||||||
MessageUtil.sendErrorResponse(session,0, messageType.getNumber(), "");
|
CommonProto.Drop.Builder dropBuilder = ItemUtil.drop(user, sChallengeMapConfig.getSweepingAward(), 1, 0, BIReason.MAP_SWEEP_REWARD);
|
||||||
return;
|
mapSweepResponse.addDrop(dropBuilder);
|
||||||
}*/
|
}
|
||||||
SChallengeMapConfig sChallengeMapConfig = SChallengeMapConfig.integerSChallengeMapConfigMap.get(mapId);
|
user.getUserMissionManager().onGameEvent(user, GameEvent.STORY_FIGHT, mapId,1,count);
|
||||||
MapInfoProto.MapSweepResponse.Builder mapSweepResponse = MapInfoProto.MapSweepResponse.newBuilder();
|
MessageUtil.sendMessage(session, 1, messageType.getNumber(), mapSweepResponse.build(), true);
|
||||||
for (int i = 0; i < count; i++) {
|
}else{
|
||||||
CommonProto.Drop.Builder dropBuilder = ItemUtil.drop(user, sChallengeMapConfig.getSweepingAward(), 1, 0, BIReason.MAP_SWEEP_REWARD);
|
LOGGER.info("uid={},type={}",uid,type);
|
||||||
mapSweepResponse.addDrop(dropBuilder);
|
MessageUtil.sendErrorResponse(session, 0, messageType.getNumber(), "now sweep");
|
||||||
}
|
}
|
||||||
user.getUserMissionManager().onGameEvent(user, GameEvent.STORY_FIGHT, mapId,1,count);
|
|
||||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), mapSweepResponse.build(), true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1575,6 +1573,7 @@ public class MapLogic {
|
||||||
.setTowerUseTime((int)(mapManager.getCurrTowerTime()/1000))
|
.setTowerUseTime((int)(mapManager.getCurrTowerTime()/1000))
|
||||||
.build();
|
.build();
|
||||||
builder.setTowerCopyInfo(towerCopyInfo);
|
builder.setTowerCopyInfo(towerCopyInfo);
|
||||||
|
builder.addAllPlayedGenMapId(mapManager.getPlayGenMaps());
|
||||||
LOGGER.info("关卡信息{}",towerCopyInfo.toString());
|
LOGGER.info("关卡信息{}",towerCopyInfo.toString());
|
||||||
MessageUtil.sendMessage(iSession, 1, msgId, builder.build(), true);
|
MessageUtil.sendMessage(iSession, 1, msgId, builder.build(), true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,6 +71,10 @@ public class MapManager extends MongoBase {
|
||||||
// 副本星级奖励领取进度 challengeStarBox id
|
// 副本星级奖励领取进度 challengeStarBox id
|
||||||
private int starReward;
|
private int starReward;
|
||||||
|
|
||||||
|
//已玩普通副本地图
|
||||||
|
private Set<Integer> playGenMaps = new HashSet<>();
|
||||||
|
|
||||||
|
|
||||||
// 爬塔副本当前层数
|
// 爬塔副本当前层数
|
||||||
private int tower = 1;
|
private int tower = 1;
|
||||||
// 爬塔副本战斗次数
|
// 爬塔副本战斗次数
|
||||||
|
@ -579,4 +583,13 @@ public class MapManager extends MongoBase {
|
||||||
this.setBossXY(0);
|
this.setBossXY(0);
|
||||||
this.setBossType(0);
|
this.setBossType(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<Integer> getPlayGenMaps() {
|
||||||
|
return playGenMaps;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updatePlayGenMaps(int mapId) {
|
||||||
|
playGenMaps.add(mapId);
|
||||||
|
updateString("playGenMaps",playGenMaps);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -672,7 +672,8 @@ public class CombatLogic {
|
||||||
//发送击杀boss奖励和发现者奖励
|
//发送击杀boss奖励和发现者奖励
|
||||||
if(fightResult == 1){
|
if(fightResult == 1){
|
||||||
i = i+1;
|
i = i+1;
|
||||||
sendRewardOfBossKilled(adventureBoss.getFindUserId(),uid,bossGroupId,adventureBoss.getArenaId(),adventureBoss.getArenaLevel());
|
String killReward = sendRewardOfBossKilled(adventureBoss.getFindUserId(), uid, bossGroupId, adventureBoss.getArenaId(), adventureBoss.getArenaLevel());
|
||||||
|
builder.setKillRewards(killReward);
|
||||||
user.getUserMissionManager().onGameEvent(user, GameEvent.KILLINVASIONBOSS);
|
user.getUserMissionManager().onGameEvent(user, GameEvent.KILLINVASIONBOSS);
|
||||||
RedisUtil.getInstence().removeMapEntrys(RedisKey.ADVENTRUEN_BOSS_INFO,"",bossId);
|
RedisUtil.getInstence().removeMapEntrys(RedisKey.ADVENTRUEN_BOSS_INFO,"",bossId);
|
||||||
ISession findSession = OnlineUserManager.getSessionByUid(adventureBoss.getFindUserId());
|
ISession findSession = OnlineUserManager.getSessionByUid(adventureBoss.getFindUserId());
|
||||||
|
@ -706,7 +707,7 @@ public class CombatLogic {
|
||||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.ADVENTURE_BOSS_CHALLENGE_RESPONSE_VALUE,build,true);
|
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.ADVENTURE_BOSS_CHALLENGE_RESPONSE_VALUE,build,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendRewardOfBossKilled(int findUserId,int killUid,int killBossGroupId, int arenaId,int arenaLevel) throws Exception {
|
private String sendRewardOfBossKilled(int findUserId,int killUid,int killBossGroupId, int arenaId,int arenaLevel) throws Exception {
|
||||||
SMonsterGroup sMonsterGroup = SMonsterGroup.getsMonsterGroupMap().get(killBossGroupId);
|
SMonsterGroup sMonsterGroup = SMonsterGroup.getsMonsterGroupMap().get(killBossGroupId);
|
||||||
int[] killReward = sMonsterGroup.getRewardgroup();
|
int[] killReward = sMonsterGroup.getRewardgroup();
|
||||||
SAdventureConfig sAdventureConfig = SAdventureConfig.getConfig().get(arenaId);
|
SAdventureConfig sAdventureConfig = SAdventureConfig.getConfig().get(arenaId);
|
||||||
|
@ -728,7 +729,7 @@ public class CombatLogic {
|
||||||
title = SErrorCodeEerverConfig.getI18NMessage("adventuren_boss_kill_reward_title");
|
title = SErrorCodeEerverConfig.getI18NMessage("adventuren_boss_kill_reward_title");
|
||||||
content = SErrorCodeEerverConfig.getI18NMessage("adventuren_boss_kill_reward__txt");
|
content = SErrorCodeEerverConfig.getI18NMessage("adventuren_boss_kill_reward__txt");
|
||||||
MailLogic.getInstance().sendMail(killUid,title,content,killRewardMail,nowTime, Global.MAIL_EFFECTIVE_TIME);
|
MailLogic.getInstance().sendMail(killUid,title,content,killRewardMail,nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||||
|
return killRewardMail;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int updateBossAndGetHurtForFight(int[] checkResult,AdventureBoss adventureBoss){
|
public int updateBossAndGetHurtForFight(int[] checkResult,AdventureBoss adventureBoss){
|
||||||
|
|
Loading…
Reference in New Issue