Пример #1
0
        public virtual void setupStats(int level)
        {
            DBG.Add("<StatKVList>", true);
            for (int i = 0; i < numStats; i++)
            {
                rpStatType type = (rpStatType)i;
                switch (type)
                {
                case rpStatType.INVALID:
                case rpStatType.COUNT:
                    break;

                case rpStatType.LVL:
                case rpStatType.XP:
                    Stats.AddStat(type, new rpStat(level));
                    break;

                case rpStatType.RXP:
                    Stats.AddStat(type, new rpStat(level * 3));
                    break;

                case rpStatType.RGLD:
                    Stats.AddStat(type, new rpStat(rollStat(level, level * 100)));
                    break;

                default:
                    Stats.AddStat(type, new rpStat(rollStat(level)));
                    break;
                }
                DBG.Add("[" + type + "]", true);
                DBG.Add(" : " + Stats[type].Value);
                //DBG.Add("\n");
            }
            if (!DBG.Paused)
            {
                DBG.Log();
            }
        }
Пример #2
0
 public virtual rpStat TryGet(rpStatType type)
 {
     rpStat tmp; return((Stats.TryGetValue(type, out tmp)) ? Stats[type] : tmp);
 }