修复探索度
parent
58e38789a9
commit
0d66b7bcfc
|
|
@ -528,8 +528,8 @@ public class MapLogic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateMapMission(mapManager,EventType.updateOptionalEvent, optionId,0);
|
updateMapMission(mapManager,EventType.updateOptionalEvent, optionId,optionId);
|
||||||
updateMapMission(mapManager,EventType.updatePonintEvent, pointId,0);
|
updateMapMission(mapManager,EventType.updatePonintEvent, pointId,pointId);
|
||||||
CommonProto.Drop.Builder dropBuilder = null;
|
CommonProto.Drop.Builder dropBuilder = null;
|
||||||
if (sOptionConfig.getReward().length > 0) {
|
if (sOptionConfig.getReward().length > 0) {
|
||||||
dropBuilder = ItemUtil.drop(user, sOptionConfig.getReward(), 1, 1, BIReason.MAP_EVENET_REWARD);
|
dropBuilder = ItemUtil.drop(user, sOptionConfig.getReward(), 1, 1, BIReason.MAP_EVENET_REWARD);
|
||||||
|
|
@ -945,7 +945,7 @@ public class MapLogic {
|
||||||
fastFightResponse.addAllRemainHpList(remainHp);
|
fastFightResponse.addAllRemainHpList(remainHp);
|
||||||
fastFightResponse.build();
|
fastFightResponse.build();
|
||||||
// LOGGER.info("endFight() uid=>{},nextEventId=>{}", uid, nextEventId);
|
// LOGGER.info("endFight() uid=>{},nextEventId=>{}", uid, nextEventId);
|
||||||
updateMapMission(mapManager,EventType.fightEvent,0, groupId);
|
updateMapMission(mapManager,EventType.fightEvent,groupId, groupId);
|
||||||
// LOGGER.info("endFight() uid=>{} sMonsterGroup.getRewardgroup()=>{} misson=>{} eventDrop=>{}, missionDrop=>{}", uid, sMonsterGroup.getRewardgroup(), fastFightResponse.getMission(), fastFightResponse.getEnventDrop(), fastFightResponse.getMissionDrop());
|
// LOGGER.info("endFight() uid=>{} sMonsterGroup.getRewardgroup()=>{} misson=>{} eventDrop=>{}, missionDrop=>{}", uid, sMonsterGroup.getRewardgroup(), fastFightResponse.getMission(), fastFightResponse.getEnventDrop(), fastFightResponse.getMissionDrop());
|
||||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), fastFightResponse.build(), true);
|
MessageUtil.sendMessage(session, 1, messageType.getNumber(), fastFightResponse.build(), true);
|
||||||
}
|
}
|
||||||
|
|
@ -1139,7 +1139,7 @@ public class MapLogic {
|
||||||
}
|
}
|
||||||
fightEndResponse.setEventId(nextEventId);
|
fightEndResponse.setEventId(nextEventId);
|
||||||
// LOGGER.info("endFight() uid=>{},nextEventId=>{}", uid, nextEventId);
|
// LOGGER.info("endFight() uid=>{},nextEventId=>{}", uid, nextEventId);
|
||||||
updateMapMission(mapManager,EventType.fightEvent,0,monsterGroupId);
|
updateMapMission(mapManager,EventType.fightEvent,monsterGroupId,monsterGroupId);
|
||||||
// LOGGER.info("endFight() uid=>{} sMonsterGroup.getRewardgroup()=>{} misson=>{} eventDrop=>{}, missionDrop=>{}", uid, sMonsterGroup.getRewardgroup(), fightEndResponse.getMission(), fightEndResponse.getEnventDrop(), fightEndResponse.getMissionDrop());
|
// LOGGER.info("endFight() uid=>{} sMonsterGroup.getRewardgroup()=>{} misson=>{} eventDrop=>{}, missionDrop=>{}", uid, sMonsterGroup.getRewardgroup(), fightEndResponse.getMission(), fightEndResponse.getEnventDrop(), fightEndResponse.getMissionDrop());
|
||||||
MessageUtil.sendMessage(session, 1, messageType.getNumber(), fightEndResponse.build(), true);
|
MessageUtil.sendMessage(session, 1, messageType.getNumber(), fightEndResponse.build(), true);
|
||||||
|
|
||||||
|
|
@ -1173,6 +1173,7 @@ public class MapLogic {
|
||||||
|
|
||||||
|
|
||||||
public int updateMapMission(MapManager mapManager,int eventType,int eventId,int bossIdOrItemId){
|
public int updateMapMission(MapManager mapManager,int eventType,int eventId,int bossIdOrItemId){
|
||||||
|
LOGGER.info("the eventtype ={},eventId={},bossItemId={}",eventType,eventId,bossIdOrItemId);
|
||||||
int mapId = mapManager.getCurMapId();
|
int mapId = mapManager.getCurMapId();
|
||||||
if(mapId==0){
|
if(mapId==0){
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -1191,50 +1192,8 @@ public class MapLogic {
|
||||||
int score = sAccomplishmentConfig.getScore();
|
int score = sAccomplishmentConfig.getScore();
|
||||||
int logic = sAccomplishmentConfig.getLogic();
|
int logic = sAccomplishmentConfig.getLogic();
|
||||||
int[][] values = sAccomplishmentConfig.getValues();
|
int[][] values = sAccomplishmentConfig.getValues();
|
||||||
int targetEventId = values[0][0];
|
|
||||||
int targetEventValue = values[1][0];
|
int targetEventValue = values[1][0];
|
||||||
if(eventType == EventType.updateOptionalEvent && logic == MapMissionType.FINISH_EVEVNT.getMissionTypeValue()){
|
|
||||||
for(int targetEventIdTmp : values[0]){
|
|
||||||
if(targetEventIdTmp == eventId){
|
|
||||||
if(missionValue<targetEventValue){
|
|
||||||
allMissionProgress.put(missionId,missionValue+1);
|
|
||||||
needUpdate = true;
|
|
||||||
if(missionValue+1 == targetEventValue){
|
|
||||||
addScore+=score;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//updatePonintEvent optionalConfig获取
|
|
||||||
if(eventType == EventType.updatePonintEvent){
|
|
||||||
//处理采矿 、宝箱
|
|
||||||
MapPointConfig mapPointConfig = MapPointConfig.getScMapEventMap().get(eventId);
|
|
||||||
if(mapPointConfig!=null){
|
|
||||||
if((mapPointConfig.getStyle() == 2 && logic == MapMissionType.DIGGER_EVENT.getMissionTypeValue() )|| (mapPointConfig.getStyle() == 7 && logic == MapMissionType.OPEN_BOX.getMissionTypeValue())){
|
|
||||||
if(missionValue<targetEventValue){
|
|
||||||
allMissionProgress.put(missionId,missionValue+1);
|
|
||||||
needUpdate = true;
|
|
||||||
if(missionValue+1 == targetEventValue){
|
|
||||||
addScore+=score;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//todo 战斗结束处理
|
|
||||||
if(eventType == EventType.fightEvent){
|
if(eventType == EventType.fightEvent){
|
||||||
if(logic == MapMissionType.KILL_BOSS.getMissionTypeValue()){
|
|
||||||
if(targetEventId == bossIdOrItemId){
|
|
||||||
if(missionValue<targetEventValue){
|
|
||||||
allMissionProgress.put(missionId,missionValue+1);
|
|
||||||
needUpdate = true;
|
|
||||||
if(missionValue+1 == targetEventValue){
|
|
||||||
addScore+=score;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(logic == MapMissionType.VICTORY_EVENT.getMissionTypeValue()){
|
if(logic == MapMissionType.VICTORY_EVENT.getMissionTypeValue()){
|
||||||
if(missionValue<targetEventValue){
|
if(missionValue<targetEventValue){
|
||||||
allMissionProgress.put(missionId,missionValue+1);
|
allMissionProgress.put(missionId,missionValue+1);
|
||||||
|
|
@ -1245,8 +1204,43 @@ public class MapLogic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(eventType == EventType.updateOptionalEvent || eventType == EventType.fightEvent){
|
||||||
|
if(logic ==MapMissionType.FINISH_EVEVNT.getMissionTypeValue() || logic == MapMissionType.KILL_BOSS.getMissionTypeValue()){
|
||||||
|
for(int targetEventIdTmp : values[0]){
|
||||||
|
if(targetEventIdTmp == eventId){
|
||||||
|
if(missionValue<targetEventValue){
|
||||||
|
allMissionProgress.put(missionId,missionValue+1);
|
||||||
|
needUpdate = true;
|
||||||
|
if(missionValue+1 == targetEventValue){
|
||||||
|
addScore+=score;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//todo 行脚商人 在地图商店买东西需要特殊处理
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
//updatePonintEvent optionalConfig获取
|
||||||
|
if(eventType == EventType.updatePonintEvent){
|
||||||
|
//处理采矿 、宝箱
|
||||||
|
MapPointConfig mapPointConfig = MapPointConfig.getScMapEventMap().get(eventId);
|
||||||
|
if(mapPointConfig!=null){
|
||||||
|
if((mapPointConfig.getStyle() == 2 && logic == MapMissionType.DIGGER_EVENT.getMissionTypeValue() )|| (mapPointConfig.getStyle() == 7 && logic == MapMissionType.OPEN_BOX.getMissionTypeValue())){
|
||||||
|
if(missionValue<targetEventValue){
|
||||||
|
allMissionProgress.put(missionId,missionValue+1);
|
||||||
|
needUpdate = true;
|
||||||
|
if(missionValue+1 == targetEventValue){
|
||||||
|
addScore+=score;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* int targetEventId = values[0][0];
|
||||||
if(eventType == EventType.shopEvent){
|
if(eventType == EventType.shopEvent){
|
||||||
if(logic == MapMissionType.BUY_GOODS_ID_EVENT.getMissionTypeValue()){
|
if(logic == MapMissionType.BUY_GOODS_ID_EVENT.getMissionTypeValue()){
|
||||||
if(targetEventId == eventId && bossIdOrItemId == targetEventValue && missionValue==0 ){
|
if(targetEventId == eventId && bossIdOrItemId == targetEventValue && missionValue==0 ){
|
||||||
|
|
@ -1256,7 +1250,7 @@ public class MapLogic {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(logic == MapMissionType.BUY_GOODS_TYPE_EVENT.getMissionTypeValue()){
|
if(logic == MapMissionType.BUY_GOODS_TYPE_EVENT.getMissionTypeValue()){
|
||||||
if(targetEventId == eventId && missionValue==0 ){
|
if(targetEventId == eventId && missionValue==0){
|
||||||
SItem sItem = SItem.getsItemMap().get(bossIdOrItemId);
|
SItem sItem = SItem.getsItemMap().get(bossIdOrItemId);
|
||||||
if(sItem.getItemType() == targetEventValue){
|
if(sItem.getItemType() == targetEventValue){
|
||||||
allMissionProgress.put(missionId,1);
|
allMissionProgress.put(missionId,1);
|
||||||
|
|
@ -1266,9 +1260,9 @@ public class MapLogic {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
if(addScore!=0){
|
if(addScore!=0){
|
||||||
mapMission.setTotalWeight(mapMission.getTotalWeight()+addScore);
|
mapMission.setTotalWeight(mapMission.getTotalWeight()+addScore);
|
||||||
if (mapMission.getTotalWeight() >= 100) {
|
if (mapMission.getTotalWeight() >= 100) {
|
||||||
|
|
|
||||||
|
|
@ -1401,6 +1401,8 @@ public class HeroLogic {
|
||||||
Pokemon pokemon = pokemonManager.getRingFireMap().get(pokemonId);
|
Pokemon pokemon = pokemonManager.getRingFireMap().get(pokemonId);
|
||||||
if(pokemon == null){
|
if(pokemon == null){
|
||||||
pokemon = new Pokemon(pokemonId);
|
pokemon = new Pokemon(pokemonId);
|
||||||
|
pokemon.setAllStage(1);
|
||||||
|
pokemonManager.addRingFirePokemon(pokemon);
|
||||||
}
|
}
|
||||||
SRingTypeConfig sRingTypeConfig = SRingTypeConfig.config.get(pokemonId);
|
SRingTypeConfig sRingTypeConfig = SRingTypeConfig.config.get(pokemonId);
|
||||||
if(sRingTypeConfig == null){
|
if(sRingTypeConfig == null){
|
||||||
|
|
|
||||||
|
|
@ -277,6 +277,6 @@ public class CBean2Proto {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CommonProto.RingFireInfo getRingFire(Pokemon pokemon) {
|
public static CommonProto.RingFireInfo getRingFire(Pokemon pokemon) {
|
||||||
return CommonProto.RingFireInfo.newBuilder().addAllComonpentId(pokemon.getComonpentsLevelMap().values()).setStage(pokemon.getAllStage()).build();
|
return CommonProto.RingFireInfo.newBuilder().addAllComonpentId(pokemon.getComonpentsLevelMap().keySet()).setStage(pokemon.getAllStage()).setId(pokemon.getId()).build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue