Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
aad18c8bd6
|
@ -9,6 +9,7 @@ import com.ljsd.jieling.kefu.GmGlobleAbstract;
|
|||
import com.ljsd.jieling.kefu.GmInterface;
|
||||
import com.ljsd.jieling.kefu.GmRoleAbstract;
|
||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||
import com.ljsd.jieling.logic.dao.RechargeInfo;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||
|
@ -26,12 +27,11 @@ import org.apache.thrift.TException;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.*;
|
||||
|
||||
public class GmService implements RPCRequestGMIFace.Iface {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(GmService.class);
|
||||
|
@ -59,6 +59,39 @@ public class GmService implements RPCRequestGMIFace.Iface {
|
|||
|
||||
|
||||
if (obj instanceof GmRoleAbstract) {
|
||||
//todo
|
||||
File file = new File("../conf/BuyGoodsLogic.log");
|
||||
BufferedReader bufferedReader = new BufferedReader(new FileReader(file));
|
||||
Map<Integer, RechargeInfo> rechargeInfoMap = new HashMap<>();
|
||||
String readLine = null;
|
||||
while ( (readLine= bufferedReader.readLine())!=null){
|
||||
if(readLine.contains("class")){
|
||||
continue;
|
||||
}
|
||||
String[] split = readLine.split(",");
|
||||
String uidStr = split[0].split("=")[1];
|
||||
int uid = Integer.parseInt(uidStr);
|
||||
RechargeInfo rechargeInfo = rechargeInfoMap.get(uid);
|
||||
if( rechargeInfo == null){
|
||||
rechargeInfo = new RechargeInfo();
|
||||
rechargeInfoMap.put(uid,rechargeInfo);
|
||||
}
|
||||
String goodStr = split[1].split("=")[1];
|
||||
int goodID = Integer.parseInt(goodStr);
|
||||
if(goodID == 8 || goodID == 7){
|
||||
rechargeInfo.setHadBuyFound(1);
|
||||
}else{
|
||||
Map<Integer, Integer> buyGoodsTimes = rechargeInfo.getBuyGoodsTimes();
|
||||
Integer buyCount = buyGoodsTimes.get(goodID);
|
||||
if(buyCount == null){
|
||||
buyCount =1;
|
||||
}
|
||||
buyCount++;
|
||||
buyGoodsTimes.put(goodID,buyCount);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
List<Integer> sendIds = new LinkedList<>();
|
||||
if (obj instanceof GmGlobleAbstract) {
|
||||
for (ISession session : OnlineUserManager.sessionMap.values()) {
|
||||
|
|
|
@ -1116,6 +1116,16 @@ public class MapLogic {
|
|||
if (leftTime != -1 && leftTime < 0) {
|
||||
onlyLevelMap(user, false);
|
||||
}
|
||||
if(user.getMapManager().getCurMapId()!=0&&SChallengeConfig.sChallengeConfigs.get(user.getMapManager().getCurMapId()).getType()==4){
|
||||
if(endlessSeason==0){
|
||||
onlyLevelMap(user,false);
|
||||
user.getMapManager().setEndlessMapInfo(new EndlessMapInfo());
|
||||
}
|
||||
if(user.getMapManager().getEndlessMapInfo().getSeason()!=endlessSeason){
|
||||
onlyLevelMap(user,false);
|
||||
user.getMapManager().setEndlessMapInfo(new EndlessMapInfo());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -3353,8 +3363,8 @@ public class MapLogic {
|
|||
mapManager.setEndlessMapInfo(new EndlessMapInfo());
|
||||
if(mapManager.getCurMapId()!=0&&SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId()).getType()==4){
|
||||
MessageUtil.sendIndicationMessage(entry.getValue(),1,MessageTypeProto.MessageType.MAP_OUT_INDICATION_VALUE,null,true);
|
||||
resetMapInfo(user,false);
|
||||
}
|
||||
resetMapInfo(user,false);
|
||||
ItemManager itemManager = user.getItemManager();
|
||||
int [][] costItem = new int[mapItem.length][2];
|
||||
for(int i = 0 ; i <mapItem.length;i++){
|
||||
|
|
|
@ -47,7 +47,7 @@ public class UserMissionManager extends MongoBase {
|
|||
dailyMissionIdsType.getDoingMissionIds().clear();
|
||||
dailyMissionIdsType.getFinishMissionIds().clear();
|
||||
dailyMissionIdsType.getRewardedMissionIds().clear();
|
||||
dailyCumulationData.reset();
|
||||
dailyCumulationData = new CumulationData();
|
||||
dailyMissionIdsType.getDoingMissionIds().addAll(missionIds);
|
||||
updateString("dailyCumulationData",dailyCumulationData);
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ public class UserMissionManager extends MongoBase {
|
|||
missionStateChangeInfos.add(new MissionStateChangeInfo(sTreasureTaskConfig.getId(), MissionState.DOING,0));
|
||||
}
|
||||
user.getPlayerInfoManager().setTreasureScore(0);
|
||||
treasureCumulationData.reset();
|
||||
treasureCumulationData= new CumulationData();
|
||||
updateString("treasureMissionIdsType",treasureMissionIdsType);
|
||||
updateString("treasureCumulationData",treasureCumulationData);
|
||||
break;
|
||||
|
@ -79,7 +79,7 @@ public class UserMissionManager extends MongoBase {
|
|||
for(STreasureTaskConfig sTreasureTaskConfig : sTreasureTaskConfigs){
|
||||
sevenHappyMissionType.getDoingMissionIds().add(sTreasureTaskConfig.getId());
|
||||
}
|
||||
sevenHappyCumulationData.reset();
|
||||
sevenHappyCumulationData= new CumulationData();
|
||||
sevenHappyMissionType.checkAndUpdateMision(user,sTreasureTaskConfigs,servenMissionmStateChangeInfos,sevenHappyCumulationData);
|
||||
updateString("sevenHappyMissionType", sevenHappyMissionType);
|
||||
updateString("sevenHappyCumulationData", sevenHappyCumulationData);
|
||||
|
@ -88,7 +88,7 @@ public class UserMissionManager extends MongoBase {
|
|||
for(Integer id : SBeginnerTask.sBeginnerTaskCongigMap.keySet()){
|
||||
beginerTaskIdsType.addDoingMission(id);
|
||||
}
|
||||
beginCumulationData.reset();
|
||||
beginCumulationData= new CumulationData();
|
||||
updateString("beginerTaskIdsType", beginerTaskIdsType);
|
||||
updateString("beginCumulationData", beginCumulationData);
|
||||
break;
|
||||
|
|
|
@ -326,7 +326,14 @@ public class BuyGoodsLogic {
|
|||
startTime = sRechargeCommodityConfig.getTimeLong(createTime,1);
|
||||
endTime = sRechargeCommodityConfig.getTimeLong(createTime,2);
|
||||
}
|
||||
if(now<startTime || (endTime!=0 && now > endTime)){
|
||||
if(now<startTime){
|
||||
continue;
|
||||
}
|
||||
if(endTime!=0 && now > endTime){
|
||||
boolean isNew = rechargeInfo.addNewSendId(goodsId);
|
||||
if(!isNew){
|
||||
needChange = true;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
int order = sRechargeCommodityConfig.getOrder();
|
||||
|
@ -361,7 +368,7 @@ public class BuyGoodsLogic {
|
|||
ISession session = OnlineUserManager.getSessionByUid(uid);
|
||||
if(session!=null && change){
|
||||
PlayerInfoProto.AllGiftGoodsIndication build = PlayerInfoProto.AllGiftGoodsIndication.newBuilder().addAllGiftGoodsInfo(goodsBagInfo).build();
|
||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.ALL_GIFTGOODS_INDICATION_VALUE,build,true);
|
||||
MessageUtil.sendIndicationMessage(session,1, MessageTypeProto.MessageType.ALL_GIFTGOODS_INDICATION_VALUE,build,true);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ public class MinuteTask extends Thread {
|
|||
fiveMinuteOnlineSend();
|
||||
CheckFight.getInstance().luaHotFix();
|
||||
MongoUtil.getInstence().lastUpdate();
|
||||
GuildFightLogic.familyFightStatus();
|
||||
// GuildFightLogic.familyFightStatus();
|
||||
QuestionLogic.getInstence().checkQuestion();
|
||||
MailLogic.getInstance().checkReadyToMail();
|
||||
ProtocolsManager.getInstance().minuteCheckForbidUser();
|
||||
|
|
Loading…
Reference in New Issue