/// <summary> /// 创建实例 /// </summary> public static FuncHandleInviteRoleGroupRequest create(int funcID, long invitor, long groupID, int result) { FuncHandleInviteRoleGroupRequest re = (FuncHandleInviteRoleGroupRequest)BytesControl.createRequest(dataID); re.funcID = funcID; re.invitor = invitor; re.groupID = groupID; re.result = result; return(re); }
/** 处理邀请信息 */ public void handleInvite(InviteRoleGroupReceiveData tData, int result) { int index = _inviteList.indexOf(tData); if (index == -1) { me.warnLog("未找到邀请信息"); return; } _inviteList.remove(index); long invitorID = tData.inviter.playerID; if (isRoleGroupFull()) { me.warnLog("处理邀请时,群已满", invitorID); return; } if (!me.role.checkRoleConditions(_config.joinConditions, false)) { me.warnLog("处理邀请时,目标condition不满足"); return; } //有群 if (tData.simpleData != null) { PlayerRoleGroup roleGroup = getRoleGroup(tData.simpleData.groupID); if (roleGroup != null) { me.warnLog("处理邀请时,已在群中", invitorID); return; } } me.send(FuncHandleInviteRoleGroupRequest.create(_funcID, tData.inviter.playerID, tData.getRoleGroupID(), result)); }