称号添加

lvxinran 2021-08-01 00:28:27 +08:00
parent 8a7eb09fe7
commit 9a0f8b6395
2 changed files with 13 additions and 2 deletions

View File

@ -730,9 +730,16 @@ public class ArenaLogic {
continue;
}
Map.Entry<Integer, SMServerArenaReward> entry = rewardMapByRank.floorEntry(index);
SMServerArenaReward value = entry.getValue();
int[][] titleReward = value.getTitleReward();
if(titleReward !=null&& titleReward.length>0){
for(int[] reward:titleReward){
user.getPlayerInfoManager().putUserTitleValidTime(reward[0],(long)(TimeUtils.nowInt()+reward[1])*1000);
}
}
String content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("mserverarena_reward_content",new Object[]{index},new int[]{0},"#");
MailLogic.getInstance().sendMail(uid,title,content,StringUtil.parseArrayToString(entry.getValue().getSeasonReward()),TimeUtils.nowInt(),Global.MAIL_EFFECTIVE_TIME);
MailLogic.getInstance().sendMail(uid,title,content,StringUtil.parseArrayToString(value.getSeasonReward()),TimeUtils.nowInt(),Global.MAIL_EFFECTIVE_TIME);
} catch (Exception e) {
e.printStackTrace();
}

View File

@ -17,6 +17,8 @@ public class SMServerArenaReward implements BaseConfig {
private int[][] seasonReward;
private int[][] titleReward;
public static TreeMap<Integer,SMServerArenaReward> rewardMapByRank;
@ -48,5 +50,7 @@ public class SMServerArenaReward implements BaseConfig {
return seasonReward;
}
public int[][] getTitleReward() {
return titleReward;
}
}