四灵试炼,跑马灯

back_recharge
duhui 2021-03-10 16:09:24 +08:00
parent 14f3dd54e3
commit b1d5c773c2
5 changed files with 36 additions and 16 deletions

View File

@ -86,6 +86,22 @@ public class StringUtil {
return values; return values;
} }
/**
* a#a|b#b
* @param value
* @return
*/
public static String[][] parseFiledString(String value){
if ("".equals(value) || value == null) {
return new String[0][0];
}
String[] split = value.split("|//");
String[][] values = new String[split.length][];
for (int i = 0; i < split.length; i++) {
values[i] = split[i].split("#");
}
return values;
}
/** /**
* *

View File

@ -66,7 +66,7 @@ public interface Global {
int LUCKWHEEL = 5; //幸运探宝 int LUCKWHEEL = 5; //幸运探宝
int LUCKWHEEL_ADVANCE = 6; //高级探宝 int LUCKWHEEL_ADVANCE = 6; //高级探宝
int DEATH_PATH_FIRST = 7;//十绝阵第一名公会 int DEATH_PATH_FIRST = 7;//十绝阵第一名公会
int DILIGENT_NOTICE = 9;// 勤勉,跑马灯
int VIPSTORID = 20; //vip商店id int VIPSTORID = 20; //vip商店id
int GODSTORID = 57; //vip商店id int GODSTORID = 57; //vip商店id

View File

@ -74,8 +74,8 @@ public class UpgradeGodTreeHandler extends BaseHandler<ActivityProto.UpgradeGodT
// 发送公告 // 发送公告
if (sGodHoodTreeLevel.getNeedBroadCast() == 1){ if (sGodHoodTreeLevel.getNeedBroadCast() == 1){
String message = SErrorCodeEerverConfig.getI18NMessage("JianMuLevel_Hint", new Object[]{user.getPlayerInfoManager().getNickName(), user.getPlayerInfoManager().getTreeLevel()}); String message = SErrorCodeEerverConfig.getI18NMessageNeedConvert("JianMuLevel_Hint", new Object[]{user.getPlayerInfoManager().getNickName(), user.getPlayerInfoManager().getTreeLevel()},new int[]{0,0},"#");
ChatLogic.getInstance().sendSysChatMessage(message, Global.DILIGENT, "0", 0, 0, 0, 0, 1); ChatLogic.getInstance().sendSysChatMessage(message, Global.DILIGENT_NOTICE, "0", 0, 0, 0, 0, 1);
} }
return ActivityProto.UpgradeGodTreeResponse.newBuilder().build(); return ActivityProto.UpgradeGodTreeResponse.newBuilder().build();

View File

@ -35,6 +35,7 @@ import org.slf4j.LoggerFactory;
import rpc.protocols.CommonProto; import rpc.protocols.CommonProto;
import rpc.protocols.MessageTypeProto; import rpc.protocols.MessageTypeProto;
import rpc.protocols.PlayerInfoProto; import rpc.protocols.PlayerInfoProto;
import util.StringUtil;
import util.TimeUtils; import util.TimeUtils;
import java.util.ArrayList; import java.util.ArrayList;
@ -264,8 +265,8 @@ public class FourChallengeLogic {
} }
// 发送公告 // 发送公告
if (sCampTowerConfig.getNeedBroadCast() == 1){ if (sCampTowerConfig.getNeedBroadCast() == 1){
String message = SErrorCodeEerverConfig.getI18NMessage("SiLingLevel_Hint", new Object[]{user.getPlayerInfoManager().getNickName(), getType(campId), floorId}); String message = SErrorCodeEerverConfig.getI18NMessageNeedConvert("SiLingLevel_Hint", new Object[]{user.getPlayerInfoManager().getNickName(), getType(campId), floorId},new int[]{0,1,0},"#");
ChatLogic.getInstance().sendSysChatMessage(message, Global.DILIGENT, "0", 0, 0, 0, 0, 1); ChatLogic.getInstance().sendSysChatMessage(message, Global.DILIGENT_NOTICE, "0", 0, 0, 0, 0, 1);
} }
} }
@ -287,18 +288,15 @@ public class FourChallengeLogic {
} }
private String getType(int type){ private String getType(int type){
switch (type){ SCampTowerSetting setting = STableManager.getConfig(SCampTowerSetting.class).get(1);
case 1: String[][] strings = StringUtil.parseFiledString(setting.getCampTowerName());
return "人塔"; String types = String.valueOf(type);
case 2: for (String[] str : strings) {
return "佛塔"; if (types.equals(str[0])){
case 3: return str[1];
return "妖塔"; }
case 4:
return "道塔";
default:
return "error";
} }
return "";
} }
/** /**

View File

@ -28,6 +28,8 @@ public class SCampTowerSetting implements BaseConfig {
private int[] selectHeroReward; private int[] selectHeroReward;
private String campTowerName;
@Override @Override
public void init() throws Exception { public void init() throws Exception {
@ -77,4 +79,8 @@ public class SCampTowerSetting implements BaseConfig {
public void setSelectHeroReward(int[] selectHeroReward) { public void setSelectHeroReward(int[] selectHeroReward) {
this.selectHeroReward = selectHeroReward; this.selectHeroReward = selectHeroReward;
} }
public String getCampTowerName() {
return campTowerName;
}
} }