Merge branch 'master_prb_gn' of http://60.1.1.230/backend/jieling_server into master_prb_gn
commit
1253cce600
|
@ -48,10 +48,7 @@ import rpc.protocols.CommonProto;
|
|||
import rpc.protocols.MessageTypeProto;
|
||||
import util.TimeUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class CrossYuxulundaoChallengeHandler extends BaseHandler<ArenaInfoProto.CrossYuXuLunDaoChallengeRequest> {
|
||||
|
@ -326,7 +323,7 @@ public class CrossYuxulundaoChallengeHandler extends BaseHandler<ArenaInfoProto.
|
|||
arenaRecord.setServerName(defServerName);
|
||||
for (int i = 0; i < 3; i++) {
|
||||
//编队为空 判输赢
|
||||
if (!updateResult(myUser,i, myteamId, defTeamId, result)) {
|
||||
if (!updateResult(myUser,i, myteamId, defTeamId, result,csPlayer,crossArenaManager,arenaRecord)) {
|
||||
continue;
|
||||
}
|
||||
CommonProto.FightTeamInfo fightTeamInfo = FightUtil.makePersonFightData(myUser, myteamId[i], null, null);
|
||||
|
@ -359,7 +356,7 @@ public class CrossYuxulundaoChallengeHandler extends BaseHandler<ArenaInfoProto.
|
|||
return result;
|
||||
}
|
||||
|
||||
public static boolean updateResult(User user,int i, int[] myteamId, int[] defTeamId, int[] result) {
|
||||
public static boolean updateResult(User user,int i, int[] myteamId, int[] defTeamId, int[] result,CSPlayer csPlayer,CrossArenaManager crossArenaManager, ArenaRecord arenaRecord) throws Exception{
|
||||
/*if (myteamId[i] == 0 || defTeamId[i] == 0) {
|
||||
if (myteamId[i] == 0 && defTeamId[i] == 0) {
|
||||
result[i] = 0;
|
||||
|
@ -372,6 +369,24 @@ public class CrossYuxulundaoChallengeHandler extends BaseHandler<ArenaInfoProto.
|
|||
}
|
||||
return false;
|
||||
}*/
|
||||
//没有队伍时候 直接断定对方赢
|
||||
Map<Integer, List<TeamPosHeroInfo>> teamPosForHero = user.getTeamPosManager().getTeamPosForHero();
|
||||
if(!teamPosForHero.containsKey(myteamId[i]) || teamPosForHero.get(myteamId[i]).size() == 0){
|
||||
result[i] = 0;
|
||||
if (GameApplication.serverId == csPlayer.getServerId()) {
|
||||
User defuser = UserManager.getUser(csPlayer.getUserId());
|
||||
int addforce = HeroLogic.getInstance().calTeamTotalForce(defuser, myteamId[i], false);
|
||||
arenaRecord.getYxldDefForce().add(addforce);
|
||||
}else{
|
||||
List<com.ljsd.jieling.thrift.idl.TeamPosHeroInfo> teamPosHeroInfos = crossArenaManager.getTeams().getOrDefault(myteamId[i], new ArrayList<>());
|
||||
int addforcerpc = crossArenaManager.getTotalForceByTeam().get(myteamId[i]);
|
||||
arenaRecord.getYxldDefForce().add(addforcerpc);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public static boolean updateResult(User user,int i, int[] myteamId, int[] defTeamId, int[] result){
|
||||
//没有队伍时候 直接断定对方赢
|
||||
Map<Integer, List<TeamPosHeroInfo>> teamPosForHero = user.getTeamPosManager().getTeamPosForHero();
|
||||
if(!teamPosForHero.containsKey(myteamId[i]) || teamPosForHero.get(myteamId[i]).size() == 0){
|
||||
|
@ -380,7 +395,6 @@ public class CrossYuxulundaoChallengeHandler extends BaseHandler<ArenaInfoProto.
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public int[] getFightResultByPersonToRobot(User myUser, int defUserUid, int[] myteamId, int[] defTeamId, ArenaInfoProto.CrossYuXuLunDaoChallengeResponse.Builder builder) throws Exception {
|
||||
int[] result = new int[3];//1赢 0输
|
||||
for (int i = 0; i < 3; i++) {
|
||||
|
|
|
@ -66,7 +66,7 @@ public enum ActivityTypeEnum {
|
|||
DEMON_TREASURE(ActivityType.DEMON_TREASURE,LimitRandomSpecialMonsterActivity::new),
|
||||
NEW_GENERAL_ATTACK(ActivityType.NEW_GENERAL_ATTACK,DefaultEmptyActivity::new),
|
||||
GOOD_LUCK(ActivityType.GOOD_LUCK,DefaultEmptyActivity::new),
|
||||
COW_FLY_SKY(ActivityType.COW_FLY_SKY,CowFlySkyActivity::new),
|
||||
COW_FLY_SKY(ActivityType.COW_FLY_SKY,CowFlySkyActivity::new),//牛气冲天
|
||||
FIFTEEN_LOGIN(ActivityType.FIFTEEN_LOGIN,FifteenActivity::new),
|
||||
LUCKY_GET(ActivityType.LUCKY_GET,LuckyGetActivity::new),
|
||||
EQUIP_UPLEVEL(ActivityType.EQUIP_UPLEVEL,EquipUpLevelActivity::new),
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.ljsd.jieling.logic.activity;
|
||||
|
||||
import com.ljsd.GameApplication;
|
||||
import com.ljsd.jieling.jbean.ActivityMission;
|
||||
import com.ljsd.jieling.jbean.ActivityProgressInfo;
|
||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||
|
@ -7,6 +8,7 @@ import com.ljsd.jieling.logic.dao.UserManager;
|
|||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import config.SActivityRewardConfig;
|
||||
import config.SGlobalActivity;
|
||||
|
||||
/**
|
||||
* Created by zsx on 2019/8/5 19:20
|
||||
|
@ -15,6 +17,10 @@ class RechargeSumActivity extends AbstractActivity {
|
|||
|
||||
@Override
|
||||
public void onResume(User user) throws Exception {
|
||||
boolean open = SGlobalActivity.checkActivityIfOpen(id, user.getPlayerInfoManager().getCreateTime(), GameApplication.serverConfig.getCacheOpenTime());
|
||||
if (!open){
|
||||
return;
|
||||
}
|
||||
//补发前日未领取的奖
|
||||
ISession sessionByUid = OnlineUserManager.getSessionByUid(user.getId());
|
||||
takeAllReward(sessionByUid);
|
||||
|
|
|
@ -367,17 +367,23 @@ public class CrossYuxulundaoLogic {
|
|||
|
||||
|
||||
public static CommonProto.crossYxldPlayerRecordInfo getCrossYxldPlayerRecordInfo(int uid,ArenaRecord arenaRecord,boolean isSend) throws Exception {
|
||||
CommonProto.FightData fightDataProto1 = null;
|
||||
CommonProto.FightData fightDataProto2 = null;
|
||||
CommonProto.FightData fightDataProto3 = null;
|
||||
CommonProto.FightData fightDataProto1 ;
|
||||
CommonProto.FightData fightDataProto2 ;
|
||||
CommonProto.FightData fightDataProto3;
|
||||
if(arenaRecord.getYxldFightData1() != null){
|
||||
fightDataProto1 = CommonProto.FightData.parseFrom(arenaRecord.getYxldFightData1());
|
||||
}else{
|
||||
fightDataProto1 = CommonProto.FightData.newBuilder().build();
|
||||
}
|
||||
if(arenaRecord.getYxldFightData2() != null){
|
||||
fightDataProto2 = CommonProto.FightData.parseFrom(arenaRecord.getYxldFightData2());
|
||||
}else{
|
||||
fightDataProto2 = CommonProto.FightData.newBuilder().build();
|
||||
}
|
||||
if(arenaRecord.getYxldFightData3() != null){
|
||||
fightDataProto3 = CommonProto.FightData.parseFrom(arenaRecord.getYxldFightData3());
|
||||
}else{
|
||||
fightDataProto3 = CommonProto.FightData.newBuilder().build();
|
||||
}
|
||||
List<Integer> result = null;//
|
||||
if (arenaRecord.getYxldResult() == null) {
|
||||
|
@ -389,6 +395,7 @@ public class CrossYuxulundaoLogic {
|
|||
result = Arrays.stream(arenaRecord.getYxldResult()).boxed().collect(Collectors.toList());
|
||||
}
|
||||
if(isSend){
|
||||
|
||||
CSPlayer csPlayer = CrossServiceLogic.getPlayerByRedis(uid);
|
||||
CSPlayer defPlayer = CrossServiceLogic.getPlayerByRedis(arenaRecord.getDefUid());
|
||||
String myServerName = CrossDeathPathLogic.getInstance().getServerNameByDeathPath(csPlayer.getServerId());
|
||||
|
|
|
@ -132,7 +132,7 @@ public class SGlobalActivity implements BaseConfig {
|
|||
case 4:
|
||||
// 在某某时间之后开服不会出现
|
||||
long timeOpen4 = TimeUtils.stringToTimeLong(String.valueOf(ifOpen[1]), TimeUtils.ymdFormat);
|
||||
if (value[1] != 0 && value[1] > timeOpen4){
|
||||
if (value[1] != 0 && value[1] >= timeOpen4){
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue