/// <summary> /// 是否数据一致 /// </summary> protected override bool toDataEquals(BaseData data) { if (!base.toDataEquals(data)) { return(false); } GameServerSimpleInfoData mData = (GameServerSimpleInfoData)data; if (this.isAssist != mData.isAssist) { return(false); } if (this.isNecessary != mData.isNecessary) { return(false); } if (mData.areaIDList != null) { if (this.areaIDList == null) { return(false); } if (this.areaIDList.size() != mData.areaIDList.size()) { return(false); } IntList areaIDListT = this.areaIDList; IntList areaIDListR = mData.areaIDList; int areaIDListLen = areaIDListT.size(); for (int areaIDListI = 0; areaIDListI < areaIDListLen; ++areaIDListI) { int areaIDListU = areaIDListT.get(areaIDListI); int areaIDListV = areaIDListR.get(areaIDListI); if (areaIDListU != areaIDListV) { return(false); } } } else { if (this.areaIDList != null) { return(false); } } if (this.countryID != mData.countryID) { return(false); } return(true); }
/// <summary> /// 复制(深拷贝) /// </summary> protected override void toCopy(BaseData data) { base.toCopy(data); if (!(data is GameServerSimpleInfoData)) { return; } GameServerSimpleInfoData mData = (GameServerSimpleInfoData)data; this.isAssist = mData.isAssist; this.isNecessary = mData.isNecessary; if (mData.areaIDList != null) { if (this.areaIDList != null) { this.areaIDList.clear(); this.areaIDList.ensureCapacity(mData.areaIDList.size()); } else { this.areaIDList = new IntList(); } IntList areaIDListT = this.areaIDList; if (!mData.areaIDList.isEmpty()) { int[] areaIDListVValues = mData.areaIDList.getValues(); for (int areaIDListVI = 0, areaIDListVLen = mData.areaIDList.length(); areaIDListVI < areaIDListVLen; ++areaIDListVI) { int areaIDListV = areaIDListVValues[areaIDListVI]; int areaIDListU; areaIDListU = areaIDListV; areaIDListT.add(areaIDListU); } } } else { this.areaIDList = null; nullObjError("areaIDList"); } this.countryID = mData.countryID; }
/// <summary> /// 复制(潜拷贝) /// </summary> protected override void toShadowCopy(BaseData data) { base.toShadowCopy(data); if (!(data is GameServerSimpleInfoData)) { return; } GameServerSimpleInfoData mData = (GameServerSimpleInfoData)data; this.isAssist = mData.isAssist; this.isNecessary = mData.isNecessary; this.areaIDList = mData.areaIDList; this.countryID = mData.countryID; }