Example #1
0
        protected static void RemoveTodayInWarRequest()
        {
            int day = TimeUtil.NowDateTime().DayOfYear;
            BangHuiLingDiItemData lingDiItem = JunQiManager.GetItemByLingDiID(6);

            if (null != lingDiItem)
            {
                Dictionary <int, int> warRequestMap = WangChengManager.GetWarRequstMap(lingDiItem.WarRequest);
                if (warRequestMap.ContainsValue(day))
                {
                    for (int i = 0; i < warRequestMap.Count; i++)
                    {
                        if (warRequestMap.Values.ElementAt(i) == day)
                        {
                            warRequestMap.Remove(warRequestMap.Keys.ElementAt(i));
                            break;
                        }
                    }
                    string nowWarRequest = WangChengManager.GeWarRequstString(warRequestMap);
                    WangChengManager.SetCityWarRequestToDBServer(6, nowWarRequest);
                }
            }
        }