Example #1
0
 /// <summary>
 /// 获取膜拜数据
 /// </summary>
 /// <param name="client"></param>
 /// <param name="nID"></param>
 /// <param name="bytes"></param>
 /// <param name="cmdParams"></param>
 private void HandleGetAdmireDataCommand(GameClient client, int nID, byte[] bytes, string[] cmdParams)
 {
     lock (Mutex)
     {
         CoupleWishTop1AdmireData data = StatueMgr.HandleQueryAdmireData(client);
         client.sendCmd(nID, data);
     }
 }
Example #2
0
        public CoupleWishTop1AdmireData HandleQueryAdmireData(GameClient client)
        {
            CoupleWishTop1AdmireData data = new CoupleWishTop1AdmireData();

            if (this._Statue != null && this._Statue.IsDivorced != 1 && this._Statue.DbCoupleId > 0 && this._Statue.ManRoleDataEx != null && this._Statue.WifeRoleDataEx != null)
            {
                data.DbCoupleId    = this._Statue.DbCoupleId;
                data.ManSelector   = DataHelper.BytesToObject <RoleData4Selector>(this._Statue.ManRoleDataEx, 0, this._Statue.ManRoleDataEx.Length);
                data.WifeSelector  = DataHelper.BytesToObject <RoleData4Selector>(this._Statue.WifeRoleDataEx, 0, this._Statue.WifeRoleDataEx.Length);
                data.BeAdmireCount = this._Statue.BeAdmireCount;
            }
            data.MyAdmireCount = this.GetAdmireCount(client, TimeUtil.MakeYearMonthDay(TimeUtil.NowDateTime()));
            return(data);
        }