/// <summary> /// 创建实例 /// </summary> public static FuncCreateRoleGroupRequest create(int funcID, CreateRoleGroupData createData) { FuncCreateRoleGroupRequest re = (FuncCreateRoleGroupRequest)BytesControl.createRequest(dataID); re.funcID = funcID; re.createData = createData; return(re); }
//--行为--// /** 创建玩家群 */ public void createRoleGroup(CreateRoleGroupData data) { if (isRoleGroupFull()) { me.warnLog("创建玩家群时,已达到数目限制"); return; } if (_config.createCostID > 0 && !me.bag.hasCost(_config.createCostID)) { me.warnLog("创建玩家群时,cost不满足"); return; } if (!me.role.checkRoleConditions(_config.createConditions, true)) { me.warnLog("创建玩家群时,condition不满足"); return; } if (_config.nameCharLimit > 0 && StringUtils.getCharMachineNum(data.name) > _config.nameCharLimit) { me.warnLog("创建玩家群时,名字过长"); return; } if (_config.noticeCharLimit > 0 && StringUtils.getCharMachineNum(data.notice) > _config.noticeCharLimit) { me.warnLog("创建玩家群时,公告过长"); return; } //敏感字 if (BaseGameUtils.hasSensitiveWord(data.name)) { Ctrl.warnLog("创建玩家群时,名字敏感"); GameC.info.showInfoCode(InfoCodeType.CreateRoleGroupFailed_nameIsSensitive); return; } //敏感字 if (BaseGameUtils.hasSensitiveWord(data.notice)) { Ctrl.warnLog("创建玩家群时,公告敏感"); GameC.info.showInfoCode(InfoCodeType.CreateRoleGroupFailed_noticeIsSensitive); return; } if (!canCreateRoleGroupEx()) { me.warnLog("创建玩家群时,ex不满足"); return; } //发送 me.send(FuncCreateRoleGroupRequest.create(_funcID, data)); }