社稷大典公会排行

back_recharge
zhangshanxue 2020-10-31 11:39:15 +08:00
parent 7c907c8f73
commit 101c50c28f
1 changed files with 11 additions and 9 deletions

View File

@ -124,6 +124,7 @@ class SheJiActivity extends AbstractActivity {
@Override
public void onActivityEnd() throws Exception {
ThreadManager.getScheduledExecutor().execute(this::sendReward);
ThreadManager.getScheduledExecutor().execute(this::sendGuildReward);
}
protected void sendReward() {
@ -190,8 +191,6 @@ class SheJiActivity extends AbstractActivity {
e.printStackTrace();
}
}
sendGuildReward();
}
protected void sendGuildReward() {
@ -199,9 +198,9 @@ class SheJiActivity extends AbstractActivity {
SGodSacrificeSetting sGodSacrificeSetting = STableManager.getConfig(SGodSacrificeSetting.class).get(1);
Thread.currentThread().setName("sendGuildReward-Activity-" + id);
SGlobalActivity sGlobalActivity = SGlobalActivity.getsGlobalActivityMap().get(id);
if (sGlobalActivity.getOpenRanking() == 0) {
return;
}
// if (sGlobalActivity.getOpenRanking() == 0) {
// return;
// }
int nowTime = (int) (TimeUtils.now() / 1000);
InnerResult rewardMap = getRewardMap(2);
Map<Integer, Integer> rank2miss = rewardMap.getRank2miss();
@ -209,7 +208,7 @@ class SheJiActivity extends AbstractActivity {
AbstractRank abstractRank = RankContext.getRankEnum(RankEnum.GUILD_SHEJI_SCORE_RANK.getType());
Set<ZSetOperations.TypedTuple<String>> rankByKey = abstractRank.getRankByKey("", 0, -1);
Set<ZSetOperations.TypedTuple<String>> rankByKey = abstractRank.getRankByKey(""+id, 0, -1);
int rankIndex = 1;
for (ZSetOperations.TypedTuple<String> item : rankByKey) {
@ -229,10 +228,12 @@ class SheJiActivity extends AbstractActivity {
if (null == user) {
continue;
}
if (user.getPlayerInfoManager().getCreateTime() + sGodSacrificeSetting.getLifeLimit() * TimeUtils.ONE_DAY - nowTime > 0) {
long l = user.getPlayerInfoManager().getCreateTime() + sGodSacrificeSetting.getLifeLimit() * TimeUtils.ONE_DAY;
int i = nowTime * 1000;
if (user.getPlayerInfoManager().getCreateTime() + sGodSacrificeSetting.getLifeLimit() * TimeUtils.ONE_DAY - TimeUtils.now() > 0) {
continue;
}
if (user.getGuildMyInfo().getJoinTime() + sGodSacrificeSetting.getJoinLimit() * TimeUtils.ONE_DAY - nowTime > 0) {
if (user.getGuildMyInfo().getJoinTime() + sGodSacrificeSetting.getJoinLimit() * TimeUtils.ONE_DAY - TimeUtils.now() > 0) {
continue;
}
int missionId;
@ -249,7 +250,7 @@ class SheJiActivity extends AbstractActivity {
SGodSacrificeConfig sActivityRankingReward1 = SGodSacrificeConfig.getsGodSacrificeConfigMap().get(missionId);
//sendmail
String title = SErrorCodeEerverConfig.getI18NMessage("guild_activity_reward_title", new Object[]{sGlobalActivity.getSesc()});
String content = SErrorCodeEerverConfig.getI18NMessage("guild_activity_reward_txt", new Object[]{sGlobalActivity.getSesc(), rankIndex++});
String content = SErrorCodeEerverConfig.getI18NMessage("guild_activity_reward_txt", new Object[]{sGlobalActivity.getSesc(), rankIndex});
String mailReward = ItemUtil.getMailReward(sActivityRankingReward1.getRankingReward());
MailLogic.getInstance().sendMail(uid, title, content, mailReward, nowTime, Global.MAIL_EFFECTIVE_TIME);
} catch (Exception e) {
@ -259,6 +260,7 @@ class SheJiActivity extends AbstractActivity {
}
}
rankIndex++;
} catch (Exception e) {
LOGGER.error("排行奖励没有发成功=>{}", id);