社稷大典公会排行
parent
7c907c8f73
commit
763872915f
|
@ -124,6 +124,7 @@ class SheJiActivity extends AbstractActivity {
|
||||||
@Override
|
@Override
|
||||||
public void onActivityEnd() throws Exception {
|
public void onActivityEnd() throws Exception {
|
||||||
ThreadManager.getScheduledExecutor().execute(this::sendReward);
|
ThreadManager.getScheduledExecutor().execute(this::sendReward);
|
||||||
|
ThreadManager.getScheduledExecutor().execute(this::sendGuildReward);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void sendReward() {
|
protected void sendReward() {
|
||||||
|
@ -190,8 +191,6 @@ class SheJiActivity extends AbstractActivity {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sendGuildReward();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void sendGuildReward() {
|
protected void sendGuildReward() {
|
||||||
|
@ -199,9 +198,9 @@ class SheJiActivity extends AbstractActivity {
|
||||||
SGodSacrificeSetting sGodSacrificeSetting = STableManager.getConfig(SGodSacrificeSetting.class).get(1);
|
SGodSacrificeSetting sGodSacrificeSetting = STableManager.getConfig(SGodSacrificeSetting.class).get(1);
|
||||||
Thread.currentThread().setName("sendGuildReward-Activity-" + id);
|
Thread.currentThread().setName("sendGuildReward-Activity-" + id);
|
||||||
SGlobalActivity sGlobalActivity = SGlobalActivity.getsGlobalActivityMap().get(id);
|
SGlobalActivity sGlobalActivity = SGlobalActivity.getsGlobalActivityMap().get(id);
|
||||||
if (sGlobalActivity.getOpenRanking() == 0) {
|
// if (sGlobalActivity.getOpenRanking() == 0) {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
int nowTime = (int) (TimeUtils.now() / 1000);
|
int nowTime = (int) (TimeUtils.now() / 1000);
|
||||||
InnerResult rewardMap = getRewardMap(2);
|
InnerResult rewardMap = getRewardMap(2);
|
||||||
Map<Integer, Integer> rank2miss = rewardMap.getRank2miss();
|
Map<Integer, Integer> rank2miss = rewardMap.getRank2miss();
|
||||||
|
@ -209,7 +208,7 @@ class SheJiActivity extends AbstractActivity {
|
||||||
|
|
||||||
|
|
||||||
AbstractRank abstractRank = RankContext.getRankEnum(RankEnum.GUILD_SHEJI_SCORE_RANK.getType());
|
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;
|
int rankIndex = 1;
|
||||||
for (ZSetOperations.TypedTuple<String> item : rankByKey) {
|
for (ZSetOperations.TypedTuple<String> item : rankByKey) {
|
||||||
|
|
||||||
|
@ -229,10 +228,12 @@ class SheJiActivity extends AbstractActivity {
|
||||||
if (null == user) {
|
if (null == user) {
|
||||||
continue;
|
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;
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
int missionId;
|
int missionId;
|
||||||
|
@ -249,7 +250,7 @@ class SheJiActivity extends AbstractActivity {
|
||||||
SGodSacrificeConfig sActivityRankingReward1 = SGodSacrificeConfig.getsGodSacrificeConfigMap().get(missionId);
|
SGodSacrificeConfig sActivityRankingReward1 = SGodSacrificeConfig.getsGodSacrificeConfigMap().get(missionId);
|
||||||
//sendmail
|
//sendmail
|
||||||
String title = SErrorCodeEerverConfig.getI18NMessage("guild_activity_reward_title", new Object[]{sGlobalActivity.getSesc()});
|
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());
|
String mailReward = ItemUtil.getMailReward(sActivityRankingReward1.getRankingReward());
|
||||||
MailLogic.getInstance().sendMail(uid, title, content, mailReward, nowTime, Global.MAIL_EFFECTIVE_TIME);
|
MailLogic.getInstance().sendMail(uid, title, content, mailReward, nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -259,6 +260,7 @@ class SheJiActivity extends AbstractActivity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rankIndex++;
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOGGER.error("排行奖励没有发成功=>{}", id);
|
LOGGER.error("排行奖励没有发成功=>{}", id);
|
||||||
|
|
|
@ -6,124 +6,122 @@ import manager.Table;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@Table(name ="GodSacrificeSetting")
|
@Table(name = "GodSacrificeSetting")
|
||||||
public class SGodSacrificeSetting implements BaseConfig {
|
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 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 {
|
public void init() throws Exception {
|
||||||
SGodSacrificeSetting sGodSacrificeSetting = STableManager.getConfig(SGodSacrificeSetting.class).get(1);
|
SGodSacrificeSetting sGodSacrificeSetting = STableManager.getConfig(SGodSacrificeSetting.class).get(1);
|
||||||
if(null!=sGodSacrificeSetting){
|
if (null != sGodSacrificeSetting) {
|
||||||
if(sGodSacrificeSetting.getItemDelete()==1){
|
int[] activityItems = sGodSacrificeSetting.getActivityItems();
|
||||||
int[] activityItems = sGodSacrificeSetting.getActivityItems();
|
for (int i = 0; i < activityItems.length; i++) {
|
||||||
for (int i = 0; i <activityItems.length ; i++) {
|
exchangeRate.put(activityItems[i], i);
|
||||||
exchangeRate.put(activityItems[i],i);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getActivityId() {
|
public int getActivityId() {
|
||||||
return activityId;
|
return activityId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int[] getActivityItems() {
|
public int[] getActivityItems() {
|
||||||
return activityItems;
|
return activityItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getActivityMoney() {
|
public int getActivityMoney() {
|
||||||
return activityMoney;
|
return activityMoney;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int[] getRankType() {
|
public int[] getRankType() {
|
||||||
return rankType;
|
return rankType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int[] getRewardItemChangRate() {
|
public int[] getRewardItemChangRate() {
|
||||||
return rewardItemChangRate;
|
return rewardItemChangRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getQAId() {
|
public int getQAId() {
|
||||||
return qAId;
|
return qAId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getItemDelete() {
|
public int getItemDelete() {
|
||||||
return itemDelete;
|
return itemDelete;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTimeRewardNum() {
|
public int getTimeRewardNum() {
|
||||||
return timeRewardNum;
|
return timeRewardNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int[] getTimePointList() {
|
public int[] getTimePointList() {
|
||||||
return timePointList;
|
return timePointList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTimeRewardGroup() {
|
public int getTimeRewardGroup() {
|
||||||
return timeRewardGroup;
|
return timeRewardGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getLastTime() {
|
public int getLastTime() {
|
||||||
return lastTime;
|
return lastTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getLevelLimit() {
|
public int getLevelLimit() {
|
||||||
return levelLimit;
|
return levelLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getLifeLimit() {
|
public int getLifeLimit() {
|
||||||
return lifeLimit;
|
return lifeLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getJoinLimit() {
|
public int getJoinLimit() {
|
||||||
return joinLimit;
|
return joinLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int[][] getMailId() {
|
public int[][] getMailId() {
|
||||||
return mailId;
|
return mailId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getL1Score() {
|
public int getL1Score() {
|
||||||
return l1Score;
|
return l1Score;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue