改名推送

back_recharge
zhangshanxue 2019-08-29 16:21:50 +08:00
parent 48d7ee726c
commit 9c676a4c6f
1 changed files with 15 additions and 12 deletions

View File

@ -102,7 +102,7 @@ public class PlayerLogic {
/**
*
* @param name
* @param type
* @param type 1: 2: 3
*/
public void resetUserName(ISession iSession, String name, int type,int teamPosId) throws Exception {
int uid = iSession.getUid();
@ -114,7 +114,7 @@ public class PlayerLogic {
if (checkName(iSession, name, msgId)){
return;
}
if (type == 1) {
if (type == 1||type == 3) {
// 检查名字是否被占用
if (PlayerLogic.getInstance().isExistName(name)) {
MessageUtil.sendErrorResponse(iSession, 0, msgId, SErrorCodeEerverConfig.getI18NMessage("name_repeat_txt"));
@ -135,6 +135,7 @@ public class PlayerLogic {
teamPosManager.getTeamNames().put(teamPosId,name);
}
if(type==3){
//检查下
int[][] cost = new int[1][];
int[] temp = new int[2];
@ -147,6 +148,8 @@ public class PlayerLogic {
MessageUtil.sendErrorResponse(iSession,0,msgId,"道具不足");
return;
}
}
MessageUtil.sendMessage(iSession,1,msgId,null,true);
}