public static DeclarePlayerOccupation Create(int in_atk_type, string in_name, int in_occ)
        {
            DeclarePlayerOccupation tmp = new DeclarePlayerOccupation();

            tmp._atk_type = in_atk_type;
            tmp._name     = in_name;
            tmp._occ      = in_occ;

            return(tmp);
        }
 public static void Convert(Dictionary <int, DeclarePlayerOccupation> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(0, DeclarePlayerOccupation.Create(1, StringDefines.Key_10476, 0));
     data.Add(1, DeclarePlayerOccupation.Create(0, StringDefines.Key_10517, 1));
     data.Add(2, DeclarePlayerOccupation.Create(0, StringDefines.Key_10544, 2));
     data.Add(3, DeclarePlayerOccupation.Create(0, StringDefines.Key_10569, 3));
     data.Add(4, DeclarePlayerOccupation.Create(1, StringDefines.Key_10596, 4));
     data.Add(5, DeclarePlayerOccupation.Create(0, StringDefines.Key_58333, 5));
 }
        public static void SetData()
        {
            if (_dataCaches == null && LuaEnv.isLoadLuaCfg)
            {
                long startTime = DateTime.Now.Ticks;
                Dictionary <int, int[]> dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataPlayerOccupation");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataPlayerOccupation = require 'Lua/Config/DataPlayerOccupation'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataPlayerOccupation");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclarePlayerOccupation>(6);
                    foreach (var item in dic)
                    {
                        DeclarePlayerOccupation tmp = new DeclarePlayerOccupation();
                        tmp.AtkType = item.Value[0];
                        tmp.Name    = CfgStringLua.Get(item.Value[1]);
                        tmp.Occ     = item.Value[2];

                        _dataCaches.Add(item.Key, tmp);
                    }
                }
                Record(startTime, DateTime.Now.Ticks, "PlayerOccupation");
            }
            if (_dataCaches == null && _fillDataCallBack != null)
            {
                if (_dataCaches == null)
                {
                    long startTime = DateTime.Now.Ticks;
                    _dataCaches = new Dictionary <int, DeclarePlayerOccupation>(6);
                    _fillDataCallBack(_dataCaches);
                    Record(startTime, DateTime.Now.Ticks, "PlayerOccupation");
                }
            }
        }