public void Add(ulong ulluid, uint worldId, COM_INTIMACY_STATE state, COM_INTIMACY_RELATION_CHG_TYPE op, uint timeStamp, bool bReceiveNtf = false)
        {
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo();

            if (masterRoleInfo != null && masterRoleInfo.playerUllUID == ulluid && (long)masterRoleInfo.logicWorldID == (long)((ulong)worldId))
            {
                return;
            }
            CFR cfr = this.GetCfr(ulluid, worldId);

            if (cfr == null)
            {
                this.m_cfrList.Add(new CFR(ulluid, worldId, state, op, timeStamp, bReceiveNtf));
            }
            else
            {
                cfr.SetData(ulluid, worldId, state, op, timeStamp, bReceiveNtf);
            }
            if (IntimacyRelationViewUT.IsRelaState(state))
            {
                COM_INTIMACY_STATE confirmState = IntimacyRelationViewUT.GetConfirmState(state);
                this.FindSetState(confirmState, COM_INTIMACY_STATE.COM_INTIMACY_STATE_VALUE_FULL);
            }
            Singleton <EventRouter> .GetInstance().BroadCastEvent("FRDataChange");
        }
Ejemplo n.º 2
0
        public void Add(ulong ulluid, uint worldId, COM_INTIMACY_STATE state, COM_INTIMACY_RELATION_CHG_TYPE op, uint timeStamp, bool bReceiveNtf = false)
        {
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo();

            if (masterRoleInfo != null && masterRoleInfo.playerUllUID == ulluid && (long)masterRoleInfo.logicWorldID == (long)((ulong)worldId))
            {
                return;
            }
            CFR cfr = this.GetCfr(ulluid, worldId);

            if (cfr == null)
            {
                this.m_cfrList.Add(new CFR(ulluid, worldId, state, op, timeStamp, bReceiveNtf));
            }
            else
            {
                cfr.SetData(ulluid, worldId, state, op, timeStamp, bReceiveNtf);
            }
            if (state == 1)
            {
                this.FindSetState(20, 24);
            }
            if (state == 2)
            {
                this.FindSetState(22, 24);
            }
            Singleton <EventRouter> .GetInstance().BroadCastEvent("FRDataChange");
        }
Ejemplo n.º 3
0
        public void SetData(ulong ulluid, uint worldId, COM_INTIMACY_STATE state, COM_INTIMACY_RELATION_CHG_TYPE op, uint timeStamp, bool bReciveOthersRequest)
        {
            this.ulluid  = ulluid;
            this.worldID = worldId;
            this.state   = state;
            this.op      = op;
            this.SetTimeStamp(timeStamp);
            this.bReciveOthersRequest = bReciveOthersRequest;
            this._friendInfo          = null;
            bool flag = state == COM_INTIMACY_STATE.COM_INTIMACY_STATE_GAY_CONFIRM || state == COM_INTIMACY_STATE.COM_INTIMACY_STATE_GAY_DENY || state == COM_INTIMACY_STATE.COM_INTIMACY_STATE_LOVER_CONFIRM || state == COM_INTIMACY_STATE.COM_INTIMACY_STATE_LOVER_DENY;

            if (bReciveOthersRequest && flag)
            {
                this.bRedDot = true;
                Singleton <EventRouter> .instance.BroadCastEvent("Friend_LobbyIconRedDot_Refresh");
            }
        }
Ejemplo n.º 4
0
        public void SetData(ulong ulluid, uint worldId, COM_INTIMACY_STATE state, COM_INTIMACY_RELATION_CHG_TYPE op, uint timeStamp, bool bReciveOthersRequest)
        {
            this.ulluid  = ulluid;
            this.worldID = worldId;
            this.state   = state;
            this.op      = op;
            this.SetTimeStamp(timeStamp);
            this.bReciveOthersRequest = bReciveOthersRequest;
            this._friendInfo          = null;
            COMDT_FRIEND_INFO friendInfo = this.friendInfo;

            if (bReciveOthersRequest && (state == 20 || state == 21 || state == 22 || state == 23))
            {
                this.bRedDot = true;
                Singleton <EventRouter> .get_instance().BroadCastEvent("Friend_LobbyIconRedDot_Refresh");
            }
        }
Ejemplo n.º 5
0
        public static void Send_CHG_INTIMACY_DENY(ulong ulluid, uint worldID, COM_INTIMACY_STATE state, COM_INTIMACY_RELATION_CHG_TYPE type)
        {
            CSPkg cSPkg = NetworkModule.CreateDefaultCSPKG(1366u);

            cSPkg.stPkgData.get_stChgIntimacyDenyReq().stUin.ullUid = ulluid;
            cSPkg.stPkgData.get_stChgIntimacyDenyReq().stUin.dwLogicWorldId = worldID;
            cSPkg.stPkgData.get_stChgIntimacyDenyReq().bRelationChgType = type;
            cSPkg.stPkgData.get_stChgIntimacyDenyReq().bIntimacyState   = state;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg, true);
        }
Ejemplo n.º 6
0
 public CFR(ulong ulluid, uint worldId, COM_INTIMACY_STATE state, COM_INTIMACY_RELATION_CHG_TYPE op, uint timeStamp, bool bReciveOthersRequest)
 {
     this.SetData(ulluid, worldId, state, op, timeStamp, bReciveOthersRequest);
 }
Ejemplo n.º 7
0
        public static void Send_CHG_INTIMACY_CONFIRM(ulong ulluid, uint worldID, COM_INTIMACY_STATE value, COM_INTIMACY_RELATION_CHG_TYPE type)
        {
            CSPkg cSPkg = NetworkModule.CreateDefaultCSPKG(1363u);

            cSPkg.stPkgData.stChgIntimacyConfirmReq.stUin.ullUid         = ulluid;
            cSPkg.stPkgData.stChgIntimacyConfirmReq.stUin.dwLogicWorldId = worldID;
            cSPkg.stPkgData.stChgIntimacyConfirmReq.bRelationChgType     = (byte)type;
            cSPkg.stPkgData.stChgIntimacyConfirmReq.bIntimacyState       = (byte)value;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg, true);
        }
Ejemplo n.º 8
0
        public static void Send_INTIMACY_RELATION_REQUEST(ulong ulluid, uint worldID, COM_INTIMACY_STATE state, COM_INTIMACY_RELATION_CHG_TYPE chgType)
        {
            CSPkg cSPkg = NetworkModule.CreateDefaultCSPKG(1360u);

            cSPkg.stPkgData.stIntimacyRelationRequestReq.stUin.ullUid         = ulluid;
            cSPkg.stPkgData.stIntimacyRelationRequestReq.stUin.dwLogicWorldId = worldID;
            cSPkg.stPkgData.stIntimacyRelationRequestReq.bIntimacyState       = (byte)state;
            cSPkg.stPkgData.stIntimacyRelationRequestReq.bRelationChgType     = (byte)chgType;
            Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg, true);
        }