法宝、公会战无尽副本修改
parent
a533fd4c1a
commit
9eb7a469ff
|
@ -11,6 +11,7 @@ import com.ljsd.jieling.handler.map.MapLogic;
|
|||
import com.ljsd.jieling.logic.GlobalDataManaager;
|
||||
import com.ljsd.jieling.logic.STableManager;
|
||||
import com.ljsd.jieling.logic.activity.ActivityLogic;
|
||||
import com.ljsd.jieling.logic.dao.GuilidManager;
|
||||
import com.ljsd.jieling.logic.dao.MailingSystemManager;
|
||||
import com.ljsd.jieling.logic.fight.CheckFight;
|
||||
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||
|
@ -84,7 +85,7 @@ public class GameApplication {
|
|||
|
||||
//http线程池初始化
|
||||
// HttpPool.init();
|
||||
|
||||
GuilidManager.init();
|
||||
STableManager.initialize("com.ljsd.jieling.config");
|
||||
//mongo异步数据处理线程
|
||||
MongoDataHandlerTask.init(configurableApplicationContext);
|
||||
|
|
|
@ -1282,10 +1282,13 @@ public class MapLogic {
|
|||
}
|
||||
List<TeamPosHeroInfo> team = user.getTeamPosManager().getTeamPosForHero().get(teamId);
|
||||
for (TeamPosHeroInfo teamPosHeroInfo : team) {
|
||||
if(mapManager.getHeroAllAttributeMap().get(teamPosHeroInfo.getHeroId()).get(HeroAttributeEnum.Hp.getPropertyId())<checkResult[teamPosHeroInfo.getPosition()+1]){
|
||||
continue;
|
||||
Map<Integer, Integer> heroAttr = mapManager.getHeroAllAttributeMap().get(teamPosHeroInfo.getHeroId());
|
||||
if(heroAttr!=null){
|
||||
if(heroAttr.get(HeroAttributeEnum.Hp.getPropertyId())<checkResult[teamPosHeroInfo.getPosition()+1]){
|
||||
continue;
|
||||
}
|
||||
mapManager.updateHeroOneAttribute(teamPosHeroInfo.getHeroId(), HeroAttributeEnum.CurHP.getPropertyId(), checkResult[teamPosHeroInfo.getPosition()+1]);
|
||||
}
|
||||
mapManager.updateHeroOneAttribute(teamPosHeroInfo.getHeroId(), HeroAttributeEnum.CurHP.getPropertyId(), checkResult[teamPosHeroInfo.getPosition()+1]);
|
||||
}
|
||||
if(SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId()).getType()==4&&teamId==401){
|
||||
for (int i = 0 ; i <team.size();i++) {
|
||||
|
|
|
@ -209,7 +209,6 @@ public class GlobalDataManaager {
|
|||
DataManagerDistributor.init();
|
||||
initServerIsLanEnviornment(configurableApplicationContext);
|
||||
StoreLogic.checkGlobalStore(true);
|
||||
GuilidManager.init();
|
||||
new RPCServerTask(configurableApplicationContext).start();
|
||||
new RPCGmServerTask(configurableApplicationContext).start();
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -58,8 +58,9 @@ public class BloodLogic {
|
|||
HeroManager heroManager = user.getHeroManager();
|
||||
TeamPosManager teamPosManager = user.getTeamPosManager();
|
||||
List<TeamPosHeroInfo> teamPosHeroInfos = teamPosManager.getTeamPosForHero().get(teamId);
|
||||
if(teamPosHeroInfos==null){
|
||||
if(teamPosHeroInfos==null||teamPosHeroInfos.size()<1){
|
||||
teamPosHeroInfos = teamPosManager.getTeamPosForHero().get(1);
|
||||
teamId = 1;
|
||||
}
|
||||
Iterator<TeamPosHeroInfo> it = teamPosHeroInfos.iterator();
|
||||
Map<String, FamilyHeroInfo> heroAllAttribute = new HashMap<>();
|
||||
|
|
|
@ -122,8 +122,8 @@ public class EquipManager extends MongoBase {
|
|||
if(especialEquip ==null){
|
||||
return;
|
||||
}
|
||||
updateString("especialEquipMap."+equipId+".star",especialEquip.getStar()+1);
|
||||
especialEquip.setStar(especialEquip.getStar()+1);
|
||||
especialEquipMap.put(equipId,especialEquip);
|
||||
updateString("especialEquipMap."+equipId+".star",especialEquip.getStar()+1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -483,7 +483,7 @@ public class GuildFightLogic {
|
|||
public static void getFamilyFightRoundInfo(ISession session, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
RedisUtil redisUtil = RedisUtil.getInstence();
|
||||
int enemyFamily = getEnemyFamily(UserManager.getUser(session.getUid()).getPlayerInfoManager().getGuildId());
|
||||
Integer attackCount = redisUtil.getMapEntry(RedisKey.FAMILY_FIGHT_ATTACK_COUNT,"",session.getId(),Integer.class);
|
||||
Integer attackCount = redisUtil.getMapEntry(RedisKey.FAMILY_FIGHT_ATTACK_COUNT,"",String.valueOf(session.getUid()),Integer.class);
|
||||
if(attackCount==null){
|
||||
attackCount = 0;
|
||||
}
|
||||
|
@ -663,7 +663,7 @@ public class GuildFightLogic {
|
|||
//战绩结算
|
||||
int getExp = 0;
|
||||
Double rank = redisUtil.getZSetScore(RedisKey.FAMILY_FIGHT_RANK, "", str);
|
||||
// rank+=7000;
|
||||
rank+=7000;
|
||||
for(Map.Entry<Integer, SGuildScoreConfig> entry:sGuildScoreConfigMap.entrySet()){
|
||||
if(rank<entry.getValue().getScoreMin()||rank>entry.getValue().getScoreMax()){
|
||||
continue;
|
||||
|
@ -848,24 +848,37 @@ public class GuildFightLogic {
|
|||
timeRound = sGuildSetting.getPrepareTime();
|
||||
if(status==0){
|
||||
LOGGER.info("阶段变为布防");
|
||||
Map<Integer, GuildInfo> guildInfoMap = GuilidManager.guildInfoMap;
|
||||
if(guildInfoMap!=null&&guildInfoMap.size()>0){
|
||||
for(Map.Entry<Integer, GuildInfo> entry:guildInfoMap.entrySet()){
|
||||
int build = 0;
|
||||
Map<Integer, Set<Integer>> members = entry.getValue().getMembers();
|
||||
for(Map.Entry<Integer, Set<Integer>> member:members.entrySet()){
|
||||
for(Integer uid:member.getValue()){
|
||||
entry.getValue().updateDefendInfo(uid,build%3+1);
|
||||
build=build%3+1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
status = 1;
|
||||
}
|
||||
}else if(flagTimeRound(sGuildSetting.getMatchTime(),hour,minute)){
|
||||
timeRound = sGuildSetting.getMatchTime();
|
||||
if(status==1){
|
||||
if(status!=2){
|
||||
status = 2;
|
||||
LOGGER.info("阶段变为匹配");
|
||||
startMatching = true;
|
||||
}
|
||||
startMatching = true;
|
||||
}else if(flagTimeRound(sGuildSetting.getBattleTime(),hour,minute)){
|
||||
timeRound = sGuildSetting.getBattleTime();
|
||||
if(status == 2){
|
||||
if(status != 3){
|
||||
status = 3;
|
||||
LOGGER.info("阶段变为进攻");
|
||||
}
|
||||
}else if(flagTimeRound(sGuildSetting.getSettleTime(),hour,minute)){
|
||||
timeRound = sGuildSetting.getSettleTime();
|
||||
if(status==3){
|
||||
if(status!=4){
|
||||
accountFamilyFightResult();
|
||||
MongoUtil.getLjsdMongoTemplate().lastUpdate();
|
||||
status = 4;
|
||||
|
|
|
@ -374,6 +374,11 @@ public class HeroLogic {
|
|||
for(Map.Entry<Integer, List<TeamPosHeroInfo>> item :teamPosForHero.entrySet()){
|
||||
int teamId = item.getKey();
|
||||
List<TeamPosHeroInfo> teamPosHeroInfoList = item.getValue();
|
||||
if(teamId==501){
|
||||
if(teamPosHeroInfoList==null|teamPosHeroInfoList.size()<1){
|
||||
teamPosHeroInfoList = teamPosForHero.get(1);
|
||||
}
|
||||
}
|
||||
List<TeamPosForPokenInfo> teamPosForPokenInfos = teamPosForPoken.get(teamId);
|
||||
if(null == teamPosForPokenInfos){
|
||||
teamPosForPokenInfos = new ArrayList<>(1);
|
||||
|
@ -1368,9 +1373,16 @@ public class HeroLogic {
|
|||
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.EQUIP_WEAR_RESPONSE.getNumber(),"法宝智能穿戴一个");
|
||||
}else{
|
||||
int[] equipTalismanaUnlock = SGameSetting.getGameSetting().getEquipTalismanaUnlock();
|
||||
if(user.getPlayerInfoManager().getLevel()<equipTalismanaUnlock[0]||hero.getLevel()<equipTalismanaUnlock[1]){
|
||||
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.EQUIP_WEAR_RESPONSE.getNumber(),"玩家等级或妖灵师等级不够,无法装备!");
|
||||
return;
|
||||
if(equipTalismanaUnlock[0]==1){
|
||||
if(user.getPlayerInfoManager().getLevel()<equipTalismanaUnlock[0]){
|
||||
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.EQUIP_WEAR_RESPONSE.getNumber(),"玩家等级不够,无法装备!");
|
||||
return;
|
||||
}
|
||||
}else{
|
||||
if(hero.getStar()<equipTalismanaUnlock[1]){
|
||||
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.EQUIP_WEAR_RESPONSE.getNumber(),"妖灵师等级不够,无法装备!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
hero.updateEspecial(equipIds.get(0));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue