Merge branch 'master_online_hw' into master_test_hw

# Conflicts:
#	serverlogic/src/main/java/com/ljsd/jieling/kefu/Cmd_review_gm.java
#	serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsLogic.java
lvxinran 2020-12-15 17:00:45 +08:00
commit 79d99139fe
4 changed files with 45 additions and 18 deletions

View File

@ -50,18 +50,25 @@ public class GetCarChallengeListHandler extends BaseHandler {
int zsetSize = RedisUtil.getInstence().getZsetSize(key); int zsetSize = RedisUtil.getInstence().getZsetSize(key);
List<ZsetTypedTupleWithRank> beforeList = new ArrayList<>(5); List<ZsetTypedTupleWithRank> beforeList = new ArrayList<>(5);
List<ZsetTypedTupleWithRank> afterList = new ArrayList<>(5); List<ZsetTypedTupleWithRank> afterList = new ArrayList<>(5);
int maxWhile = 30;//最大匹配循环次数
if(myRank == -1){ if(myRank == -1){
int start = zsetSize - matchNums; int end = 0;
if(start<0){ while(end<maxWhile&&beforeList.size()<matchNums){
start=0;
Set<ZSetOperations.TypedTuple<String>> beforeScore = RedisUtil.getInstence().getZsetreverseRangeWithScores(RedisKey.CAR_DEALY_RANK, "", zsetSize-end , zsetSize-end );
if(!beforeScore.isEmpty()){
ZSetOperations.TypedTuple<String> beforeNext = beforeScore.iterator().next();
if(!members.contains(Integer.parseInt(beforeNext.getValue()))){
beforeList.add(new ZsetTypedTupleWithRank(beforeNext,zsetSize-end+1));
}
}
end++;
} }
int end=-1; // process(start,end,members,matchNums,infos);
process(start,end,members,matchNums,infos);
}else{ }else{
int i = myRank-1; int i = myRank-1;
int j = myRank+1; int j = myRank+1;
int maxWhile = 30;//最大匹配循环次数
while(i>0||j<=zsetSize){ while(i>0||j<=zsetSize){
if(i>0){ if(i>0){

View File

@ -76,7 +76,10 @@ public class Cmd_review_gm extends GmAbstract {
if (defMemberInfo.getType() == 0) { if (defMemberInfo.getType() == 0) {
FamilyFightInfo fightInfo = defMemberInfo.getFightInfo(); FamilyFightInfo fightInfo = defMemberInfo.getFightInfo();
pvpFightEvent.setDefFightSnapData(new DefFightSnapData(fightInfo.getHeroAttribute(), fightInfo.getHeroSkills(), fightInfo.getPokenmonSkills(), fightInfo.getPassiveSkills())); //<<<<<<< HEAD
// pvpFightEvent.setDefFightSnapData(new DefFightSnapData(fightInfo.getHeroAttribute(), fightInfo.getHeroSkills(), fightInfo.getPokenmonSkills(), fightInfo.getPassiveSkills()));
//=======
pvpFightEvent.setDefFightSnapData(new DefFightSnapData(fightInfo.getHeroAttribute(), fightInfo.getHeroSkills(), fightInfo.getPokenmonSkills(), fightInfo.getPassiveSkills(), defUid));
defForce = fightInfo.getForce(); defForce = fightInfo.getForce();
} else { } else {
SArenaRobotConfig sArenaRobotConfig = SArenaRobotConfig.getsArenaRobotConfigById(defUid); SArenaRobotConfig sArenaRobotConfig = SArenaRobotConfig.getsArenaRobotConfigById(defUid);
@ -86,7 +89,10 @@ public class Cmd_review_gm extends GmAbstract {
} }
if (attackMemberInfo.getType() == 0) { if (attackMemberInfo.getType() == 0) {
FamilyFightInfo fightInfo = attackMemberInfo.getFightInfo(); FamilyFightInfo fightInfo = attackMemberInfo.getFightInfo();
pvpFightEvent.setAttackFightSnapData(new DefFightSnapData(fightInfo.getHeroAttribute(), fightInfo.getHeroSkills(), fightInfo.getPokenmonSkills(), fightInfo.getPassiveSkills())); //<<<<<<< HEAD
// pvpFightEvent.setAttackFightSnapData(new DefFightSnapData(fightInfo.getHeroAttribute(), fightInfo.getHeroSkills(), fightInfo.getPokenmonSkills(), fightInfo.getPassiveSkills()));
//=======
pvpFightEvent.setAttackFightSnapData(new DefFightSnapData(fightInfo.getHeroAttribute(), fightInfo.getHeroSkills(), fightInfo.getPokenmonSkills(), fightInfo.getPassiveSkills(), attackId));
minForce = fightInfo.getForce(); minForce = fightInfo.getForce();
} else { } else {
SArenaRobotConfig sArenaRobotConfig = SArenaRobotConfig.getsArenaRobotConfigById(attackId); SArenaRobotConfig sArenaRobotConfig = SArenaRobotConfig.getsArenaRobotConfigById(attackId);
@ -117,13 +123,19 @@ public class Cmd_review_gm extends GmAbstract {
deffightTeamInfo = FightUtil.makePersonFightData(defInMem, pvpFightEvent.getDefTeamId(),null,null); deffightTeamInfo = FightUtil.makePersonFightData(defInMem, pvpFightEvent.getDefTeamId(),null,null);
}else{ }else{
deffightTeamInfo = FightUtil. makeRobotFightData(pvpFightEvent.getDefUid()); deffightTeamInfo = FightUtil. makeRobotFightData(pvpFightEvent.getDefUid());
// deffightTeamInfo = FightUtil. makeRobotFightData(pvpFightEvent.getDefUid());
} }
} }
if(fightTeamInfo==null){ if(fightTeamInfo==null){
if( pvpFightEvent.getFightType()!= GameFightType.TOPArena2RobotFight){ //<<<<<<< HEAD
// if( pvpFightEvent.getFightType()!= GameFightType.TOPArena2RobotFight){
// if( SArenaRobotConfig.getsArenaRobotConfigById(pvpFightEvent.getAttackUid()) !=null){
// fightTeamInfo = FightUtil. makeRobotFightData(pvpFightEvent.getAttackUid());
//=======
if( pvpFightEvent.getFightType()!=GameFightType.TOPArena2RobotFight){
if( SArenaRobotConfig.getsArenaRobotConfigById(pvpFightEvent.getAttackUid()) !=null){ if( SArenaRobotConfig.getsArenaRobotConfigById(pvpFightEvent.getAttackUid()) !=null){
fightTeamInfo = FightUtil. makeRobotFightData(pvpFightEvent.getAttackUid()); fightTeamInfo =FightUtil. makeRobotFightData(pvpFightEvent.getAttackUid());
}else{ }else{
User userInMem = UserManager.getUserInMem(pvpFightEvent.getAttackUid()); User userInMem = UserManager.getUserInMem(pvpFightEvent.getAttackUid());
fightTeamInfo = FightUtil.makePersonFightData(userInMem, pvpFightEvent.getTeamId(),pvpFightEvent.getAttackBloodMap(),null); fightTeamInfo = FightUtil.makePersonFightData(userInMem, pvpFightEvent.getTeamId(),pvpFightEvent.getAttackBloodMap(),null);

View File

@ -309,8 +309,11 @@ public class PlayerLogic {
Set<Integer> fixVipId = new HashSet<>(); Set<Integer> fixVipId = new HashSet<>();
for(Map.Entry<Integer,VipInfo> vipInfoItem : vipInfo.entrySet()){ for(Map.Entry<Integer,VipInfo> vipInfoItem : vipInfo.entrySet()){
//如果这个权限是活动 且永久了 那么需要修复 //如果这个权限是活动 且永久了 那么需要修复
if(vipInfoItem.getValue().getEffectTime()==0&&SPrivilegeTypeConfig.getsPrivilegeTypeConfigMap().get(vipInfoItem.getKey()).getUnlockType()==5){ if(vipInfoItem.getValue().getEffectTime()==0){
fixVipId.add(vipInfoItem.getKey()); int unlockType = SPrivilegeTypeConfig.getsPrivilegeTypeConfigMap().get(vipInfoItem.getKey()).getUnlockType();
if(unlockType==5||(unlockType==4&&SPrivilegeTypeConfig.getsPrivilegeTypeConfigMap().get(vipInfoItem.getKey()).getContinueTime().length>0)){
fixVipId.add(vipInfoItem.getKey());
}
} }
if(vipInfoItem.getValue().getEffectTime()!=0 && vipInfoItem.getValue().getEffectTime()<=(TimeUtils.now()/1000)){ if(vipInfoItem.getValue().getEffectTime()!=0 && vipInfoItem.getValue().getEffectTime()<=(TimeUtils.now()/1000)){
if(SPrivilegeTypeConfig.getsPrivilegeTypeConfigMap().get(vipInfoItem.getKey()).getPrivilegeType()==VipPrivilegeType.ADVENTURE_BASE_REWARD){ if(SPrivilegeTypeConfig.getsPrivilegeTypeConfigMap().get(vipInfoItem.getKey()).getPrivilegeType()==VipPrivilegeType.ADVENTURE_BASE_REWARD){

View File

@ -966,15 +966,20 @@ public class BuyGoodsLogic {
} }
} }
// if (sRechargeCommodityConfig.getTime() == 6) {
// if (rechargeInfo.getDyGoodsCanBuyTimes().containsKey(sRechargeCommodityConfig.getId())&&rechargeInfo.getRefreshBagMap().containsKey(sRechargeCommodityConfig.getId())) {
// long endTime = rechargeInfo.getRefreshBagMap().get(sRechargeCommodityConfig.getId());
// if (now > endTime || rechargeInfo.getDyGoodsCanBuyTimes().get(sRechargeCommodityConfig.getId()) <= 0) {
// continue;
// }
// }
// }
if (sRechargeCommodityConfig.getTime() == 6) { if (sRechargeCommodityConfig.getTime() == 6) {
if (rechargeInfo.getDyGoodsCanBuyTimes().containsKey(sRechargeCommodityConfig.getId())&&rechargeInfo.getRefreshBagMap().containsKey(sRechargeCommodityConfig.getId())) { int dytime = rechargeInfo.getDyGoodsCanBuyTimes().getOrDefault(goodsId,0)-1;
long endTime = rechargeInfo.getRefreshBagMap().get(sRechargeCommodityConfig.getId()); if(dytime <0){
if (now > endTime || rechargeInfo.getDyGoodsCanBuyTimes().get(sRechargeCommodityConfig.getId()) <= 0) { continue;
continue;
}
} }
} }
} }
long startTime=0; long startTime=0;