public static int GiveDailyActiveAward(GameClient client, int nid)
        {
            int           awardDailyActiveValue = 0;
            SystemXmlItem itemDailyActive       = null;

            if (GameManager.systemDailyActiveAward.SystemXmlItemDict.TryGetValue(nid, out itemDailyActive))
            {
                awardDailyActiveValue = Math.Max(0, itemDailyActive.GetIntValue("NeedhuoYue", -1));
            }
            int result;

            if (awardDailyActiveValue > client.ClientData.DailyActiveValues)
            {
                result = -3;
            }
            else if (DailyActiveManager.IsDailyActiveAwardFetched(client, nid) > 0)
            {
                result = -2;
            }
            else
            {
                DailyActiveManager.ModifyDailyActiveInfor(client, (uint)client.ClientData.DailyActiveValues, DailyActiveDataField1.DailyActiveValue, true);
                List <GoodsData> goodsDataList = new List <GoodsData>();
                string           strGoods      = itemDailyActive.GetStringValue("GoodsID");
                if (!string.IsNullOrEmpty(strGoods))
                {
                    string[] fields = strGoods.Split(new char[]
                    {
                        '|'
                    });
                    if (null != fields)
                    {
                        for (int i = 0; i < fields.Length; i++)
                        {
                            string   strID    = fields[i];
                            string[] strinfro = fields[i].Split(new char[]
                            {
                                ','
                            });
                            if (strinfro != null && strinfro.Length == 7)
                            {
                                GoodsData good = new GoodsData
                                {
                                    Id                    = -1,
                                    GoodsID               = Convert.ToInt32(strinfro[0]),
                                    Using                 = 0,
                                    Forge_level           = Convert.ToInt32(strinfro[3]),
                                    Starttime             = "1900-01-01 12:00:00",
                                    Endtime               = "1900-01-01 12:00:00",
                                    Site                  = 0,
                                    Quality               = 0,
                                    Props                 = "",
                                    GCount                = Convert.ToInt32(strinfro[1]),
                                    Binding               = Convert.ToInt32(strinfro[2]),
                                    Jewellist             = "",
                                    BagIndex              = 0,
                                    AddPropIndex          = 0,
                                    BornIndex             = 0,
                                    Lucky                 = Convert.ToInt32(strinfro[5]),
                                    Strong                = 0,
                                    ExcellenceInfo        = Convert.ToInt32(strinfro[6]),
                                    AppendPropLev         = Convert.ToInt32(strinfro[4]),
                                    ChangeLifeLevForEquip = 0
                                };
                                goodsDataList.Add(good);
                            }
                        }
                        if (!Global.CanAddGoodsNum(client, goodsDataList.Count))
                        {
                            foreach (GoodsData item in goodsDataList)
                            {
                                Global.UseMailGivePlayerAward(client, item, GLang.GetLang(100, new object[0]), GLang.GetLang(100, new object[0]), 1.0);
                            }
                        }
                        else
                        {
                            foreach (GoodsData item in goodsDataList)
                            {
                                GoodsData goodsData = new GoodsData
                                {
                                    Id                    = -1,
                                    GoodsID               = item.GoodsID,
                                    Using                 = 0,
                                    Forge_level           = item.Forge_level,
                                    Starttime             = "1900-01-01 12:00:00",
                                    Endtime               = "1900-01-01 12:00:00",
                                    Site                  = 0,
                                    Quality               = item.Quality,
                                    Props                 = item.Props,
                                    GCount                = item.GCount,
                                    Binding               = item.Binding,
                                    Jewellist             = item.Jewellist,
                                    BagIndex              = 0,
                                    AddPropIndex          = item.AddPropIndex,
                                    BornIndex             = item.BornIndex,
                                    Lucky                 = item.Lucky,
                                    Strong                = item.Strong,
                                    ExcellenceInfo        = item.ExcellenceInfo,
                                    AppendPropLev         = item.AppendPropLev,
                                    ChangeLifeLevForEquip = item.ChangeLifeLevForEquip
                                };
                                goodsData.Id = Global.AddGoodsDBCommand_Hook(Global._TCPManager.TcpOutPacketPool, client, goodsData.GoodsID, goodsData.GCount, goodsData.Quality, goodsData.Props, goodsData.Forge_level, goodsData.Binding, 0, goodsData.Jewellist, true, 1, "副本通关获取物品", false, goodsData.Endtime, goodsData.AddPropIndex, goodsData.BornIndex, goodsData.Lucky, goodsData.Strong, goodsData.ExcellenceInfo, goodsData.AppendPropLev, goodsData.ChangeLifeLevForEquip, true, null, null, "1900-01-01 12:00:00", 0, true);
                            }
                            client.ClientData.AddAwardRecord(RoleAwardMsg.DailyActive, goodsDataList, false);
                            GameManager.ClientMgr.NotifyGetAwardMsg(client, RoleAwardMsg.DailyActive, "");
                        }
                    }
                }
                DailyActiveManager.UpdateDailyActiveAwardFlag(client, nid);
                result = 1;
            }
            return(result);
        }