Esempio n. 1
0
        public void addOrUpdateStat(eDidStat stat, int value)
        {
            sDidStat entry;

            if (didStats.TryGetValue(stat, out entry))
            {
                entry.value    = value;
                didStats[stat] = entry;
            }
            else
            {
                entry = new sDidStat(stat, value);
                didStats.Add(stat, entry);
            }
        }
Esempio n. 2
0
        void parseDidStats(StreamReader inputFile)
        {
            short amount        = 0;
            int   sectionHeader = Utils.readInt32(inputFile);

            if (sectionHeader >> 16 == 0x40)
            {
                amount = (short)sectionHeader;

                for (int i = 0; i < amount; i++)
                {
                    sDidStat newStat = new sDidStat(inputFile);
                    didStats.Add(newStat.key, newStat);
                }
            }
        }