fix guild & mail
parent
35bc1e5322
commit
0ccb33b366
|
|
@ -207,11 +207,15 @@ public class MailLogic {
|
||||||
if (mail == null){
|
if (mail == null){
|
||||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||||
}
|
}
|
||||||
|
if(mail.getState() == Global.MAIL_DRAW_ST_GOT){
|
||||||
|
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||||
|
}
|
||||||
if (mailItem.length() == 0){
|
if (mailItem.length() == 0){
|
||||||
mailItem = new StringBuilder(mail.getMailItem());
|
mailItem = new StringBuilder(mail.getMailItem());
|
||||||
}else{
|
}else{
|
||||||
mailItem.append("|").append(mail.getMailItem());
|
mailItem.append("|").append(mail.getMailItem());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if(mailItem.length()==0){
|
if(mailItem.length()==0){
|
||||||
throw new ErrorCodeException(ErrorCode.MAIL_NO_REWARD);
|
throw new ErrorCodeException(ErrorCode.MAIL_NO_REWARD);
|
||||||
|
|
@ -223,9 +227,6 @@ public class MailLogic {
|
||||||
}
|
}
|
||||||
for (String mailId : mailIdsList){
|
for (String mailId : mailIdsList){
|
||||||
Mail mail = mailManager.getMail(mailId);
|
Mail mail = mailManager.getMail(mailId);
|
||||||
if (mail == null){
|
|
||||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
|
||||||
}
|
|
||||||
mail.setState(Global.MAIL_DRAW_ST_GOT);
|
mail.setState(Global.MAIL_DRAW_ST_GOT);
|
||||||
// mail.setMailItem("");
|
// mail.setMailItem("");
|
||||||
mail.setNoUseDeleteTime(TimeUtils.now()+TimeUtils.DAY*Global.MAIL_NOUSE_DELETE_TIME);
|
mail.setNoUseDeleteTime(TimeUtils.now()+TimeUtils.DAY*Global.MAIL_NOUSE_DELETE_TIME);
|
||||||
|
|
|
||||||
|
|
@ -412,7 +412,7 @@ public class CBean2Proto {
|
||||||
.setAnnouce(guildInfo.getAnnounce())
|
.setAnnouce(guildInfo.getAnnounce())
|
||||||
.setName(guildInfo.getName())
|
.setName(guildInfo.getName())
|
||||||
.setJoinType(guildInfo.getJoinType())
|
.setJoinType(guildInfo.getJoinType())
|
||||||
.setMaxNum(30)
|
.setMaxNum(STableManager.getConfig(SGuildLevelConfig.class).get(guildInfo.getLevel()).getNum())
|
||||||
.setLevelTime(guildInfo.getLevelTime())
|
.setLevelTime(guildInfo.getLevelTime())
|
||||||
.setLevle(guildInfo.getLevel())
|
.setLevle(guildInfo.getLevel())
|
||||||
.setExp(guildInfo.getExp())
|
.setExp(guildInfo.getExp())
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue