Merge branch 'master_test_gn' into master_test_gn_mcz2
commit
87ab7cc69c
|
@ -359,7 +359,7 @@ public class GuildLogic {
|
|||
}
|
||||
//todo 判读人数是否已达上限
|
||||
if(guildInfo.getTotalMembers()>=STableManager.getConfig(SGuildLevelConfig.class).get(guildInfo.getLevel()).getNum()){
|
||||
throw new ErrorCodeException(ErrorCode.newDefineCode("该工会人数已达上限"));
|
||||
throw new ErrorCodeException(ErrorCode.FAMILY_MAX);
|
||||
}
|
||||
boolean isSuccess = RedisUtil.getInstence().tryGetDistributedLock(RedisKey.OPERATE_FAMILY, Integer.toString(guildId), Integer.toString(uid), 500);
|
||||
if(!isSuccess){
|
||||
|
|
|
@ -1673,14 +1673,23 @@ public class HeroLogic{
|
|||
}
|
||||
//玩家皮肤加成
|
||||
for(Map.Entry<Integer, Long> entry : user.getPlayerInfoManager().getUserSkinValidTime().entrySet()){
|
||||
if(!SPlayerHeadIcon.getHeadIconMap().containsKey(entry.getKey())){
|
||||
continue;
|
||||
}
|
||||
combinedAttribute(SPlayerHeadIcon.getHeadIconMap().get(entry.getKey()).getUnlockProperty(),heroAllAttribute);
|
||||
}
|
||||
//玩家称号加成
|
||||
for(Map.Entry<Integer, Long> entry : user.getPlayerInfoManager().getUserTitleValidTime().entrySet()){
|
||||
if(!SPlayerHeadIcon.getHeadIconMap().containsKey(entry.getKey())){
|
||||
continue;
|
||||
}
|
||||
combinedAttribute(SPlayerHeadIcon.getHeadIconMap().get(entry.getKey()).getUnlockProperty(),heroAllAttribute);
|
||||
}
|
||||
//玩家坐骑加成
|
||||
for(Map.Entry<Integer, Long> entry : user.getPlayerInfoManager().getUserMountValidTime().entrySet()){
|
||||
if(!SPlayerHeadIcon.getHeadIconMap().containsKey(entry.getKey())){
|
||||
continue;
|
||||
}
|
||||
combinedAttribute(SPlayerHeadIcon.getHeadIconMap().get(entry.getKey()).getUnlockProperty(),heroAllAttribute);
|
||||
}
|
||||
//装备总战力评分
|
||||
|
|
|
@ -185,7 +185,7 @@ public class MailLogic {
|
|||
|
||||
private void getAllMailProtoList(List<Mail> cMailList, List<CommonProto.Mail> mailList) {
|
||||
for (Mail mail :cMailList){
|
||||
mailList.add(CBean2Proto.getMail(mail));
|
||||
mailList.add(CBean2Proto.getMailWithoutContent(mail));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -203,11 +203,14 @@ public class MailLogic {
|
|||
mail.setState(Global.MAIL_STATE_READ);
|
||||
mail.setNoUseDeleteTime(TimeUtils.now()+TimeUtils.DAY*Global.MAIL_NOUSE_DELETE_TIME);
|
||||
}else{
|
||||
mail.setState(Global.MAIL_DRAW_ST_UNGET);
|
||||
if(mail.getState()!=Global.MAIL_DRAW_ST_GOT){
|
||||
mail.setState(Global.MAIL_DRAW_ST_UNGET);
|
||||
}
|
||||
}
|
||||
mailManager.addMail(mail);
|
||||
ReportUtil.onReportEvent(user, ReportEventEnum.OPEN_MAIL.getType());
|
||||
MessageUtil.sendMessage(iSession, 1,msgId, null, true);
|
||||
PlayerInfoProto.MailReadResponse.Builder builder = PlayerInfoProto.MailReadResponse.newBuilder().setMailInfo(CBean2Proto.getMail(mail, false));
|
||||
MessageUtil.sendMessage(iSession, 1,msgId, builder.build(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -119,6 +119,8 @@ public class CBean2Proto {
|
|||
List<CommonProto.UserSkinInfo> userSkinLists = new ArrayList<>();
|
||||
// 获取玩家已使用皮肤列表
|
||||
Map<Integer, Long> validTime = user.getPlayerInfoManager().getUserSkinValidTime();
|
||||
user.getPlayerInfoManager().removeUserSkinValidTime(0);
|
||||
|
||||
|
||||
long now = TimeUtils.now() / 1000;
|
||||
|
||||
|
@ -240,22 +242,28 @@ public class CBean2Proto {
|
|||
.build();
|
||||
}*/
|
||||
|
||||
public static CommonProto.Mail getMail(Mail mail){
|
||||
public static CommonProto.Mail getMail(Mail mail,boolean withOutContent){
|
||||
CommonProto.Mail.Builder mailProto = CommonProto.Mail
|
||||
.newBuilder()
|
||||
.setMailId(mail.getId())
|
||||
.setHead(mail.getHead())
|
||||
.setContent(mail.getContent())
|
||||
.setState(mail.getState())
|
||||
.setEffectiveTime(mail.getEffectiveTime())
|
||||
.setSendTime(mail.getSendTime())
|
||||
.setSendName(mail.getSendName())
|
||||
.setMailType(mail.getMailType());
|
||||
|
||||
if(!withOutContent){
|
||||
mailProto.setContent(mail.getContent());
|
||||
}
|
||||
if(mail.getMailItem()!=null){
|
||||
mailProto.setMailItem(mail.getMailItem());
|
||||
}
|
||||
return mailProto.build();
|
||||
}
|
||||
public static CommonProto.Mail getMailWithoutContent(Mail mail){
|
||||
return getMail(mail,true);
|
||||
}
|
||||
|
||||
|
||||
public static CommonProto.Equip getEquipProto(PropertyItem equip){
|
||||
|
|
Loading…
Reference in New Issue