社稷大典公会排行
parent
7c907c8f73
commit
763872915f
|
@ -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);
|
||||
|
|
|
@ -6,124 +6,122 @@ import manager.Table;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Table(name ="GodSacrificeSetting")
|
||||
@Table(name = "GodSacrificeSetting")
|
||||
public class SGodSacrificeSetting implements BaseConfig {
|
||||
|
||||
private int id;
|
||||
private int id;
|
||||
|
||||
private int activityId;
|
||||
private int activityId;
|
||||
|
||||
private int[] activityItems;
|
||||
private int[] activityItems;
|
||||
|
||||
private int activityMoney;
|
||||
private int activityMoney;
|
||||
|
||||
private int[] rankType;
|
||||
private int[] rankType;
|
||||
|
||||
private int[] rewardItemChangRate;
|
||||
private int[] rewardItemChangRate;
|
||||
|
||||
private int qAId;
|
||||
private int qAId;
|
||||
|
||||
private int itemDelete;
|
||||
private int itemDelete;
|
||||
|
||||
private int timeRewardNum;
|
||||
private int timeRewardNum;
|
||||
|
||||
private int[] timePointList;
|
||||
private int[] timePointList;
|
||||
|
||||
private int timeRewardGroup;
|
||||
private int timeRewardGroup;
|
||||
|
||||
private int lastTime;
|
||||
private int lastTime;
|
||||
|
||||
public static HashMap<Integer,Integer> exchangeRate= new HashMap<>();
|
||||
public static HashMap<Integer, Integer> exchangeRate = new HashMap<>();
|
||||
private int levelLimit;
|
||||
private int lifeLimit;
|
||||
private int lifeLimit;
|
||||
|
||||
private int joinLimit;
|
||||
private int joinLimit;
|
||||
|
||||
private int[][] mailId;
|
||||
private int[][] mailId;
|
||||
|
||||
private int l1Score;
|
||||
private int l1Score;
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
SGodSacrificeSetting sGodSacrificeSetting = STableManager.getConfig(SGodSacrificeSetting.class).get(1);
|
||||
if(null!=sGodSacrificeSetting){
|
||||
if(sGodSacrificeSetting.getItemDelete()==1){
|
||||
int[] activityItems = sGodSacrificeSetting.getActivityItems();
|
||||
for (int i = 0; i <activityItems.length ; i++) {
|
||||
exchangeRate.put(activityItems[i],i);
|
||||
}
|
||||
if (null != sGodSacrificeSetting) {
|
||||
int[] activityItems = sGodSacrificeSetting.getActivityItems();
|
||||
for (int i = 0; i < activityItems.length; i++) {
|
||||
exchangeRate.put(activityItems[i], i);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public int getId() {
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getActivityId() {
|
||||
public int getActivityId() {
|
||||
return activityId;
|
||||
}
|
||||
|
||||
public int[] getActivityItems() {
|
||||
public int[] getActivityItems() {
|
||||
return activityItems;
|
||||
}
|
||||
|
||||
public int getActivityMoney() {
|
||||
public int getActivityMoney() {
|
||||
return activityMoney;
|
||||
}
|
||||
|
||||
public int[] getRankType() {
|
||||
public int[] getRankType() {
|
||||
return rankType;
|
||||
}
|
||||
|
||||
public int[] getRewardItemChangRate() {
|
||||
public int[] getRewardItemChangRate() {
|
||||
return rewardItemChangRate;
|
||||
}
|
||||
|
||||
public int getQAId() {
|
||||
public int getQAId() {
|
||||
return qAId;
|
||||
}
|
||||
|
||||
public int getItemDelete() {
|
||||
public int getItemDelete() {
|
||||
return itemDelete;
|
||||
}
|
||||
|
||||
public int getTimeRewardNum() {
|
||||
public int getTimeRewardNum() {
|
||||
return timeRewardNum;
|
||||
}
|
||||
|
||||
public int[] getTimePointList() {
|
||||
public int[] getTimePointList() {
|
||||
return timePointList;
|
||||
}
|
||||
|
||||
public int getTimeRewardGroup() {
|
||||
public int getTimeRewardGroup() {
|
||||
return timeRewardGroup;
|
||||
}
|
||||
|
||||
public int getLastTime() {
|
||||
public int getLastTime() {
|
||||
return lastTime;
|
||||
}
|
||||
|
||||
public int getLevelLimit() {
|
||||
public int getLevelLimit() {
|
||||
return levelLimit;
|
||||
}
|
||||
|
||||
public int getLifeLimit() {
|
||||
public int getLifeLimit() {
|
||||
return lifeLimit;
|
||||
}
|
||||
|
||||
public int getJoinLimit() {
|
||||
public int getJoinLimit() {
|
||||
return joinLimit;
|
||||
}
|
||||
|
||||
public int[][] getMailId() {
|
||||
public int[][] getMailId() {
|
||||
return mailId;
|
||||
}
|
||||
|
||||
public int getL1Score() {
|
||||
public int getL1Score() {
|
||||
return l1Score;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue