Merge branch 'master_test_gn' of http://60.1.1.230/backend/jieling_server into master_test_gn
commit
0402d633a0
|
@ -178,6 +178,7 @@ public abstract class AbstractActivity implements IActivity, IEventHandler {
|
||||||
SGlobalActivity sGlobalActivity = SGlobalActivity.getsGlobalActivityMap().get(id);
|
SGlobalActivity sGlobalActivity = SGlobalActivity.getsGlobalActivityMap().get(id);
|
||||||
//up miss
|
//up miss
|
||||||
int[][] reward = sActivityRewardConfig.getReward();
|
int[][] reward = sActivityRewardConfig.getReward();
|
||||||
|
|
||||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, reward, BIReason.TAKE_ACTIVITY_REWARD);
|
CommonProto.Drop.Builder drop = ItemUtil.drop(user, reward, BIReason.TAKE_ACTIVITY_REWARD);
|
||||||
checkAndSetProgress(activityMission, activityProgressInfo, missionId);
|
checkAndSetProgress(activityMission, activityProgressInfo, missionId);
|
||||||
|
|
||||||
|
|
|
@ -47,11 +47,9 @@ public interface ActivityType {
|
||||||
int EXPEDITION_EXPERT = 26;//天宫达人
|
int EXPEDITION_EXPERT = 26;//天宫达人
|
||||||
int THREE_WORLD_NEW = 27;//新版三界降魔活动
|
int THREE_WORLD_NEW = 27;//新版三界降魔活动
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int LUCK_WHEEL= 30;//幸运转盘
|
int LUCK_WHEEL= 30;//幸运转盘
|
||||||
int LUCK_WHEEL_ADVANCE= 31;//高级幸运转盘
|
int LUCK_WHEEL_ADVANCE= 31;//高级幸运转盘
|
||||||
|
int DEMON_TREASURE = 36;//降妖夺宝
|
||||||
int ESPECIALEQUIP_EXPERT = 37;//法宝达人
|
int ESPECIALEQUIP_EXPERT = 37;//法宝达人
|
||||||
int SOULEQUIP_EXPERT = 38;//魂印达人
|
int SOULEQUIP_EXPERT = 38;//魂印达人
|
||||||
|
|
||||||
|
@ -76,36 +74,22 @@ public interface ActivityType {
|
||||||
int NEW_EIGHT_LOGIN = 56;//新的八日登录
|
int NEW_EIGHT_LOGIN = 56;//新的八日登录
|
||||||
int SIGN_BOX= 57;//累计签到宝箱
|
int SIGN_BOX= 57;//累计签到宝箱
|
||||||
int JADE_DYNASTY_RECHARGE_SUM = 58;//破阵诛仙累充
|
int JADE_DYNASTY_RECHARGE_SUM = 58;//破阵诛仙累充
|
||||||
int TA_SUI_LING_XIAO = 66;//踏碎凌霄
|
|
||||||
int JADE_DYNASTY_MISSION = 20000;//破阵诛仙任务
|
|
||||||
int JADE_DYNASTY_SHOP = 20001;//破阵诛仙限时商市
|
|
||||||
int JADE_DYNASTY_RARE_SHOP = 20002;//破阵诛仙珍奇宝阁
|
|
||||||
int CHOICE_DRAW_CRAD = 20003;//心愿抽奖(选择抽卡)
|
|
||||||
int LING_LONG_PAVILION = 20005;//玲珑宝阁
|
|
||||||
int ITEMS_STORE= 6000;//百宝商会
|
|
||||||
int TRIAL_EXPERT = 70;//幻境达人
|
|
||||||
int SHEJI_ACTIVITY = 60;//社稷大典
|
int SHEJI_ACTIVITY = 60;//社稷大典
|
||||||
int GOOD_LUCK= 61;//扭转乾坤
|
int GOOD_LUCK= 61;//扭转乾坤
|
||||||
int COW_FLY_SKY = 62;//牛气冲天
|
int COW_FLY_SKY = 62;//牛气冲天
|
||||||
int LUCKY_GET = 63;//福星高照
|
int LUCKY_GET = 63;//福星高照
|
||||||
int FIFTEEN_LOGIN = 64;//十五日签到
|
int FIFTEEN_LOGIN = 64;//十五日签到
|
||||||
int EQUIP_UPLEVEL = 65;//云游商人
|
int EQUIP_UPLEVEL = 65;//云游商人
|
||||||
int HARD_STAGE_EXERCISE = 68;//山河试炼
|
int TA_SUI_LING_XIAO = 66;//踏碎凌霄
|
||||||
|
|
||||||
int SUB_ACTIVITY = 8000;//易经宝库
|
|
||||||
int SKIN_RECHARGE_ACTIVITY = 71;
|
|
||||||
int SPECIAL_MONSTER_RANDOM_ACTIVITY = 100;//灵兽限时抽卡
|
|
||||||
int SPECIAL_MONSTER_GIFT_ACTIVITY = 101;//灵兽礼包
|
|
||||||
|
|
||||||
int DEMON_TREASURE = 36;//降妖夺宝
|
|
||||||
int NEW_GENERAL_ATTACK = 200;//新将来袭
|
|
||||||
|
|
||||||
int QI_MEN_DUN_JIA = 67;//奇门遁甲
|
int QI_MEN_DUN_JIA = 67;//奇门遁甲
|
||||||
|
int HARD_STAGE_EXERCISE = 68;//山河试炼
|
||||||
int SUPER_BOX = 69;//惊喜礼盒
|
int SUPER_BOX = 69;//惊喜礼盒
|
||||||
|
int TRIAL_EXPERT = 70;//幻境达人
|
||||||
|
int SKIN_RECHARGE_ACTIVITY = 71;
|
||||||
int MISTY_TRIP = 72;//缥缈之旅
|
int MISTY_TRIP = 72;//缥缈之旅
|
||||||
int SUPER_DISCOUNT_SKIN = 73;//特惠神装
|
int SUPER_DISCOUNT_SKIN = 73;//特惠神装
|
||||||
int HERO_STAR = 500;
|
int TRUMP_GACHA_ACTIVITY=74;//天地洪炉(法宝聚灵抽奖活动)
|
||||||
|
|
||||||
int SUPERFUND128 = 78;//超值基金128
|
int SUPERFUND128 = 78;//超值基金128
|
||||||
int SUPERFUND328 = 79;//超值基金328
|
int SUPERFUND328 = 79;//超值基金328
|
||||||
int PREPARE_FIFTEEN_ACTIVITY = 80;//15日登陆预告
|
int PREPARE_FIFTEEN_ACTIVITY = 80;//15日登陆预告
|
||||||
|
@ -114,6 +98,19 @@ public interface ActivityType {
|
||||||
|
|
||||||
int SEVEN_WORLD_TREASURE = 83;//七界秘宝
|
int SEVEN_WORLD_TREASURE = 83;//七界秘宝
|
||||||
int RIDING_SWARD = 84;//御剑飞行
|
int RIDING_SWARD = 84;//御剑飞行
|
||||||
|
int SPECIAL_MONSTER_RANDOM_ACTIVITY = 100;//灵兽宝阁活动
|
||||||
|
int SPECIAL_MONSTER_GIFT_ACTIVITY = 101;//灵兽礼包
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int NEW_GENERAL_ATTACK = 200;//新将来袭
|
||||||
|
int HERO_STAR = 500;
|
||||||
|
int ITEMS_STORE= 6000;//百宝商会
|
||||||
int ITEMS_STORE_NEW = 6001;//新百宝商会
|
int ITEMS_STORE_NEW = 6001;//新百宝商会
|
||||||
|
int SUB_ACTIVITY = 8000;//易经宝库
|
||||||
|
int JADE_DYNASTY_MISSION = 20000;//破阵诛仙任务
|
||||||
|
int JADE_DYNASTY_SHOP = 20001;//破阵诛仙限时商市
|
||||||
|
int JADE_DYNASTY_RARE_SHOP = 20002;//破阵诛仙珍奇宝阁
|
||||||
|
int CHOICE_DRAW_CRAD = 20003;//心愿抽奖(选择抽卡)
|
||||||
|
int LING_LONG_PAVILION = 20005;//玲珑宝阁
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,14 +194,18 @@ public class CrossLingmaiLogic {
|
||||||
|
|
||||||
//TODO 之后删除
|
//TODO 之后删除
|
||||||
public void fixBug(){
|
public void fixBug(){
|
||||||
|
LOGGER.error("lingmaimijing6");
|
||||||
//初始化数据
|
//初始化数据
|
||||||
int crossGroup = GlobleSystemLogic.getInstence().getCrossGroup();
|
int crossGroup = GlobleSystemLogic.getInstence().getCrossGroup();
|
||||||
if (crossGroup == -1) {
|
if (crossGroup == -1) {
|
||||||
|
LOGGER.error("lingmaifenzu:"+crossGroup);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Map<String, LingMaiSecretArea> lingMaiMap1 = RedisUtil.getInstence().getMapValues(RedisKey.CROSS_LINGMAISECRET_INFO, crossGroup + RedisKey.Delimiter_colon + 1, String.class, LingMaiSecretArea.class);
|
Map<String, LingMaiSecretArea> lingMaiMap1 = RedisUtil.getInstence().getMapValues(RedisKey.CROSS_LINGMAISECRET_INFO, crossGroup + RedisKey.Delimiter_colon + 1, String.class, LingMaiSecretArea.class);
|
||||||
Map<String, LingMaiSecretArea> lingMaiMap2 = RedisUtil.getInstence().getMapValues(RedisKey.CROSS_LINGMAISECRET_INFO, crossGroup + RedisKey.Delimiter_colon + 2, String.class, LingMaiSecretArea.class);
|
Map<String, LingMaiSecretArea> lingMaiMap2 = RedisUtil.getInstence().getMapValues(RedisKey.CROSS_LINGMAISECRET_INFO, crossGroup + RedisKey.Delimiter_colon + 2, String.class, LingMaiSecretArea.class);
|
||||||
|
LOGGER.error("lingmaimijing4");
|
||||||
fixBugUpdateLingmaiData(lingMaiMap1,crossGroup,1);
|
fixBugUpdateLingmaiData(lingMaiMap1,crossGroup,1);
|
||||||
|
LOGGER.error("lingmaimijing5");
|
||||||
fixBugUpdateLingmaiData(lingMaiMap2,crossGroup,2);
|
fixBugUpdateLingmaiData(lingMaiMap2,crossGroup,2);
|
||||||
LOGGER.error("lingmaimijing1");
|
LOGGER.error("lingmaimijing1");
|
||||||
//排行榜删除
|
//排行榜删除
|
||||||
|
|
|
@ -485,18 +485,30 @@ public class BuyGoodsNewLogic {
|
||||||
SRechargeCommodityNewConfig configById = SRechargeCommodityNewConfig.getConfigById(bag.getModId());
|
SRechargeCommodityNewConfig configById = SRechargeCommodityNewConfig.getConfigById(bag.getModId());
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
//判断刷新时间
|
//判断刷新时间
|
||||||
if(bag.getRefreshTime() != 0 && bag.getRefreshTime() < System.currentTimeMillis()){
|
long now = TimeUtils.now();
|
||||||
|
if(bag.getRefreshTime() != 0 && bag.getRefreshTime() < now){
|
||||||
bag.refresh();
|
bag.refresh();
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
if(bag.isOpen()){
|
if(bag.isOpen()){
|
||||||
if(bag.getType() != 1 && bag.getEndTime() != 0 && System.currentTimeMillis() > bag.getEndTime()){
|
if(bag.getType() != 1 && bag.getEndTime() != 0 && now > bag.getEndTime()){
|
||||||
bagTimeUp(user,bag);
|
bagTimeUp(user,bag);
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
|
// 月礼包 特殊处理,需要每日都刷新
|
||||||
|
if (configById.getTime() == 8 && configById.getDailyUpdate() == 1) {
|
||||||
|
if (!TimeUtils.isSameDay(now, bag.getStartTime())) {
|
||||||
|
bag.setStartTime(now);
|
||||||
|
if (bag.getBuyTimes() > 0) {
|
||||||
|
bag.setBuyTimes(0);
|
||||||
|
}
|
||||||
|
bag.setOpen(true);
|
||||||
|
result = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
if(bag.getType() == RechargeType.push.getType() && !bag.isOpen()){
|
if(bag.getType() == RechargeType.push.getType() && !bag.isOpen()){
|
||||||
user.getPlayerInfoManager().getNewRechargeInfo().removePush((PushWelfareBag) bag);
|
user.getPlayerInfoManager().getNewRechargeInfo().removePush(bag.getModId());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if(bag.getType() == RechargeType.timeLimit.getType()){
|
if(bag.getType() == RechargeType.timeLimit.getType()){
|
||||||
|
@ -513,7 +525,7 @@ public class BuyGoodsNewLogic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if(bag.getTimeType() == 9){
|
if (bag.getTimeType() == 9) {
|
||||||
boolean init = true;
|
boolean init = true;
|
||||||
for(String[] con : bag.getCondition()){
|
for(String[] con : bag.getCondition()){
|
||||||
if(!judgeOpen(con,user)){
|
if(!judgeOpen(con,user)){
|
||||||
|
@ -528,7 +540,7 @@ public class BuyGoodsNewLogic {
|
||||||
endTime = Long.parseLong(con[2])*1000;
|
endTime = Long.parseLong(con[2])*1000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bag.setStartTime(System.currentTimeMillis());
|
bag.setStartTime(now);
|
||||||
if(endTime != 0){
|
if(endTime != 0){
|
||||||
bag.setEndTime(bag.getStartTime() + endTime);
|
bag.setEndTime(bag.getStartTime() + endTime);
|
||||||
}
|
}
|
||||||
|
@ -537,7 +549,7 @@ public class BuyGoodsNewLogic {
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
boolean open = true;
|
boolean open = true;
|
||||||
if(System.currentTimeMillis() > bag.getStartTime()){
|
if(now > bag.getStartTime()){
|
||||||
for(String[] con : bag.getCondition()){
|
for(String[] con : bag.getCondition()){
|
||||||
if(!judgeOpen(con,user)){
|
if(!judgeOpen(con,user)){
|
||||||
open = false;
|
open = false;
|
||||||
|
@ -586,7 +598,7 @@ public class BuyGoodsNewLogic {
|
||||||
bag.setLastBuyTime(0);
|
bag.setLastBuyTime(0);
|
||||||
bag.setBuyTimes(0);
|
bag.setBuyTimes(0);
|
||||||
if(bag.getType() == RechargeType.push.getType()){
|
if(bag.getType() == RechargeType.push.getType()){
|
||||||
user.getPlayerInfoManager().getNewRechargeInfo().removePush((PushWelfareBag) bag);
|
user.getPlayerInfoManager().getNewRechargeInfo().removePush(bag.getModId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -640,25 +652,70 @@ public class BuyGoodsNewLogic {
|
||||||
User user = UserManager.getUser(uid);
|
User user = UserManager.getUser(uid);
|
||||||
boolean needChange = refreshWelfareState(user);
|
boolean needChange = refreshWelfareState(user);
|
||||||
NewRechargeInfo rechargeInfo = user.getPlayerInfoManager().getNewRechargeInfo();
|
NewRechargeInfo rechargeInfo = user.getPlayerInfoManager().getNewRechargeInfo();
|
||||||
|
Set<Integer> needRemoveIds = new HashSet<>();
|
||||||
for(AbstractWelfareBag bag : rechargeInfo.getPerpetualMap().values()){
|
for(AbstractWelfareBag bag : rechargeInfo.getPerpetualMap().values()){
|
||||||
if(bag.isOpen()){
|
if(bag.isOpen()){
|
||||||
giftGoodsInfoList.add(buildGoodsInfo(bag));
|
CommonProto.GiftGoodsInfo giftGoodsInfo = buildGoodsInfo(bag);
|
||||||
|
if (giftGoodsInfo == null) {
|
||||||
|
needRemoveIds.add(bag.getModId());
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
giftGoodsInfoList.add(giftGoodsInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!needRemoveIds.isEmpty()) {
|
||||||
|
for (Integer needRemoveId : needRemoveIds) {
|
||||||
|
rechargeInfo.removePerpetualMap(needRemoveId);
|
||||||
|
}
|
||||||
|
needRemoveIds.clear();
|
||||||
}
|
}
|
||||||
for(AbstractWelfareBag bag : rechargeInfo.getTimeLimitMap().values()){
|
for(AbstractWelfareBag bag : rechargeInfo.getTimeLimitMap().values()){
|
||||||
if(bag.isOpen()){
|
if(bag.isOpen()){
|
||||||
giftGoodsInfoList.add(buildGoodsInfo(bag));
|
CommonProto.GiftGoodsInfo giftGoodsInfo = buildGoodsInfo(bag);
|
||||||
|
if (giftGoodsInfo == null) {
|
||||||
|
needRemoveIds.add(bag.getModId());
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
giftGoodsInfoList.add(giftGoodsInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!needRemoveIds.isEmpty()) {
|
||||||
|
for (Integer needRemoveId : needRemoveIds) {
|
||||||
|
rechargeInfo.removeTimeLimitMap(needRemoveId);
|
||||||
|
}
|
||||||
|
needRemoveIds.clear();
|
||||||
}
|
}
|
||||||
for(AbstractWelfareBag bag : rechargeInfo.getReceiveMap().values()){
|
for(AbstractWelfareBag bag : rechargeInfo.getReceiveMap().values()){
|
||||||
if(bag.isOpen()){
|
if(bag.isOpen()){
|
||||||
giftGoodsInfoList.add(buildGoodsInfo(bag));
|
CommonProto.GiftGoodsInfo giftGoodsInfo = buildGoodsInfo(bag);
|
||||||
|
if (giftGoodsInfo == null) {
|
||||||
|
needRemoveIds.add(bag.getModId());
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
giftGoodsInfoList.add(giftGoodsInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!needRemoveIds.isEmpty()) {
|
||||||
|
for (Integer needRemoveId : needRemoveIds) {
|
||||||
|
rechargeInfo.removeReceiveMap(needRemoveId);
|
||||||
|
}
|
||||||
|
needRemoveIds.clear();
|
||||||
}
|
}
|
||||||
for(AbstractWelfareBag bag : rechargeInfo.getPushMap().values()){
|
for(AbstractWelfareBag bag : rechargeInfo.getPushMap().values()){
|
||||||
if(bag.isOpen()){
|
if(bag.isOpen()){
|
||||||
giftGoodsInfoList.add(buildGoodsInfo(bag));
|
CommonProto.GiftGoodsInfo giftGoodsInfo = buildGoodsInfo(bag);
|
||||||
|
if (giftGoodsInfo == null) {
|
||||||
|
needRemoveIds.add(bag.getModId());
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
giftGoodsInfoList.add(giftGoodsInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!needRemoveIds.isEmpty()) {
|
||||||
|
for (Integer needRemoveId : needRemoveIds) {
|
||||||
|
rechargeInfo.removePush(needRemoveId);
|
||||||
|
}
|
||||||
|
needRemoveIds.clear();
|
||||||
}
|
}
|
||||||
giftGoodsInfoList.sort((o1, o2) -> {
|
giftGoodsInfoList.sort((o1, o2) -> {
|
||||||
if(o1.getGoodsId() > o2.getGoodsId()){
|
if(o1.getGoodsId() > o2.getGoodsId()){
|
||||||
|
@ -770,6 +827,10 @@ public class BuyGoodsNewLogic {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CommonProto.GiftGoodsInfo buildGoodsInfo(AbstractWelfareBag bag){
|
public static CommonProto.GiftGoodsInfo buildGoodsInfo(AbstractWelfareBag bag){
|
||||||
|
SRechargeCommodityNewConfig configById = SRechargeCommodityNewConfig.getConfigById(bag.getModId());
|
||||||
|
if (configById == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
CommonProto.GiftGoodsInfo.Builder builder = CommonProto.GiftGoodsInfo.newBuilder();
|
CommonProto.GiftGoodsInfo.Builder builder = CommonProto.GiftGoodsInfo.newBuilder();
|
||||||
builder.setGoodsId(bag.getModId());
|
builder.setGoodsId(bag.getModId());
|
||||||
builder.setBuyTimes(bag.getBuyTimes());
|
builder.setBuyTimes(bag.getBuyTimes());
|
||||||
|
|
|
@ -204,9 +204,24 @@ public class NewRechargeInfo extends MongoBase {
|
||||||
updateString("pushMap."+bag.getModId(),bag);
|
updateString("pushMap."+bag.getModId(),bag);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removePush(PushWelfareBag bag){
|
public void removePerpetualMap(int modId){
|
||||||
pushMap.remove(bag.getModId());
|
perpetualMap.remove(modId);
|
||||||
removeString(getMongoKey() + ".pushMap."+bag.getModId());
|
removeString(getMongoKey() + ".perpetualMap."+modId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeTimeLimitMap(int modId){
|
||||||
|
timeLimitMap.remove(modId);
|
||||||
|
removeString(getMongoKey() + ".timeLimitMap."+modId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeReceiveMap(int modId){
|
||||||
|
receiveMap.remove(modId);
|
||||||
|
removeString(getMongoKey() + ".receiveMap."+modId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removePush(int modId){
|
||||||
|
pushMap.remove(modId);
|
||||||
|
removeString(getMongoKey() + ".pushMap."+modId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMainLineLost() {
|
public int getMainLineLost() {
|
||||||
|
|
|
@ -337,7 +337,7 @@ public class MinuteTask extends Thread {
|
||||||
|
|
||||||
//bug 修复
|
//bug 修复
|
||||||
if(w==4){
|
if(w==4){
|
||||||
if(hour ==10 && minute ==20){
|
if(hour ==10 && minute ==50){
|
||||||
LOGGER.error("lingmaimijing0 000000");
|
LOGGER.error("lingmaimijing0 000000");
|
||||||
CrossLingmaiLogic.getInstance().fixBug();
|
CrossLingmaiLogic.getInstance().fixBug();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue