Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
1861d13d4e
|
|
@ -72,6 +72,7 @@ public class HandlerLogicThread extends Thread{
|
|||
|
||||
whiteMsg.add(MessageTypeProto.MessageType.GET_MISSION_REQUEST_VALUE);
|
||||
whiteMsg.add(MessageTypeProto.MessageType.REFRESH_ITEM_NUM_REQUEST_VALUE);
|
||||
whiteMsg.add(MessageTypeProto.MessageType.STORE_GOODS_REFRESH_REQUEST_VALUE);
|
||||
//日后删除
|
||||
whiteMsg.add(MessageTypeProto.MessageType.GET_CHAT_MESSAGE_REQUEST_VALUE);
|
||||
|
||||
|
|
|
|||
|
|
@ -102,11 +102,12 @@ public class MapLogic {
|
|||
user.setMapManager(mapManager);
|
||||
}*/
|
||||
MapInfoProto.MapEnterResponse.Builder mapEnterResponse = MapInfoProto.MapEnterResponse.newBuilder();
|
||||
SChallengeMapConfig sChallengeMapConfig = SChallengeMapConfig.integerSChallengeMapConfigMap.get(mapManager.getCurMapId());
|
||||
|
||||
// 进入新地图
|
||||
SChallengeConfig sChallengeConfig = SChallengeConfig.sChallengeConfigs.get(mapId);
|
||||
int type = sChallengeConfig.getType();
|
||||
if (mapManager.getCurMapId() == 0) {
|
||||
SChallengeMapConfig sChallengeMapConfig = SChallengeMapConfig.integerSChallengeMapConfigMap.get(mapId);
|
||||
mapEnterResponse.setCurXY(CellUtil.xy2Pos(sChallengeMapConfig.getPosition()[0],sChallengeMapConfig.getPosition()[1]));
|
||||
Map<Integer, SCMap> scMap = SCMap.sCMap.get(mapId);
|
||||
if (scMap == null) {
|
||||
|
|
@ -188,8 +189,11 @@ public class MapLogic {
|
|||
user.getUserMissionManager().onGameEvent(user,GameEvent.PlAY_STORY,SChallengeConfig.sChallengeConfigs.get(mapId).getType(),1);
|
||||
Poster.getPoster().dispatchEvent(new StoryEvent(user.getId()));
|
||||
} else if (mapManager.getCurMapId() != mapId) {
|
||||
|
||||
MessageUtil.sendErrorResponse(iSession, 0, messageType.getNumber(), "地图错误,应进入" + mapManager.getCurMapId());
|
||||
return;
|
||||
}else{
|
||||
mapEnterResponse.setCurXY(mapManager.getCurXY());
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -202,7 +206,12 @@ public class MapLogic {
|
|||
}
|
||||
if(mapManager.getEndlessMapInfo().getCurCell()!=0){
|
||||
if(mapManager.getEndlessMapInfo().getCurMapId()==mapId) {
|
||||
mapEnterResponse.setCurXY(mapManager.getEndlessMapInfo().getCurCell());
|
||||
if(mapManager.getCurXY()!=0){
|
||||
mapEnterResponse.setCurXY(mapManager.getCurXY());
|
||||
}else{
|
||||
mapEnterResponse.setCurXY(mapManager.getEndlessMapInfo().getCurCell());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -564,7 +573,7 @@ public class MapLogic {
|
|||
// LOGGER.info("updateMap() uid=>{} mapId =>{} eventId=>{}", uid, mapManager.getCurMapId(), cell.getEventId());
|
||||
mapManager.updateFoodBufferByStep(cells.size());
|
||||
if(!cells.isEmpty()){
|
||||
if(cells.size() >2){
|
||||
if(cells.size() >1){
|
||||
lastXY = cells.get(cells.size()-2);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ public class ActivityLogic {
|
|||
user.getPlayerInfoManager().setRechargedaily(0);
|
||||
updateActivityMissionProgress(user, ActivityType.SevenLogin, 1);
|
||||
upFivePlayerActivity(user, ActivityType.SevenLogin, fBuilder);
|
||||
upFivePlayerActivity(user, ActivityType.DAILY_RECHARGE, fBuilder);
|
||||
}
|
||||
|
||||
public void flushForLogin(User user) throws Exception {
|
||||
|
|
@ -327,9 +328,6 @@ public class ActivityLogic {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (fBuilder == null) {
|
||||
return;
|
||||
}
|
||||
long createTime = user.getPlayerInfoManager().getCreateTime();
|
||||
int startTime = (int) (sGlobalActivity.getTimeLong(createTime, 1) / 1000);
|
||||
int endTime = (int) (sGlobalActivity.getTimeLong(createTime, 2) / 1000);
|
||||
|
|
|
|||
|
|
@ -48,10 +48,12 @@ public class DefaultEmptyActivity extends AbstractActivity{
|
|||
sevenHappyMissionType.getRewardedMissionIds().set(sTreasureTaskConfig.getId());
|
||||
user.getUserMissionManager().setSevenHappyMissionType(sevenHappyMissionType);
|
||||
SSevenDaysScore sSevenDaysScore = SSevenDaysScore.SSevenDaysScoreByActivityIdAndScoreMap.get(id).get(senvenScores);
|
||||
String mailReward = ItemUtil.getMailReward(sSevenDaysScore.getReward());
|
||||
String title=SErrorCodeEerverConfig.getI18NMessage("opencarnival_activity_"+id+"_title");
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("opencarnival_activity_"+id+"_txt");
|
||||
MailLogic.getInstance().sendMail(user.getId(),title,content,mailReward,(int)(System.currentTimeMillis()/1000), Global.MAIL_EFFECTIVE_TIME);
|
||||
if(sSevenDaysScore!=null){
|
||||
String mailReward = ItemUtil.getMailReward(sSevenDaysScore.getReward());
|
||||
String title=SErrorCodeEerverConfig.getI18NMessage("opencarnival_activity_"+id+"_title");
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("opencarnival_activity_"+id+"_txt");
|
||||
MailLogic.getInstance().sendMail(user.getId(),title,content,mailReward,(int)(System.currentTimeMillis()/1000), Global.MAIL_EFFECTIVE_TIME);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public class RechargeInfo extends MongoBase{
|
|||
}
|
||||
|
||||
public void setDailyFirst(int first) {
|
||||
updateString("isFirst",first);
|
||||
updateString("isDayFirst",first);
|
||||
isDayFirst = first;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -126,6 +126,11 @@ public class MissionLoigc {
|
|||
state =0;
|
||||
}
|
||||
}
|
||||
|
||||
if(takeTimes == null){
|
||||
takeTimes=0;
|
||||
}
|
||||
|
||||
|
||||
missionList.add(CommonProto.UserMissionInfo.newBuilder().setMissionId(missionId).setState(state).setType(treasuremissionType).setProgress(sendProgress).setTakeTimes(takeTimes).build());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue