public void Add(COMDT_ACNT_UNIQ uniq) { CFriendHeartData.CDHeartData friendData = this.GetFriendData(uniq); if (friendData != null) { this.RemoveCDHeartData(uniq); } UT.Add2List <CFriendHeartData.CDHeartData>(new CFriendHeartData.CDHeartData { ullUid = uniq.ullUid, dwLogicWorldId = uniq.dwLogicWorldId }, this._sendHeartList); }
private int GetHeartDataIndex(COMDT_ACNT_UNIQ uniq) { if (uniq == null) { return(-1); } for (int i = 0; i < this._sendHeartList.Count; i++) { CFriendHeartData.CDHeartData cDHeartData = this._sendHeartList[i]; if (cDHeartData.ullUid == uniq.ullUid && cDHeartData.dwLogicWorldId == uniq.dwLogicWorldId) { return(i); } } return(-1); }