Beispiel #1
0
        public ItemInfo GetItemByInxNameInfo(string InxName)
        {
            ItemInfo info;

            if (ItemsByName.TryGetValue(InxName, out info))
            {
                return(info);
            }
            else
            {
                return(null);
            }
        }
Beispiel #2
0
        private void LoadItemStats()
        {
            DataTable itemStats = null;

            using (var dbClient = Program.DatabaseManager.GetClient())
            {
                itemStats = dbClient.ReadDataTable("SELECT  *FROM ItemStats");
            }

            foreach (DataRow row in itemStats.Rows)
            {
                var      Iteminx = row["itemIndex"].ToString();
                ItemInfo Iteminf;
                if (!ItemsByName.TryGetValue(Iteminx, out Iteminf))
                {
                    Log.WriteLine(LogLevel.Warn, "Can not Find item {0} by ItemStatLoad", Iteminx);
                    continue;
                }

                Iteminf.Stats = ItemStats.LoadItemStatsFromDatabase(row);
            }
        }