探索优化
parent
2bd61083e2
commit
77a87f7ccd
|
|
@ -245,9 +245,13 @@ public class ExplorerMapLogic {
|
|||
|
||||
MessageUtil.sendIndicationMessage(sess, 1, MessageTypeProto.MessageType.ExplorerMapIndicationResponse_VALUE, indication.build(), true);
|
||||
}
|
||||
|
||||
public static void sendDisappearEvent(User user) {
|
||||
ISession sess = OnlineUserManager.sessionMap.get(user.getId());
|
||||
List<KeyVal> event = user.getPlayerInfoManager().getExploreEvent();
|
||||
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();
|
||||
|
|
@ -438,17 +442,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);
|
||||
}
|
||||
if (explorer.size() > 0) {
|
||||
sendRandomEvent(user);
|
||||
}
|
||||
}else{
|
||||
sendDisappearEvent(user);
|
||||
}
|
||||
MongoUtil.getLjsdMongoTemplate().lastUpdate();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue