Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
63fc8dbd14
|
@ -104,7 +104,7 @@ public class ChatLogic {
|
||||||
//0|content需要解字符串
|
//0|content需要解字符串
|
||||||
String s = message;
|
String s = message;
|
||||||
String[] strs = message.split("|",3);
|
String[] strs = message.split("|",3);
|
||||||
if(strs.length<3){
|
if(strs.length==3){
|
||||||
s = strs[2];
|
s = strs[2];
|
||||||
}
|
}
|
||||||
result = ShieldedWordUtils.checkName(user,s,false,ChatContentType.WORLD_CHAT);
|
result = ShieldedWordUtils.checkName(user,s,false,ChatContentType.WORLD_CHAT);
|
||||||
|
|
|
@ -24,6 +24,8 @@ public class SSpecialConfig implements BaseConfig {
|
||||||
public static final String ADVENTURE_RANKINGSHOWNUM = "Adventure_RankingShowNum";//外敌入侵排行榜上榜显示排名
|
public static final String ADVENTURE_RANKINGSHOWNUM = "Adventure_RankingShowNum";//外敌入侵排行榜上榜显示排名
|
||||||
public static final String COMBAT_RANKINGSHOWNUM = "Combat_RankingShowNum";//战力排行榜上榜显示排名
|
public static final String COMBAT_RANKINGSHOWNUM = "Combat_RankingShowNum";//战力排行榜上榜显示排名
|
||||||
public static final String EQUIPSIGN_LIMIT = "EquipSign_limit";//仓库中的魂印上限
|
public static final String EQUIPSIGN_LIMIT = "EquipSign_limit";//仓库中的魂印上限
|
||||||
|
public static final String FRIENDAMOUNT_LIMIT = "FriendAmount_limit";//好友上限
|
||||||
|
public static final String FRIENDAPPLYAMOUNT_LIMIT = "FriendApplyAmount_limit";//好友申请上限
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -632,6 +632,9 @@ public class MapLogic {
|
||||||
// MessageUtil.sendErrorResponse(session,0,messageType.getNumber(),"行动力不足!");
|
// MessageUtil.sendErrorResponse(session,0,messageType.getNumber(),"行动力不足!");
|
||||||
// return;
|
// return;
|
||||||
}
|
}
|
||||||
|
Set<Integer> walkCell = mapManager.getEndlessMapInfo().getWalkCell();
|
||||||
|
walkCell.addAll(new HashSet<>(cells));
|
||||||
|
mapManager.endlessWalkCellSave(walkCell);
|
||||||
}
|
}
|
||||||
|
|
||||||
// LOGGER.info("updateMap() uid=>{} mapId =>{} eventId=>{}", uid, mapManager.getCurMapId(), cell.getEventId());
|
// LOGGER.info("updateMap() uid=>{} mapId =>{} eventId=>{}", uid, mapManager.getCurMapId(), cell.getEventId());
|
||||||
|
@ -1281,32 +1284,19 @@ public class MapLogic {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<TeamPosHeroInfo> team = user.getTeamPosManager().getTeamPosForHero().get(teamId);
|
List<TeamPosHeroInfo> team = user.getTeamPosManager().getTeamPosForHero().get(teamId);
|
||||||
for (TeamPosHeroInfo teamPosHeroInfo : team) {
|
|
||||||
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]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId()).getType()==4&&teamId==401){
|
if(SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId()).getType()==4&&teamId==401){
|
||||||
for (int i = 0 ; i <team.size();i++) {
|
for (int i = 0 ; i <team.size();i++) {
|
||||||
Hero hero = user.getHeroManager().getHero(team.get(i).getHeroId());
|
Hero hero = user.getHeroManager().getHero(team.get(i).getHeroId());
|
||||||
Map<Integer, Integer> heroAllAttribute = HeroLogic.getInstance().calHeroNotBufferAttribute(user, hero,false,teamId);
|
Map<Integer, Integer> heroAllAttribute = HeroLogic.getInstance().calHeroNotBufferAttribute(user, hero,false,teamId);
|
||||||
int per = (int)(checkResult[i+2] / (double) heroAllAttribute.get(HeroAttributeEnum.Hp.getPropertyId())*10000);
|
int per = (int)(checkResult[i+2] / (double) heroAllAttribute.get(HeroAttributeEnum.Hp.getPropertyId())*10000);
|
||||||
mapManager.updateEndlessHeroHp(team.get(i).getHeroId(),per);
|
mapManager.updateEndlessHeroHp(team.get(i).getHeroId(),per);
|
||||||
Map<Integer, Integer> currAttrMap = mapManager.getHeroAllAttributeMap().get(hero.getId());
|
mapManager.updateHeroOneAttribute(team.get(i).getHeroId(), HeroAttributeEnum.CurHP.getPropertyId(), checkResult[i+2]);
|
||||||
if(currAttrMap==null){
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if(currAttrMap.get(HeroAttributeEnum.CurHP.getPropertyId())==0){
|
|
||||||
mapManager.removeOneHeroAttribute(hero.getId());
|
|
||||||
}else{
|
|
||||||
mapManager.updateHeroOneAttribute(team.get(i).getHeroId(), HeroAttributeEnum.CurHP.getPropertyId(), checkResult[i+2]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
for (TeamPosHeroInfo teamPosHeroInfo : team) {
|
||||||
|
mapManager.updateHeroOneAttribute(teamPosHeroInfo.getHeroId(), HeroAttributeEnum.CurHP.getPropertyId(), checkResult[teamPosHeroInfo.getPosition()+1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId()).getType()==4) {
|
if(SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId()).getType()==4) {
|
||||||
endlessRefreshMonster(session,destoryXY);
|
endlessRefreshMonster(session,destoryXY);
|
||||||
|
@ -1542,16 +1532,13 @@ public class MapLogic {
|
||||||
List<TeamPosHeroInfo> team = user.getTeamPosManager().getTeamPosForHero().get(teamId);
|
List<TeamPosHeroInfo> team = user.getTeamPosManager().getTeamPosForHero().get(teamId);
|
||||||
if(SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId()).getType()==4&&teamId==401){
|
if(SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId()).getType()==4&&teamId==401){
|
||||||
mapManager.updateEndlessFightCount(mapManager.getEndlessMapInfo().getFightCount()+1);
|
mapManager.updateEndlessFightCount(mapManager.getEndlessMapInfo().getFightCount()+1);
|
||||||
Set<String> cacheRemove = new HashSet<>();
|
|
||||||
for (int i = 0 ; i <team.size();i++) {
|
for (int i = 0 ; i <team.size();i++) {
|
||||||
Hero hero = user.getHeroManager().getHero(team.get(i).getHeroId());
|
Hero hero = user.getHeroManager().getHero(team.get(i).getHeroId());
|
||||||
Map<Integer, Integer> heroAllAttribute = HeroLogic.getInstance().calHeroNotBufferAttribute(user, hero,false,teamId);
|
Map<Integer, Integer> heroAllAttribute = HeroLogic.getInstance().calHeroNotBufferAttribute(user, hero,false,teamId);
|
||||||
int per =(int) (checkResult[i+2] / (double) heroAllAttribute.get(HeroAttributeEnum.Hp.getPropertyId())*10000);
|
int per =(int) (checkResult[i+2] / (double) heroAllAttribute.get(HeroAttributeEnum.Hp.getPropertyId())*10000);
|
||||||
mapManager.updateEndlessHeroHp(team.get(i).getHeroId(),per);
|
mapManager.updateEndlessHeroHp(team.get(i).getHeroId(),per);
|
||||||
mapManager.updateHeroOneAttribute(team.get(i).getHeroId(), HeroAttributeEnum.CurHP.getPropertyId(), checkResult[i+2]);
|
mapManager.updateHeroOneAttribute(team.get(i).getHeroId(), HeroAttributeEnum.CurHP.getPropertyId(), checkResult[i+2]);
|
||||||
if(per<=0){
|
|
||||||
cacheRemove.add(hero.getId());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// if(!cacheRemove.isEmpty()){
|
// if(!cacheRemove.isEmpty()){
|
||||||
// Iterator<TeamPosHeroInfo> iterator = team.iterator();
|
// Iterator<TeamPosHeroInfo> iterator = team.iterator();
|
||||||
|
@ -3164,25 +3151,7 @@ public class MapLogic {
|
||||||
user.getTeamPosManager().updateTeamPosByTeamId(401,team);
|
user.getTeamPosManager().updateTeamPosByTeamId(401,team);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Iterator<TeamPosHeroInfo> iterator = team.iterator();
|
|
||||||
// while(iterator.hasNext()){
|
|
||||||
// TeamPosHeroInfo teamInfo = iterator.next();
|
|
||||||
// EndlessHero endlessHero = endlessMapInfo.getEndlessHeroInfo().get(teamInfo.getHeroId());
|
|
||||||
// if(endlessHero==null){
|
|
||||||
// continue;
|
|
||||||
// }
|
|
||||||
// if(endlessHero.getCurHp()==0){
|
|
||||||
// Map<String, Map<Integer, Integer>> heroAllAttributeMap = mapManager.getHeroAllAttributeMap();
|
|
||||||
// if(heroAllAttributeMap.containsKey(teamInfo.getHeroId())){
|
|
||||||
// heroAllAttributeMap.remove(teamInfo.getHeroId());
|
|
||||||
// }
|
|
||||||
// mapManager.setHeroAllAttributeMap(heroAllAttributeMap);
|
|
||||||
// iterator.remove();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// user.getTeamPosManager().updateTeamPosByTeamId(401,team);
|
|
||||||
// }
|
|
||||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),response.build(),true);
|
MessageUtil.sendMessage(session,1,messageType.getNumber(),response.build(),true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -777,7 +777,7 @@ public class MapManager extends MongoBase {
|
||||||
}
|
}
|
||||||
public void endlessWalkCellSave(Set<Integer> walkCells){
|
public void endlessWalkCellSave(Set<Integer> walkCells){
|
||||||
endlessMapInfo.setWalkCell(walkCells);
|
endlessMapInfo.setWalkCell(walkCells);
|
||||||
updateString("endlessMapInfo.walkCells",walkCells);
|
updateString("endlessMapInfo.walkCell",walkCells);
|
||||||
}
|
}
|
||||||
public void endlessMapInfoSave(Map<Integer, Cell> mapInfo){
|
public void endlessMapInfoSave(Map<Integer, Cell> mapInfo){
|
||||||
endlessMapInfo.setMapInfo(mapInfo);
|
endlessMapInfo.setMapInfo(mapInfo);
|
||||||
|
|
|
@ -91,6 +91,8 @@ public class CumulationData {
|
||||||
public int takeDailyBoxTimes;// 领取日常任务宝箱奖励次数达到
|
public int takeDailyBoxTimes;// 领取日常任务宝箱奖励次数达到
|
||||||
public int wearEquipTimes;// 妖灵师穿戴装备件数达到
|
public int wearEquipTimes;// 妖灵师穿戴装备件数达到
|
||||||
public int toBeStronger;//我要变强
|
public int toBeStronger;//我要变强
|
||||||
|
public int familyFightCount;//公会战进攻次数
|
||||||
|
public int findStar;//占星次数
|
||||||
public Map<Integer,Integer> synthesisHeroStarTimesMap = new HashMap<>();// 碎片合成%s星妖灵师次数达到
|
public Map<Integer,Integer> synthesisHeroStarTimesMap = new HashMap<>();// 碎片合成%s星妖灵师次数达到
|
||||||
|
|
||||||
public Map<Integer,Integer> heroUpStarTimesMap = new HashMap<>();//将妖灵师%s进阶次数达到
|
public Map<Integer,Integer> heroUpStarTimesMap = new HashMap<>();//将妖灵师%s进阶次数达到
|
||||||
|
@ -164,6 +166,8 @@ public class CumulationData {
|
||||||
toBeStronger = 0;
|
toBeStronger = 0;
|
||||||
consumeAction = 0;
|
consumeAction = 0;
|
||||||
especialEquipStar.clear();
|
especialEquipStar.clear();
|
||||||
|
familyFightCount = 0;
|
||||||
|
findStar=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void clearArray(int[] source){
|
private void clearArray(int[] source){
|
||||||
|
|
|
@ -16,6 +16,7 @@ import com.ljsd.jieling.logic.fight.CheckFight;
|
||||||
import com.ljsd.jieling.logic.fight.FightType;
|
import com.ljsd.jieling.logic.fight.FightType;
|
||||||
import com.ljsd.jieling.logic.hero.HeroAttributeEnum;
|
import com.ljsd.jieling.logic.hero.HeroAttributeEnum;
|
||||||
import com.ljsd.jieling.logic.hero.HeroLogic;
|
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||||
|
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||||
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.Family;
|
import com.ljsd.jieling.protocols.Family;
|
||||||
|
@ -477,6 +478,7 @@ public class GuildFightLogic {
|
||||||
}
|
}
|
||||||
redisUtil.putMapEntry(RedisKey.FAMILY_FIGHT_CAL_STAR,String.valueOf(attackGuildId),String.valueOf(defendBuildId),haveGotStar+getStar);
|
redisUtil.putMapEntry(RedisKey.FAMILY_FIGHT_CAL_STAR,String.valueOf(attackGuildId),String.valueOf(defendBuildId),haveGotStar+getStar);
|
||||||
Family.FamilyFightAttackResponse response = Family.FamilyFightAttackResponse.newBuilder().setResult(fightResult[0]).setStarCount(getStar).setData(fightData).build();
|
Family.FamilyFightAttackResponse response = Family.FamilyFightAttackResponse.newBuilder().setResult(fightResult[0]).setStarCount(getStar).setData(fightData).build();
|
||||||
|
userAttack.getUserMissionManager().onGameEvent(userAttack, GameEvent.FAMILY_FIGHT_ATTACK);
|
||||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), response, true);
|
MessageUtil.sendMessage(session, 1, messageType.getNumber(), response, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.ljsd.jieling.logic.friend;
|
package com.ljsd.jieling.logic.friend;
|
||||||
|
|
||||||
import com.ljsd.jieling.config.SGameSetting;
|
import com.ljsd.jieling.config.SGameSetting;
|
||||||
|
import com.ljsd.jieling.config.SSpecialConfig;
|
||||||
import com.ljsd.jieling.core.HandlerLogicThread;
|
import com.ljsd.jieling.core.HandlerLogicThread;
|
||||||
import com.ljsd.jieling.db.mongo.MongoUtil;
|
import com.ljsd.jieling.db.mongo.MongoUtil;
|
||||||
import com.ljsd.jieling.db.redis.RedisKey;
|
import com.ljsd.jieling.db.redis.RedisKey;
|
||||||
|
@ -203,8 +204,8 @@ public class FriendLogic {
|
||||||
}
|
}
|
||||||
User user = UserManager.getUser(uid);
|
User user = UserManager.getUser(uid);
|
||||||
List<Integer> friends = user.getFriendManager().getFriends();
|
List<Integer> friends = user.getFriendManager().getFriends();
|
||||||
int maxFriends = 200;
|
int maxFriends = SSpecialConfig.getIntegerValue(SSpecialConfig.FRIENDAMOUNT_LIMIT);
|
||||||
int maxApplyFriends = 10;
|
int maxApplyFriends = SSpecialConfig.getIntegerValue(SSpecialConfig.FRIENDAPPLYAMOUNT_LIMIT);
|
||||||
if (friends.size() >= maxFriends){
|
if (friends.size() >= maxFriends){
|
||||||
MessageUtil.sendErrorResponse(iSession,0,msgId,"好友已达上限");
|
MessageUtil.sendErrorResponse(iSession,0,msgId,"好友已达上限");
|
||||||
return;
|
return;
|
||||||
|
@ -278,7 +279,7 @@ public class FriendLogic {
|
||||||
FriendManager friendManager = user.getFriendManager();
|
FriendManager friendManager = user.getFriendManager();
|
||||||
List<Integer> friends = friendManager.getFriends();
|
List<Integer> friends = friendManager.getFriends();
|
||||||
List<Integer> applyFriends = friendManager.getApplyFriends();
|
List<Integer> applyFriends = friendManager.getApplyFriends();
|
||||||
int maxFriends = 200;
|
int maxFriends = SSpecialConfig.getIntegerValue(SSpecialConfig.FRIENDAMOUNT_LIMIT);
|
||||||
User friendUser;
|
User friendUser;
|
||||||
List<Integer> friendFriendList;
|
List<Integer> friendFriendList;
|
||||||
switch (type){
|
switch (type){
|
||||||
|
|
|
@ -541,6 +541,7 @@ public class ItemLogic {
|
||||||
HeroInfoProto.SoulRandResponse.Builder builder = HeroInfoProto.SoulRandResponse.newBuilder();
|
HeroInfoProto.SoulRandResponse.Builder builder = HeroInfoProto.SoulRandResponse.newBuilder();
|
||||||
builder.setDrop(drop);
|
builder.setDrop(drop);
|
||||||
builder.setPos(currentPool);
|
builder.setPos(currentPool);
|
||||||
|
user.getUserMissionManager().onGameEvent(user,GameEvent.FIND_STAR,time);
|
||||||
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.SOUL_RAND_EQUIP_RESPONSE_VALUE, builder.build(), true);
|
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.SOUL_RAND_EQUIP_RESPONSE_VALUE, builder.build(), true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,6 +58,12 @@ public enum GameEvent {
|
||||||
|
|
||||||
BLOODY_END,// 血战结束
|
BLOODY_END,// 血战结束
|
||||||
|
|
||||||
ESPECIAL_EQUIP//获得法宝
|
FAMILY_FIGHT_ATTACK,//公会战进攻次数
|
||||||
|
|
||||||
|
ESPECIAL_EQUIP,//获得法宝
|
||||||
|
|
||||||
|
FIND_STAR,//占星
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -631,6 +631,9 @@ public class MissionLoigc {
|
||||||
case ENDLESS_CONSUME_ACTION:
|
case ENDLESS_CONSUME_ACTION:
|
||||||
count = cumulationData.consumeAction;
|
count = cumulationData.consumeAction;
|
||||||
break;
|
break;
|
||||||
|
case FAMILY_FIGHT_ATTACK:
|
||||||
|
count = cumulationData.familyFightCount;
|
||||||
|
break;
|
||||||
case ESPECIAL_EQUIP:
|
case ESPECIAL_EQUIP:
|
||||||
count = cumulationData.especialEquipStar.get(missionSubType[0]);
|
count = cumulationData.especialEquipStar.get(missionSubType[0]);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -79,7 +79,9 @@ public enum MissionType {
|
||||||
TO_BE_STRONGER(58),//我要变强点击:%s次
|
TO_BE_STRONGER(58),//我要变强点击:%s次
|
||||||
BLOODY_KILL_NUMS(59),// 血战每日击杀人数
|
BLOODY_KILL_NUMS(59),// 血战每日击杀人数
|
||||||
ENDLESS_CONSUME_ACTION(60),//无尽消耗行动力
|
ENDLESS_CONSUME_ACTION(60),//无尽消耗行动力
|
||||||
ESPECIAL_EQUIP(62)//拥有%s星级法宝的数量为:%s
|
FAMILY_FIGHT_ATTACK(61),//公会战进攻次数
|
||||||
|
ESPECIAL_EQUIP(62),//拥有%s星级法宝的数量为:%s
|
||||||
|
FIND_STAR(65)//占星
|
||||||
;
|
;
|
||||||
|
|
||||||
private int missionType;
|
private int missionType;
|
||||||
|
@ -214,8 +216,12 @@ public enum MissionType {
|
||||||
return BLOODY_KILL_NUMS;
|
return BLOODY_KILL_NUMS;
|
||||||
case 60:
|
case 60:
|
||||||
return ENDLESS_CONSUME_ACTION;
|
return ENDLESS_CONSUME_ACTION;
|
||||||
|
case 61:
|
||||||
|
return FAMILY_FIGHT_ATTACK;
|
||||||
case 62:
|
case 62:
|
||||||
return ESPECIAL_EQUIP;
|
return ESPECIAL_EQUIP;
|
||||||
|
case 65:
|
||||||
|
return FIND_STAR;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,6 +100,8 @@ public class DataManagerDistributor {
|
||||||
judges.put(MissionType.MONSTER_ATTACK_LEVEL,new DefaultDataManager());
|
judges.put(MissionType.MONSTER_ATTACK_LEVEL,new DefaultDataManager());
|
||||||
judges.put(MissionType.TO_BE_STRONGER,new StrongerManager());
|
judges.put(MissionType.TO_BE_STRONGER,new StrongerManager());
|
||||||
judges.put(MissionType.ESPECIAL_EQUIP,new EspecialStarManager());
|
judges.put(MissionType.ESPECIAL_EQUIP,new EspecialStarManager());
|
||||||
|
judges.put(MissionType.FAMILY_FIGHT_ATTACK,new FamilyFightManager());
|
||||||
|
judges.put(MissionType.FIND_STAR,new FindStarManager());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.ljsd.jieling.logic.mission.data;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.logic.dao.CumulationData;
|
||||||
|
import com.ljsd.jieling.logic.mission.MissionType;
|
||||||
|
|
||||||
|
public class FamilyFightManager implements BaseDataManager {
|
||||||
|
@Override
|
||||||
|
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
|
||||||
|
data.familyFightCount++;
|
||||||
|
return new CumulationData.Result(missionType);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.ljsd.jieling.logic.mission.data;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.logic.dao.CumulationData;
|
||||||
|
import com.ljsd.jieling.logic.mission.MissionType;
|
||||||
|
|
||||||
|
public class FindStarManager implements BaseDataManager{
|
||||||
|
@Override
|
||||||
|
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
|
||||||
|
data.findStar=+(int)parm[0];
|
||||||
|
return new CumulationData.Result(missionType);
|
||||||
|
}
|
||||||
|
}
|
|
@ -254,11 +254,21 @@ public class MissionEventDistributor {
|
||||||
eventEnumListMap.put(GameEvent.BLOODY_END,typeList);
|
eventEnumListMap.put(GameEvent.BLOODY_END,typeList);
|
||||||
eventProcessor.put(GameEvent.BLOODY_END,new CumulationDataEventProcessor());
|
eventProcessor.put(GameEvent.BLOODY_END,new CumulationDataEventProcessor());
|
||||||
|
|
||||||
|
typeList = new ArrayList<>();
|
||||||
|
typeList.add(MissionType.FAMILY_FIGHT_ATTACK);
|
||||||
|
eventEnumListMap.put(GameEvent.FAMILY_FIGHT_ATTACK,typeList);
|
||||||
|
eventProcessor.put(GameEvent.FAMILY_FIGHT_ATTACK,new CumulationDataEventProcessor());
|
||||||
|
|
||||||
typeList = new ArrayList<>();
|
typeList = new ArrayList<>();
|
||||||
typeList.add(MissionType.ESPECIAL_EQUIP);
|
typeList.add(MissionType.ESPECIAL_EQUIP);
|
||||||
eventEnumListMap.put(GameEvent.ESPECIAL_EQUIP,typeList);
|
eventEnumListMap.put(GameEvent.ESPECIAL_EQUIP,typeList);
|
||||||
eventProcessor.put(GameEvent.ESPECIAL_EQUIP,new CumulationDataEventProcessor());
|
eventProcessor.put(GameEvent.ESPECIAL_EQUIP,new CumulationDataEventProcessor());
|
||||||
|
|
||||||
|
typeList = new ArrayList<>();
|
||||||
|
typeList.add(MissionType.FIND_STAR);
|
||||||
|
eventEnumListMap.put(GameEvent.FIND_STAR,typeList);
|
||||||
|
eventProcessor.put(GameEvent.FIND_STAR,new CumulationDataEventProcessor());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final ThreadLocal<Map<GameMisionType, List<MissionStateChangeInfo>>> threadMissionChangeList =
|
private static final ThreadLocal<Map<GameMisionType, List<MissionStateChangeInfo>>> threadMissionChangeList =
|
||||||
|
|
|
@ -65,6 +65,7 @@ public class CBean2Proto {
|
||||||
.setItemId(item.getItemId())
|
.setItemId(item.getItemId())
|
||||||
.setItemNum(itemNum)
|
.setItemNum(itemNum)
|
||||||
.setEndingTime(item.getEndingTime())
|
.setEndingTime(item.getEndingTime())
|
||||||
|
.setNextFlushTime(item.getEndingTime() + getRecoverSpeedByItem(item.getItemId()))
|
||||||
.build();
|
.build();
|
||||||
return itemProto;
|
return itemProto;
|
||||||
}
|
}
|
||||||
|
@ -366,6 +367,9 @@ public class CBean2Proto {
|
||||||
return energyRecoverSpeed[1]*60;
|
return energyRecoverSpeed[1]*60;
|
||||||
}
|
}
|
||||||
int[] recoveryItemInfo = SGameSetting.getGameSetting().getItemRecoveryMap().get(itemId);
|
int[] recoveryItemInfo = SGameSetting.getGameSetting().getItemRecoveryMap().get(itemId);
|
||||||
|
if(recoveryItemInfo == null){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return recoveryItemInfo[2];
|
return recoveryItemInfo[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -761,6 +761,7 @@ public class ItemUtil {
|
||||||
for(Integer itemId : itemForTimeRecoverys){
|
for(Integer itemId : itemForTimeRecoverys){
|
||||||
Item item = itemMap.get(itemId);
|
Item item = itemMap.get(itemId);
|
||||||
if(item == null){
|
if(item == null){
|
||||||
|
item = itemMap.get(itemId);
|
||||||
MapManager.getTimesRecoveryTicket(user,itemId);
|
MapManager.getTimesRecoveryTicket(user,itemId);
|
||||||
itemList.add(CBean2Proto.getItem(item,-1));
|
itemList.add(CBean2Proto.getItem(item,-1));
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
package db;
|
||||||
|
|
||||||
|
public class MongoTest {
|
||||||
|
}
|
Loading…
Reference in New Issue