公会宣言长度
parent
aab51ba39c
commit
7d26a0da25
|
|
@ -142,7 +142,8 @@ public enum ErrorCode implements IErrorCode {
|
|||
IN_BLACK(108,"对方已被您加入黑名单,无法添加好友"),
|
||||
NULL_NAME(109,"名字不能为空"),
|
||||
NAME_LENGTH_ERROR(110,"公会名长度不符"),
|
||||
EXIST_NAME(111,"此名已存在");
|
||||
EXIST_NAME(111,"此名已存在"),
|
||||
ANNOUNCE_SIZE(112,"公会宣言长度不符"),
|
||||
|
||||
|
||||
;
|
||||
|
|
|
|||
|
|
@ -98,6 +98,9 @@ public class GuildLogic {
|
|||
if(StringUtil.isEmpty(announce)){
|
||||
announce= SGuildSetting.sGuildSetting.getDefaultDeclaration();
|
||||
}
|
||||
if(announce.length()<0||announce.length()>32){
|
||||
throw new ErrorCodeException(ErrorCode.ANNOUNCE_SIZE);
|
||||
}
|
||||
GuildInfo guildInfo = new GuildInfo(user.getId(),familyName,announce);
|
||||
GuilidManager.addGuildInfo(guildInfo);
|
||||
user.getPlayerInfoManager().setGuildId(guildInfo.getId());
|
||||
|
|
@ -680,6 +683,9 @@ public class GuildLogic {
|
|||
throw new ErrorCodeException(ErrorCode.FAMILY_IN_SENSITIVE);
|
||||
}else{
|
||||
if(type==1){
|
||||
if(content.length()<0||content.length()>32){
|
||||
throw new ErrorCodeException(ErrorCode.ANNOUNCE_SIZE);
|
||||
}
|
||||
guildInfo.setAnnounce(content);
|
||||
}else{
|
||||
checkForCreateGuild(user, content, guildInfo.getAnnounce());
|
||||
|
|
|
|||
Loading…
Reference in New Issue