公会副本任务添加
parent
c126a79604
commit
4de7b94119
|
|
@ -194,6 +194,9 @@ public class CumulationData {
|
|||
//山河社稷章节数
|
||||
public int hardstage_node;
|
||||
|
||||
// 公会boss
|
||||
public int guild_boss_room;
|
||||
|
||||
public Result updateData(MissionType missionType, Object...parm) throws Exception {
|
||||
return DataManagerDistributor.updateData(this, missionType,parm);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import com.ljsd.jieling.logic.dao.root.User;
|
|||
import com.ljsd.jieling.logic.fight.*;
|
||||
import com.ljsd.jieling.logic.fight.result.FightResult;
|
||||
import com.ljsd.jieling.logic.mail.MailLogic;
|
||||
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||
import com.ljsd.jieling.logic.player.PlayerLogic;
|
||||
import com.ljsd.jieling.logic.rank.RankContext;
|
||||
import com.ljsd.jieling.logic.rank.RankEnum;
|
||||
|
|
@ -373,6 +374,8 @@ public class GuildChallengeLogic {
|
|||
|
||||
PlayerLogic.getInstance().checkAndUpdate(user,config.getPrivilege()[0],1);
|
||||
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.GUILD_BOSS_ROOM,1);
|
||||
|
||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),response.build(),true);
|
||||
if(kill==1&&!UserManager.getUser(uid).getGuildMyInfo().getRefreshedBoss().contains(bossId)&&guildInfo.getBossHpRemain()!=-1){
|
||||
indication.setIsRefresh(1);//需要前端刷新次数
|
||||
|
|
|
|||
|
|
@ -123,4 +123,6 @@ public enum GameEvent {
|
|||
|
||||
HARSTAGE_STARS,//山河社稷图星数
|
||||
HARSTAGE_NODE,//山河社稷图通关章节
|
||||
|
||||
GUILD_BOSS_ROOM,//公会boos副本
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,6 +136,8 @@ public enum MissionType {
|
|||
ENDLESS_OPEN_PERCENT(128),
|
||||
ENDLESS_SMALL_REWARD(129),
|
||||
ENDLESS_BIG_REWARD(130),
|
||||
|
||||
GUILD_BOSS_ROOM(131),//公会副本boss
|
||||
;
|
||||
|
||||
private int missionType;
|
||||
|
|
|
|||
|
|
@ -158,6 +158,8 @@ public class DataManagerDistributor {
|
|||
judges.put(MissionType.HARSTAGE_STARS, new HardStageStarsDataManager());
|
||||
judges.put(MissionType.HARSTAGE_NODE, new HardStageNodeDataManager());
|
||||
|
||||
// 公会副本/boss
|
||||
judges.put(MissionType.GUILD_BOSS_ROOM,new GuildBossRoomManager());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
package com.ljsd.jieling.logic.mission.data;
|
||||
|
||||
import com.ljsd.jieling.logic.dao.CumulationData;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.mission.MissionType;
|
||||
|
||||
/**
|
||||
* @Author hj
|
||||
* @Date 2021/6/7 11:03
|
||||
* @Description:
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class GuildBossRoomManager extends AbstractDataManager {
|
||||
@Override
|
||||
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
|
||||
int num = (int)parm[0];
|
||||
data.guild_boss_room+=num;
|
||||
return new CumulationData.Result(missionType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFinish(User user,CumulationData data, int[][] value, Object... parm) {
|
||||
return data.guild_boss_room>=value[1][0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getProcess(User user, CumulationData data, int[] missionSubType) {
|
||||
return data.guild_boss_room;
|
||||
}
|
||||
}
|
||||
|
|
@ -345,6 +345,11 @@ public class MissionEventDistributor {
|
|||
eventEnumListMap.put(GameEvent.LOGIN_GAME,typeList);
|
||||
eventProcessor.put(GameEvent.LOGIN_GAME,new CumulationDataEventProcessor());
|
||||
|
||||
typeList = new ArrayList<>();
|
||||
typeList.add(MissionType.GUILD_BOSS_ROOM);
|
||||
eventEnumListMap.put(GameEvent.GUILD_BOSS_ROOM,typeList);
|
||||
eventProcessor.put(GameEvent.GUILD_BOSS_ROOM,new CumulationDataEventProcessor());
|
||||
|
||||
typeList = new ArrayList<>();
|
||||
typeList.add(MissionType.SEVEN_GIFT_BUY);
|
||||
eventEnumListMap.put(GameEvent.BUY_SEVEN_GIFT,typeList);
|
||||
|
|
|
|||
Loading…
Reference in New Issue