试炼本推送删除

back_recharge
lvxinran 2019-11-12 11:35:02 +08:00
parent e6aa788f21
commit fd6f075151
11 changed files with 15 additions and 13 deletions

View File

@ -2616,7 +2616,7 @@ public class MapLogic {
int randomPoint = MathUtils.randomFromWeight(pointId[type-1]);
// LOGGER.info("随机事件id==>{}",randomPoint);
MapInfoProto.MapTowerCallChiefResponse.Builder response = MapInfoProto.MapTowerCallChiefResponse.newBuilder();
Cell cell = BehaviorUtil.addBehaviorInfo(user,randomPoint,mapManager,mapManager.getCurMapId(),CellUtil.pos2XY(xyResult)[0],CellUtil.pos2XY(xyResult)[1]);
Cell cell = BehaviorUtil.addBehaviorInfo(user,randomPoint,mapManager,mapManager.getCurMapId(),CellUtil.pos2XY(xyResult)[0],CellUtil.pos2XY(xyResult)[1],false);
CommonProto.Cell protoCell =CBean2Proto.getCell(cell);
response.setType(type);
mapManager.setEssenceValue(-1);

View File

@ -90,13 +90,15 @@ public class BehaviorUtil {
* @param y
* @throws Exception
*/
public static Cell addBehaviorInfo(User user,int needDistoryPointId, MapManager mapManager, int mapId, int x, int y) throws Exception {
public static Cell addBehaviorInfo(User user,int needDistoryPointId, MapManager mapManager, int mapId, int x, int y,boolean isIndication) throws Exception {
int xy = CellUtil.xy2Pos(x, y);
MapPointConfig mapPointConfig = MapPointConfig.scMapEventMap.get(needDistoryPointId);
Cell cellValue = new Cell(xy, mapPointConfig.getInitialEventId(), mapPointConfig.getId());
mapManager.addOrUpdateCell(xy, cellValue);
MapInfoProto.RefreshMonsterResponse monsterResponse = MapInfoProto.RefreshMonsterResponse.newBuilder().addCell(CBean2Proto.getCell(cellValue)).build();
MessageUtil.sendIndicationMessage(OnlineUserManager.getSessionByUid(user.getId()),1, MessageTypeProto.MessageType.ENDLESS_MONSTER_REFRESH_INDICATION_VALUE,monsterResponse,true);
if(isIndication){
MapInfoProto.RefreshMonsterResponse monsterResponse = MapInfoProto.RefreshMonsterResponse.newBuilder().addCell(CBean2Proto.getCell(cellValue)).build();
MessageUtil.sendIndicationMessage(OnlineUserManager.getSessionByUid(user.getId()),1, MessageTypeProto.MessageType.ENDLESS_MONSTER_REFRESH_INDICATION_VALUE,monsterResponse,true);
}
return cellValue;
}

View File

@ -20,7 +20,7 @@ public class FourtyBehavior extends BaseBehavior {
CombatLogic.getInstance().bufferAddByEatFoodOrEventTrigger(user, behaviorTypeValues[0][0]);
BehaviorUtil.destoryPoints(user, behaviorTypeValues[1]);
for (int i = 2; i < behaviorTypeValues.length; i++) {
BehaviorUtil.addBehaviorInfo(user,behaviorTypeValues[i][3], user.getMapManager(), behaviorTypeValues[i][0], behaviorTypeValues[i][1], behaviorTypeValues[i][2]);
BehaviorUtil.addBehaviorInfo(user,behaviorTypeValues[i][3], user.getMapManager(), behaviorTypeValues[i][0], behaviorTypeValues[i][1], behaviorTypeValues[i][2],true);
}
return true;
}

View File

@ -22,7 +22,7 @@ public class MonitorMissionAndDestroyPointBehavior extends BaseBehavior {
}
// 开新事件
for (int j = 1; j < behaviorTypeValues.length; j++) {
BehaviorUtil.addBehaviorInfo(user,behaviorTypeValues[j][3], user.getMapManager(), behaviorTypeValues[j][0], behaviorTypeValues[j][1], behaviorTypeValues[j][2]);
BehaviorUtil.addBehaviorInfo(user,behaviorTypeValues[j][3], user.getMapManager(), behaviorTypeValues[j][0], behaviorTypeValues[j][1], behaviorTypeValues[j][2],true);
}
return true;
}

View File

@ -19,7 +19,7 @@ public class MonitorMissionBehavior extends BaseBehavior {
user.getMapManager().setMonsterId(behaviorTypeValues[0][0]);
user.getMapManager().setNeedKillNum(behaviorTypeValues[0][1]);
for (int i = 1; i < behaviorTypeValues.length; i++) {
BehaviorUtil.addBehaviorInfo(user, behaviorTypeValues[i][3], user.getMapManager(), behaviorTypeValues[i][0], behaviorTypeValues[i][1], behaviorTypeValues[i][2]);
BehaviorUtil.addBehaviorInfo(user, behaviorTypeValues[i][3], user.getMapManager(), behaviorTypeValues[i][0], behaviorTypeValues[i][1], behaviorTypeValues[i][2],true);
}
return b;
}

View File

@ -17,7 +17,7 @@ public class OpenMissionBehavior extends BaseBehavior {
BehaviorUtil.updateMission(user, eventUpdateResponse);
// 开新事件
for (int i = 1; i < behaviorTypeValues.length; i++) {
BehaviorUtil.addBehaviorInfo(user,behaviorTypeValues[i][3], user.getMapManager(), behaviorTypeValues[i][0], behaviorTypeValues[i][1], behaviorTypeValues[i][2]);
BehaviorUtil.addBehaviorInfo(user,behaviorTypeValues[i][3], user.getMapManager(), behaviorTypeValues[i][0], behaviorTypeValues[i][1], behaviorTypeValues[i][2],true);
}
return true;
}

View File

@ -15,7 +15,7 @@ public class ThirtyBehavior extends BaseBehavior {
@Override
public boolean process(int optionId, User user, int[][] behaviorTypeValues, MapInfoProto.EventUpdateResponse.Builder eventUpdateResponse) throws Exception {
for (int i = 0; i < behaviorTypeValues.length; i++) {
BehaviorUtil.addBehaviorInfo(user,behaviorTypeValues[i][3], user.getMapManager(), behaviorTypeValues[i][0], behaviorTypeValues[i][1], behaviorTypeValues[i][2]);
BehaviorUtil.addBehaviorInfo(user,behaviorTypeValues[i][3], user.getMapManager(), behaviorTypeValues[i][0], behaviorTypeValues[i][1], behaviorTypeValues[i][2],true);
}
return true;
}

View File

@ -17,7 +17,7 @@ public class ThirtyFiveBehavior extends BaseBehavior {
BehaviorUtil.updateMission(user, eventUpdateResponse);
BehaviorUtil.destoryPoints(user, behaviorTypeValues[0]);
for (int i = 1; i < behaviorTypeValues.length; i++) {
BehaviorUtil.addBehaviorInfo(user,behaviorTypeValues[i][3], user.getMapManager(), behaviorTypeValues[i][0], behaviorTypeValues[i][1], behaviorTypeValues[i][2]);
BehaviorUtil.addBehaviorInfo(user,behaviorTypeValues[i][3], user.getMapManager(), behaviorTypeValues[i][0], behaviorTypeValues[i][1], behaviorTypeValues[i][2],true);
}
return true;
}

View File

@ -30,7 +30,7 @@ public class ThirtyNineBehavior extends BaseBehavior {
public boolean afterFight(User user, int[][] behaviorTypeValues, FightInfoProto.FightEndResponse.Builder fightEndResponse) throws Exception {
BehaviorUtil.updateMissionEndFight(user, fightEndResponse);
for (int i = 1; i < behaviorTypeValues.length; i++) {
BehaviorUtil.addBehaviorInfo(user,behaviorTypeValues[i][3], user.getMapManager(), behaviorTypeValues[i][0], behaviorTypeValues[i][1], behaviorTypeValues[i][2]);
BehaviorUtil.addBehaviorInfo(user,behaviorTypeValues[i][3], user.getMapManager(), behaviorTypeValues[i][0], behaviorTypeValues[i][1], behaviorTypeValues[i][2],true);
}
return true;
}

View File

@ -25,7 +25,7 @@ public class ThirtyThreeBehavior extends BaseBehavior {
public boolean afterFight(User user, int[][] behaviorTypeValues, FightInfoProto.FightEndResponse.Builder fightEndResponse) throws Exception {
BehaviorUtil.destoryPoint(user, behaviorTypeValues[0][1]);
for (int i = 1; i < behaviorTypeValues.length; i++) {
BehaviorUtil.addBehaviorInfo(user,behaviorTypeValues[i][3], user.getMapManager(), behaviorTypeValues[i][0], behaviorTypeValues[i][1], behaviorTypeValues[i][2]);
BehaviorUtil.addBehaviorInfo(user,behaviorTypeValues[i][3], user.getMapManager(), behaviorTypeValues[i][0], behaviorTypeValues[i][1], behaviorTypeValues[i][2],true);
}
return true;
}

View File

@ -26,7 +26,7 @@ public class ThirtyTwoBehavior extends BaseBehavior {
BehaviorUtil.updateMissionEndFight(user, fightEndResponse);
BehaviorUtil.destoryPoint(user, behaviorTypeValues[0][1]);
for (int i = 1; i < behaviorTypeValues.length; i++) {
BehaviorUtil.addBehaviorInfo(user,behaviorTypeValues[i][3], user.getMapManager(), behaviorTypeValues[i][0], behaviorTypeValues[i][1], behaviorTypeValues[i][2]);
BehaviorUtil.addBehaviorInfo(user,behaviorTypeValues[i][3], user.getMapManager(), behaviorTypeValues[i][0], behaviorTypeValues[i][1], behaviorTypeValues[i][2],true);
}
return true;
}