探索优化
parent
6f805a716f
commit
fbd3281ca6
|
|
@ -99,6 +99,7 @@ public class ExplorerMapEventHandler extends BaseHandler<PlayerInfoProto.Explore
|
|||
if ((int) fightResult.getCheckResult()[0] == 1) {
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.EXPLORE, MissionType.EXPLORE_REPELMONSTER_NUM,
|
||||
1);
|
||||
eventList.remove(index);
|
||||
}
|
||||
} else if (exploreEventConfig.get(id).getType() == 2) {
|
||||
int defUid = user.getPlayerInfoManager().getExploreEventMatchDefUid();
|
||||
|
|
@ -131,14 +132,15 @@ public class ExplorerMapEventHandler extends BaseHandler<PlayerInfoProto.Explore
|
|||
if ((int) fightResult.getCheckResult()[0] == 1) {
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.EXPLORE, MissionType.EXPLORE_REPELXINMO_NUM,
|
||||
1);
|
||||
eventList.remove(index);
|
||||
}
|
||||
} else if (exploreEventConfig.get(id).getType() == 3) {
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, new int[]{exploreEventConfig.get(id).getRewardGroup()}, 1, 0, BIReason.EXPLORE_EVENT_BOX);
|
||||
builder.setDrop(drop);
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.EXPLORE, MissionType.EXPLORE_PICKYM_NUM,
|
||||
1);
|
||||
eventList.remove(index);
|
||||
}
|
||||
eventList.remove(index);
|
||||
user.getPlayerInfoManager().setExploreEvent(eventList);
|
||||
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.ExplorerMapEventResponse.getNumber(), builder.build(), true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -228,6 +228,9 @@ public class ExplorerMapLogic {
|
|||
Random random = new Random();
|
||||
int randomMapId = random.nextInt(limitConfig.size());
|
||||
SExplore rankExplore = limitConfig.get(randomMapId);
|
||||
if(rankExplore.getEventList().length == 0){
|
||||
return;
|
||||
}
|
||||
int randomEventId = random.nextInt(rankExplore.getEventList().length);
|
||||
int eventId = rankExplore.getEventList()[randomEventId];
|
||||
LOGGER.info("explore add eventId:" + eventId + " randomMapId: " + randomMapId + 1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue