七界积分修改
parent
7046a85c3d
commit
7a95b0e771
|
@ -11,7 +11,6 @@ import com.ljsd.jieling.logic.dao.cross.CSPlayer;
|
|||
import com.ljsd.jieling.logic.mail.MailLogic;
|
||||
import com.ljsd.jieling.logic.rank.RankContext;
|
||||
import com.ljsd.jieling.logic.rank.RankEnum;
|
||||
import com.ljsd.jieling.logic.sevenworld.SevenWorldLogic;
|
||||
import config.SErrorCodeEerverConfig;
|
||||
import config.SQijieRanking;
|
||||
import manager.STableManager;
|
||||
|
@ -59,7 +58,7 @@ public class SevenWorldFunction implements FunctionManager {
|
|||
continue;
|
||||
}
|
||||
// 清除道具标记
|
||||
SevenWorldLogic.setClearMark(uid);
|
||||
// SevenWorldLogic.setClearMark(uid);
|
||||
if (TimeUtils.now() > (player.getOffLineTime()+TimeUtils.WEEK)){
|
||||
LOGGER.error("七界发奖,玩家登陆时间超过七天,uid:{},排名:{},最后登陆时间:{},当前时间:{}",uid,rank,TimeUtils.getTimeStamp2(player.getOffLineTime()),TimeUtils.nowStr());
|
||||
continue;
|
||||
|
|
|
@ -441,8 +441,6 @@ public class GlobalDataManaager implements IManager {
|
|||
RidingSwardLogic.getInstance().zeroClearRidingSwardByUser(user);
|
||||
// 公会援助
|
||||
GuildLogic.getInstance().guildHelpDayHandler(user);
|
||||
// 七界道具清理
|
||||
SevenWorldLogic.getClearMark(user.getId());
|
||||
|
||||
WeekCardLogic.getInstance().weekCardInfoIndication(user,0,0);
|
||||
ChallengeLogic.getInstance().ChallengeInfoIndication(session);
|
||||
|
|
|
@ -3,8 +3,6 @@ package com.ljsd.jieling.logic.sevenworld;
|
|||
import com.ljsd.GameApplication;
|
||||
import com.ljsd.jieling.core.FunctionIdEnum;
|
||||
import com.ljsd.jieling.core.HandlerLogicThread;
|
||||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||
import com.ljsd.jieling.exception.ErrorCode;
|
||||
import com.ljsd.jieling.exception.ErrorCodeException;
|
||||
import com.ljsd.jieling.globals.BIReason;
|
||||
|
@ -20,7 +18,6 @@ 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.item.ItemLogic;
|
||||
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||
import com.ljsd.jieling.logic.mission.MissionType;
|
||||
import com.ljsd.jieling.logic.player.PlayerLogic;
|
||||
|
@ -134,8 +131,6 @@ public class SevenWorldLogic {
|
|||
*/
|
||||
public PlayerInfoProto.SevenWorldInfoResponse getSevenWorldInfo(int uid, PlayerInfoProto.SevenWorldInfoRequest proto) throws Exception {
|
||||
User user = verify(uid);
|
||||
// 七界道具清理
|
||||
SevenWorldLogic.getClearMark(user.getId());
|
||||
// 当前周几
|
||||
int week = TimeUtils.getDayOfWeek();
|
||||
// 客户端传层数不为0,表示切换层数
|
||||
|
@ -335,27 +330,31 @@ public class SevenWorldLogic {
|
|||
int[][] jieLingReward = stage.getJielingReward();
|
||||
// 奖励的拼接字符串
|
||||
StringBuilder rewardStr = new StringBuilder();
|
||||
// 七界积分特殊处理
|
||||
int integralId = 1241;
|
||||
int integralNum = 0;
|
||||
for (int[] reward : jieLingReward) {
|
||||
// 向上取整积分
|
||||
int ceil = (int) Math.ceil(reward[1] * (buff / 10000));
|
||||
// 排行榜积分
|
||||
if (reward[0] == 1241) {
|
||||
// if (getEnd() == 1) {
|
||||
// // 规定时间不获得积分
|
||||
// continue;
|
||||
// }
|
||||
int rewardNum = reward[1] + ceil;
|
||||
if (reward[0] == integralId) {
|
||||
// 排行榜添加积分
|
||||
addRank(user.getId(),reward[1] + ceil);
|
||||
LOGGER.info("七界得分,uid:{},score:{}, qieji:{}",user.getId(),reward[1] + ceil, stage);
|
||||
addRank(user.getId(), rewardNum);
|
||||
LOGGER.info("七界得分,uid:{},score:{}, qieji:{}",user.getId(), rewardNum, stage);
|
||||
integralNum+=rewardNum;
|
||||
continue;
|
||||
}
|
||||
rewardStr.append(reward[0]).append("#").append(reward[1] + ceil).append("|");
|
||||
rewardStr.append(reward[0]).append("#").append(rewardNum).append("|");
|
||||
}
|
||||
// 1241,七界积分不如背包,只展示用
|
||||
CommonProto.Item.Builder item = CommonProto.Item.newBuilder().setItemId(integralId).setItemNum(integralNum);
|
||||
drop.addItemlist(item);
|
||||
// string转int二维数组
|
||||
int[][] rewardMap = StringUtil.parseFiledInt2(rewardStr.substring(0, rewardStr.length() - 1));
|
||||
ItemUtil.drop(user,rewardMap,drop,BIReason.SEVEN_WORLD_CHALLENGE);
|
||||
// 七界秘宝积分,没有加成
|
||||
ItemUtil.drop(user,new int[][]{stage.getTreasureIntegral()},drop,BIReason.SEVEN_WORLD_CHALLENGE);
|
||||
|
||||
// 数数埋点
|
||||
List<String> dropResult = new ArrayList<>();
|
||||
ReportUtil.dropToString(drop,dropResult);
|
||||
|
@ -375,24 +374,24 @@ public class SevenWorldLogic {
|
|||
/**
|
||||
* 添加排行榜
|
||||
*/
|
||||
public static void setClearMark(int uid){
|
||||
String key2 = RedisUtil.getInstence().getKey2(RedisKey.SEVEN_WORLD_MARK, String.valueOf(uid));
|
||||
RedisUtil.getInstence().set(key2,"1");
|
||||
LOGGER.info("七界发奖后,添加清理标记,uid:{},key:{}",uid,key2);
|
||||
}
|
||||
// public static void setClearMark(int uid){
|
||||
// String key2 = RedisUtil.getInstence().getKey2(RedisKey.SEVEN_WORLD_MARK, String.valueOf(uid));
|
||||
// RedisUtil.getInstence().set(key2,"1");
|
||||
// LOGGER.info("七界发奖后,添加清理标记,uid:{},key:{}",uid,key2);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 清理道具
|
||||
*/
|
||||
public static void getClearMark(int uid){
|
||||
String key2 = RedisUtil.getInstence().getKey2(RedisKey.SEVEN_WORLD_MARK, String.valueOf(uid));
|
||||
if (key2 == null){
|
||||
return;
|
||||
}
|
||||
ItemLogic.getInstance().functionEndClearItem(uid, FunctionIdEnum.CrossSevenWorld.getFunctionType(), BIReason.SEVEN_WORLD_FUNCTION_END);
|
||||
LOGGER.info("七界发奖后,首次获取信息,清理道具,uid:{}",uid);
|
||||
RedisUtil.getInstence().remove(key2);
|
||||
}
|
||||
// public static void getClearMark(int uid){
|
||||
// String key2 = RedisUtil.getInstence().getKey2(RedisKey.SEVEN_WORLD_MARK, String.valueOf(uid));
|
||||
// if (key2 == null){
|
||||
// return;
|
||||
// }
|
||||
// ItemLogic.getInstance().functionEndClearItem(uid, FunctionIdEnum.CrossSevenWorld.getFunctionType(), BIReason.SEVEN_WORLD_FUNCTION_END);
|
||||
// LOGGER.info("七界发奖后,首次获取信息,清理道具,uid:{}",uid);
|
||||
// RedisUtil.getInstence().remove(key2);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 根据阵营分类
|
||||
|
|
Loading…
Reference in New Issue