Merge branch 'master_test_gn' into master_prb_gn
# Conflicts: # serverlogic/src/main/java/com/ljsd/jieling/util/MessageUtil.javaback_recharge
commit
fb2d38e908
|
@ -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);
|
||||
|
|
|
@ -84,7 +84,10 @@ public class MessageUtil {
|
|||
}
|
||||
|
||||
public static byte[] wrappedBufferSE(GeneratedMessage generatedMessage,SkyEyeProperties properties) {
|
||||
int b1 = Integer.parseInt(properties.getAppId(),16);
|
||||
int b1 = 0;
|
||||
if(properties.getAppId() != null){
|
||||
b1 = Integer.parseInt(properties.getAppId(),16);
|
||||
}
|
||||
byte[] idByte = short2byte((short) b1);
|
||||
byte[] backMessage = generatedMessage.toByteArray();
|
||||
byte[] verifyByte = new byte[2+4+backMessage.length];
|
||||
|
@ -464,6 +467,9 @@ public class MessageUtil {
|
|||
}
|
||||
SkyEyeAutoConfigration netServerConfig = ConfigurableApplicationContextManager.getBean(SkyEyeAutoConfigration.class);
|
||||
SkyEyeProperties properties = netServerConfig.getSkyEyeProperties();
|
||||
if(properties == null){
|
||||
return;
|
||||
}
|
||||
ChatProto.ChatV3.Builder v3 = buildChatV3(msg,me,he,channel,properties);
|
||||
byte[] byteBuf = wrappedBufferSE(v3.build(),properties);
|
||||
// session.writeAndFlush(byteBuf);
|
||||
|
@ -488,6 +494,9 @@ public class MessageUtil {
|
|||
v3.setIp(ip);
|
||||
skyEyeExtraMap.clear();
|
||||
String url = properties.getGmAddress();
|
||||
if(url == null){
|
||||
return v3;
|
||||
}
|
||||
skyEyeExtraMap.put("url",url);
|
||||
v3.setExtra(JSON.toJSONString(skyEyeExtraMap));
|
||||
return v3;
|
||||
|
|
Loading…
Reference in New Issue