示例#1
0
 static MonStat()
 {
     foreach (MonStat stat in sheet)
     {
         var key = stat.id.ToLower();
         if (stats.ContainsKey(key))
         {
             stats.Remove(key);
         }
         stats.Add(key, stat);
         stat.ext         = MonStatsExtended.Find(stat.monStatEx);
         stat.name        = stat.nameStr == null ? null : Translation.Find(stat.nameStr);
         stat.minion1     = stat.minion1Id == null ? null : Find(stat.minion1Id);
         stat.minion2     = stat.minion2Id == null ? null : Find(stat.minion2Id);
         stat.sound       = MonSound.Find(stat.monSoundId);
         stat.uniqueSound = MonSound.Find(stat.uMonSoundId);
         foreach (var tcInfo in stat.treasureClass)
         {
             tcInfo.normal   = TreasureClass.Find(tcInfo._normal);
             tcInfo.champion = TreasureClass.Find(tcInfo._champion);
             tcInfo.unique   = TreasureClass.Find(tcInfo._unique);
             tcInfo.quest    = TreasureClass.Find(tcInfo._quest);
         }
     }
 }
示例#2
0
 static MonStat()
 {
     foreach(MonStat stat in sheet)
     {
         var key = stat.id.ToLower();
         if (monStats.ContainsKey(key))
         {
             monStats.Remove(key);
         }
         monStats.Add(key, stat);
         stat.ext = MonStatsExtended.Find(stat.monStatEx);
         stat.name = stat.nameStr == null ? null : Translation.Find(stat.nameStr);
         stat.minion1 = stat.minion1Id == null ? null : Find(stat.minion1Id);
         stat.minion2 = stat.minion2Id == null ? null : Find(stat.minion2Id);
         stat.sound = MonSound.Find(stat.monSoundId);
         stat.uniqueSound = MonSound.Find(stat.uMonSoundId);
         for(int i = 0; i < stat.treasureClass.Length; ++i)
         {
             stat.treasureClass[i].normal = TreasureClass.Find(stat.treasureClass[i]._normal);
             stat.treasureClass[i].champion = TreasureClass.Find(stat.treasureClass[i]._champion);
             stat.treasureClass[i].unique = TreasureClass.Find(stat.treasureClass[i]._unique);
             stat.treasureClass[i].quest = TreasureClass.Find(stat.treasureClass[i]._quest);
         }
     }
 }