无尽修改N。。。
parent
4f39ea2210
commit
b52d314375
|
@ -1,8 +1,8 @@
|
||||||
package com.ljsd.jieling.globals;
|
package com.ljsd.jieling.globals;
|
||||||
|
|
||||||
public interface Global {
|
public interface Global {
|
||||||
|
int EXECUTION = 1;//行动力id
|
||||||
int STAMINA = 2; // 体力id
|
int STAMINA = 2; // 体力id
|
||||||
int EXECUTION = 3;//行动力id
|
|
||||||
int DROP = 53;//水滴
|
int DROP = 53;//水滴
|
||||||
int HEROSTORY_TICKET = 28; //精英入场券
|
int HEROSTORY_TICKET = 28; //精英入场券
|
||||||
int GENERALSTORY_TICKET = 27; //普通入场券
|
int GENERALSTORY_TICKET = 27; //普通入场券
|
||||||
|
|
|
@ -1553,19 +1553,19 @@ public class MapLogic {
|
||||||
cacheRemove.add(hero.getId());
|
cacheRemove.add(hero.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!cacheRemove.isEmpty()){
|
// if(!cacheRemove.isEmpty()){
|
||||||
Iterator<TeamPosHeroInfo> iterator = team.iterator();
|
// Iterator<TeamPosHeroInfo> iterator = team.iterator();
|
||||||
while (iterator.hasNext()){
|
// while (iterator.hasNext()){
|
||||||
TeamPosHeroInfo next = iterator.next();
|
// TeamPosHeroInfo next = iterator.next();
|
||||||
if(cacheRemove.contains(next.getHeroId())){
|
// if(cacheRemove.contains(next.getHeroId())){
|
||||||
if(mapManager.getHeroAllAttributeMap().containsKey(next.getHeroId())){
|
// if(mapManager.getHeroAllAttributeMap().containsKey(next.getHeroId())){
|
||||||
mapManager.removeOneHeroAttribute(next.getHeroId());
|
// mapManager.removeOneHeroAttribute(next.getHeroId());
|
||||||
}
|
// }
|
||||||
iterator.remove();
|
// iterator.remove();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
user.getTeamPosManager().updateTeamPosByTeamId(teamId,team);
|
// user.getTeamPosManager().updateTeamPosByTeamId(teamId,team);
|
||||||
}
|
// }
|
||||||
}else{
|
}else{
|
||||||
for (TeamPosHeroInfo teamPosHeroInfo : team) {
|
for (TeamPosHeroInfo teamPosHeroInfo : team) {
|
||||||
mapManager.updateHeroOneAttribute(teamPosHeroInfo.getHeroId(), HeroAttributeEnum.CurHP.getPropertyId(), checkResult[teamPosHeroInfo.getPosition()+1]);
|
mapManager.updateHeroOneAttribute(teamPosHeroInfo.getHeroId(), HeroAttributeEnum.CurHP.getPropertyId(), checkResult[teamPosHeroInfo.getPosition()+1]);
|
||||||
|
@ -3139,8 +3139,31 @@ public class MapLogic {
|
||||||
}
|
}
|
||||||
endlessMapInfo.setEndlessHeroInfo(endlessHeroInfo);
|
endlessMapInfo.setEndlessHeroInfo(endlessHeroInfo);
|
||||||
mapManager.setEndlessMapInfo(endlessMapInfo);
|
mapManager.setEndlessMapInfo(endlessMapInfo);
|
||||||
// List<TeamPosHeroInfo> team = user.getTeamPosManager().getTeamPosForHero().get(401);
|
List<TeamPosHeroInfo> team = user.getTeamPosManager().getTeamPosForHero().get(401);
|
||||||
// if(team!=null&&team.size()>0){
|
if(team!=null&&team.size()>0){
|
||||||
|
Set<String> cacheRemove = new HashSet<>();
|
||||||
|
Map<String, Map<Integer, Integer>> heroAllAttributeMap = mapManager.getHeroAllAttributeMap();
|
||||||
|
if(heroAllAttributeMap !=null){
|
||||||
|
for(Map.Entry<String, Map<Integer, Integer>> entry:heroAllAttributeMap.entrySet()){
|
||||||
|
if(entry.getValue().get(HeroAttributeEnum.CurHP.getPropertyId())==0){
|
||||||
|
cacheRemove.add(entry.getKey());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!cacheRemove.isEmpty()){
|
||||||
|
Iterator<TeamPosHeroInfo> iterator = team.iterator();
|
||||||
|
while (iterator.hasNext()){
|
||||||
|
TeamPosHeroInfo next = iterator.next();
|
||||||
|
if(cacheRemove.contains(next.getHeroId())){
|
||||||
|
if(heroAllAttributeMap.containsKey(next.getHeroId())){
|
||||||
|
mapManager.removeOneHeroAttribute(next.getHeroId());
|
||||||
|
}
|
||||||
|
iterator.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
user.getTeamPosManager().updateTeamPosByTeamId(401,team);
|
||||||
|
}
|
||||||
|
}
|
||||||
// Iterator<TeamPosHeroInfo> iterator = team.iterator();
|
// Iterator<TeamPosHeroInfo> iterator = team.iterator();
|
||||||
// while(iterator.hasNext()){
|
// while(iterator.hasNext()){
|
||||||
// TeamPosHeroInfo teamInfo = iterator.next();
|
// TeamPosHeroInfo teamInfo = iterator.next();
|
||||||
|
|
|
@ -111,6 +111,8 @@ public class CumulationData {
|
||||||
|
|
||||||
public int monsterAttackTimes;
|
public int monsterAttackTimes;
|
||||||
|
|
||||||
|
public int consumeAction;//无尽消耗行动力
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//任务重置
|
//任务重置
|
||||||
|
@ -158,6 +160,7 @@ public class CumulationData {
|
||||||
friendNums=0;
|
friendNums=0;
|
||||||
monsterAttackTimes = 0;
|
monsterAttackTimes = 0;
|
||||||
toBeStronger = 0;
|
toBeStronger = 0;
|
||||||
|
consumeAction = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void clearArray(int[] source){
|
private void clearArray(int[] source){
|
||||||
|
|
|
@ -306,7 +306,12 @@ public class GuildFightLogic {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
GuildInfo enemyInfo = GuilidManager.guildInfoMap.get(enemyFamily);
|
GuildInfo enemyInfo = GuilidManager.guildInfoMap.get(enemyFamily);
|
||||||
Family.EnemyFamily familyInfo = Family.EnemyFamily.newBuilder().setId(enemyInfo.getId()).setLevel(enemyInfo.getLevel()).setName(enemyInfo.getName()).setPictureId(1).build();
|
Family.EnemyFamily familyInfo = Family.EnemyFamily.newBuilder().setId(enemyInfo.getId())
|
||||||
|
.setLevel(enemyInfo.getLevel())
|
||||||
|
.setName(enemyInfo.getName())
|
||||||
|
.setPictureId(1)
|
||||||
|
.setTotalStar(redisUtil.getMapEntry(RedisKey.FAMILY_FIGHT_TOTAL_STAR,"",String.valueOf(enemyFamily),Integer.class))
|
||||||
|
.build();
|
||||||
GuildLogic.sendIndicationToMember(guildInfo, MessageTypeProto.MessageType.FAMILY_FIGHT_MATCHING_SUCCESS_INDICATION, familyInfo);
|
GuildLogic.sendIndicationToMember(guildInfo, MessageTypeProto.MessageType.FAMILY_FIGHT_MATCHING_SUCCESS_INDICATION, familyInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ import com.ljsd.jieling.network.server.ProtocolsManager;
|
||||||
import com.ljsd.jieling.network.session.ISession;
|
import com.ljsd.jieling.network.session.ISession;
|
||||||
import com.ljsd.jieling.protocols.CommonProto;
|
import com.ljsd.jieling.protocols.CommonProto;
|
||||||
import com.ljsd.jieling.protocols.HeroInfoProto;
|
import com.ljsd.jieling.protocols.HeroInfoProto;
|
||||||
|
import com.ljsd.jieling.protocols.MapInfoProto;
|
||||||
import com.ljsd.jieling.protocols.MessageTypeProto;
|
import com.ljsd.jieling.protocols.MessageTypeProto;
|
||||||
import com.ljsd.jieling.util.*;
|
import com.ljsd.jieling.util.*;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -426,6 +427,7 @@ public class HeroLogic {
|
||||||
if(teamPosHeroInfos!=null){
|
if(teamPosHeroInfos!=null){
|
||||||
List<String> heroes = new ArrayList<>(teamPosHeroInfos.size());
|
List<String> heroes = new ArrayList<>(teamPosHeroInfos.size());
|
||||||
Map<String, Map<Integer, Integer>> heroAllAttributeMap = new HashMap<>(teamPosHeroInfos.size());
|
Map<String, Map<Integer, Integer>> heroAllAttributeMap = new HashMap<>(teamPosHeroInfos.size());
|
||||||
|
List<MapInfoProto.HeroInfo> indiHeros = new ArrayList<>();
|
||||||
for (TeamPosHeroInfo heroInfo : teamPosHeroInfos) {
|
for (TeamPosHeroInfo heroInfo : teamPosHeroInfos) {
|
||||||
Hero hero = user.getHeroManager().getHero(heroInfo.getHeroId());
|
Hero hero = user.getHeroManager().getHero(heroInfo.getHeroId());
|
||||||
if (hero == null) {
|
if (hero == null) {
|
||||||
|
@ -442,11 +444,23 @@ public class HeroLogic {
|
||||||
}
|
}
|
||||||
heroAllAttributeMap.put(hero.getId(), heroAllAttribute);
|
heroAllAttributeMap.put(hero.getId(), heroAllAttribute);
|
||||||
heroes.add(heroInfo.getHeroId());
|
heroes.add(heroInfo.getHeroId());
|
||||||
|
MapInfoProto.HeroInfo indiInfo = MapInfoProto.HeroInfo.newBuilder().setHeroId(heroInfo.getHeroId())
|
||||||
|
.setHeroHp(heroAllAttribute.get(HeroAttributeEnum.CurHP.getPropertyId()))
|
||||||
|
.setHeroMaxHp(heroAllAttribute.get(HeroAttributeEnum.Hp.getPropertyId()))
|
||||||
|
.build();
|
||||||
|
indiHeros.add(indiInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
user.getMapManager().setHeroAllAttributeMap(heroAllAttributeMap);
|
user.getMapManager().setHeroAllAttributeMap(heroAllAttributeMap);
|
||||||
|
if(user.getMapManager().getCurMapId()!=0){
|
||||||
|
MapInfoProto.EndlessSetTeamIndication response = MapInfoProto.EndlessSetTeamIndication.newBuilder().addAllInfo(indiHeros).build();
|
||||||
|
MessageUtil.sendIndicationMessage(iSession,1, MessageTypeProto.MessageType.ENDLESS_MAP_SET_TEAM_INDICATION_VALUE,response,true);
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
user.getTeamPosManager().changeTeamInfo(teamId,heroIds,pokemonoIds);
|
user.getTeamPosManager().changeTeamInfo(teamId,heroIds,pokemonoIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
user.getUserMissionManager().onGameEvent(user,GameEvent.HERO_IN_TEAM,heroIds.size());
|
user.getUserMissionManager().onGameEvent(user,GameEvent.HERO_IN_TEAM,heroIds.size());
|
||||||
MessageUtil.sendMessage(iSession,1,MessageTypeProto.MessageType.TEAM_POS_SAVE_RESPONSE_VALUE,null,true);
|
MessageUtil.sendMessage(iSession,1,MessageTypeProto.MessageType.TEAM_POS_SAVE_RESPONSE_VALUE,null,true);
|
||||||
|
|
|
@ -628,6 +628,9 @@ public class MissionLoigc {
|
||||||
case BLOODY_KILL_NUMS:
|
case BLOODY_KILL_NUMS:
|
||||||
count = user.getBloodyInfo().getKillNums();
|
count = user.getBloodyInfo().getKillNums();
|
||||||
break;
|
break;
|
||||||
|
case ENDLESS_CONSUME_ACTION:
|
||||||
|
count = cumulationData.consumeAction;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
count = 0;
|
count = 0;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -78,7 +78,7 @@ public enum MissionType {
|
||||||
MONSTER_ATTACK_LEVEL(57),//兽潮来袭到达x层
|
MONSTER_ATTACK_LEVEL(57),//兽潮来袭到达x层
|
||||||
TO_BE_STRONGER(58),//我要变强点击:%s次
|
TO_BE_STRONGER(58),//我要变强点击:%s次
|
||||||
BLOODY_KILL_NUMS(59),// 血战每日击杀人数
|
BLOODY_KILL_NUMS(59),// 血战每日击杀人数
|
||||||
|
ENDLESS_CONSUME_ACTION(60)//无尽消耗行动力
|
||||||
;
|
;
|
||||||
|
|
||||||
private int missionType;
|
private int missionType;
|
||||||
|
@ -211,6 +211,8 @@ public enum MissionType {
|
||||||
return TO_BE_STRONGER;
|
return TO_BE_STRONGER;
|
||||||
case 59:
|
case 59:
|
||||||
return BLOODY_KILL_NUMS;
|
return BLOODY_KILL_NUMS;
|
||||||
|
case 60:
|
||||||
|
return ENDLESS_CONSUME_ACTION;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,12 @@ public class ConsumerMaterialDataManager implements BaseDataManager{
|
||||||
data.consumerStamina+=count;
|
data.consumerStamina+=count;
|
||||||
result = new CumulationData.Result(missionType);
|
result = new CumulationData.Result(missionType);
|
||||||
}
|
}
|
||||||
|
}else if(missionType==MissionType.ENDLESS_CONSUME_ACTION){
|
||||||
|
count = consumeMaterialMapTmp.get(Global.EXECUTION);
|
||||||
|
if(count!=null){
|
||||||
|
data.consumeAction+=count;
|
||||||
|
result = new CumulationData.Result(missionType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ public class DataManagerDistributor {
|
||||||
|
|
||||||
judges.put(MissionType.USER_CONSUMER_GEM,new ConsumerMaterialDataManager());
|
judges.put(MissionType.USER_CONSUMER_GEM,new ConsumerMaterialDataManager());
|
||||||
judges.put(MissionType.USER_CONSUMER_STAMINA,new ConsumerMaterialDataManager());
|
judges.put(MissionType.USER_CONSUMER_STAMINA,new ConsumerMaterialDataManager());
|
||||||
|
judges.put(MissionType.ENDLESS_CONSUME_ACTION,new ConsumerMaterialDataManager());
|
||||||
|
|
||||||
judges.put(MissionType.USER_WORKSHOP_LEVEL,new DefaultDataManager());
|
judges.put(MissionType.USER_WORKSHOP_LEVEL,new DefaultDataManager());
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,7 @@ public class MissionEventDistributor {
|
||||||
typeList = new ArrayList<>();
|
typeList = new ArrayList<>();
|
||||||
typeList.add(MissionType.USER_CONSUMER_GEM);
|
typeList.add(MissionType.USER_CONSUMER_GEM);
|
||||||
typeList.add(MissionType.USER_CONSUMER_STAMINA);
|
typeList.add(MissionType.USER_CONSUMER_STAMINA);
|
||||||
|
typeList.add(MissionType.ENDLESS_CONSUME_ACTION);
|
||||||
eventEnumListMap.put(GameEvent.CONSUMER_MATERIAL,typeList);
|
eventEnumListMap.put(GameEvent.CONSUMER_MATERIAL,typeList);
|
||||||
eventProcessor.put(GameEvent.CONSUMER_MATERIAL,new CumulationDataEventProcessor());
|
eventProcessor.put(GameEvent.CONSUMER_MATERIAL,new CumulationDataEventProcessor());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue