公会战大区
parent
afa01af21b
commit
6b28068a8e
|
|
@ -24,6 +24,8 @@ public class ServerProperties {
|
|||
|
||||
private boolean guildFight;
|
||||
|
||||
private int areaId;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
|
@ -88,6 +90,14 @@ public class ServerProperties {
|
|||
this.guildFight = guildFight;
|
||||
}
|
||||
|
||||
public int getAreaId() {
|
||||
return areaId;
|
||||
}
|
||||
|
||||
public void setAreaId(int areaId) {
|
||||
this.areaId = areaId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ServerProperties{" +
|
||||
|
|
@ -99,6 +109,7 @@ public class ServerProperties {
|
|||
", num=" + num +
|
||||
", sendlog37=" + sendlog37 +
|
||||
", guildFight =" + guildFight +
|
||||
", areaId="+areaId+
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -189,7 +189,6 @@ public class RedisKey {
|
|||
public static final String SYSMSG = "SYSMSG";
|
||||
|
||||
public final static String CDKEY = "CDKEY";
|
||||
|
||||
public static Set<String> familyKey = new HashSet<>();
|
||||
static {
|
||||
familyKey.add(FAMILY_FIGHT);
|
||||
|
|
@ -207,10 +206,12 @@ public class RedisKey {
|
|||
familyKey.add(FAMILY_FIGHT_FINISH_MATCHING);
|
||||
}
|
||||
public static String getKey(String type, String key, boolean withoutServerId) {
|
||||
if(RedisKey.TOKEN.equals(type)||RedisKey.USER_SERVER_INFO.equals(type)||familyKey.contains(type)){
|
||||
if(RedisKey.TOKEN.equals(type)||RedisKey.USER_SERVER_INFO.equals(type)){
|
||||
return type + RedisKey.Delimiter_colon + key;
|
||||
}
|
||||
|
||||
if(familyKey.contains(type)){
|
||||
return type + RedisKey.Delimiter_colon + GameApplication.serverProperties.getAreaId();
|
||||
}
|
||||
if (withoutServerId) {
|
||||
return GameApplication.areaId + Delimiter_colon + type + Delimiter_colon + String.valueOf(key);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1018,9 +1018,12 @@ public class RedisUtil {
|
|||
|
||||
public String getKey(String type,String key){
|
||||
|
||||
if(RedisKey.BLOODY_RANK.equals(type) || RedisKey.BLOODY_TEAM.equals(type) || RedisKey.PLAYER_INFO_CACHE.equals(type) || RedisKey.BLOODY_PERSON_BATTLE_INFO.equals(type)||RedisKey.familyKey.contains(type)) {
|
||||
if(RedisKey.BLOODY_RANK.equals(type) || RedisKey.BLOODY_TEAM.equals(type) || RedisKey.PLAYER_INFO_CACHE.equals(type) || RedisKey.BLOODY_PERSON_BATTLE_INFO.equals(type)) {
|
||||
return type + RedisKey.Delimiter_colon + key;
|
||||
}
|
||||
if(RedisKey.familyKey.contains(type)){
|
||||
return type + RedisKey.Delimiter_colon + GameApplication.serverProperties.getAreaId();
|
||||
}
|
||||
if(RedisKey.TOKEN.equals(type)||RedisKey.USER_SERVER_INFO.equals(type)||
|
||||
RedisKey.CDKEY.equals(type)){
|
||||
return type + RedisKey.Delimiter_colon + key;
|
||||
|
|
|
|||
Loading…
Reference in New Issue