Merge branch 'master_test_hw' into master_test_hw_five_to_zero
commit
3d388fcf32
|
@ -44,9 +44,14 @@ public class CarDelayFunction implements FunctionManager {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void closeAction() throws Exception {
|
public void closeAction() throws Exception {
|
||||||
Map<Integer, TreeMap<Integer, String>> rewardByTypeAndRankMap = SWorldBossRewardConfig.rewardByTypeAndRankMap;
|
// 获取车迟斗法当前boss的索引id
|
||||||
|
int indexId = GuildFightLogic.carDelayProgressIndication.getBossIndexId();
|
||||||
|
// 根据索引id取出当前的奖励配置
|
||||||
|
Map<Integer, TreeMap<Integer, String>> rewardByTypeAndRankMap = SWorldBossRewardConfig.rewardByBossIdMap.get(indexId);
|
||||||
|
|
||||||
TreeMap<Integer, String> personRewardConfigTreeMap = rewardByTypeAndRankMap.get(2);
|
TreeMap<Integer, String> personRewardConfigTreeMap = rewardByTypeAndRankMap.get(2);
|
||||||
TreeMap<Integer, String> guildRewardConfigTreeMap = rewardByTypeAndRankMap.get(1);
|
TreeMap<Integer, String> guildRewardConfigTreeMap = rewardByTypeAndRankMap.get(1);
|
||||||
|
|
||||||
Set<ZSetOperations.TypedTuple<String>> personRangeWithScores = RedisUtil.getInstence().getZsetreverseRangeWithScores(RedisKey.CAR_DEALY_RANK, "", 0, -1);
|
Set<ZSetOperations.TypedTuple<String>> personRangeWithScores = RedisUtil.getInstence().getZsetreverseRangeWithScores(RedisKey.CAR_DEALY_RANK, "", 0, -1);
|
||||||
int rank=0;
|
int rank=0;
|
||||||
String personTitle = SErrorCodeEerverConfig.getI18NMessage("family_fight_rank_personreward_title");
|
String personTitle = SErrorCodeEerverConfig.getI18NMessage("family_fight_rank_personreward_title");
|
||||||
|
|
|
@ -41,7 +41,6 @@ public class HotfixUtil implements IEventHandler {
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(IEvent event) throws Exception {
|
public void onEvent(IEvent event) throws Exception {
|
||||||
doWork(SysUtil.getPath("conf/hotfix.json"));
|
doWork(SysUtil.getPath("conf/hotfix.json"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doWork(String pathName){
|
private void doWork(String pathName){
|
||||||
|
|
|
@ -127,6 +127,7 @@ public class ActivityLogic implements IEventHandler{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void checkActiviyStatus() throws Exception {
|
public void checkActiviyStatus() throws Exception {
|
||||||
|
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
Map<Integer, SGlobalActivity> sGlobalActivityMap = SGlobalActivity.getsGlobalActivityMap();
|
Map<Integer, SGlobalActivity> sGlobalActivityMap = SGlobalActivity.getsGlobalActivityMap();
|
||||||
|
|
||||||
|
@ -181,7 +182,6 @@ public class ActivityLogic implements IEventHandler{
|
||||||
abstractActivity.onActivityStart();
|
abstractActivity.onActivityStart();
|
||||||
openActivityIds.add(sGlobalActivity.getId());
|
openActivityIds.add(sGlobalActivity.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
//活动数据处理分发到角色线程
|
//活动数据处理分发到角色线程
|
||||||
InnerMessageUtil.broadcastWithRandom(user1 -> {
|
InnerMessageUtil.broadcastWithRandom(user1 -> {
|
||||||
if(user1==null){
|
if(user1==null){
|
||||||
|
@ -221,7 +221,6 @@ public class ActivityLogic implements IEventHandler{
|
||||||
}, new LinkedList<>(OnlineUserManager.sessionMap.keySet()),5);
|
}, new LinkedList<>(OnlineUserManager.sessionMap.keySet()),5);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void newPlayerOpenActivityMission(User user) throws Exception {
|
public void newPlayerOpenActivityMission(User user) throws Exception {
|
||||||
checkActivityOfUser(user, null);
|
checkActivityOfUser(user, null);
|
||||||
ISession session = OnlineUserManager.getSessionByUid(user.getId());
|
ISession session = OnlineUserManager.getSessionByUid(user.getId());
|
||||||
|
|
|
@ -57,6 +57,7 @@ public class Poster {
|
||||||
try {
|
try {
|
||||||
eh.onEvent(e);
|
eh.onEvent(e);
|
||||||
}catch (Exception e1){
|
}catch (Exception e1){
|
||||||
|
e1.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,6 +72,7 @@ public class MinuteTask extends Thread {
|
||||||
STableManager.updateTablesWithTableNames(true);
|
STableManager.updateTablesWithTableNames(true);
|
||||||
ActivityLogic.getInstance().checkSecretBoxSeason();
|
ActivityLogic.getInstance().checkSecretBoxSeason();
|
||||||
StoreLogic.checkGlobalStore(false);
|
StoreLogic.checkGlobalStore(false);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
MapLogic.getInstance().minuteCheckAndRemoveMapRank();
|
MapLogic.getInstance().minuteCheckAndRemoveMapRank();
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
|
|
@ -37,8 +37,8 @@ public class MessageUtil {
|
||||||
backMessage = new byte[0];
|
backMessage = new byte[0];
|
||||||
} else {
|
} else {
|
||||||
backMessage = generatedMessage.toByteArray();
|
backMessage = generatedMessage.toByteArray();
|
||||||
if (backMessage.length != 0)
|
// if (backMessage.length != 0)
|
||||||
LOGGER.info("wrappedBuffer uid=>{}, generatedMessage=>{}", uid, JsonFormat.printToString(generatedMessage));
|
// LOGGER.info("wrappedBuffer uid=>{}, generatedMessage=>{}", uid, JsonFormat.printToString(generatedMessage));
|
||||||
}
|
}
|
||||||
|
|
||||||
return wrappedBuffer(uid, token, index, result, msgId, backMessage);
|
return wrappedBuffer(uid, token, index, result, msgId, backMessage);
|
||||||
|
|
|
@ -19,23 +19,36 @@ public class SWorldBossRewardConfig implements BaseConfig {
|
||||||
|
|
||||||
private int type;
|
private int type;
|
||||||
|
|
||||||
public static Map<Integer, TreeMap<Integer,String>> rewardByTypeAndRankMap = new HashMap<>();
|
private int bossId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型,排名,奖励
|
||||||
|
*/
|
||||||
|
public static Map<Integer,TreeMap<Integer,String>> rewardByTypeAndRankMap = new HashMap<>();
|
||||||
|
/**
|
||||||
|
* boss索引id,类型,排名,奖励
|
||||||
|
*/
|
||||||
|
public static Map<Integer,TreeMap<Integer, TreeMap<Integer,String>>> rewardByBossIdMap = new HashMap<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init() throws Exception {
|
public void init() throws Exception {
|
||||||
Map<Integer, SWorldBossRewardConfig> config = STableManager.getConfig(SWorldBossRewardConfig.class);
|
Map<Integer, SWorldBossRewardConfig> config = STableManager.getConfig(SWorldBossRewardConfig.class);
|
||||||
Map<Integer, TreeMap<Integer,String>> rewardByTypeAndRankMapTmp = new HashMap<>();
|
Map<Integer, TreeMap<Integer,String>> rewardByTypeAndRankMapTmp = new HashMap<>();
|
||||||
|
Map<Integer,TreeMap<Integer, TreeMap<Integer,String>>> rewardByBossIdMapTmp = new HashMap<>();
|
||||||
config.forEach((id,item)->{
|
config.forEach((id,item)->{
|
||||||
rewardByTypeAndRankMapTmp.putIfAbsent(item.getType(),new TreeMap<>());
|
rewardByTypeAndRankMapTmp.putIfAbsent(item.getType(),new TreeMap<>());
|
||||||
rewardByTypeAndRankMapTmp.get(item.getType()).put(item.getSection()[0], StringUtil.parseArrayToString(item.getReward()));
|
rewardByTypeAndRankMapTmp.get(item.getType()).put(item.getSection()[0], StringUtil.parseArrayToString(item.getReward()));
|
||||||
});
|
|
||||||
rewardByTypeAndRankMap = rewardByTypeAndRankMapTmp;
|
|
||||||
|
|
||||||
|
rewardByBossIdMapTmp.putIfAbsent(item.getBossId(),new TreeMap<>());
|
||||||
|
rewardByBossIdMapTmp.get(item.getBossId()).putIfAbsent(item.getType(),new TreeMap<>());
|
||||||
|
rewardByBossIdMapTmp.get(item.getBossId()).get(item.getType()).put(item.getSection()[0], StringUtil.parseArrayToString(item.getReward()));
|
||||||
|
});
|
||||||
|
|
||||||
|
rewardByTypeAndRankMap = rewardByTypeAndRankMapTmp;
|
||||||
|
rewardByBossIdMap = rewardByBossIdMapTmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
public int getId() {
|
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,4 +63,8 @@ public class SWorldBossRewardConfig implements BaseConfig {
|
||||||
public int getType() {
|
public int getType() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getBossId() {
|
||||||
|
return bossId;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue