Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
181649ee07
|
@ -54,5 +54,13 @@ netty.writeTimeout=32
|
|||
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
|
|
@ -140,16 +140,15 @@ public class MapLogic {
|
|||
return;
|
||||
}
|
||||
int type = sChallengeConfig.getType();
|
||||
Map<Integer, CrossInfo> crossInfoMap = mapManager.getCrossInfoMap();
|
||||
if (type == 1) {
|
||||
if (crossInfoMap.containsKey(mapId)) {
|
||||
if (crossInfoMap.get(mapId).getStars().contains(STAR_1)) {
|
||||
if (mapManager.getPlayGenMaps().contains(mapId)) {
|
||||
boolean enough = ItemUtil.itemCost(user, new int[][]{{Global.GENERALSTORY_TICKET, 1}}, BIReason.MAP_ENTER_CONSUME, mapId);
|
||||
if (!enough) {
|
||||
MessageUtil.sendErrorResponse(iSession, 0, messageType.getNumber(), "no ticket");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
mapManager.updatePlayGenMaps(mapId);
|
||||
}
|
||||
}else if(type == 3){
|
||||
boolean enough = ItemUtil.itemCost(user, new int[][]{{Global.HEROSTORY_TICKET, 1}},BIReason.MAP_ENTER_CONSUME,mapId);
|
||||
|
@ -1491,15 +1490,9 @@ public class MapLogic {
|
|||
MessageUtil.sendErrorResponse(session, 0, messageType.getNumber(), "");
|
||||
return;
|
||||
}
|
||||
//todo vip
|
||||
/* SChallengeSetting sChallengeSetting = SChallengeSetting.challengeSetting;
|
||||
int dailyLimitPrivilege = sChallengeSetting.getDailyLimitPrivilege();
|
||||
VipPrivilegeType.
|
||||
if (mapManager.getDayFightCount() + count > sChallengeSetting.getLimit() + mapManager.getBuyFightCount()) {
|
||||
LOGGER.info("sweep over max count: {}", (mapManager.getDayFightCount() + count));
|
||||
MessageUtil.sendErrorResponse(session,0, messageType.getNumber(), "");
|
||||
return;
|
||||
}*/
|
||||
SChallengeConfig sChallengeConfig = SChallengeConfig.sChallengeConfigs.get(mapId);
|
||||
int type = sChallengeConfig.getType();
|
||||
if(type==3 || type==1){
|
||||
SChallengeMapConfig sChallengeMapConfig = SChallengeMapConfig.integerSChallengeMapConfigMap.get(mapId);
|
||||
MapInfoProto.MapSweepResponse.Builder mapSweepResponse = MapInfoProto.MapSweepResponse.newBuilder();
|
||||
for (int i = 0; i < count; i++) {
|
||||
|
@ -1508,6 +1501,11 @@ public class MapLogic {
|
|||
}
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.STORY_FIGHT, mapId,1,count);
|
||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), mapSweepResponse.build(), true);
|
||||
}else{
|
||||
LOGGER.info("uid={},type={}",uid,type);
|
||||
MessageUtil.sendErrorResponse(session, 0, messageType.getNumber(), "now sweep");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -1575,6 +1573,7 @@ public class MapLogic {
|
|||
.setTowerUseTime((int)(mapManager.getCurrTowerTime()/1000))
|
||||
.build();
|
||||
builder.setTowerCopyInfo(towerCopyInfo);
|
||||
builder.addAllPlayedGenMapId(mapManager.getPlayGenMaps());
|
||||
LOGGER.info("关卡信息{}",towerCopyInfo.toString());
|
||||
MessageUtil.sendMessage(iSession, 1, msgId, builder.build(), true);
|
||||
}
|
||||
|
|
|
@ -71,6 +71,10 @@ public class MapManager extends MongoBase {
|
|||
// 副本星级奖励领取进度 challengeStarBox id
|
||||
private int starReward;
|
||||
|
||||
//已玩普通副本地图
|
||||
private Set<Integer> playGenMaps = new HashSet<>();
|
||||
|
||||
|
||||
// 爬塔副本当前层数
|
||||
private int tower = 1;
|
||||
// 爬塔副本战斗次数
|
||||
|
@ -579,4 +583,13 @@ public class MapManager extends MongoBase {
|
|||
this.setBossXY(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奖励和发现者奖励
|
||||
if(fightResult == 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);
|
||||
RedisUtil.getInstence().removeMapEntrys(RedisKey.ADVENTRUEN_BOSS_INFO,"",bossId);
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
int[] killReward = sMonsterGroup.getRewardgroup();
|
||||
SAdventureConfig sAdventureConfig = SAdventureConfig.getConfig().get(arenaId);
|
||||
|
@ -728,7 +729,7 @@ public class CombatLogic {
|
|||
title = SErrorCodeEerverConfig.getI18NMessage("adventuren_boss_kill_reward_title");
|
||||
content = SErrorCodeEerverConfig.getI18NMessage("adventuren_boss_kill_reward__txt");
|
||||
MailLogic.getInstance().sendMail(killUid,title,content,killRewardMail,nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||
|
||||
return killRewardMail;
|
||||
}
|
||||
|
||||
public int updateBossAndGetHurtForFight(int[] checkResult,AdventureBoss adventureBoss){
|
||||
|
|
Loading…
Reference in New Issue