加入图腾

back_recharge
lvxinran 2019-08-21 14:02:32 +08:00
parent 0f9897eeac
commit 668e58147d
2 changed files with 14 additions and 2 deletions

View File

@ -2,6 +2,8 @@ package com.ljsd.jieling.logic.player;
import com.ljsd.jieling.config.*; import com.ljsd.jieling.config.*;
import com.ljsd.jieling.core.VipPrivilegeType; import com.ljsd.jieling.core.VipPrivilegeType;
import com.ljsd.jieling.dataReport.reportBeans_37.ChatContentType;
import com.ljsd.jieling.dataReport.reportBeans_37.Repot37EventUtil;
import com.ljsd.jieling.db.redis.RedisKey; import com.ljsd.jieling.db.redis.RedisKey;
import com.ljsd.jieling.db.redis.RedisUtil; import com.ljsd.jieling.db.redis.RedisUtil;
import com.ljsd.jieling.globals.BIReason; import com.ljsd.jieling.globals.BIReason;
@ -114,7 +116,7 @@ public class PlayerLogic {
if (type == 1) { if (type == 1) {
// 检查名字是否被占用 // 检查名字是否被占用
if (PlayerLogic.getInstance().isExistName(name)) { if (PlayerLogic.getInstance().isExistName(name)) {
MessageUtil.sendErrorResponse(iSession, 0, msgId, ""); MessageUtil.sendErrorResponse(iSession, 0, msgId, SErrorCodeEerverConfig.getI18NMessage("name_repeat_txt"));
return; return;
} }
if (!playerInfoManager.getNickName().equals(String.valueOf(uid))){ if (!playerInfoManager.getNickName().equals(String.valueOf(uid))){
@ -135,6 +137,10 @@ public class PlayerLogic {
} }
private boolean checkName(ISession iSession, String name, int msgId) throws Exception { private boolean checkName(ISession iSession, String name, int msgId) throws Exception {
if(!Repot37EventUtil.Report37Chat(UserManager.getUser(iSession.getUid()), ChatContentType.ROLE_NAME,name)){
MessageUtil.sendErrorResponse(iSession, Global.RENAME_DIRTY, msgId, "名字不合法");
return true;
}
int length = getStrLength(name); int length = getStrLength(name);
if (length == -1) { if (length == -1) {
MessageUtil.sendErrorResponse(iSession, Global.RENAME_DIRTY, msgId, "名字不合法"); MessageUtil.sendErrorResponse(iSession, Global.RENAME_DIRTY, msgId, "名字不合法");

View File

@ -224,7 +224,7 @@ public class CBean2Proto {
.setLevel(playerInfoManager.getLevel()) .setLevel(playerInfoManager.getLevel())
.setName(playerInfoManager.getNickName()) .setName(playerInfoManager.getNickName())
.setHurt(hurtNum) .setHurt(hurtNum)
.setHead(0) .setHead(String.valueOf(0))
.setRank(rank) .setRank(rank)
.build(); .build();
} }
@ -342,6 +342,10 @@ public class CBean2Proto {
} }
public static CommonProto.FamilyBaseInfo getFamilyBaseInfo(GuildInfo guildInfo){ public static CommonProto.FamilyBaseInfo getFamilyBaseInfo(GuildInfo guildInfo){
CommonProto.FamilyContribute familyContribute = CommonProto.FamilyContribute.newBuilder()
.setWin(guildInfo.getResult(1))
.setDraw(guildInfo.getResult(2))
.setFail(guildInfo.getResult(3)).build();
return CommonProto.FamilyBaseInfo.newBuilder() return CommonProto.FamilyBaseInfo.newBuilder()
.setId(guildInfo.getId()) .setId(guildInfo.getId())
.setAnnouce(guildInfo.getAnnounce()) .setAnnouce(guildInfo.getAnnounce())
@ -352,6 +356,8 @@ public class CBean2Proto {
.setLevle(guildInfo.getLevel()) .setLevle(guildInfo.getLevel())
.setExp(guildInfo.getExp()) .setExp(guildInfo.getExp())
.setTotalNum(guildInfo.getTotalMembers()) .setTotalNum(guildInfo.getTotalMembers())
.setIcon(guildInfo.getIcon())
.setFightResult(familyContribute)
.build(); .build();
} }