cdk 服务器id添加
parent
834f6e303e
commit
d00c9f8c64
|
@ -71,7 +71,10 @@ public class ExchangeCdkHandler extends BaseHandler<PlayerInfoProto.ExchangeCdkR
|
||||||
if(scdkInfo.getPid()!=-2&&user.getPlayerInfoManager().getPid()!=scdkInfo.getPid()){
|
if(scdkInfo.getPid()!=-2&&user.getPlayerInfoManager().getPid()!=scdkInfo.getPid()){
|
||||||
throw new ErrorCodeException(ErrorCode.CDK_FAIL);
|
throw new ErrorCodeException(ErrorCode.CDK_FAIL);
|
||||||
}
|
}
|
||||||
|
//serverId
|
||||||
|
if(scdkInfo.getServerId()!=0&&scdkInfo.getServerId()!=GameApplication.serverId){
|
||||||
|
throw new ErrorCodeException(ErrorCode.CDK_FAIL);
|
||||||
|
}
|
||||||
int usetype = scdkInfo.getUsetype();
|
int usetype = scdkInfo.getUsetype();
|
||||||
if (usetype == 0) {//只能兑换一次
|
if (usetype == 0) {//只能兑换一次
|
||||||
if (cdkInfo.getStatus() == 1) {
|
if (cdkInfo.getStatus() == 1) {
|
||||||
|
|
|
@ -42,6 +42,9 @@ public class SCdkInfo {
|
||||||
@Field(value = "isAdd")
|
@Field(value = "isAdd")
|
||||||
private int isAdd; // 1: 已生成过 ,0: 未生成过
|
private int isAdd; // 1: 已生成过 ,0: 未生成过
|
||||||
|
|
||||||
|
@Field(value = "serverId")
|
||||||
|
private int serverId;
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
@ -129,5 +132,13 @@ public class SCdkInfo {
|
||||||
public void setRoleUseNum(int roleUseNum) {
|
public void setRoleUseNum(int roleUseNum) {
|
||||||
this.roleUseNum = roleUseNum;
|
this.roleUseNum = roleUseNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getServerId() {
|
||||||
|
return serverId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setServerId(int serverId) {
|
||||||
|
this.serverId = serverId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue