Beispiel #1
0
        /// <summary>
        /// 根据流水号取得相关配置
        /// </summary>
        private MarryPartyConfigData GetMarryPartyConfigData(int type)
        {
            MarryPartyConfigData data = null;

            lock (MarryPartyConfigList)
            {
                MarryPartyConfigList.TryGetValue(type, out data);
            }
            return(data);
        }
Beispiel #2
0
        public MarryPartyResult MarryPartyRemove(int roleID, bool forceRemove, GameClient client)
        {
            MarryPartyData   partyData = this.m_MarryPartyDataCache.GetParty(roleID);
            MarryPartyResult result;

            if (partyData == null)
            {
                result = MarryPartyResult.PartyNotFound;
            }
            else if (!forceRemove && partyData.StartTime <= TimeUtil.NOW())
            {
                result = MarryPartyResult.AlreadyStart;
            }
            else
            {
                MarryPartyConfigData configData = this.GetMarryPartyConfigData(partyData.PartyType);
                if (null == configData)
                {
                    result = MarryPartyResult.InvalidParam;
                }
                else if (!this.MarryPartyRemoveInternal(roleID, forceRemove, client, partyData))
                {
                    result = MarryPartyResult.PartyNotFound;
                }
                else
                {
                    if (!forceRemove)
                    {
                        GameManager.ClientMgr.AddMoney1(Global._TCPManager.MySocketListener, Global._TCPManager.tcpClientPool, Global._TCPManager.TcpOutPacketPool, client, configData.PartyCost, "婚宴退款", false);
                        this.SendMarryPartyList(client, new MarryPartyData(), -1);
                    }
                    else if (partyData.StartTime > TimeUtil.NOW())
                    {
                        GoodsData goodData = Global.GetNewGoodsData(50014, 1);
                        goodData.GCount = configData.PartyCost / 10000;
                        Global.UseMailGivePlayerAward3(roleID, new List <GoodsData>
                        {
                            goodData
                        }, GLang.GetLang(491, new object[0]), GLang.GetLang(492, new object[0]), 0, 0, 0);
                    }
                    result = MarryPartyResult.Success;
                }
            }
            return(result);
        }
Beispiel #3
0
        /// <summary>
        /// 加载配置文件 WeddingFeasttAward.xml
        /// </summary>
        public void LoadMarryPartyConfig()
        {
            lock (MarryPartyConfigList)
            {
                MarryPartyConfigList.Clear();

                string fileName = "Config/WeddingFeasttAward.xml";
                GeneralCachingXmlMgr.RemoveCachingXml(Global.GameResPath(fileName));
                XElement xml = GeneralCachingXmlMgr.GetXElement(Global.GameResPath(fileName));
                if (null == xml)
                {
                    return;
                }

                IEnumerable <XElement> xmlItems = xml.Elements();
                foreach (var xmlItem in xmlItems)
                {
                    MarryPartyConfigData data = new MarryPartyConfigData();
                    data.PartyID            = (int)Global.GetSafeAttributeLong(xmlItem, "ID");
                    data.PartyType          = (int)Global.GetSafeAttributeLong(xmlItem, "Type");
                    data.PartyCost          = (int)Global.GetSafeAttributeLong(xmlItem, "ConductBindJinBi");
                    data.PartyMaxJoinCount  = (int)Global.GetSafeAttributeLong(xmlItem, "SumNum");
                    data.PlayerMaxJoinCount = (int)Global.GetSafeAttributeLong(xmlItem, "UseNum");
                    data.JoinCost           = (int)Global.GetSafeAttributeLong(xmlItem, "BindJinBi");
                    data.RewardExp          = (int)Global.GetSafeAttributeLong(xmlItem, "EXPAward");
                    data.RewardXingHun      = (int)Global.GetSafeAttributeLong(xmlItem, "XingHunAward");
                    data.RewardShengWang    = (int)Global.GetSafeAttributeLong(xmlItem, "ShengWangAward");
                    data.GoodWillRatio      = (int)Global.GetSafeAttributeLong(xmlItem, "GoodWillRatio");

                    string   strGoodsAward = Global.GetSafeAttributeStr(xmlItem, "GoodsAward");
                    string[] fields        = strGoodsAward.Split(',');
                    if (fields.Length == 7)
                    {
                        data.RewardItem = new AwardsItemData()
                        {
                            Occupation          = 0,
                            RoleSex             = 0,
                            GoodsID             = Convert.ToInt32(fields[0]),
                            GoodsNum            = Convert.ToInt32(fields[1]),
                            Binding             = Convert.ToInt32(fields[2]),
                            Level               = Convert.ToInt32(fields[3]),
                            AppendLev           = Convert.ToInt32(fields[4]), // 追加等级
                            IsHaveLuckyProp     = Convert.ToInt32(fields[5]), // 是否有幸运属性
                            ExcellencePorpValue = Convert.ToInt32(fields[6]), // 卓越属性值
                            EndTime             = Global.ConstGoodsEndTime,
                        };
                    }

                    MarryPartyConfigList.Add(data.PartyType, data);
                }
            }

            string npcDataString = GameManager.systemParamsList.GetParamValueByName("HunYanNPC");

            string[] npcAttrString = npcDataString.Split(',');
            if (npcAttrString.Length >= 5)
            {
                int.TryParse(npcAttrString[0], out MarryPartyNPCConfig.MapCode);
                int.TryParse(npcAttrString[1], out MarryPartyNPCConfig.NpcID);
                int.TryParse(npcAttrString[2], out MarryPartyNPCConfig.NpcX);
                int.TryParse(npcAttrString[3], out MarryPartyNPCConfig.NpcY);
                int.TryParse(npcAttrString[4], out MarryPartyNPCConfig.NpcDir);
            }

            MarryPartyPlayerMaxJoinCount = (int)GameManager.systemParamsList.GetParamValueIntByName("HunYanUseMaxNum");
            MarryPartyJoinListResetTime  = TimeUtil.NowDateTime().DayOfYear;

            MarryPartyQueryList();
        }
Beispiel #4
0
        public MarryPartyResult MarryPartyJoin(GameClient client, int roleID)
        {
            if (!MarryLogic.IsVersionSystemOpenOfMarriage())
            {
                return(MarryPartyResult.NotOpen);
            }

            MarryPartyData partyData = m_MarryPartyDataCache.GetParty(roleID);

            if (partyData == null)
            {
                return(MarryPartyResult.PartyNotFound);
            }

            if (partyData.StartTime > TimeUtil.NOW())
            {
                return(MarryPartyResult.NotStart);
            }

            MarryPartyConfigData configData = GetMarryPartyConfigData(partyData.PartyType);

            if (null == configData)
            {
                return(MarryPartyResult.PartyNotFound);
            }

            // 检查參予所需金币是否足够
            if (configData.JoinCost > Global.GetTotalBindTongQianAndTongQianVal(client))
            {
                return(MarryPartyResult.NotEnoughMoney);
            }

            // 检查參予次数
            Dictionary <int, int> joinList = client.ClientData.MyMarryPartyJoinList;
            int  targetPartyJoinCount      = 0;
            int  allPartyJoinCount         = 0;
            bool remove = false;

            lock (joinList)
            {
                joinList.TryGetValue(roleID, out targetPartyJoinCount);

                foreach (KeyValuePair <int, int> kv in client.ClientData.MyMarryPartyJoinList)
                {
                    allPartyJoinCount += kv.Value;
                }

                if (allPartyJoinCount >= MarryPartyPlayerMaxJoinCount)
                {
                    return(MarryPartyResult.ZeroPlayerJoinCount);
                }
                if (targetPartyJoinCount >= configData.PlayerMaxJoinCount)
                {
                    return(MarryPartyResult.ZeroPlayerJoinCount);
                }

                // 增加參予次数
                if (m_MarryPartyDataCache.IncPartyJoin(roleID, configData.PartyMaxJoinCount, out remove) == false)
                {
                    return(MarryPartyResult.ZeroPartyJoinCount);
                }

                ++targetPartyJoinCount;

                byte[] byteData = null;
                TCPProcessCmdResults dbResult =
                    Global.RequestToDBServer3(Global._TCPManager.tcpClientPool, Global._TCPManager.TcpOutPacketPool,
                                              (int)TCPGameServerCmds.CMD_DB_MARRY_PARTY_JOIN_INC,
                                              string.Format("{0}:{1}:{2}", roleID, client.ClientData.RoleID, targetPartyJoinCount),
                                              out byteData,
                                              client.ServerId
                                              );
                if (TCPProcessCmdResults.RESULT_FAILED == dbResult || null == byteData || byteData.Length <= 6)
                {
                    m_MarryPartyDataCache.IncPartyJoinCancel(roleID);
                    return(MarryPartyResult.ZeroPartyJoinCount);
                }

                joinList[roleID] = targetPartyJoinCount;
            }

            if (configData.JoinCost > 0)
            {
                // 扣除參予所需金币
                if (Global.SubBindTongQianAndTongQian(client, configData.JoinCost, "參予婚宴") == false)
                {
                    // TODO: 沒处理參予次数已更新数据库的问题
                    return(MarryPartyResult.NotEnoughMoney);
                }
            }

            if (configData.RewardExp > 0)
            {
                GameManager.ClientMgr.ProcessRoleExperience(client, configData.RewardExp, false);
            }

            if (configData.RewardShengWang > 0)
            {
                GameManager.ClientMgr.ModifyShengWangValue(client, configData.RewardShengWang, "婚宴奖励", false);
            }

            if (configData.RewardXingHun > 0)
            {
                GameManager.ClientMgr.ModifyStarSoulValue(client, configData.RewardXingHun, "婚宴奖励", false);
            }

            if (remove == true)
            {
                MarryPartyRemoveInternal(roleID, true, client);

                // 婚宴结算, 换成友善度物品, 个数双方平分
                GoodsData goodData = Global.GetNewGoodsData(configData.RewardItem.GoodsID, configData.RewardItem.Binding);
                goodData.GCount = configData.JoinCost * configData.PartyMaxJoinCount / configData.GoodWillRatio / 2;
                List <GoodsData> goodList = new List <GoodsData>();
                goodList.Add(goodData);

                string sMsg = Global.GetLang("恭喜您成功举办了一场盛大的婚宴,宾客们馈赠的礼物已随这封邮件发送到您手上,请查收附件。");
                Global.UseMailGivePlayerAward3(roleID, goodList, Global.GetLang("婚宴"), sMsg, 0);

                int spouseID = (roleID == partyData.HusbandRoleID)? partyData.WifeRoleID : partyData.HusbandRoleID;
                Global.UseMailGivePlayerAward3(spouseID, goodList, Global.GetLang("婚宴"), sMsg, 0);
            }

            SendMarryPartyJoinList(client);
            SendMarryPartyList(client, partyData);

            //if (m_MarryPartyDataCache.GetPartyCount() <= 0)
            //{
            //    lock (MarryPartyNPCShowMutex)
            //    {
            //        if (MarryPartyNPCShow == true)
            //        {
            //            // TODO: add npc
            //            MarryPartyNPCShow = false;
            //        }
            //    }
            //}

            return(MarryPartyResult.Success);
        }
Beispiel #5
0
        public MarryPartyResult MarryPartyRemove(int roleID, bool forceRemove, GameClient client)
        {
            MarryPartyData partyData = m_MarryPartyDataCache.GetParty(roleID);

            if (partyData == null)
            {
                return(MarryPartyResult.PartyNotFound);
            }

            if (forceRemove == false && partyData.StartTime <= TimeUtil.NOW())
            {
                return(MarryPartyResult.AlreadyStart);
            }

            MarryPartyConfigData configData = GetMarryPartyConfigData(partyData.PartyType);

            if (null == configData)
            {
                return(MarryPartyResult.InvalidParam);
            }

            if (MarryPartyRemoveInternal(roleID, forceRemove, client, partyData) == false)
            {
                return(MarryPartyResult.PartyNotFound);
            }

            if (forceRemove == false)
            {
                // 手动取消,直接返绑金
                GameManager.ClientMgr.AddMoney1(Global._TCPManager.MySocketListener, Global._TCPManager.tcpClientPool, Global._TCPManager.TcpOutPacketPool, client,
                                                configData.PartyCost, "婚宴退款", false);

                SendMarryPartyList(client, new MarryPartyData());

                //if (m_MarryPartyDataCache.GetPartyCount() <= 0)
                //{
                //    lock (MarryPartyNPCShowMutex)
                //    {
                //        if (MarryPartyNPCShow == true)
                //        {
                //            // TODO: add npc
                //            MarryPartyNPCShow = false;
                //        }
                //    }
                //}
            }
            else
            {
                // 被动强制取消, 如果婚宴沒开始, 邮件返绑金
                if (partyData.StartTime > TimeUtil.NOW())
                {
                    GoodsData goodData = Global.GetNewGoodsData(50014, 1);
                    goodData.GCount = configData.PartyCost / 10000;
                    List <GoodsData> goodList = new List <GoodsData>();
                    goodList.Add(goodData);

                    Global.UseMailGivePlayerAward3(roleID, goodList, "婚宴取消", "你的婚宴被取消,返回金币请查收!", 0);
                }
            }

            return(MarryPartyResult.Success);
        }
Beispiel #6
0
        public MarryPartyResult MarryPartyCreate(GameClient client, int partyType, long startTime)
        {
            if (!MarryLogic.IsVersionSystemOpenOfMarriage())
            {
                return(MarryPartyResult.NotOpen);
            }

            MarryPartyConfigData configData = GetMarryPartyConfigData(partyType);

            if (null == configData)
            {
                return(MarryPartyResult.InvalidParam);
            }

            MarriageData marryData = client.ClientData.MyMarriageData;

            if (marryData.nSpouseID < 0 || marryData.byMarrytype < 0)
            {
                return(MarryPartyResult.NotMarry);
            }

            int    husbandRoleID = 0;
            int    wifeRoleID    = 0;
            string husbandName   = "";
            string wifeName      = "";

            if (1 == marryData.byMarrytype)
            {
                husbandRoleID = client.ClientData.RoleID;
                husbandName   = client.ClientData.RoleName;
                wifeRoleID    = marryData.nSpouseID;
                wifeName      = MarryLogic.GetRoleName(marryData.nSpouseID);
            }
            else
            {
                husbandRoleID = marryData.nSpouseID;
                husbandName   = MarryLogic.GetRoleName(marryData.nSpouseID);
                wifeRoleID    = client.ClientData.RoleID;
                wifeName      = client.ClientData.RoleName;
            }

            // 必须先添加,以防夫妻重复举行婚宴。。。想不通为什么找我
            MarryPartyData partyData = m_MarryPartyDataCache.AddParty(client.ClientData.RoleID, partyType, startTime, husbandRoleID, wifeRoleID, husbandName, wifeName);

            if (partyData == null)
            {
                return(MarryPartyResult.AlreadyRequest);
            }

            MarryPartyResult result = MarryPartyResult.Success;

            byte[] byteData = null;
            TCPProcessCmdResults dbResult =
                Global.RequestToDBServer3(Global._TCPManager.tcpClientPool, Global._TCPManager.TcpOutPacketPool,
                                          (int)TCPGameServerCmds.CMD_DB_MARRY_PARTY_ADD,
                                          string.Format("{0}:{1}:{2}:{3}:{4}:{5}:{6}", client.ClientData.RoleID, partyType, startTime, husbandRoleID, wifeRoleID, husbandName, wifeName),
                                          out byteData,
                                          client.ServerId
                                          );

            if (TCPProcessCmdResults.RESULT_FAILED == dbResult || null == byteData || byteData.Length <= 6)
            {
                result = MarryPartyResult.AlreadyRequest;
            }

            if (result == MarryPartyResult.Success)
            {
                // 检查举办所需金币是否足够
                if (configData.PartyCost > Global.GetTotalBindTongQianAndTongQianVal(client))
                {
                    result = MarryPartyResult.NotEnoughMoney;
                }
                if (configData.PartyCost > 0)
                {
                    // 扣除举办所需金币
                    if (Global.SubBindTongQianAndTongQian(client, configData.PartyCost, "举办婚宴") == false)
                    {
                        result = MarryPartyResult.NotEnoughMoney;
                    }
                }
            }

            if (result != MarryPartyResult.Success)
            {
                if (dbResult != TCPProcessCmdResults.RESULT_FAILED)
                {
                    try
                    {
                        Global.SendAndRecvData((int)TCPGameServerCmds.CMD_DB_MARRY_PARTY_REMOVE,
                                               string.Format("{0}", client.ClientData.RoleID),
                                               client.ServerId
                                               );
                    }
                    catch (Exception)
                    {
                    }
                }
                m_MarryPartyDataCache.RemoveParty(client.ClientData.RoleID);
                return(result);
            }

            Int32          length      = BitConverter.ToInt32(byteData, 0);
            MarryPartyData dbPartyData = DataHelper.BytesToObject <MarryPartyData>(byteData, 6, length - 2);

            m_MarryPartyDataCache.SetPartyTime(partyData, dbPartyData.StartTime);

            SendMarryPartyList(client, partyData);

            //lock (MarryPartyNPCShowMutex)
            //{
            //    if (MarryPartyNPCShow == false)
            //    {
            //        // TODO: add npc
            //        MarryPartyNPCShow = true;
            //    }
            //}

            return(result);
        }
Beispiel #7
0
        public MarryPartyResult MarryPartyJoin(GameClient client, int roleID)
        {
            MarryPartyResult result;

            if (!MarryLogic.IsVersionSystemOpenOfMarriage())
            {
                result = MarryPartyResult.NotOpen;
            }
            else
            {
                MarryPartyData partyData = this.m_MarryPartyDataCache.GetParty(roleID);
                if (partyData == null)
                {
                    result = MarryPartyResult.PartyNotFound;
                }
                else if (partyData.StartTime > TimeUtil.NOW())
                {
                    result = MarryPartyResult.NotStart;
                }
                else
                {
                    MarryPartyConfigData configData = this.GetMarryPartyConfigData(partyData.PartyType);
                    if (null == configData)
                    {
                        result = MarryPartyResult.PartyNotFound;
                    }
                    else if (configData.JoinCost > Global.GetTotalBindTongQianAndTongQianVal(client))
                    {
                        result = MarryPartyResult.NotEnoughMoney;
                    }
                    else
                    {
                        Dictionary <int, int> joinList = client.ClientData.MyMarryPartyJoinList;
                        int  targetPartyJoinCount      = 0;
                        int  allPartyJoinCount         = 0;
                        bool remove = false;
                        lock (joinList)
                        {
                            joinList.TryGetValue(roleID, out targetPartyJoinCount);
                            foreach (KeyValuePair <int, int> kv in client.ClientData.MyMarryPartyJoinList)
                            {
                                allPartyJoinCount += kv.Value;
                            }
                            if (allPartyJoinCount >= this.MarryPartyPlayerMaxJoinCount)
                            {
                                return(MarryPartyResult.ZeroPlayerJoinCount);
                            }
                            if (targetPartyJoinCount >= configData.PlayerMaxJoinCount)
                            {
                                return(MarryPartyResult.ZeroPlayerJoinCount);
                            }
                            if (!this.m_MarryPartyDataCache.IncPartyJoin(roleID, configData.PartyMaxJoinCount, out remove))
                            {
                                return(MarryPartyResult.ZeroPartyJoinCount);
                            }
                            targetPartyJoinCount++;
                            byte[] byteData = null;
                            TCPProcessCmdResults dbResult = Global.RequestToDBServer3(Global._TCPManager.tcpClientPool, Global._TCPManager.TcpOutPacketPool, 10190, string.Format("{0}:{1}:{2}", roleID, client.ClientData.RoleID, targetPartyJoinCount), out byteData, client.ServerId);
                            if (TCPProcessCmdResults.RESULT_FAILED == dbResult || byteData == null || byteData.Length <= 6)
                            {
                                this.m_MarryPartyDataCache.IncPartyJoinCancel(roleID);
                                return(MarryPartyResult.ZeroPartyJoinCount);
                            }
                            joinList[roleID] = targetPartyJoinCount;
                        }
                        if (configData.JoinCost > 0)
                        {
                            if (!Global.SubBindTongQianAndTongQian(client, configData.JoinCost, "參予婚宴"))
                            {
                                return(MarryPartyResult.NotEnoughMoney);
                            }
                        }
                        if (configData.RewardExp > 0)
                        {
                            GameManager.ClientMgr.ProcessRoleExperience(client, (long)configData.RewardExp, false, true, false, "none");
                        }
                        if (configData.RewardShengWang > 0)
                        {
                            GameManager.ClientMgr.ModifyShengWangValue(client, configData.RewardShengWang, "婚宴奖励", false, true);
                        }
                        if (configData.RewardXingHun > 0)
                        {
                            GameManager.ClientMgr.ModifyStarSoulValue(client, configData.RewardXingHun, "婚宴奖励", false, true);
                        }
                        if (remove)
                        {
                            this.MarryPartyRemoveInternal(roleID, true, client, null);
                            GoodsData goodData = Global.GetNewGoodsData(configData.RewardItem.GoodsID, configData.RewardItem.Binding);
                            goodData.GCount = configData.JoinCost * configData.PartyMaxJoinCount / configData.GoodWillRatio / 2;
                            List <GoodsData> goodList = new List <GoodsData>();
                            goodList.Add(goodData);
                            string sMsg = GLang.GetLang(493, new object[0]);
                            Global.UseMailGivePlayerAward3(roleID, goodList, GLang.GetLang(494, new object[0]), sMsg, 0, 0, 0);
                            int spouseID = (roleID == partyData.HusbandRoleID) ? partyData.WifeRoleID : partyData.HusbandRoleID;
                            Global.UseMailGivePlayerAward3(spouseID, goodList, GLang.GetLang(494, new object[0]), sMsg, 0, 0, 0);
                        }
                        this.SendMarryPartyJoinList(client);
                        this.SendMarryPartyList(client, partyData, -1);
                        result = MarryPartyResult.Success;
                    }
                }
            }
            return(result);
        }
Beispiel #8
0
        public MarryPartyResult MarryPartyCreate(GameClient client, int partyType, long startTime)
        {
            MarryPartyResult result2;

            if (!MarryLogic.IsVersionSystemOpenOfMarriage())
            {
                result2 = MarryPartyResult.NotOpen;
            }
            else
            {
                MarryPartyConfigData configData = this.GetMarryPartyConfigData(partyType);
                if (null == configData)
                {
                    result2 = MarryPartyResult.InvalidParam;
                }
                else
                {
                    MarriageData marryData = client.ClientData.MyMarriageData;
                    if (marryData.nSpouseID < 0 || marryData.byMarrytype < 0)
                    {
                        result2 = MarryPartyResult.NotMarry;
                    }
                    else
                    {
                        int    husbandRoleID;
                        string husbandName;
                        int    wifeRoleID;
                        string wifeName;
                        if (1 == marryData.byMarrytype)
                        {
                            husbandRoleID = client.ClientData.RoleID;
                            husbandName   = client.ClientData.RoleName;
                            wifeRoleID    = marryData.nSpouseID;
                            wifeName      = MarryLogic.GetRoleName(marryData.nSpouseID);
                        }
                        else
                        {
                            husbandRoleID = marryData.nSpouseID;
                            husbandName   = MarryLogic.GetRoleName(marryData.nSpouseID);
                            wifeRoleID    = client.ClientData.RoleID;
                            wifeName      = client.ClientData.RoleName;
                        }
                        MarryPartyData partyData = this.m_MarryPartyDataCache.AddParty(client.ClientData.RoleID, partyType, startTime, husbandRoleID, wifeRoleID, husbandName, wifeName);
                        if (partyData == null)
                        {
                            result2 = MarryPartyResult.AlreadyRequest;
                        }
                        else
                        {
                            MarryPartyResult     result   = MarryPartyResult.Success;
                            byte[]               byteData = null;
                            TCPProcessCmdResults dbResult = Global.RequestToDBServer3(Global._TCPManager.tcpClientPool, Global._TCPManager.TcpOutPacketPool, 10188, string.Format("{0}:{1}:{2}:{3}:{4}:{5}:{6}", new object[]
                            {
                                client.ClientData.RoleID,
                                partyType,
                                startTime,
                                husbandRoleID,
                                wifeRoleID,
                                husbandName,
                                wifeName
                            }), out byteData, client.ServerId);
                            if (TCPProcessCmdResults.RESULT_FAILED == dbResult || byteData == null || byteData.Length <= 6)
                            {
                                result = MarryPartyResult.AlreadyRequest;
                            }
                            if (result == MarryPartyResult.Success)
                            {
                                if (configData.PartyCost > Global.GetTotalBindTongQianAndTongQianVal(client))
                                {
                                    result = MarryPartyResult.NotEnoughMoney;
                                }
                                if (configData.PartyCost > 0)
                                {
                                    if (!Global.SubBindTongQianAndTongQian(client, configData.PartyCost, "举办婚宴"))
                                    {
                                        result = MarryPartyResult.NotEnoughMoney;
                                    }
                                }
                            }
                            if (result != MarryPartyResult.Success)
                            {
                                if (dbResult != TCPProcessCmdResults.RESULT_FAILED)
                                {
                                    try
                                    {
                                        Global.SendAndRecvData <string>(10189, string.Format("{0}", client.ClientData.RoleID), client.ServerId, 0);
                                    }
                                    catch (Exception)
                                    {
                                    }
                                }
                                this.m_MarryPartyDataCache.RemoveParty(client.ClientData.RoleID);
                                result2 = result;
                            }
                            else
                            {
                                int            length      = BitConverter.ToInt32(byteData, 0);
                                MarryPartyData dbPartyData = DataHelper.BytesToObject <MarryPartyData>(byteData, 6, length - 2);
                                this.m_MarryPartyDataCache.SetPartyTime(partyData, dbPartyData.StartTime);
                                this.SendMarryPartyList(client, partyData, -1);
                                result2 = result;
                            }
                        }
                    }
                }
            }
            return(result2);
        }