Merge branch 'refs/heads/master_xiyou' into master_zzxx
commit
9727e31297
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"version":"5",
|
"version":"6",
|
||||||
"tables":""
|
"tables":"GameSetting"
|
||||||
}
|
}
|
|
@ -1,5 +1,7 @@
|
||||||
{
|
{
|
||||||
"version":"5",
|
"version":"7",
|
||||||
"classes": [
|
"classes": [
|
||||||
|
{"name":"BuyGoodsNewLogic.class","fullName":"com.ljsd.jieling.logic.store.BuyGoodsNewLogic"},
|
||||||
|
{"name":"RetrySendIndicationThread.class","fullName":"com.ljsd.jieling.thread.task.RetrySendIndicationThread"}
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
package com.ljsd.jieling.handler.map;
|
package com.ljsd.jieling.handler.map;
|
||||||
|
|
||||||
|
import com.ljsd.GameApplication;
|
||||||
import com.ljsd.fight.FightType;
|
import com.ljsd.fight.FightType;
|
||||||
import com.ljsd.jieling.config.clazzStaticCfg.CommonStaticConfig;
|
import com.ljsd.jieling.config.clazzStaticCfg.CommonStaticConfig;
|
||||||
import com.ljsd.jieling.core.FunctionIdEnum;
|
import com.ljsd.jieling.core.FunctionIdEnum;
|
||||||
|
@ -1860,6 +1861,12 @@ public class MapLogic {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 10://开服天数
|
||||||
|
long openTime = GameApplication.serverConfig.getCacheOpenTime();
|
||||||
|
int count = TimeUtils.differentDays(openTime, TimeUtils.now()) + 1;
|
||||||
|
if (count < ints[1]){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return isOpen;
|
return isOpen;
|
||||||
|
|
|
@ -454,6 +454,11 @@ public class ActivityLogic implements IEventHandler{
|
||||||
goRewardActivity(user,activityId,builder, isRemove);
|
goRewardActivity(user,activityId,builder, isRemove);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// todo 影响所有创角类型活动,已有的暂时不受影响,新增活动注意initactivtiy方法
|
||||||
|
// ActivityMission activityMission = activityMissionMap.get(activityId);
|
||||||
|
// if (activityMission != null) {
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
boolean checked = checkStateAndInitFromActivity(user, activityId);
|
boolean checked = checkStateAndInitFromActivity(user, activityId);
|
||||||
if (checked){
|
if (checked){
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -27,27 +27,17 @@ class OnlineRewardActivity extends AbstractActivity {
|
||||||
User user = UserManager.getUser(session.getUid());
|
User user = UserManager.getUser(session.getUid());
|
||||||
List<int[][]> reward = new ArrayList<>();
|
List<int[][]> reward = new ArrayList<>();
|
||||||
getAllMissRewards(user,session,reward);
|
getAllMissRewards(user,session,reward);
|
||||||
Map<Integer,Integer> itemMap = new HashMap<>();
|
CommonProto.Drop.Builder drop = ItemUtil.drop(user, reward, BIReason.TAKE_ACTIVITY_REWARD);
|
||||||
reward.forEach(n-> Arrays.stream(n).forEach(m->itemMap.put(m[0],itemMap.getOrDefault(m[0], 0)+m[1])));
|
|
||||||
|
|
||||||
int[][] rewardArray = ItemUtil.mapToArray(itemMap);
|
|
||||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, rewardArray, BIReason.TAKE_ACTIVITY_REWARD);
|
|
||||||
|
|
||||||
PlayerInfoProto.TakeActivityRewardResponse build = PlayerInfoProto.TakeActivityRewardResponse.newBuilder().setDrop(drop).build();
|
PlayerInfoProto.TakeActivityRewardResponse build = PlayerInfoProto.TakeActivityRewardResponse.newBuilder().setDrop(drop).build();
|
||||||
|
// reportTakeActivityReward(user,rewardArray,missionId);
|
||||||
reportTakeActivityReward(user,rewardArray,missionId);
|
|
||||||
|
|
||||||
MessageUtil.sendMessage(session, 1, rewardResponseValue, build, true);
|
MessageUtil.sendMessage(session, 1, rewardResponseValue, build, true);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean takeRewardsProcess(ISession session, SActivityRewardConfig sActivityRewardConfig, ActivityProgressInfo activityProgressInfo) throws Exception {
|
boolean takeRewardsProcess(ISession session, SActivityRewardConfig sActivityRewardConfig, ActivityProgressInfo activityProgressInfo) throws Exception {
|
||||||
|
|
||||||
int[][] values = sActivityRewardConfig.getValues();
|
int[][] values = sActivityRewardConfig.getValues();
|
||||||
int missionProgress = activityProgressInfo.getProgrss();
|
int missionProgress = activityProgressInfo.getProgrss();
|
||||||
long now = TimeUtils.now();
|
long now = TimeUtils.now();
|
||||||
|
|
|
@ -1682,7 +1682,7 @@ public class GuildLogic {
|
||||||
@SuppressWarnings("SuspiciousMethodCalls")
|
@SuppressWarnings("SuspiciousMethodCalls")
|
||||||
private static void exploreActivity(User user, GuildInfo guildInfo){
|
private static void exploreActivity(User user, GuildInfo guildInfo){
|
||||||
Set<Integer> openActivityIdsByType = ActivityLogic.getInstance().getOpenActivityIdsByType(user, ActivityTypeEnum.EXPLORE_EXPECT_ACTIVITY.getType(), false);
|
Set<Integer> openActivityIdsByType = ActivityLogic.getInstance().getOpenActivityIdsByType(user, ActivityTypeEnum.EXPLORE_EXPECT_ACTIVITY.getType(), false);
|
||||||
if(openActivityIdsByType.size()!= 0){
|
if(!openActivityIdsByType.isEmpty()){
|
||||||
ActivityMission activityMission = user.getActivityManager().getActivityMissionMap().get(openActivityIdsByType.toArray()[0]);
|
ActivityMission activityMission = user.getActivityManager().getActivityMissionMap().get(openActivityIdsByType.toArray()[0]);
|
||||||
if(guildInfo!=null){
|
if(guildInfo!=null){
|
||||||
activityMission.setV(0);
|
activityMission.setV(0);
|
||||||
|
|
|
@ -246,15 +246,18 @@ public class BuyGoodsNewLogic {
|
||||||
ISession session = OnlineUserManager.getSessionByUid(uid);
|
ISession session = OnlineUserManager.getSessionByUid(uid);
|
||||||
if (session == null) {
|
if (session == null) {
|
||||||
resultRes.setResultMsg("Session is null");
|
resultRes.setResultMsg("Session is null");
|
||||||
|
LOGGER.error("sendGoods 玩家不在缓存中, uid={}",uid);
|
||||||
return resultRes;
|
return resultRes;
|
||||||
}
|
}
|
||||||
if (!StringUtil.isNumeric(sdkGoodsId)){
|
if (!StringUtil.isNumeric(sdkGoodsId)){
|
||||||
resultRes.setResultMsg("sdkGoodsId is error");
|
resultRes.setResultMsg("sdkGoodsId is error");
|
||||||
|
LOGGER.error("sendGoods 礼包id不是纯数字, uid={}, goodId={}",uid, sdkGoodsId);
|
||||||
return resultRes;
|
return resultRes;
|
||||||
}
|
}
|
||||||
SRechargeCommodityNewConfig config = SRechargeCommodityNewConfig.configMap.get(Integer.parseInt(sdkGoodsId));
|
SRechargeCommodityNewConfig config = SRechargeCommodityNewConfig.configMap.get(Integer.parseInt(sdkGoodsId));
|
||||||
if(null == config){
|
if(null == config){
|
||||||
resultRes.setResultMsg("SRechargeCommodityNewConfig is null");
|
resultRes.setResultMsg("SRechargeCommodityNewConfig is null");
|
||||||
|
LOGGER.error("sendGoods 礼包表找不到, uid={}, goodId={}",uid, sdkGoodsId);
|
||||||
return resultRes;
|
return resultRes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -272,6 +275,7 @@ public class BuyGoodsNewLogic {
|
||||||
User user = UserManager.getUser(uid);
|
User user = UserManager.getUser(uid);
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
resultRes.setResultMsg("User not found");
|
resultRes.setResultMsg("User not found");
|
||||||
|
LOGGER.error("sendGoods 玩家找不到, uid={}",uid);
|
||||||
return resultRes;
|
return resultRes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,6 +283,7 @@ public class BuyGoodsNewLogic {
|
||||||
AbstractWelfareBag bag = rechargeHandler.getBag(user, goodsId);
|
AbstractWelfareBag bag = rechargeHandler.getBag(user, goodsId);
|
||||||
if (bag == null) {
|
if (bag == null) {
|
||||||
resultRes.setResultMsg("Welfare bag not found");
|
resultRes.setResultMsg("Welfare bag not found");
|
||||||
|
LOGGER.error("sendGoods 玩家身上找不到礼包, uid={}, goodId={}",uid, goodsId);
|
||||||
return resultRes;
|
return resultRes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,18 +51,19 @@ public class RetrySendIndicationThread extends Thread{
|
||||||
}
|
}
|
||||||
ConcurrentHashMap<Integer, ISession.IndicationMsg> indexToIndication = session.getIndexToIndication();
|
ConcurrentHashMap<Integer, ISession.IndicationMsg> indexToIndication = session.getIndexToIndication();
|
||||||
for(ISession.IndicationMsg indicationMsg : indexToIndication.values()){
|
for(ISession.IndicationMsg indicationMsg : indexToIndication.values()){
|
||||||
// long create = indicationMsg.getCreate();
|
long create = indicationMsg.getCreate();
|
||||||
// int retryTimes = indicationMsg.getRetryTimes()+1;
|
int retryTimes = indicationMsg.getRetryTimes()+1;
|
||||||
// if(retryTimes>3){
|
if(retryTimes>3){
|
||||||
// continue;
|
continue;
|
||||||
// }
|
}
|
||||||
// if(now-create > retryTimes*3000L){
|
if(now-create > retryTimes*3000L){
|
||||||
// MessageUtil.retrySendIndication(session,indicationMsg.getMsg());
|
MessageUtil.retrySendIndication(session,indicationMsg.getMsg());
|
||||||
// indicationMsg.setRetryTimes(retryTimes);
|
indicationMsg.setRetryTimes(retryTimes);
|
||||||
// }
|
}
|
||||||
MessageUtil.retrySendIndication(session,indicationMsg.getMsg());
|
// LOGGER.info("indication :{}",indicationMsg.getMsg());
|
||||||
|
// MessageUtil.retrySendIndication(session,indicationMsg.getMsg());
|
||||||
}
|
}
|
||||||
session.cleanIndication();
|
// session.cleanIndication();
|
||||||
}else{
|
}else{
|
||||||
removeIds.add(session.getUid());
|
removeIds.add(session.getUid());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue