Merge branch 'master_test_gn' of http://60.1.1.230/backend/jieling_server into master_test_gn
commit
921fbf9cc7
|
@ -179,7 +179,7 @@ public class ExplorerMapLogic {
|
|||
}
|
||||
LOGGER.info("{}怪物死亡=》重生时间{}", user.getId(), explorerInfo.getEnemyReliveTime());
|
||||
RankEnum.toRank(RankEnum.EXPLORE_RANK.getType()).incrementRankScore(user.getId(), "", 1);
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.EXPLORE, MissionType.EXPLORE_ENEMY_NUM,1);
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.EXPLORE, MissionType.EXPLORE_ENEMY_NUM, 1);
|
||||
}
|
||||
|
||||
if (time == 0) {
|
||||
|
@ -230,32 +230,35 @@ public class ExplorerMapLogic {
|
|||
SExplore rankExplore = limitConfig.get(randomMapId);
|
||||
int randomEventId = random.nextInt(rankExplore.getEventList().length);
|
||||
int eventId = rankExplore.getEventList()[randomEventId];
|
||||
LOGGER.info("explore add eventId:" + eventId + " randomMapId: " + randomMapId+1);
|
||||
LOGGER.info("explore add eventId:" + eventId + " randomMapId: " + randomMapId + 1);
|
||||
user.getPlayerInfoManager().addExploreEvent(new KeyVal(eventId, TimeUtils.nowInt() + exploreEventConfig.get(eventId).getTime(), randomMapId + 1));
|
||||
PlayerInfoProto.ExplorerMapIndicationResponse.Builder indication = PlayerInfoProto.ExplorerMapIndicationResponse.newBuilder();
|
||||
PlayerInfoProto.ExplorerMapIndicationEventResponse.Builder indication = PlayerInfoProto.ExplorerMapIndicationEventResponse.newBuilder();
|
||||
List<KeyVal> event = user.getPlayerInfoManager().getExploreEvent();
|
||||
//删除过期的
|
||||
if(event.removeIf(n->n.getVal() < TimeUtils.nowInt())){
|
||||
if (event.removeIf(n -> n.getVal() < TimeUtils.nowInt())) {
|
||||
user.getPlayerInfoManager().setExploreEvent(event);
|
||||
}
|
||||
for (KeyVal keyVal : event) {
|
||||
indication.addRandEvent(CommonProto.CommKeyVal.newBuilder().setKey(keyVal.getKey()).setVal(keyVal.getVal()).
|
||||
setVal2(keyVal.getVa2()).build());
|
||||
}
|
||||
|
||||
MessageUtil.sendIndicationMessage(sess, 1, MessageTypeProto.MessageType.ExplorerMapIndicationResponse_VALUE, indication.build(), true);
|
||||
MessageUtil.sendIndicationMessage(sess, 1, MessageTypeProto.MessageType.ExplorerMapIndicationEventResponse_VALUE, indication.build(), true);
|
||||
}
|
||||
public static void sendDisappearEvent(User user){
|
||||
|
||||
public static void sendDisappearEvent(User user) {
|
||||
ISession sess = OnlineUserManager.sessionMap.get(user.getId());
|
||||
List<KeyVal> event = user.getPlayerInfoManager().getExploreEvent();
|
||||
if(event.removeIf(n->n.getVal() < TimeUtils.nowInt())){
|
||||
if(event.size() == 0 ||event == null){
|
||||
return;
|
||||
}
|
||||
if (event.removeIf(n -> n.getVal() < TimeUtils.nowInt())) {
|
||||
user.getPlayerInfoManager().setExploreEvent(event);
|
||||
PlayerInfoProto.ExplorerMapIndicationResponse.Builder indication = PlayerInfoProto.ExplorerMapIndicationResponse.newBuilder();
|
||||
PlayerInfoProto.ExplorerMapIndicationEventResponse.Builder indication = PlayerInfoProto.ExplorerMapIndicationEventResponse.newBuilder();
|
||||
for (KeyVal keyVal : event) {
|
||||
indication.addRandEvent(CommonProto.CommKeyVal.newBuilder().setKey(keyVal.getKey()).setVal(keyVal.getVal()).
|
||||
setVal2(keyVal.getVa2()).build());
|
||||
}
|
||||
MessageUtil.sendIndicationMessage(sess, 1, MessageTypeProto.MessageType.ExplorerMapIndicationResponse_VALUE, indication.build(), true);
|
||||
MessageUtil.sendIndicationMessage(sess, 1, MessageTypeProto.MessageType.ExplorerMapIndicationEventResponse_VALUE, indication.build(), true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -287,9 +290,9 @@ public class ExplorerMapLogic {
|
|||
}
|
||||
LOGGER.info("离线玩家队伍id", keyVal.getKey());
|
||||
//探索事件
|
||||
long gapDay = TimeUtils.getGapDaysByTwoTime(TimeUtils.getTimeStamp2(keyVal.getValue().getBatteTime()*1000L), TimeUtils.getTimeStamp2(offlineEndTime*1000L));
|
||||
for(int i = 0;i< gapDay;i++){
|
||||
LOGGER.info("gapDay------------------------>{}",i);
|
||||
long gapDay = TimeUtils.getGapDaysByTwoTime(TimeUtils.getTimeStamp2(keyVal.getValue().getBatteTime() * 1000L), TimeUtils.getTimeStamp2(offlineEndTime * 1000L));
|
||||
for (int i = 0; i < gapDay; i++) {
|
||||
LOGGER.info("gapDay------------------------>{}", i);
|
||||
sendRandomEvent(user);
|
||||
}
|
||||
for (int i = keyVal.getValue().getBatteTime(); i <= offlineEndTime; i = i + battleInterval) {
|
||||
|
@ -438,17 +441,16 @@ public class ExplorerMapLogic {
|
|||
if (delayId.size() > 0) {
|
||||
user.getPlayerInfoManager().setExplorer(explorer);
|
||||
}
|
||||
|
||||
//探索有消耗 整点刷出随机事件
|
||||
if (explorer.size() > 0) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int minute = calendar.get(Calendar.MINUTE);
|
||||
if (minute == 0) {
|
||||
//sendRandomEvent(user);
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int minute = calendar.get(Calendar.MINUTE);
|
||||
if (minute == 0) {
|
||||
if (explorer.size() > 0) {
|
||||
sendRandomEvent(user);
|
||||
}
|
||||
sendRandomEvent(user);
|
||||
}else{
|
||||
sendDisappearEvent(user);
|
||||
}
|
||||
sendDisappearEvent(user);
|
||||
MongoUtil.getLjsdMongoTemplate().lastUpdate();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -2879,7 +2879,7 @@ public class HeroLogic {
|
|||
buff += Optional.ofNullable(strengthenMap.get(strongId)).map(SEquipStrengthen::getRate).orElse(0);
|
||||
// 突破
|
||||
buff += Optional.ofNullable(rankUpMap.get(homeRankUp)).map(v -> v.getRate()[sEquipConfig.getPosition() - 1]).orElse(0);
|
||||
value = value + (long) Math.ceil(buff/100*value);
|
||||
value = value + (long) Math.ceil(buff/10000*value);
|
||||
}
|
||||
propertyValueByIdMap.put(prop[0], value);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue