public static void On_NTF_INTIMACY_RELATION_REQUEST(CSPkg msg) { SCPKG_CMD_NTF_INTIMACY_RELATION_REQUEST stNtfIntimacyRelationRequest = msg.stPkgData.stNtfIntimacyRelationRequest; if (stNtfIntimacyRelationRequest == null) { return; } COM_INTIMACY_STATE cOM_INTIMACY_STATE = COM_INTIMACY_STATE.COM_INTIMACY_STATE_NULL; if (stNtfIntimacyRelationRequest.bRelationChgType == 1) { if (IntimacyRelationViewUT.IsRelaState(stNtfIntimacyRelationRequest.bIntimacyState)) { cOM_INTIMACY_STATE = IntimacyRelationViewUT.GetConfirmState(stNtfIntimacyRelationRequest.bIntimacyState); } } else if (stNtfIntimacyRelationRequest.bRelationChgType == 2 && IntimacyRelationViewUT.IsRelaState(stNtfIntimacyRelationRequest.bIntimacyState)) { cOM_INTIMACY_STATE = IntimacyRelationViewUT.GetDenyState(stNtfIntimacyRelationRequest.bIntimacyState); } if (cOM_INTIMACY_STATE != COM_INTIMACY_STATE.COM_INTIMACY_STATE_NULL) { CFriendRelationship.FRData.Add(stNtfIntimacyRelationRequest.stUin.ullUid, stNtfIntimacyRelationRequest.stUin.dwLogicWorldId, cOM_INTIMACY_STATE, (COM_INTIMACY_RELATION_CHG_TYPE)stNtfIntimacyRelationRequest.bRelationChgType, 0u, true); } }
public static void On_Send_INTIMACY_RELATION_REQUEST(CSPkg msg) { Singleton <CUIManager> .GetInstance().CloseSendMsgAlert(); SCPKG_CMD_INTIMACY_RELATION_REQUEST stIntimacyRelationRequestRsp = msg.stPkgData.stIntimacyRelationRequestRsp; if (stIntimacyRelationRequestRsp.dwResult == 0u) { string strContent = string.Empty; COM_INTIMACY_STATE state = COM_INTIMACY_STATE.COM_INTIMACY_STATE_NULL; if (stIntimacyRelationRequestRsp.bRelationChgType == 1) { if (IntimacyRelationViewUT.IsRelaState(stIntimacyRelationRequestRsp.bIntimacyState)) { state = IntimacyRelationViewUT.GetConfirmState(stIntimacyRelationRequestRsp.bIntimacyState); RelationConfig relaTextCfg = Singleton <CFriendContoller> .instance.model.FRData.GetRelaTextCfg(stIntimacyRelationRequestRsp.bIntimacyState); strContent = relaTextCfg.IntimRela_Tips_SendRequestSuccess; } } else if (stIntimacyRelationRequestRsp.bRelationChgType == 2 && IntimacyRelationViewUT.IsRelaState(stIntimacyRelationRequestRsp.bIntimacyState)) { state = IntimacyRelationViewUT.GetDenyState(stIntimacyRelationRequestRsp.bIntimacyState); RelationConfig relaTextCfg2 = Singleton <CFriendContoller> .instance.model.FRData.GetRelaTextCfg(stIntimacyRelationRequestRsp.bIntimacyState); strContent = relaTextCfg2.IntimRela_Tips_SendDelSuccess; } Singleton <CUIManager> .GetInstance().OpenTips(strContent, false, 1.5f, null, new object[0]); CFriendRelationship.FRData.Add(stIntimacyRelationRequestRsp.stUin.ullUid, stIntimacyRelationRequestRsp.stUin.dwLogicWorldId, state, (COM_INTIMACY_RELATION_CHG_TYPE)stIntimacyRelationRequestRsp.bRelationChgType, 0u, false); } else { Singleton <CUIManager> .GetInstance().OpenTips(UT.ErrorCode_String(stIntimacyRelationRequestRsp.dwResult), false, 1.5f, null, new object[0]); } }
public static COM_INTIMACY_STATE GetDenyState(byte state) { return IntimacyRelationViewUT.GetDenyState((COM_INTIMACY_STATE)state); }