十绝阵 跑马灯添加 领奖修改
parent
b302bd3601
commit
297bb65445
|
@ -65,6 +65,7 @@ public interface Global {
|
|||
int GMMSG = 4; //gm
|
||||
int LUCKWHEEL = 5; //幸运探宝
|
||||
int LUCKWHEEL_ADVANCE = 6; //高级探宝
|
||||
int DEATH_PATH_FIRST = 7;//十绝阵第一名公会
|
||||
|
||||
|
||||
int VIPSTORID = 20; //vip商店id
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.ljsd.jieling.logic.family;
|
||||
|
||||
import com.ljsd.common.mogodb.util.BlockingUniqueQueue;
|
||||
import com.ljsd.jieling.chat.logic.ChatLogic;
|
||||
import com.ljsd.jieling.core.FunctionIdEnum;
|
||||
import com.ljsd.jieling.core.GlobalsDef;
|
||||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
|
@ -47,7 +48,7 @@ import java.util.concurrent.BlockingQueue;
|
|||
/**
|
||||
* @author lvxinran
|
||||
* @date 2020/5/6
|
||||
* @discribe 十绝阵相关
|
||||
* @discribe 十绝阵相关-----难。。。
|
||||
*/
|
||||
public class DeathPathLogic {
|
||||
private DeathPathLogic(){
|
||||
|
@ -145,21 +146,34 @@ public class DeathPathLogic {
|
|||
// currStatus与服务器当前status比较,如果不同,认为状态修改
|
||||
if(currStatus!=status){
|
||||
status = currStatus;
|
||||
if(status==1){
|
||||
overTime = (int)(TimeUtils.getAppointTime(guildWarTime[status][0],guildWarTime[status][1])/1000);
|
||||
}
|
||||
if(status==1){
|
||||
if (taskExecutor == null) {
|
||||
taskExecutor = new DeathPathExecutor(tasks);
|
||||
taskExecutor.start();
|
||||
}
|
||||
}
|
||||
if(status==0){
|
||||
try {
|
||||
deleteDeathPathInfo();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
switch (status){
|
||||
case 0:
|
||||
try {
|
||||
deleteDeathPathInfo();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
overTime = (int)(TimeUtils.getAppointTime(guildWarTime[status][0],guildWarTime[status][1])/1000);
|
||||
if (taskExecutor == null) {
|
||||
taskExecutor = new DeathPathExecutor(tasks);
|
||||
taskExecutor.start();
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
AbstractRank guildTotalRank = RankContext.getRankEnum(RankEnum.DEATH_PATH_TOTAL_GUILD_RANK.getType());
|
||||
Set<ZSetOperations.TypedTuple<String>> firstGuild = guildTotalRank.getRankByKey("", 0, 1);
|
||||
if(firstGuild.isEmpty()||firstGuild.size()>1){
|
||||
break;
|
||||
}
|
||||
String gid = firstGuild.iterator().next().getValue();
|
||||
GuildInfo guildInfo = GuilidManager.guildInfoMap.get(Integer.parseInt(gid));
|
||||
String message = SErrorCodeEerverConfig.getI18NMessage("guildwar_content", new Object[]{guildInfo.getName()});
|
||||
ChatLogic.getInstance().sendSysChatMessage(message, Global.DEATH_PATH_FIRST, 0, 0, 0, 0, 0, 0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
System.out.println("状态修改-------");
|
||||
//阶段信息改变发送推送
|
||||
|
@ -381,8 +395,6 @@ public class DeathPathLogic {
|
|||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
int[] reward = getRewardByRank(rank.intValue());
|
||||
countInfo = new DeathChallengeCount();
|
||||
|
||||
countInfo.putUserReward(uid,new DeathReward(reward[0],reward[1],position,user.getPlayerInfoManager().getNickName()));
|
||||
RedisUtil.getInstence().set(RedisKey.DEATH_PAHT_TOTAL_CHALLENGE_COUNT, String.valueOf(guildId),countInfo);
|
||||
ItemUtil.drop(user,new int[][]{reward},BIReason.DEATH_PAHT_RANDOM_REWARD);
|
||||
|
|
Loading…
Reference in New Issue