Merge branch 'master' of 60.1.1.230:backend/jieling_server
# Conflicts: # serverlogic/src/main/java/com/ljsd/jieling/logic/fight/GameFightType.java # serverlogic/src/main/java/com/ljsd/jieling/logic/rank/RankEnum.javaback_recharge
commit
09731d81bc
|
@ -245,6 +245,17 @@ public class RedisKey {
|
||||||
|
|
||||||
public final static String ACTIVITY_GIFT_LIMIT = "ACTIVITY_GIFT_LIMIT"; //活动礼包个数限制
|
public final static String ACTIVITY_GIFT_LIMIT = "ACTIVITY_GIFT_LIMIT"; //活动礼包个数限制
|
||||||
|
|
||||||
|
|
||||||
|
public static final String DEATH_PATH_EVERY_PERSON_RANK = "DEATH_PATH_EVERY_PERSON_RANK";
|
||||||
|
|
||||||
|
public static final String DEATH_PATH_EVERY_GUILD_RANK = "DEATH_PATH_EVERY_GUILD_RANK";
|
||||||
|
|
||||||
|
public static final String DEATH_PATH_CHALLENGE_COUNT = "DEATH_PATH_CHALLENGE_COUNT";
|
||||||
|
|
||||||
|
public static final String DEATH_PATH_TOTAL_PERSON_RANK = "DEATH_PATH_TOTAL_PERSON_RANK";
|
||||||
|
|
||||||
|
public static final String DEATH_PATH_TOTAL_GUILD_RANK = "DEATH_PATH_TOTAL_GUILD_RANK";
|
||||||
|
|
||||||
public final static String CAR_CHALLENEG_SB = "CAR_CHALLENEG_SB"; //车迟玩法挑战记录
|
public final static String CAR_CHALLENEG_SB = "CAR_CHALLENEG_SB"; //车迟玩法挑战记录
|
||||||
|
|
||||||
public final static String CAR_CHALLENEG_RECORD = "CAR_CHALLENEG_RECORD"; //车迟玩法挑战记录
|
public final static String CAR_CHALLENEG_RECORD = "CAR_CHALLENEG_RECORD"; //车迟玩法挑战记录
|
||||||
|
|
|
@ -930,6 +930,9 @@ public class RedisUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void incrementZsetScore(String type,String key, String value, int changeScore){
|
public void incrementZsetScore(String type,String key, String value, int changeScore){
|
||||||
|
incrementZsetScore(type,key,value,(double)(changeScore));
|
||||||
|
}
|
||||||
|
public void incrementZsetScore(String type,String key, String value, double changeScore){
|
||||||
String rkey = getKey(type, key);
|
String rkey = getKey(type, key);
|
||||||
for (int i = 0; i < MAX_TRY_TIMES; i++) {
|
for (int i = 0; i < MAX_TRY_TIMES; i++) {
|
||||||
try {
|
try {
|
||||||
|
@ -944,6 +947,7 @@ public class RedisUtil {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void removeZSetRangeByRank(String key,int start,int end){
|
public void removeZSetRangeByRank(String key,int start,int end){
|
||||||
for (int i = 0; i < MAX_TRY_TIMES; i++) {
|
for (int i = 0; i < MAX_TRY_TIMES; i++) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -126,7 +126,11 @@ public interface BIReason {
|
||||||
int JEWEL_DECOMPOSE = 70;//分解宝器
|
int JEWEL_DECOMPOSE = 70;//分解宝器
|
||||||
|
|
||||||
int RESET_GUILD_SKILL = 71;//重置工会技能
|
int RESET_GUILD_SKILL = 71;//重置工会技能
|
||||||
int FETE_REWARD = 72;//祭祀掉落
|
|
||||||
|
int DEATH_PATH_CHALLENGE = 72;//十绝阵挑战奖励
|
||||||
|
|
||||||
|
|
||||||
|
int FETE_REWARD = 73;//祭祀掉落
|
||||||
|
|
||||||
int ADVENTURE_UPLEVEL_CONSUME = 1000;//秘境升级
|
int ADVENTURE_UPLEVEL_CONSUME = 1000;//秘境升级
|
||||||
int SECRETBOX_CONSUME = 1001;//秘盒抽卡
|
int SECRETBOX_CONSUME = 1001;//秘盒抽卡
|
||||||
|
|
|
@ -19,7 +19,6 @@ public class RankHandler extends BaseHandler<PlayerInfoProto.RankRequest> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void processWithProto(ISession iSession, PlayerInfoProto.RankRequest proto) throws Exception {
|
public void processWithProto(ISession iSession, PlayerInfoProto.RankRequest proto) throws Exception {
|
||||||
// MapLogic.getInstance().getTowerRank(iSession,proto.getType(),MessageTypeProto.MessageType.GET_ONE_RANK_RESPONSE);
|
|
||||||
RankLogic.getInstance().getRank(iSession,proto.getType(),proto.getActiviteId(),MessageTypeProto.MessageType.GET_ONE_RANK_RESPONSE);
|
RankLogic.getInstance().getRank(iSession,proto.getType(),proto.getActiviteId(),MessageTypeProto.MessageType.GET_ONE_RANK_RESPONSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.ljsd.jieling.handler.family.deathPath;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.handler.BaseHandler;
|
||||||
|
import com.ljsd.jieling.logic.family.DeathPathLogic;
|
||||||
|
import com.ljsd.jieling.network.session.ISession;
|
||||||
|
import com.ljsd.jieling.protocols.Family;
|
||||||
|
import com.ljsd.jieling.protocols.MessageTypeProto;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lvxinran
|
||||||
|
* @date 2020/5/7
|
||||||
|
* @discribe
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class DeathPathChallengeHandler extends BaseHandler<Family.ChallengeDeathPathRequest> {
|
||||||
|
@Override
|
||||||
|
public MessageTypeProto.MessageType getMessageCode() {
|
||||||
|
return MessageTypeProto.MessageType.DEATH_PATH_CHALLENGE_REQUEST;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void processWithProto(ISession iSession, Family.ChallengeDeathPathRequest proto) throws Exception {
|
||||||
|
DeathPathLogic.getInstance().challenge(iSession,proto.getPathId(), MessageTypeProto.MessageType.DEATH_PATH_CHALLENGE_RESPONSE);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.ljsd.jieling.handler.family.deathPath;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.handler.BaseHandler;
|
||||||
|
import com.ljsd.jieling.logic.family.DeathPathLogic;
|
||||||
|
import com.ljsd.jieling.netty.cocdex.PacketNetData;
|
||||||
|
import com.ljsd.jieling.network.session.ISession;
|
||||||
|
import com.ljsd.jieling.protocols.MessageTypeProto;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lvxinran
|
||||||
|
* @date 2020/5/7
|
||||||
|
* @discribe
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class GetDeathPathInfoHandler extends BaseHandler {
|
||||||
|
@Override
|
||||||
|
public MessageTypeProto.MessageType getMessageCode() {
|
||||||
|
return MessageTypeProto.MessageType.DEATH_PATH_INFO_REQUEST;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void process(ISession iSession, PacketNetData netData) throws Exception {
|
||||||
|
DeathPathLogic.getInstance().getBaseInfo(iSession, MessageTypeProto.MessageType.DEATH_PATH_INFO_RESPONSE);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.ljsd.jieling.handler.family.deathPath;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.handler.BaseHandler;
|
||||||
|
import com.ljsd.jieling.logic.family.DeathPathLogic;
|
||||||
|
import com.ljsd.jieling.netty.cocdex.PacketNetData;
|
||||||
|
import com.ljsd.jieling.network.session.ISession;
|
||||||
|
import com.ljsd.jieling.protocols.MessageTypeProto;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lvxinran
|
||||||
|
* @date 2020/5/7
|
||||||
|
* @discribe
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class GetDeathPathStatusHandler extends BaseHandler {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageTypeProto.MessageType getMessageCode() {
|
||||||
|
return MessageTypeProto.MessageType.DEATH_PATH_GET_STATUS_REQUEST;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void process(ISession iSession, PacketNetData netData) throws Exception {
|
||||||
|
DeathPathLogic.getInstance().getStatus(iSession,MessageTypeProto.MessageType.DEATH_PATH_GET_STATUS_RESPONSE);
|
||||||
|
}
|
||||||
|
}
|
|
@ -20,6 +20,8 @@ public class GuildMyInfo extends MongoBase {
|
||||||
private long preMoveTimestamp; //上次更新时间
|
private long preMoveTimestamp; //上次更新时间
|
||||||
private int maxBossHurt; //工会boss最高伤害
|
private int maxBossHurt; //工会boss最高伤害
|
||||||
private int lastHurt; //上一次伤害
|
private int lastHurt; //上一次伤害
|
||||||
|
private Map<Integer,Integer> deathMaxDamage = new HashMap<>();
|
||||||
|
|
||||||
private int fetetype;//祭祀类型
|
private int fetetype;//祭祀类型
|
||||||
private int feteguild;//祭祀公会id
|
private int feteguild;//祭祀公会id
|
||||||
private Set<Integer> hadTakeReward= new HashSet<>();//已经领取的进度奖励
|
private Set<Integer> hadTakeReward= new HashSet<>();//已经领取的进度奖励
|
||||||
|
@ -172,4 +174,14 @@ public class GuildMyInfo extends MongoBase {
|
||||||
guildSkill.remove(type);
|
guildSkill.remove(type);
|
||||||
updateString("guildSkill",guildSkill);
|
updateString("guildSkill",guildSkill);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Map<Integer, Integer> getDeathMaxDamage() {
|
||||||
|
return deathMaxDamage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeathMaxDamage(int pathId, int damage) {
|
||||||
|
deathMaxDamage.put(pathId,damage);
|
||||||
|
updateString("deathMaxDamage",deathMaxDamage);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,270 @@
|
||||||
|
package com.ljsd.jieling.logic.family;
|
||||||
|
|
||||||
|
import com.ljsd.common.mogodb.util.BlockingUniqueQueue;
|
||||||
|
import com.ljsd.jieling.core.GlobalsDef;
|
||||||
|
import com.ljsd.jieling.db.redis.RedisKey;
|
||||||
|
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||||
|
import com.ljsd.jieling.globals.BIReason;
|
||||||
|
import com.ljsd.jieling.logic.dao.GuildMyInfo;
|
||||||
|
import com.ljsd.jieling.logic.dao.GuilidManager;
|
||||||
|
import com.ljsd.jieling.logic.dao.UserManager;
|
||||||
|
import com.ljsd.jieling.logic.dao.root.GuildInfo;
|
||||||
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
|
import com.ljsd.jieling.logic.fight.FightDispatcher;
|
||||||
|
import com.ljsd.jieling.logic.fight.GameFightType;
|
||||||
|
import com.ljsd.jieling.logic.fight.PVEFightEvent;
|
||||||
|
import com.ljsd.jieling.logic.fight.result.FightResult;
|
||||||
|
import com.ljsd.jieling.logic.rank.RankContext;
|
||||||
|
import com.ljsd.jieling.logic.rank.RankEnum;
|
||||||
|
import com.ljsd.jieling.logic.rank.rankImpl.AbstractRank;
|
||||||
|
import com.ljsd.jieling.network.session.ISession;
|
||||||
|
import com.ljsd.jieling.protocols.CommonProto;
|
||||||
|
import com.ljsd.jieling.protocols.Family;
|
||||||
|
import com.ljsd.jieling.protocols.MessageTypeProto;
|
||||||
|
import com.ljsd.jieling.util.ItemUtil;
|
||||||
|
import com.ljsd.jieling.util.MessageUtil;
|
||||||
|
import config.SGuildSetting;
|
||||||
|
import config.SGuildWarConfig;
|
||||||
|
import manager.STableManager;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.data.redis.core.ZSetOperations;
|
||||||
|
import util.TimeUtils;
|
||||||
|
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.concurrent.BlockingQueue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lvxinran
|
||||||
|
* @date 2020/5/6
|
||||||
|
* @discribe 十绝阵相关
|
||||||
|
*/
|
||||||
|
public class DeathPathLogic {
|
||||||
|
private DeathPathLogic(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private int[] guildWarOpenTime;
|
||||||
|
|
||||||
|
private int[][] guildWarTime;
|
||||||
|
|
||||||
|
private int overTime;
|
||||||
|
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(DeathPathLogic.class);
|
||||||
|
|
||||||
|
private Thread taskExecutor = null;
|
||||||
|
|
||||||
|
private BlockingQueue<DeathPathTask> tasks = new BlockingUniqueQueue<>();
|
||||||
|
|
||||||
|
public static class DeathPathLogicInstance {
|
||||||
|
public final static DeathPathLogic instance = new DeathPathLogic();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DeathPathLogic getInstance() {
|
||||||
|
return DeathPathLogic.DeathPathLogicInstance.instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int status = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查是否在开启状态
|
||||||
|
*/
|
||||||
|
public void statusCheck(){
|
||||||
|
if(guildWarOpenTime==null){
|
||||||
|
guildWarOpenTime = SGuildSetting.sGuildSetting.getGuildWarOpenTime();
|
||||||
|
}
|
||||||
|
if(guildWarTime==null){
|
||||||
|
guildWarTime = SGuildSetting.sGuildSetting.getGuildWarTime();
|
||||||
|
}
|
||||||
|
boolean result = false;
|
||||||
|
if(guildWarOpenTime[0]==2){
|
||||||
|
int dayOfWeek = TimeUtils.getDayOfWeek();
|
||||||
|
for(int i = 1;i<guildWarOpenTime.length;i++){
|
||||||
|
if(guildWarOpenTime[i]!=dayOfWeek){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
result = true;
|
||||||
|
}
|
||||||
|
}else if(guildWarOpenTime[0]==1){
|
||||||
|
result = true;
|
||||||
|
}else{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(result&&isOpen()){
|
||||||
|
if(taskExecutor==null){
|
||||||
|
taskExecutor = new DeathPathExecutor(tasks);
|
||||||
|
taskExecutor.start();
|
||||||
|
}
|
||||||
|
status = 1;
|
||||||
|
}else {
|
||||||
|
status = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isOpen(){
|
||||||
|
int hourOfDay = TimeUtils.getHourOfDay();
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
int minute = calendar.get(Calendar.MINUTE);
|
||||||
|
if(hourOfDay<=guildWarTime[0][0]&&minute<guildWarTime[0][1]){
|
||||||
|
if(overTime!=0)
|
||||||
|
overTime=0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(hourOfDay>=guildWarTime[1][0]&&minute>guildWarTime[1][1]){
|
||||||
|
if(overTime!=0)
|
||||||
|
overTime=0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(overTime==0){
|
||||||
|
overTime = (int)(TimeUtils.getAppointTime(guildWarTime[1][0],guildWarTime[1][1])/1000);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取状态
|
||||||
|
* @param session
|
||||||
|
* @param messageType
|
||||||
|
*/
|
||||||
|
public void getStatus(ISession session, MessageTypeProto.MessageType messageType){
|
||||||
|
Family.GetDeathPathStatusResponse response = Family.GetDeathPathStatusResponse.newBuilder().setStatus(status).build();
|
||||||
|
MessageUtil.sendMessage(session,1,messageType.getNumber(),response,true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取十绝阵内部信息
|
||||||
|
* @param session
|
||||||
|
* @param messageType
|
||||||
|
*/
|
||||||
|
public void getBaseInfo(ISession session,MessageTypeProto.MessageType messageType){
|
||||||
|
int uid = session.getUid();
|
||||||
|
String count = (String) RedisUtil.getInstence().get(RedisKey.getKey(RedisKey.DEATH_PATH_CHALLENGE_COUNT, String.valueOf(uid), false));
|
||||||
|
int challengeCount = count==null?0:Integer.parseInt(count);
|
||||||
|
Family.GetDeathPathInfoResponse.Builder response = Family.GetDeathPathInfoResponse.newBuilder().setOverTime(overTime)
|
||||||
|
.setChallengeCount(challengeCount);
|
||||||
|
AbstractRank guildRank = RankContext.getRankEnum(RankEnum.DEATH_PATH_EVERY_GUILD_RANK.getType());
|
||||||
|
for(int i = 1 ;i<=10;i++){
|
||||||
|
Set<ZSetOperations.TypedTuple<String>> zSetReverseRangeWithScores = RedisUtil.getInstence().getZsetreverseRangeWithScores(guildRank.getRedisKey(), String.valueOf(i), 0, 0);
|
||||||
|
Iterator<ZSetOperations.TypedTuple<String>> iterator = zSetReverseRangeWithScores.iterator();
|
||||||
|
if(!iterator.hasNext()){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
ZSetOperations.TypedTuple<String> next = iterator.next();
|
||||||
|
int guildId = Integer.valueOf(next.getValue());
|
||||||
|
GuildInfo guildInfo = GuilidManager.guildInfoMap.get(guildId);
|
||||||
|
Family.DeathPathInfo info = Family.DeathPathInfo.newBuilder().setGuildName(guildInfo.getName()).setPathId(i).build();
|
||||||
|
response.addInfos(info);
|
||||||
|
}
|
||||||
|
MessageUtil.sendMessage(session,1,messageType.getNumber(),response.build(),true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 挑战十绝阵
|
||||||
|
* @param session
|
||||||
|
* @param pathId
|
||||||
|
* @param messageType
|
||||||
|
*/
|
||||||
|
public void challenge(ISession session, int pathId, MessageTypeProto.MessageType messageType) throws Exception {
|
||||||
|
int uid = session.getUid();
|
||||||
|
User user = UserManager.getUser(uid);
|
||||||
|
int guildId = user.getPlayerInfoManager().getGuildId();
|
||||||
|
SGuildWarConfig config = STableManager.getConfig(SGuildWarConfig.class).get(pathId);
|
||||||
|
PVEFightEvent pveFightEvent = new PVEFightEvent(user.getId(), GlobalsDef.FORMATION_NORMAL, 1000, "", GameFightType.DeathPathChallenge, config.getMonsterId(), 3);
|
||||||
|
FightResult fightResult = FightDispatcher.dispatcher(pveFightEvent);
|
||||||
|
int damage = fightResult.getCheckResult()[1];
|
||||||
|
CommonProto.FightData fightData = CommonProto.FightData.newBuilder()
|
||||||
|
.setFightMaxTime(1000)
|
||||||
|
.setFightSeed(fightResult.getSeed())
|
||||||
|
.setHeroFightInfos(fightResult.getFightTeamInfo())
|
||||||
|
.addAllMonsterList(fightResult.getMonsterTeamList())
|
||||||
|
.build();
|
||||||
|
//更新排行榜数据
|
||||||
|
tasks.offer(new DeathPathTask(uid,guildId,damage,pathId));
|
||||||
|
//挑战次数记录
|
||||||
|
RedisUtil.getInstence().increment(RedisKey.getKey(RedisKey.DEATH_PATH_CHALLENGE_COUNT,String.valueOf(uid),false));
|
||||||
|
CommonProto.Drop.Builder drop = ItemUtil.drop(user, config.getReward(), BIReason.DEATH_PATH_CHALLENGE);
|
||||||
|
Map<Integer, Integer> deathMaxDamage = user.getGuildMyInfo().getDeathMaxDamage();
|
||||||
|
int maxDamage = deathMaxDamage.getOrDefault(pathId, 0);
|
||||||
|
Family.ChallengeDeathPathResponse response = Family.ChallengeDeathPathResponse.newBuilder().setDamage(damage).setFightData(fightData).setDrop(drop).setHistoryMax(maxDamage).build();
|
||||||
|
if(!deathMaxDamage.containsKey(pathId)||deathMaxDamage.get(pathId)<damage){
|
||||||
|
user.getGuildMyInfo().setDeathMaxDamage(pathId,damage);
|
||||||
|
}
|
||||||
|
MessageUtil.sendMessage(session,1,messageType.getNumber(),response,true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class DeathPathExecutor extends Thread{
|
||||||
|
|
||||||
|
|
||||||
|
public DeathPathExecutor(BlockingQueue<DeathPathTask> blockingQueue) {
|
||||||
|
this.blockingQueue = blockingQueue;
|
||||||
|
}
|
||||||
|
|
||||||
|
private BlockingQueue<DeathPathTask> blockingQueue;
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
while(true){
|
||||||
|
try {
|
||||||
|
DeathPathTask task= blockingQueue.take();
|
||||||
|
taskDoExecute(task);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void taskDoExecute(DeathPathTask task){
|
||||||
|
//操作每个关的公会数据
|
||||||
|
task.setDamage(2000000000);
|
||||||
|
AbstractRank guildRank = RankContext.getRankEnum(RankEnum.DEATH_PATH_EVERY_GUILD_RANK.getType());
|
||||||
|
|
||||||
|
AbstractRank personRank = RankContext.getRankEnum(RankEnum.DEATH_PATH_EVERY_PERSON_RANK.getType());
|
||||||
|
|
||||||
|
|
||||||
|
//操作总的个人伤害
|
||||||
|
AbstractRank personTotalRank = RankContext.getRankEnum(RankEnum.DEATH_PATH_TOTAL_PERSON_RANK.getType());
|
||||||
|
personTotalRank.addRank(task.getUid(),"",task.getDamage());
|
||||||
|
//操作总的工会伤害
|
||||||
|
AbstractRank guildTotalRank = RankContext.getRankEnum(RankEnum.DEATH_PATH_TOTAL_GUILD_RANK.getType());
|
||||||
|
|
||||||
|
Set<ZSetOperations.TypedTuple<String>> zSetReverseRangeWithScores = RedisUtil.getInstence().getZsetreverseRangeWithScores(guildRank.getRedisKey(), String.valueOf(task.getPathId()), 0, 0);
|
||||||
|
int firstGuildId;
|
||||||
|
Iterator<ZSetOperations.TypedTuple<String>> iterator = zSetReverseRangeWithScores.iterator();
|
||||||
|
if(!iterator.hasNext()){
|
||||||
|
guildTotalRank.addRank(task.getGuildId(),"",task.getDamage(),1);
|
||||||
|
//操作每个关的个人数据
|
||||||
|
if(personRank.getScoreById(task.getUid(),String.valueOf(task.getPathId()))==-1){
|
||||||
|
guildRank.addRank(task.getGuildId(),String.valueOf(task.getPathId()),task.getDamage(),1);
|
||||||
|
}else{
|
||||||
|
guildRank.addRank(task.getGuildId(),String.valueOf(task.getPathId()),task.getDamage());
|
||||||
|
}
|
||||||
|
personRank.addRank(task.getUid(),String.valueOf(task.getPathId()),task.getDamage());
|
||||||
|
}else{
|
||||||
|
ZSetOperations.TypedTuple<String> next = iterator.next();
|
||||||
|
firstGuildId = Integer.valueOf(next.getValue());
|
||||||
|
//判断改阵排行榜中是否有我打过的信息,没有加个人数
|
||||||
|
if(personRank.getScoreById(task.getUid(),String.valueOf(task.getPathId()))==-1){
|
||||||
|
guildRank.addRank(task.getGuildId(),String.valueOf(task.getPathId()),task.getDamage(),1);
|
||||||
|
}else{
|
||||||
|
guildRank.addRank(task.getGuildId(),String.valueOf(task.getPathId()),task.getDamage());
|
||||||
|
}
|
||||||
|
personRank.addRank(task.getUid(),String.valueOf(task.getPathId()),task.getDamage());
|
||||||
|
Set<ZSetOperations.TypedTuple<String>> currScores = RedisUtil.getInstence().getZsetreverseRangeWithScores(guildRank.getRedisKey(), String.valueOf(task.getPathId()), 0, 0);
|
||||||
|
Iterator<ZSetOperations.TypedTuple<String>> currIterator = currScores.iterator();
|
||||||
|
ZSetOperations.TypedTuple<String> currNext = currIterator.next();
|
||||||
|
int currFirstGuildId = Integer.valueOf(currNext.getValue());
|
||||||
|
if(currFirstGuildId==firstGuildId){
|
||||||
|
guildTotalRank.addRank(task.getGuildId(),"",task.getDamage());
|
||||||
|
}else{
|
||||||
|
guildTotalRank.addRank(currFirstGuildId,"",task.getDamage(),1);
|
||||||
|
guildTotalRank.addRank(firstGuildId,"",task.getDamage(),-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
package com.ljsd.jieling.logic.family;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lvxinran
|
||||||
|
* @date 2020/5/7
|
||||||
|
* @discribe 十绝阵更新任务
|
||||||
|
*/
|
||||||
|
public class DeathPathTask {
|
||||||
|
private int uid;
|
||||||
|
|
||||||
|
private int guildId;
|
||||||
|
|
||||||
|
private int damage;
|
||||||
|
|
||||||
|
private int pathId;
|
||||||
|
|
||||||
|
public DeathPathTask(int uid, int guildId, int damage, int pathId) {
|
||||||
|
this.uid = uid;
|
||||||
|
this.guildId = guildId;
|
||||||
|
this.damage = damage;
|
||||||
|
this.pathId = pathId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getUid() {
|
||||||
|
return uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUid(int uid) {
|
||||||
|
this.uid = uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getGuildId() {
|
||||||
|
return guildId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGuildId(int guildId) {
|
||||||
|
this.guildId = guildId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDamage() {
|
||||||
|
return damage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDamage(int damage) {
|
||||||
|
this.damage = damage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPathId() {
|
||||||
|
return pathId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPathId(int pathId) {
|
||||||
|
this.pathId = pathId;
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,6 +18,7 @@ import com.ljsd.jieling.logic.fight.eventhandler.PVPFightHandler;
|
||||||
* BloodyFight(7), // 血战
|
* BloodyFight(7), // 血战
|
||||||
* MonterFight(8), // 兽潮
|
* MonterFight(8), // 兽潮
|
||||||
* DailyChallenge(9), //每日挑战
|
* DailyChallenge(9), //每日挑战
|
||||||
|
* 十绝阵
|
||||||
*/
|
*/
|
||||||
public enum GameFightType {
|
public enum GameFightType {
|
||||||
StoryFight(FightType.StoryFight,new DefaultOfRedisCacheFightHandler(), RedisKey.LEVE_DIFFICULTY_FIGHT),
|
StoryFight(FightType.StoryFight,new DefaultOfRedisCacheFightHandler(), RedisKey.LEVE_DIFFICULTY_FIGHT),
|
||||||
|
@ -42,6 +43,7 @@ public enum GameFightType {
|
||||||
|
|
||||||
GuildBossFight(FightType.GuildBossFight,new DefaultOfRedisCacheFightHandler(),RedisKey.GUILD_MONSTER_FIGHT),
|
GuildBossFight(FightType.GuildBossFight,new DefaultOfRedisCacheFightHandler(),RedisKey.GUILD_MONSTER_FIGHT),
|
||||||
DailyChallenge(FightType.StoryFight,new DefaultWithoutHandFightHandler(),null),
|
DailyChallenge(FightType.StoryFight,new DefaultWithoutHandFightHandler(),null),
|
||||||
|
DeathPathChallenge(FightType.StoryFight,new DefaultWithoutHandFightHandler(),null),
|
||||||
|
|
||||||
CarBossChallenge(FightType.CarBossFight,new DefaultWithoutHandFightHandler(),null),
|
CarBossChallenge(FightType.CarBossFight,new DefaultWithoutHandFightHandler(),null),
|
||||||
CarPersonChallenge(FightType.CarBossFight,new PVPFightHandler(),null),
|
CarPersonChallenge(FightType.CarBossFight,new PVPFightHandler(),null),
|
||||||
|
|
|
@ -23,9 +23,15 @@ public enum RankEnum {
|
||||||
GUILD_BOSS_RANK(12,RedisKey.GUILD_BOSS_RANK,GuildBossRank::new),//param1:时间 param2:英雄tempId param3:uid
|
GUILD_BOSS_RANK(12,RedisKey.GUILD_BOSS_RANK,GuildBossRank::new),//param1:时间 param2:英雄tempId param3:uid
|
||||||
GUILD_RED_PACKAGE_RANK(13,RedisKey.GUILD_RED_PACKAGE_RANK,GuildRedPackageRank::new),//param1:红包总价格 param2:无 param3:无
|
GUILD_RED_PACKAGE_RANK(13,RedisKey.GUILD_RED_PACKAGE_RANK,GuildRedPackageRank::new),//param1:红包总价格 param2:无 param3:无
|
||||||
CAR_DEALY_RANK(14,RedisKey.CAR_DEALY_RANK,CarDealyRank::new),//param1:伤害 param2:无 param3:无
|
CAR_DEALY_RANK(14,RedisKey.CAR_DEALY_RANK,CarDealyRank::new),//param1:伤害 param2:无 param3:无
|
||||||
|
<<<<<<< HEAD
|
||||||
CAR_DEALY_GUILD_RANK(15,RedisKey.CAR_DEALY_GUILD_RANK,CarDealyGuildRank::new),//param1:伤害 param2:无 param3:无
|
CAR_DEALY_GUILD_RANK(15,RedisKey.CAR_DEALY_GUILD_RANK,CarDealyGuildRank::new),//param1:伤害 param2:无 param3:无
|
||||||
|
=======
|
||||||
|
DEATH_PATH_EVERY_PERSON_RANK(15,RedisKey.DEATH_PATH_EVERY_PERSON_RANK,DeathPathEveryPersonRank::new),//param1:当前阵玩家伤害 param2:无 param3:无
|
||||||
|
DEATH_PATH_EVERY_GUILD_RANK(16,RedisKey.DEATH_PATH_EVERY_GUILD_RANK, DeathPathEveryGuildRank::new),//param1:当前阵公会伤害 param2:当前工会挑战人数 param3:无
|
||||||
|
DEATH_PATH_TOTAL_PERSON_RANK(17,RedisKey.DEATH_PATH_TOTAL_PERSON_RANK,DeathPathTotalPersonRank::new),//param1:玩家总伤害 param2:无 param3:无
|
||||||
|
DEATH_PATH_TOTAL_GUILD_RANK(18,RedisKey.DEATH_PATH_TOTAL_GUILD_RANK,DeathPathTotalGuildRank::new);//param1:工会总伤害 param2:无 param3:无
|
||||||
|
>>>>>>> 6079cc96cad9be05eaf05cb60cabe881449adf30
|
||||||
|
|
||||||
;
|
|
||||||
private int type;
|
private int type;
|
||||||
private String redisKey;
|
private String redisKey;
|
||||||
private BiFunction<Integer,String,AbstractRank> rankFunction;
|
private BiFunction<Integer,String,AbstractRank> rankFunction;
|
||||||
|
|
|
@ -0,0 +1,64 @@
|
||||||
|
package com.ljsd.jieling.logic.rank.rankImpl;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||||
|
import com.ljsd.jieling.logic.dao.GuilidManager;
|
||||||
|
import com.ljsd.jieling.logic.dao.root.GuildInfo;
|
||||||
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
|
import com.ljsd.jieling.protocols.CommonProto;
|
||||||
|
import com.ljsd.jieling.protocols.PlayerInfoProto;
|
||||||
|
import org.springframework.data.redis.core.ZSetOperations;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lvxinran
|
||||||
|
* @date 2020/5/7
|
||||||
|
* @discribe
|
||||||
|
*/
|
||||||
|
public class DeathPathEveryGuildRank extends AbstractRank {
|
||||||
|
public DeathPathEveryGuildRank(int type, String redisKey) {
|
||||||
|
super(type, redisKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void getOptional(int index, ZSetOperations.TypedTuple<String> data, PlayerInfoProto.RankResponse.Builder builder) {
|
||||||
|
GuildInfo guildInfo = GuilidManager.guildInfoMap.get(Integer.parseInt(data.getValue()));
|
||||||
|
CommonProto.RankInfo.Builder everyRankInfo = CommonProto.RankInfo.newBuilder()
|
||||||
|
.setRank(index)
|
||||||
|
.setParam1(getParam1(data.getScore()))
|
||||||
|
.setParam2(getParam2(data.getScore()))
|
||||||
|
.setParam3(getParam3(data.getScore()));
|
||||||
|
CommonProto.UserRank.Builder everyRank = CommonProto.UserRank.newBuilder()
|
||||||
|
.setUid(guildInfo.getId())
|
||||||
|
.setGuildName(guildInfo.getName())
|
||||||
|
.setRankInfo(everyRankInfo);
|
||||||
|
builder.addRanks(everyRank);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int[] getDataByScore(Double score) {
|
||||||
|
return new int[]{(int)(score/1000),(int)(score%1000)};
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getScore(double... data) {
|
||||||
|
long result = (long) (data[0]*1000);
|
||||||
|
if(data.length>1){
|
||||||
|
result+=data[1];
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void addRank(int uid,String rkey,double... data){
|
||||||
|
RedisUtil.getInstence().incrementZsetScore(redisKey,rkey,String.valueOf(uid), getScore(data));
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected void getMyInfo(User user, String rkey, PlayerInfoProto.RankResponse.Builder allUserResponse){
|
||||||
|
int guildId = user.getPlayerInfoManager().getGuildId();
|
||||||
|
int myRank= RedisUtil.getInstence().getZSetreverseRank(redisKey,rkey,Integer.toString(guildId)).intValue();
|
||||||
|
Double zSetScore = RedisUtil.getInstence().getZSetScore(redisKey, rkey, Integer.toString(guildId));
|
||||||
|
CommonProto.RankInfo towerRankInfo = CommonProto.RankInfo.newBuilder()
|
||||||
|
.setRank(myRank)
|
||||||
|
.setParam1(getParam1(zSetScore))
|
||||||
|
.setParam2(getParam2(zSetScore)).build();
|
||||||
|
allUserResponse.setMyRankInfo(towerRankInfo);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.ljsd.jieling.logic.rank.rankImpl;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lvxinran
|
||||||
|
* @date 2020/5/7
|
||||||
|
* @discribe
|
||||||
|
*/
|
||||||
|
public class DeathPathEveryPersonRank extends AbstractRank {
|
||||||
|
|
||||||
|
public DeathPathEveryPersonRank(int type, String redisKey) {
|
||||||
|
super(type, redisKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int[] getDataByScore(Double score) {
|
||||||
|
return new int[]{score.intValue()};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double getScore(double... data) {
|
||||||
|
return data[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addRank(int uid,String rkey,double... data){
|
||||||
|
RedisUtil.getInstence().incrementZsetScore(redisKey,rkey,String.valueOf(uid), Double.valueOf(getScore(data)).intValue());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,71 @@
|
||||||
|
package com.ljsd.jieling.logic.rank.rankImpl;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||||
|
import com.ljsd.jieling.logic.dao.GuilidManager;
|
||||||
|
import com.ljsd.jieling.logic.dao.UserManager;
|
||||||
|
import com.ljsd.jieling.logic.dao.root.GuildInfo;
|
||||||
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
|
import com.ljsd.jieling.protocols.CommonProto;
|
||||||
|
import com.ljsd.jieling.protocols.PlayerInfoProto;
|
||||||
|
import org.springframework.data.redis.core.ZSetOperations;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lvxinran
|
||||||
|
* @date 2020/5/8
|
||||||
|
* @discribe
|
||||||
|
*/
|
||||||
|
public class DeathPathTotalGuildRank extends AbstractRank{
|
||||||
|
public DeathPathTotalGuildRank(int type, String redisKey) {
|
||||||
|
super(type, redisKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int[] getDataByScore(Double score) {
|
||||||
|
BigDecimal bigDecimal = new BigDecimal(score.toString()).subtract(new BigDecimal(score.intValue())).multiply(new BigDecimal(String.valueOf(Math.pow(10,8))));
|
||||||
|
return new int[]{bigDecimal.intValue(),score.intValue()};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double getScore(double... data) {
|
||||||
|
BigDecimal decimal = null;
|
||||||
|
decimal = new BigDecimal(String.valueOf(data[0])).divide(new BigDecimal(String.valueOf(Math.pow(10,8))));
|
||||||
|
if(data.length>1){
|
||||||
|
decimal = decimal.add(new BigDecimal(data[1]));
|
||||||
|
}
|
||||||
|
return decimal.doubleValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void getOptional(int index, ZSetOperations.TypedTuple<String> data, PlayerInfoProto.RankResponse.Builder builder) throws Exception {
|
||||||
|
|
||||||
|
GuildInfo guildInfo = GuilidManager.guildInfoMap.get(Integer.parseInt(data.getValue()));
|
||||||
|
CommonProto.RankInfo.Builder everyRankInfo = CommonProto.RankInfo.newBuilder()
|
||||||
|
.setRank(index)
|
||||||
|
.setParam1(getParam1(data.getScore()))
|
||||||
|
.setParam2(getParam2(data.getScore()))
|
||||||
|
.setParam3(getParam3(data.getScore()));
|
||||||
|
CommonProto.UserRank.Builder everyRank = CommonProto.UserRank.newBuilder()
|
||||||
|
.setUid(guildInfo.getId())
|
||||||
|
.setGuildName(guildInfo.getName())
|
||||||
|
.setRankInfo(everyRankInfo);
|
||||||
|
builder.addRanks(everyRank);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void getMyInfo(User user, String rkey, PlayerInfoProto.RankResponse.Builder allUserResponse) {
|
||||||
|
int guildId = user.getPlayerInfoManager().getGuildId();
|
||||||
|
int myRank= RedisUtil.getInstence().getZSetreverseRank(redisKey,rkey,Integer.toString(guildId)).intValue();
|
||||||
|
Double zSetScore = RedisUtil.getInstence().getZSetScore(redisKey, rkey, Integer.toString(guildId));
|
||||||
|
CommonProto.RankInfo towerRankInfo = CommonProto.RankInfo.newBuilder()
|
||||||
|
.setRank(myRank)
|
||||||
|
.setParam1(getParam1(zSetScore))
|
||||||
|
.setParam2(getParam2(zSetScore)).build();
|
||||||
|
allUserResponse.setMyRankInfo(towerRankInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addRank(int uid, String rkey, double... data) {
|
||||||
|
RedisUtil.getInstence().incrementZsetScore(redisKey,rkey,String.valueOf(uid), getScore(data));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.ljsd.jieling.logic.rank.rankImpl;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lvxinran
|
||||||
|
* @date 2020/5/8
|
||||||
|
* @discribe 十绝阵个人总排行
|
||||||
|
*/
|
||||||
|
public class DeathPathTotalPersonRank extends AbstractRank {
|
||||||
|
|
||||||
|
public DeathPathTotalPersonRank(int type, String redisKey) {
|
||||||
|
super(type, redisKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int[] getDataByScore(Double score) {
|
||||||
|
return new int[]{score.intValue()};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double getScore(double... data) {
|
||||||
|
return data[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addRank(int uid, String rkey, double... data) {
|
||||||
|
RedisUtil.getInstence().incrementZsetScore(redisKey,rkey,String.valueOf(uid), getScore(data));
|
||||||
|
}
|
||||||
|
}
|
|
@ -23,6 +23,7 @@ import com.ljsd.jieling.logic.activity.event.Poster;
|
||||||
import com.ljsd.jieling.logic.arena.ArenaLogic;
|
import com.ljsd.jieling.logic.arena.ArenaLogic;
|
||||||
import com.ljsd.jieling.logic.dao.GuilidManager;
|
import com.ljsd.jieling.logic.dao.GuilidManager;
|
||||||
import com.ljsd.jieling.logic.dao.root.GuildInfo;
|
import com.ljsd.jieling.logic.dao.root.GuildInfo;
|
||||||
|
import com.ljsd.jieling.logic.family.DeathPathLogic;
|
||||||
import com.ljsd.jieling.logic.family.GuildFightLogic;
|
import com.ljsd.jieling.logic.family.GuildFightLogic;
|
||||||
import com.ljsd.jieling.logic.fight.CombatLogic;
|
import com.ljsd.jieling.logic.fight.CombatLogic;
|
||||||
import com.ljsd.jieling.logic.mail.MailLogic;
|
import com.ljsd.jieling.logic.mail.MailLogic;
|
||||||
|
@ -77,6 +78,7 @@ public class MinuteTask extends Thread {
|
||||||
CoreLogic.getInstance().checkCoreCdk();
|
CoreLogic.getInstance().checkCoreCdk();
|
||||||
BuyGoodsLogic.minuteCheckReharge();
|
BuyGoodsLogic.minuteCheckReharge();
|
||||||
RedisUtil.getInstence().set(RedisKey.ONLINE_NUM+RedisKey.Delimiter_colon+GameApplication.serverId, String.valueOf(OnlineUserManager.sessionMap.entrySet().size()));
|
RedisUtil.getInstence().set(RedisKey.ONLINE_NUM+RedisKey.Delimiter_colon+GameApplication.serverId, String.valueOf(OnlineUserManager.sessionMap.entrySet().size()));
|
||||||
|
DeathPathLogic.getInstance().statusCheck();
|
||||||
GuildFightLogic.minuteCheckForCarFight();
|
GuildFightLogic.minuteCheckForCarFight();
|
||||||
LOGGER.info("MinuteTask end...");
|
LOGGER.info("MinuteTask end...");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
@ -28,6 +28,8 @@ public class SGuildSetting implements BaseConfig {
|
||||||
|
|
||||||
private int[] guildWarOpenTime;
|
private int[] guildWarOpenTime;
|
||||||
|
|
||||||
|
private int[][] guildWarTime;
|
||||||
|
|
||||||
private int[][] prepareTime;
|
private int[][] prepareTime;
|
||||||
|
|
||||||
private int[][] matchTime;
|
private int[][] matchTime;
|
||||||
|
@ -219,4 +221,8 @@ public class SGuildSetting implements BaseConfig {
|
||||||
public int[] getGiveLikeReward() {
|
public int[] getGiveLikeReward() {
|
||||||
return giveLikeReward;
|
return giveLikeReward;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int[][] getGuildWarTime() {
|
||||||
|
return guildWarTime;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
package config;
|
||||||
|
|
||||||
|
import manager.STableManager;
|
||||||
|
import manager.Table;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Table(name ="GuildWarConfig")
|
||||||
|
public class SGuildWarConfig implements BaseConfig {
|
||||||
|
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
private int monsterId;
|
||||||
|
|
||||||
|
private int[][] reward;
|
||||||
|
|
||||||
|
private int maxHealth;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init() throws Exception {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMonsterId() {
|
||||||
|
return monsterId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[][] getReward() {
|
||||||
|
return reward;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMaxHealth() {
|
||||||
|
return maxHealth;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue