using System.Collections.Generic; public partial class PersonalBossConfig : IConfigPostProcess { // ¾³½ç bossNPCID private static Dictionary realmDict = new Dictionary(); // lineid bossNPCID private static Dictionary lineIdDict = new Dictionary(); public void OnConfigParseCompleted() { } //»ñÈ¡¾³½ç¶ÔÓ¦µÄbossNPCID×Öµä public static Dictionary GetNPCIDDictForRealm() { if (realmDict.IsNullOrEmpty()) { var keyList = GetKeys(); for (int i = 0; i < keyList.Count; i++) { int npcID = int.Parse(keyList[i]); //NPC±íÀïûÓÐÕâ¸öid if (!NPCConfig.Has(npcID)) continue; int realmLv = NPCConfig.Get(npcID).Realm; //¾³½ç±íÖÐûÓÐÕâ¸öLV if (!RealmConfig.Has(realmLv)) continue; realmDict[realmLv] = npcID; } } return realmDict; } //»ñÈ¡lineid¶ÔÓ¦µÄbossNPCID×Öµä public static Dictionary GetNPCIDDictForLineId() { if (lineIdDict.IsNullOrEmpty()) { var keyList = GetKeys(); Dictionary tempDict = new Dictionary(); for (int i = 0; i < keyList.Count; i++) { int npcID = int.Parse(keyList[i]); lineIdDict[Get(npcID).lineId] = npcID; } } return lineIdDict; } }