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
commit
79d99139fe
|
@ -50,18 +50,25 @@ public class GetCarChallengeListHandler extends BaseHandler {
|
|||
int zsetSize = RedisUtil.getInstence().getZsetSize(key);
|
||||
List<ZsetTypedTupleWithRank> beforeList = new ArrayList<>(5);
|
||||
List<ZsetTypedTupleWithRank> afterList = new ArrayList<>(5);
|
||||
int maxWhile = 30;//最大匹配循环次数
|
||||
if(myRank == -1){
|
||||
int start = zsetSize - matchNums;
|
||||
if(start<0){
|
||||
start=0;
|
||||
int end = 0;
|
||||
while(end<maxWhile&&beforeList.size()<matchNums){
|
||||
|
||||
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));
|
||||
}
|
||||
int end=-1;
|
||||
process(start,end,members,matchNums,infos);
|
||||
}
|
||||
end++;
|
||||
}
|
||||
// process(start,end,members,matchNums,infos);
|
||||
}else{
|
||||
int i = myRank-1;
|
||||
int j = myRank+1;
|
||||
|
||||
int maxWhile = 30;//最大匹配循环次数
|
||||
while(i>0||j<=zsetSize){
|
||||
|
||||
if(i>0){
|
||||
|
|
|
@ -76,7 +76,10 @@ public class Cmd_review_gm extends GmAbstract {
|
|||
|
||||
if (defMemberInfo.getType() == 0) {
|
||||
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();
|
||||
} else {
|
||||
SArenaRobotConfig sArenaRobotConfig = SArenaRobotConfig.getsArenaRobotConfigById(defUid);
|
||||
|
@ -86,7 +89,10 @@ public class Cmd_review_gm extends GmAbstract {
|
|||
}
|
||||
if (attackMemberInfo.getType() == 0) {
|
||||
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();
|
||||
} else {
|
||||
SArenaRobotConfig sArenaRobotConfig = SArenaRobotConfig.getsArenaRobotConfigById(attackId);
|
||||
|
@ -117,13 +123,19 @@ public class Cmd_review_gm extends GmAbstract {
|
|||
deffightTeamInfo = FightUtil.makePersonFightData(defInMem, pvpFightEvent.getDefTeamId(),null,null);
|
||||
}else{
|
||||
deffightTeamInfo = FightUtil. makeRobotFightData(pvpFightEvent.getDefUid());
|
||||
// deffightTeamInfo = FightUtil. makeRobotFightData(pvpFightEvent.getDefUid());
|
||||
}
|
||||
|
||||
}
|
||||
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){
|
||||
fightTeamInfo = FightUtil. makeRobotFightData(pvpFightEvent.getAttackUid());
|
||||
fightTeamInfo =FightUtil. makeRobotFightData(pvpFightEvent.getAttackUid());
|
||||
}else{
|
||||
User userInMem = UserManager.getUserInMem(pvpFightEvent.getAttackUid());
|
||||
fightTeamInfo = FightUtil.makePersonFightData(userInMem, pvpFightEvent.getTeamId(),pvpFightEvent.getAttackBloodMap(),null);
|
||||
|
|
|
@ -309,9 +309,12 @@ public class PlayerLogic {
|
|||
Set<Integer> fixVipId = new HashSet<>();
|
||||
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){
|
||||
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(SPrivilegeTypeConfig.getsPrivilegeTypeConfigMap().get(vipInfoItem.getKey()).getPrivilegeType()==VipPrivilegeType.ADVENTURE_BASE_REWARD){
|
||||
CombatLogic.getInstance().getNewAdventureReward(user,true,vipInfoItem.getValue().getEffectTime());
|
||||
|
|
|
@ -966,17 +966,22 @@ 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 (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) {
|
||||
int dytime = rechargeInfo.getDyGoodsCanBuyTimes().getOrDefault(goodsId,0)-1;
|
||||
if(dytime <0){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
long startTime=0;
|
||||
long endTime=0;
|
||||
int dybuytime = 0;
|
||||
|
|
Loading…
Reference in New Issue