using System.Collections.Generic;
|
|
public partial class PersonalBossConfig : IConfigPostProcess
|
{
|
// ¾³½ç bossNPCID
|
private static Dictionary<int, int> realmDict = new Dictionary<int, int>();
|
// lineid bossNPCID
|
private static Dictionary<int, int> lineIdDict = new Dictionary<int, int>();
|
public void OnConfigParseCompleted()
|
{
|
|
}
|
|
//»ñÈ¡¾³½ç¶ÔÓ¦µÄbossNPCID×Öµä
|
public static Dictionary<int, int> 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<int, int> GetNPCIDDictForLineId()
|
{
|
if (lineIdDict.IsNullOrEmpty())
|
{
|
var keyList = GetKeys();
|
Dictionary<int, int> tempDict = new Dictionary<int, int>();
|
for (int i = 0; i < keyList.Count; i++)
|
{
|
int npcID = int.Parse(keyList[i]);
|
lineIdDict[Get(npcID).lineId] = npcID;
|
}
|
}
|
return lineIdDict;
|
}
|
}
|