车迟斗法发奖逻辑修改

back_recharge
duhui 2023-02-25 21:01:20 +08:00
parent dee406ab56
commit bc798e4cb4
4 changed files with 8 additions and 16 deletions

View File

@ -53,6 +53,7 @@ public class CarDelayFunction implements FunctionManager {
@Override
public void closeAction() throws Exception {
LOGGER.info("本服车迟斗法发奖开始===================");
// 获取车迟斗法当前boss的索引id
int indexId = GuildFightLogic.carDelayProgressIndication.getBossIndexId();
// 根据索引id取出当前的奖励配置
@ -84,11 +85,8 @@ public class CarDelayFunction implements FunctionManager {
int uid = Integer.parseInt(rankInfo.getValue());
long score = rankInfo.getScore().longValue();
String rewardByRank = personRewardConfigTreeMap.floorEntry(score).getValue();
String personContent = SErrorCodeEerverConfig.getI18NMessageNeedConvert("family_fight_rank_personreward_txt",new Object[]{score},new int[]{0},"#");
MailLogic.getInstance().sendMail(uid,personTitle,personContent,rewardByRank,nowTime, Global.MAIL_EFFECTIVE_TIME);
if(times++%20==0){
MongoUtil.getLjsdMongoTemplate().lastUpdate();
}
String personContent = SErrorCodeEerverConfig.getI18NMessageNeedConvert("family_fight_rank_personreward_txt",new Object[]{score},new int[]{0},"#");
MailLogic.getInstance().sendMailToRedis(uid,personTitle,personContent,rewardByRank,nowTime, Global.MAIL_EFFECTIVE_TIME);
}
MongoUtil.getLjsdMongoTemplate().lastUpdate();
@ -104,16 +102,12 @@ public class CarDelayFunction implements FunctionManager {
String rewardByRank = guildRewardConfigTreeMap.floorEntry(score).getValue();
guildInfo.clearCarFightSb();
GuilidManager.saveOrUpdateGuildInfo(guildInfo);
String guildContent = SErrorCodeEerverConfig.getI18NMessageNeedConvert("family_fight_rank_familyreward_txt",new Object[]{score},new int[0],"#");
String guildContent = SErrorCodeEerverConfig.getI18NMessageNeedConvert("family_fight_rank_familyreward_txt",new Object[]{score},new int[0],"#");
for(Set<Integer> uids : guildInfo.getMembers().values()){
for(Integer uid:uids){
MailLogic.getInstance().sendMail(uid,guildTitle,guildContent,rewardByRank,nowTime, Global.MAIL_EFFECTIVE_TIME);
if(times++%20==0){
MongoUtil.getLjsdMongoTemplate().lastUpdate();
}
MailLogic.getInstance().sendMailToRedis(uid,guildTitle,guildContent,rewardByRank,nowTime, Global.MAIL_EFFECTIVE_TIME);
}
}
}
MongoUtil.getLjsdMongoTemplate().lastUpdate();
}

View File

@ -213,11 +213,10 @@ public class GlobalDataManaager implements IManager {
TimeControllerOfFunction timeControllerOfFunction = timeControllerOfFunctionMap.get(id);
if(timeControllerOfFunction == null || timeControllerOfFunction.getStartTime()!=timeControllerOfFunction1.getStartTime()){
needUpdate = true;
TimeControllerOfFunction timeControllerOfFunctionCacheItem = timeControllerOfFunction1;
if(timeControllerOfFunction!=null){
timeControllerOfFunctionCacheItem.setTimes(timeControllerOfFunction.getTimes()+1);
timeControllerOfFunction1.setTimes(timeControllerOfFunction.getTimes()+1);
}else{
timeControllerOfFunctionCacheItem.setTimes(1);
timeControllerOfFunction1.setTimes(1);
}
globalSystemControl.updateTimeControllerOfFunction(timeControllerOfFunction1);
reallyOpenList.add(id);

View File

@ -1239,7 +1239,6 @@ public class GuildFightLogic {
//车迟玩法
private static int carProgress=-2 ;
public static Family.CarDelayProgressIndication carDelayProgressIndication;

View File

@ -461,7 +461,7 @@ public class StoreLogic implements IEventHandler {
Random random = new Random();
if(totalWeight==0){
//没有符合规则的栏位奖励
LOGGER.info("getRewardId uid={}没有符合规则的栏位奖励sort=>{}, sort=>{}", user.getId(),storeId,sort);
// LOGGER.info("getRewardId uid={}没有符合规则的栏位奖励sort=>{}, sort=>{}", user.getId(),storeId,sort);
return 0;
}
int randomWeight = random.nextInt(totalWeight) + 1;