少年修仙传客户端代码仓库
client_Wu Xijin
2018-11-15 d5bf165ef28b530ed531aed097ad301278c5fcae
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// ------------------------------------------------------------------------------
//  <autogenerated>
//      This code was generated by a tool.
//      Mono Runtime Version: 2.0.50727.1433
// 
//      Changes to this file may cause incorrect behavior and will be lost if 
//      the code is regenerated.
//  </autogenerated>
// ------------------------------------------------------------------------------
 
namespace TableConfig
{
    using System;
    using System.Collections.Generic;
 
    public partial class ActorShowConfig : ConfigBase, IConfigPostProcess
    {
        private static Dictionary<string, ActorShowConfig> actorShowDic = new Dictionary<string, ActorShowConfig>();
 
        public void OnConfigParseCompleted()
        {
            string key = StringUtility.Contact(MapID, NpcID);
            if (!actorShowDic.ContainsKey(key))
            {
                actorShowDic.Add(key, this);
            }
        }
 
        public static bool GetActorShowModel(int mapID, int npcID, out ActorShowConfig actorShowModel)
        {
            string key = StringUtility.Contact(mapID, npcID);
            if (actorShowDic.TryGetValue(key, out actorShowModel))
            {
                return true;
            }
            return false;
        }
 
        public static bool GetActoreShowConfigByMapIdAndLineId(int mapId, int lineId, out ActorShowConfig config)
        {
            foreach (var item in actorShowDic.Values)
            {
                if (item.MapID == mapId && (item.line == lineId || item.line == 1000))
                {
                    config = item;
                    return true;
                }
            }
 
            config = null;
            return false;
        }
 
    }
}