邮件本地化提交
parent
2f45a0710a
commit
166b93b3f7
|
@ -57,7 +57,7 @@ public class CarDelayFunction implements FunctionManager {
|
|||
String value = item.getValue();
|
||||
int uid = Integer.parseInt(value);
|
||||
String rewardByRank = personRewardConfigTreeMap.floorEntry(rank).getValue();
|
||||
String personContent = SErrorCodeEerverConfig.getI18NMessage("family_fight_rank_personreward_txt",new Object[]{rank});
|
||||
String personContent = SErrorCodeEerverConfig.getI18NMessageNeedConvert("family_fight_rank_personreward_txt",new Object[]{rank},new int[]{0},"#");
|
||||
MailLogic.getInstance().sendMail(uid,personTitle,personContent,rewardByRank,nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||
if(times++%20==0){
|
||||
MongoUtil.getLjsdMongoTemplate().lastUpdate();
|
||||
|
@ -88,7 +88,7 @@ public class CarDelayFunction implements FunctionManager {
|
|||
if(userLevelGuildMap.containsKey(guildId)){
|
||||
values.add(usersByGuildId.get(guildId));
|
||||
}
|
||||
String guildContent = SErrorCodeEerverConfig.getI18NMessage("family_fight_rank_familyreward_txt",new Object[]{rank});
|
||||
String guildContent = SErrorCodeEerverConfig.getI18NMessageNeedConvert("family_fight_rank_familyreward_txt",new Object[]{rank},new int[0],"#");
|
||||
for(Set<Integer> uids : values){
|
||||
for(Integer uid:uids){
|
||||
MailLogic.getInstance().sendMail(uid,guildTitle,guildContent,rewardByRank,nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||
|
|
|
@ -158,7 +158,7 @@ public class SituationLogic {
|
|||
int index = 1;
|
||||
for(ZSetOperations.TypedTuple<String> rankInfo:rankInfos){
|
||||
String title = SErrorCodeEerverConfig.getI18NMessage("xuanyuan_Ranking_reward_title");
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("xuanyuan_Ranking_reward_txt", new Object[]{index});
|
||||
String content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("xuanyuan_Ranking_reward_txt", new Object[]{index},new int[0],"#");
|
||||
SRaceTowerRewardConfig sRaceTowerRewardConfig = rewardConfigMap.get(index);
|
||||
if(sRaceTowerRewardConfig==null){
|
||||
continue;
|
||||
|
|
|
@ -190,8 +190,8 @@ public abstract class AbstractActivity implements IActivity, IEventHandler {
|
|||
SGlobalActivity sGlobalActivity = SGlobalActivity.getsGlobalActivityMap().get(id);
|
||||
if (null == sGlobalActivity)
|
||||
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
||||
String title = SErrorCodeEerverConfig.getI18NMessage("receive_activity_title", new Object[]{sGlobalActivity.getSesc()});
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("receive_activity_txt", new Object[]{sGlobalActivity.getSesc()});
|
||||
String title = SErrorCodeEerverConfig.getI18NMessageNeedConvert("receive_activity_title", new Object[]{sGlobalActivity.getSesc()},new int[]{1},"#");
|
||||
String content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("receive_activity_txt", new Object[]{sGlobalActivity.getSesc()},new int[]{1},"#");
|
||||
String mailReward = ItemUtil.getMailReward(itemArrs);
|
||||
int nowTime = (int) (TimeUtils.now() / 1000);
|
||||
MailLogic.getInstance().sendMail(user.getId(), title, content, mailReward, nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||
|
|
|
@ -131,8 +131,8 @@ class ExpectRankActivity extends AbstractActivity {
|
|||
SActivityRankingReward sActivityRankingReward1 = SActivityRankingReward.getsActivityRankingRewardMap().get(missionId);
|
||||
//sendmail
|
||||
|
||||
String title = SErrorCodeEerverConfig.getI18NMessage("expertrank_activity_title", new Object[]{sGlobalActivity.getSesc()});
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("expertrank_activity_txt", new Object[]{sGlobalActivity.getSesc(), rank++});
|
||||
String title = SErrorCodeEerverConfig.getI18NMessageNeedConvert("expertrank_activity_title", new Object[]{sGlobalActivity.getSesc()},new int[]{1},"#");
|
||||
String content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("expertrank_activity_txt", new Object[]{sGlobalActivity.getSesc(),rank++},new int[]{1,0},"#");
|
||||
String mailReward = ItemUtil.getMailReward(sActivityRankingReward1.getRankingReward());
|
||||
MailLogic.getInstance().sendMail(uid, title, content, mailReward, nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||
}catch (Exception e) {
|
||||
|
|
|
@ -122,7 +122,7 @@ class ForceRankActivity extends AbstractActivity {
|
|||
}
|
||||
//sendmail
|
||||
String title = SErrorCodeEerverConfig.getI18NMessage("powerrank_activity_title");
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("powerrank_activity_txt", new Object[]{rank});
|
||||
String content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("powerrank_activity_txt", new Object[]{rank},new int[]{0},"#");
|
||||
String mailReward = ItemUtil.getMailReward(sActivityRewardConfig.getReward());
|
||||
MailLogic.getInstance().sendMail(uid, title, content, mailReward, nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||
rank++;
|
||||
|
|
|
@ -224,8 +224,8 @@ class SheJiActivity extends AbstractActivity {
|
|||
SGodSacrificeConfig sActivityRankingReward1 = SGodSacrificeConfig.getsGodSacrificeConfigMap().get(missionId);
|
||||
//sendmail
|
||||
|
||||
String title = SErrorCodeEerverConfig.getI18NMessage("personal_activity_reward_title", new Object[]{sGlobalActivity.getSesc()});
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("personal_activity_reward_txt", new Object[]{sGlobalActivity.getSesc(), finalIndex});
|
||||
String title = SErrorCodeEerverConfig.getI18NMessageNeedConvert("personal_activity_reward_title", new Object[]{sGlobalActivity.getSesc()},new int[]{1},"#");
|
||||
String content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("personal_activity_reward_txt", new Object[]{sGlobalActivity.getSesc(), finalIndex},new int[]{1,0},"#");
|
||||
String mailReward = ItemUtil.getMailReward(sActivityRankingReward1.getRankingReward());
|
||||
MailLogic.getInstance().sendMail(uid, title, content, mailReward, nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||
|
||||
|
@ -306,8 +306,8 @@ class SheJiActivity extends AbstractActivity {
|
|||
//checkAndUpdate value
|
||||
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(), finalIndex});
|
||||
String title = SErrorCodeEerverConfig.getI18NMessageNeedConvert("guild_activity_reward_title", new Object[]{sGlobalActivity.getSesc()},new int[]{1},"#");
|
||||
String content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("guild_activity_reward_txt", new Object[]{sGlobalActivity.getSesc(), finalIndex},new int[]{1,0},"#");
|
||||
String mailReward = ItemUtil.getMailReward(sActivityRankingReward1.getRankingReward());
|
||||
MailLogic.getInstance().sendMail(uid, title, content, mailReward, nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||
|
||||
|
|
|
@ -237,7 +237,7 @@ public class SubActivity extends AbstractActivity {
|
|||
SItem getItem = SItem.getsItemMap().get(16);
|
||||
String getName =costNum*integerValue+getItem.getName();
|
||||
String title = SErrorCodeEerverConfig.getI18NMessage("activity_item_retrieve_mail_titile");
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("activity_item_retrieve_mail_content", new Object[]{sGlobalActivity.getSesc(),sItem.getName(),costNum,getName});
|
||||
String content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("activity_item_retrieve_mail_content", new Object[]{sGlobalActivity.getSesc(),sItem.getName(),costNum,getName},new int[]{1,1,0,1},"#");
|
||||
String mailReward = ItemUtil.getMailReward(rewards);
|
||||
int nowTime = (int) (TimeUtils.now() / 1000);
|
||||
MailLogic.getInstance().sendMail(user.getId(), title, content, mailReward, nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||
|
|
|
@ -481,9 +481,9 @@ public class ArenaLogic {
|
|||
|
||||
}
|
||||
if(type == GlobalsDef.ARENA_DAILY_REWARD){
|
||||
content = SErrorCodeEerverConfig.getI18NMessage("arena_daily_reward_txt",new Object[]{rank});
|
||||
content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("arena_daily_reward_txt",new Object[]{rank},new int[0],"#");
|
||||
}else{
|
||||
content = SErrorCodeEerverConfig.getI18NMessage("arena_season_reward_txt",new Object[]{rank});
|
||||
content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("arena_season_reward_txt",new Object[]{rank},new int[0],"#");
|
||||
user.getPlayerInfoManager().removeRed(GlobalsDef.ARENA_CHALLENGE_TYPE);
|
||||
String key = RedisUtil.getInstence().getKey(RedisKey.ARENA_RRECORD, Integer.toString(uid));
|
||||
RedisUtil.getInstence().del(key);
|
||||
|
|
|
@ -408,7 +408,7 @@ public class ChampionshipLogic {
|
|||
user.getUserMissionManager().onGameEvent(user, GameEvent.CHAMPIONSHIP_RANK, rank);
|
||||
rank++;
|
||||
String title = SErrorCodeEerverConfig.getI18NMessage("champion_reward_title");
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("champion_reward_txt", new Object[]{sChampionshipReward.getTitleDesc()});
|
||||
String content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("champion_reward_txt", new Object[]{sChampionshipReward.getTitleDesc()},new int[1],"#");
|
||||
MailLogic.getInstance().sendMail(user.getId(), title, content, ItemUtil.getMailReward(sChampionshipReward.getSeasonReward()), nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||
}
|
||||
}catch (Exception e){
|
||||
|
|
|
@ -158,7 +158,7 @@ public class ExpeditionLogic {
|
|||
String mailReward = ItemUtil.getMailReward(itemArrs);
|
||||
int nowTime = (int) (TimeUtils.now() / 1000);
|
||||
String title = SErrorCodeEerverConfig.getI18NMessage("expedition_title");
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("expedition_txt",new Object[]{user.getExpeditionManager().getLay()-1});
|
||||
String content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("expedition_txt",new Object[]{user.getExpeditionManager().getLay()-1},new int[]{0},"#");
|
||||
MailLogic.getInstance().sendMail(user.getId(), title, content, mailReward, nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||
}
|
||||
|
||||
|
|
|
@ -440,7 +440,7 @@ public class GuildChallengeLogic {
|
|||
int index = 1;
|
||||
for(ZSetOperations.TypedTuple<String> rankInfo:rankInfos){
|
||||
String title = SErrorCodeEerverConfig.getI18NMessage("GuildRanking_mail_gonghui_title");
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("GuildRanking_mail_gonghui_txt", new Object[]{index});
|
||||
String content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("GuildRanking_mail_gonghui_txt", new Object[]{index},new int[0],"#");
|
||||
|
||||
SGuildCheckpointRank config = configMap.get(index);
|
||||
if(config==null){
|
||||
|
|
|
@ -847,7 +847,7 @@ public class GuildFightLogic {
|
|||
continue;
|
||||
}
|
||||
String title = SErrorCodeEerverConfig.getI18NMessage("family_fight_rank_reward_title");
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("family_fight_rank_reward_txt",new Object[]{String.valueOf(userResultRank)});
|
||||
String content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("family_fight_rank_reward_txt",new Object[]{String.valueOf(userResultRank)},new int[0],"#");
|
||||
MailLogic.getInstance().sendMail(Integer.parseInt(next.getValue()),title,content,SGuildRewardConfig.rewardMap.get(userResultRank),(int) (TimeUtils.now()/1000), Global.MAIL_EFFECTIVE_TIME);
|
||||
}
|
||||
}
|
||||
|
@ -1189,7 +1189,7 @@ public class GuildFightLogic {
|
|||
}
|
||||
ZSetOperations.TypedTuple<String> next = bossHurtRankInfo.iterator().next();
|
||||
int maxHurt =next.getScore().intValue();
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("guildboss_daily_reward_txt",new String[]{UserManager.getUser(Integer.parseInt(next.getValue())).getPlayerInfoManager().getNickName(),Integer.toString(maxHurt)});
|
||||
String content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("guildboss_daily_reward_txt",new String[]{UserManager.getUser(Integer.parseInt(next.getValue())).getPlayerInfoManager().getNickName(),Integer.toString(maxHurt)},new int[]{0,0},"#");
|
||||
int[][] mineReward = new int[bossReward.length][];
|
||||
int j=0;
|
||||
for(int i=0;i<bossReward.length;i++){
|
||||
|
|
|
@ -676,7 +676,7 @@ public class GuildLogic {
|
|||
//// MessageUtil.sendIndicationMessage(targetSession,1, MessageTypeProto.MessageType.FAMILY_KICK_INDICATION_VALUE,build,true);
|
||||
// }
|
||||
String title = SErrorCodeEerverConfig.getI18NMessage("family_kick_title");
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("family_kick_txt",new Object[]{guildInfo.getName()});
|
||||
String content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("family_kick_txt",new Object[]{guildInfo.getName()},new int[]{0},"#");
|
||||
MailLogic.getInstance().sendMail(targetUid,title,content,"",(int) (TimeUtils.now()/1000), Global.MAIL_EFFECTIVE_TIME);
|
||||
MessageUtil.sendMessage(session,1,msgId,null,true);
|
||||
}
|
||||
|
@ -874,7 +874,7 @@ public class GuildLogic {
|
|||
Set<Integer> chairmans = guildInfo.getMembers().get(GlobalsDef.CHAIRMAN);
|
||||
Integer chairmanUid = chairmans.iterator().next();
|
||||
User chairmanUser = UserManager.getUser(chairmanUid);
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("guild_breakup_txt",new String[]{guildInfo.getName(),chairmanUser.getPlayerInfoManager().getNickName()});
|
||||
String content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("guild_breakup_txt",new String[]{guildInfo.getName(),chairmanUser.getPlayerInfoManager().getNickName()},new int[]{0,0},"#");
|
||||
for(Set<Integer> items : members.values()){
|
||||
for(Integer sendUid : items){
|
||||
ISession session = OnlineUserManager.getSessionByUid(sendUid);
|
||||
|
|
|
@ -730,7 +730,7 @@ public class CombatLogic {
|
|||
if("".equals(rewardByRank)){
|
||||
break;
|
||||
}
|
||||
String content=SErrorCodeEerverConfig.getI18NMessage("adventure_boss_reward_txt",new Object[]{user.getPlayerInfoManager().getNickName(),rank});
|
||||
String content=SErrorCodeEerverConfig.getI18NMessageNeedConvert("adventure_boss_reward_txt",new Object[]{user.getPlayerInfoManager().getNickName(),rank},new int[]{0,0},"#");
|
||||
MailLogic.getInstance().sendMail(user.getId(),title,content,rewardByRank,nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||
rank++;
|
||||
MongoUtil.getInstence().lastUpdate();
|
||||
|
@ -985,7 +985,7 @@ public class CombatLogic {
|
|||
if(!baseItemMap.isEmpty()){
|
||||
int vipLevel = user.getPlayerInfoManager().getVipLevel();
|
||||
String title = SErrorCodeEerverConfig.getI18NMessage("adventuren_reward_of_viplevel_title");
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("adventuren_reward_of_viplevel_content",new Object[]{vipLevel});
|
||||
String content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("adventuren_reward_of_viplevel_content",new Object[]{vipLevel},new int[0],"#");
|
||||
String reward = ItemUtil.getReward(baseItemMap, baseCardMap, baseEquipMap, baseRandomMap);
|
||||
String randomReward = ItemUtil.getReward(randomItemMap, randomCardMap, randomEquipMap, randomRandomMap);
|
||||
if(randomReward.length()!=0){
|
||||
|
|
|
@ -261,75 +261,75 @@ public class WorkShopLogic {
|
|||
}
|
||||
|
||||
//装备打造 TODO
|
||||
public void createEquipByUser(ISession session,int equipTid, List<Integer> runneIdsList,int nums) throws Exception {
|
||||
int uid=session.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
SGlobalSystemConfig sGlobalSystemConfig = STableManager.getConfig(SGlobalSystemConfig.class).get(FunctionIdEnum.Adventure.getFunctionType());
|
||||
if (!HandlerLogicThread.checkOpen(user,sGlobalSystemConfig)) {
|
||||
throw new ErrorCodeException(ErrorCode.newDefineCode("未开"));
|
||||
}
|
||||
SWorkShopEquipmentConfig sWorkShopEquipmentConfig = SWorkShopEquipmentConfig.getsWorkShopEquipmentConfigMap().get(equipTid);
|
||||
if(sWorkShopEquipmentConfig == null){
|
||||
throw new ErrorCodeException(ErrorCode.newDefineCode("equipTid not exists"));
|
||||
}
|
||||
if(!checkIsUnlock(GlobalsDef.WORK_CREATE_TYPE,sWorkShopEquipmentConfig.getType(),user.getWorkShopController(),sWorkShopEquipmentConfig.getOpenRules(),sWorkShopEquipmentConfig.getId())){
|
||||
throw new ErrorCodeException(ErrorCode.newDefineCode("未开"));
|
||||
}
|
||||
int runesNum = sWorkShopEquipmentConfig.getRunesNum();
|
||||
int[][] specialRunes = sWorkShopEquipmentConfig.getSpecialRunes();
|
||||
int needNums = runesNum - specialRunes.length;
|
||||
if(runneIdsList.size()!=needNums){
|
||||
throw new ErrorCodeException(ErrorCode.newDefineCode("符文错误"));
|
||||
}
|
||||
int costLength = runesNum + 1;
|
||||
int[] costMineral = sWorkShopEquipmentConfig.getMineral();
|
||||
if(costMineral == null || costMineral.length == 0){
|
||||
costLength = costLength-1;
|
||||
}
|
||||
int[][] costs = new int[costLength][];
|
||||
if(costMineral!=null && costMineral.length>0){
|
||||
costs[--costLength] =costMineral;
|
||||
}
|
||||
if(runneIdsList.size() ==0){
|
||||
runneIdsList =new ArrayList<>(specialRunes.length);
|
||||
}
|
||||
for(Integer runneId : runneIdsList){
|
||||
costs[--costLength] = new int[]{runneId, 1};
|
||||
}
|
||||
for(int specialRunneId[] : specialRunes){
|
||||
costs[--costLength] = new int[]{specialRunneId[0],specialRunneId[1]};
|
||||
}
|
||||
|
||||
boolean enoughCost = ItemUtil.itemCost(user,costs,nums,BIReason.WORKSHOP_EQUIP_CONSUME,equipTid);
|
||||
if(!enoughCost){
|
||||
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
||||
}
|
||||
CommonProto.Drop.Builder dropBuilder = CommonProto.Drop.newBuilder();
|
||||
//熟练度提升
|
||||
int type = sWorkShopEquipmentConfig.getType();
|
||||
int workShopLevel = user.getWorkShopController().getWorkShopLevel();
|
||||
if(type == GlobalsDef.WORK_SHOP_TYPE){
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.WORKSHOP_CREATE_EQUIP,nums);
|
||||
while (nums-->0){
|
||||
Equip equip = new Equip(uid, equipTid, workShopLevel, runneIdsList);
|
||||
SEquipConfig sEquipConfig = STableManager.getConfig(SEquipConfig.class).get(equip.getEquipId());
|
||||
if (sEquipConfig.getQuality() >= SSpecialConfig.getIntegerValue(SSpecialConfig.lamp_lottery_equip_content_parm)) {
|
||||
String nickName = user.getPlayerInfoManager().getNickName();
|
||||
String message = SErrorCodeEerverConfig.getI18NMessage("lamp_lottery_equip_content", new Object[]{
|
||||
nickName, ItemUtil.equipQulityNameMap.get(sEquipConfig.getQuality()),SItem.getsItemMap().get(equip.getEquipId()).getName()});
|
||||
ChatLogic.getInstance().sendSysChatMessage(message, Global.LUCKY_LUCK,equip.getEquipId(),0,0,0,0,0);
|
||||
}
|
||||
user.getEquipManager().addEquip(user,equip);
|
||||
dropBuilder.addEquipId(CBean2Proto.getEquipProto(equip));
|
||||
}
|
||||
}else if( type == GlobalsDef.COOK_SHOP_TYPE){
|
||||
Map<Integer,Integer> items = new HashMap<>();
|
||||
items.put(equipTid,SMysteryFoodSetting.getsMysteryFoodSetting().getFoodNum()*nums);
|
||||
ItemUtil.addItem(user,items,dropBuilder,BIReason.WORKSHOP_CREATEQUIP);
|
||||
}
|
||||
PlayerInfoProto.WorkShopEquipCreateResponse build = PlayerInfoProto.WorkShopEquipCreateResponse.newBuilder().setType(type).setDrop(dropBuilder).build();
|
||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.WORKSHOP_EQUIP_CREATE_RESPONSE_VALUE,build,true);
|
||||
}
|
||||
// public void createEquipByUser(ISession session,int equipTid, List<Integer> runneIdsList,int nums) throws Exception {
|
||||
// int uid=session.getUid();
|
||||
// User user = UserManager.getUser(uid);
|
||||
// SGlobalSystemConfig sGlobalSystemConfig = STableManager.getConfig(SGlobalSystemConfig.class).get(FunctionIdEnum.Adventure.getFunctionType());
|
||||
// if (!HandlerLogicThread.checkOpen(user,sGlobalSystemConfig)) {
|
||||
// throw new ErrorCodeException(ErrorCode.newDefineCode("未开"));
|
||||
// }
|
||||
// SWorkShopEquipmentConfig sWorkShopEquipmentConfig = SWorkShopEquipmentConfig.getsWorkShopEquipmentConfigMap().get(equipTid);
|
||||
// if(sWorkShopEquipmentConfig == null){
|
||||
// throw new ErrorCodeException(ErrorCode.newDefineCode("equipTid not exists"));
|
||||
// }
|
||||
// if(!checkIsUnlock(GlobalsDef.WORK_CREATE_TYPE,sWorkShopEquipmentConfig.getType(),user.getWorkShopController(),sWorkShopEquipmentConfig.getOpenRules(),sWorkShopEquipmentConfig.getId())){
|
||||
// throw new ErrorCodeException(ErrorCode.newDefineCode("未开"));
|
||||
// }
|
||||
// int runesNum = sWorkShopEquipmentConfig.getRunesNum();
|
||||
// int[][] specialRunes = sWorkShopEquipmentConfig.getSpecialRunes();
|
||||
// int needNums = runesNum - specialRunes.length;
|
||||
// if(runneIdsList.size()!=needNums){
|
||||
// throw new ErrorCodeException(ErrorCode.newDefineCode("符文错误"));
|
||||
// }
|
||||
// int costLength = runesNum + 1;
|
||||
// int[] costMineral = sWorkShopEquipmentConfig.getMineral();
|
||||
// if(costMineral == null || costMineral.length == 0){
|
||||
// costLength = costLength-1;
|
||||
// }
|
||||
// int[][] costs = new int[costLength][];
|
||||
// if(costMineral!=null && costMineral.length>0){
|
||||
// costs[--costLength] =costMineral;
|
||||
// }
|
||||
// if(runneIdsList.size() ==0){
|
||||
// runneIdsList =new ArrayList<>(specialRunes.length);
|
||||
// }
|
||||
// for(Integer runneId : runneIdsList){
|
||||
// costs[--costLength] = new int[]{runneId, 1};
|
||||
// }
|
||||
// for(int specialRunneId[] : specialRunes){
|
||||
// costs[--costLength] = new int[]{specialRunneId[0],specialRunneId[1]};
|
||||
// }
|
||||
//
|
||||
// boolean enoughCost = ItemUtil.itemCost(user,costs,nums,BIReason.WORKSHOP_EQUIP_CONSUME,equipTid);
|
||||
// if(!enoughCost){
|
||||
// throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
||||
// }
|
||||
// CommonProto.Drop.Builder dropBuilder = CommonProto.Drop.newBuilder();
|
||||
// //熟练度提升
|
||||
// int type = sWorkShopEquipmentConfig.getType();
|
||||
// int workShopLevel = user.getWorkShopController().getWorkShopLevel();
|
||||
// if(type == GlobalsDef.WORK_SHOP_TYPE){
|
||||
// user.getUserMissionManager().onGameEvent(user, GameEvent.WORKSHOP_CREATE_EQUIP,nums);
|
||||
// while (nums-->0){
|
||||
// Equip equip = new Equip(uid, equipTid, workShopLevel, runneIdsList);
|
||||
// SEquipConfig sEquipConfig = STableManager.getConfig(SEquipConfig.class).get(equip.getEquipId());
|
||||
// if (sEquipConfig.getQuality() >= SSpecialConfig.getIntegerValue(SSpecialConfig.lamp_lottery_equip_content_parm)) {
|
||||
// String nickName = user.getPlayerInfoManager().getNickName();
|
||||
// String message = SErrorCodeEerverConfig.getI18NMessage("lamp_lottery_equip_content", new Object[]{
|
||||
// nickName, ItemUtil.equipQulityNameMap.get(sEquipConfig.getQuality()),SItem.getsItemMap().get(equip.getEquipId()).getName()});
|
||||
// ChatLogic.getInstance().sendSysChatMessage(message, Global.LUCKY_LUCK,equip.getEquipId(),0,0,0,0,0);
|
||||
// }
|
||||
// user.getEquipManager().addEquip(user,equip);
|
||||
// dropBuilder.addEquipId(CBean2Proto.getEquipProto(equip));
|
||||
// }
|
||||
// }else if( type == GlobalsDef.COOK_SHOP_TYPE){
|
||||
// Map<Integer,Integer> items = new HashMap<>();
|
||||
// items.put(equipTid,SMysteryFoodSetting.getsMysteryFoodSetting().getFoodNum()*nums);
|
||||
// ItemUtil.addItem(user,items,dropBuilder,BIReason.WORKSHOP_CREATEQUIP);
|
||||
// }
|
||||
// PlayerInfoProto.WorkShopEquipCreateResponse build = PlayerInfoProto.WorkShopEquipCreateResponse.newBuilder().setType(type).setDrop(dropBuilder).build();
|
||||
// MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.WORKSHOP_EQUIP_CREATE_RESPONSE_VALUE,build,true);
|
||||
// }
|
||||
|
||||
//装备重铸
|
||||
// public void rebuildEquip(ISession session, String equipId, List<String> consumeEquipIds) throws Exception {
|
||||
|
|
|
@ -551,7 +551,7 @@ public class PlayerLogic {
|
|||
mailReward = ItemUtil.getMailReward(SLuxuryFund.getByFoundIdAndDay(goodsInfo.getKey(),sRechargeCommodityConfig.getContiueDays()-remainDays).getreward());
|
||||
LOGGER.info(":{}:",sRechargeCommodityConfig.getContiueDays()-remainDays - sendTims);
|
||||
}
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("recharge_"+type+"_daily_txt",new Object[]{remainDays + sendTims});
|
||||
String content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("recharge_"+type+"_daily_txt",new Object[]{remainDays + sendTims},new int[]{0},"#");
|
||||
MailLogic.getInstance().sendMail(user.getId(),title,content,mailReward,nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -417,13 +417,13 @@ public class BuyGoodsLogic {
|
|||
String title = SErrorCodeEerverConfig.getI18NMessage("recharge_" + sRechargeCommodityConfig.getType() + "_title");
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("recharge_" + sRechargeCommodityConfig.getType() + "_txt");
|
||||
if(type== 3 || type==1 || type==6){
|
||||
content = SErrorCodeEerverConfig.getI18NMessage("recharge_" + sRechargeCommodityConfig.getType() + "_txt",new Object[]{rewardStr.split("#")[1]});
|
||||
content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("recharge_" + sRechargeCommodityConfig.getType() + "_txt",new Object[]{rewardStr.split("#")[1]},new int[]{0},"#");
|
||||
}
|
||||
if(type==10){
|
||||
//红包事件
|
||||
Poster.getPoster().dispatchEvent(new BuyGoodsDirectEvent(uid,goodsId));
|
||||
title = SErrorCodeEerverConfig.getI18NMessage("recharge_" + sRechargeCommodityConfig.getType() + "_title",new Object[]{sRechargeCommodityConfig.getName()});
|
||||
content = SErrorCodeEerverConfig.getI18NMessage("recharge_" + sRechargeCommodityConfig.getType() + "_txt",new Object[]{sRechargeCommodityConfig.getName()});
|
||||
title = SErrorCodeEerverConfig.getI18NMessageNeedConvert("recharge_" + sRechargeCommodityConfig.getType() + "_title",new Object[]{sRechargeCommodityConfig.getName()},new int[]{1},"#");
|
||||
content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("recharge_" + sRechargeCommodityConfig.getType() + "_txt",new Object[]{sRechargeCommodityConfig.getName()},new int[]{1},"#");
|
||||
}
|
||||
if(!rewardStr.isEmpty()){
|
||||
MailLogic.getInstance().sendMail(user.getId(),title,content,rewardStr,nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||
|
|
|
@ -689,7 +689,7 @@ public class ItemUtil {
|
|||
builder.append(entry.getKey()).append("#").append(entry.getValue());
|
||||
String title = SErrorCodeEerverConfig.getI18NMessage("item_max_mail_title");
|
||||
SItem item = SItem.getsItemMap().get(entry.getKey());
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("item_max_mail_content",new String[]{item.getName(),String.valueOf(item.getItemNumlimit())});
|
||||
String content = SErrorCodeEerverConfig.getI18NMessageNeedConvert("item_max_mail_content",new String[]{item.getName(),String.valueOf(item.getItemNumlimit())},new int[]{1,0},"#");
|
||||
MailLogic.getInstance().sendMail(user.getId(),title,content,builder.toString(),TimeUtils.nowInt(),Global.MAIL_EFFECTIVE_TIME);
|
||||
builder = new StringBuilder();
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ public class SErrorCodeEerverConfig implements BaseConfig {
|
|||
if (value == null) {
|
||||
return "";
|
||||
}
|
||||
return value.getvalue()+"|"+value.getEnglishValue();
|
||||
return value.getvalue();
|
||||
}
|
||||
|
||||
public static String getI18NMessage(String key,Object[] obj ){
|
||||
|
@ -60,10 +60,16 @@ public class SErrorCodeEerverConfig implements BaseConfig {
|
|||
if(value==null){
|
||||
return "";
|
||||
}
|
||||
return MessageFormat.format(value.getvalue(), obj) + "|" + MessageFormat.format(value.getEnglishValue(), obj);
|
||||
return MessageFormat.format(value.getvalue(), obj);
|
||||
|
||||
}
|
||||
public static String getI18NMessageNeedConvert(String key,Object[] obj ,int[] convert){
|
||||
return getI18NMessageNeedConvert(key,obj,convert,"|");
|
||||
}
|
||||
public static String getI18NMessageNeedConvert(String key,Object[] obj ,int[] convert,String split){
|
||||
if(!split.equals("#")&&!split.equals("|")){
|
||||
return "";
|
||||
}
|
||||
SErrorCodeEerverConfig value = errorCodeMap.get(key);
|
||||
if(value==null){
|
||||
return "";
|
||||
|
@ -73,7 +79,7 @@ public class SErrorCodeEerverConfig implements BaseConfig {
|
|||
}
|
||||
StringBuilder str = new StringBuilder();
|
||||
for(int i = 0 ; i <obj.length;i++) {
|
||||
str.append("|").append(convert[i]).append(obj[i].toString());
|
||||
str.append(split).append(convert[i]).append(obj[i].toString());
|
||||
}
|
||||
return value.getvalue()+str.toString();
|
||||
|
||||
|
|
Loading…
Reference in New Issue