public void CleanUp() { m_GUID = MacroDefine.UINT_MAX; m_szName = null; m_RelationType = RELATION_TYPE.RELATION_TYPE_NONE; m_nFriendPoint = 0; m_nLevel = 0; m_nMenPai = 9; m_nPortrait = -1; m_GuildID = MacroDefine.INVALID_ID; m_szGuildName = null; m_bOnlineFlag = false; m_szMood = ""; m_szTitle = null; m_SceneID = MacroDefine.INVALID_ID; m_szRelation = null; m_szLocation = null; m_nTeamSize = 0; m_szTeamDesc = null; m_nEnterOrder = 0; }
// 移动一个关系,Srg 是原来的组,guid 是要移动的玩家 GUID,Dtype 是移动后的关系类型,Drg 是移动后的组 public bool MoveRelation(RELATION_GROUP Srg, RELATION_TYPE Dtype, RELATION_GROUP Drg, uint guid) { RelationList pSRelationList; pSRelationList = GetRelationList(Srg); if (pSRelationList == null) { return(false); } RelationList pDRelationList; pDRelationList = GetRelationList(Drg); if (pDRelationList == null) { return(false); } SDATA_RELATION_MEMBER pMember; pMember = pSRelationList.GetMemberByGUID(guid); if (pMember == null) { return(false); } if (pSRelationList.RemoveByGUID(guid)) { UpdateUIList(Srg); // 修改关系信息 pMember.m_RelationType = Dtype; string m_szName = pMember.m_szName; bool isFinish = false; if (pDRelationList.Add(pMember)) { UpdateUIList(Drg); isFinish = true; } else { pMember = null; isFinish = false; } // 必须等add完成后再刷新 [9/26/2011 Ivan edit] CObject_Character player = (CObject_Character)(CObjectManager.Instance.FindCharacterByName(m_szName)); if (player != null) { player.GetCharacterData().RefreshName(); } return(isFinish); } return(false); }