コード例 #1
0
        public static DeclareMarriageZodiac Create(string in_att, int in_level, string in_name, int in_radio)
        {
            DeclareMarriageZodiac tmp = new DeclareMarriageZodiac();

            tmp._att   = in_att;
            tmp._level = in_level;
            tmp._name  = in_name;
            tmp._radio = in_radio;

            return(tmp);
        }
コード例 #2
0
 public static void Convert(Dictionary <int, DeclareMarriageZodiac> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1, DeclareMarriageZodiac.Create(StringDefines.Key_31356, 1, StringDefines.Key_31357, 1));
     data.Add(2, DeclareMarriageZodiac.Create(StringDefines.Key_31358, 2, StringDefines.Key_31359, 1));
     data.Add(3, DeclareMarriageZodiac.Create(StringDefines.Key_31360, 3, StringDefines.Key_31361, 1));
     data.Add(4, DeclareMarriageZodiac.Create(StringDefines.Key_31362, 4, StringDefines.Key_31363, 1));
     data.Add(5, DeclareMarriageZodiac.Create(StringDefines.Key_31364, 5, StringDefines.Key_31365, 1));
     data.Add(6, DeclareMarriageZodiac.Create(StringDefines.Key_31366, 6, StringDefines.Key_31367, 1));
     data.Add(7, DeclareMarriageZodiac.Create(StringDefines.Key_31368, 7, StringDefines.Key_31369, 1));
     data.Add(8, DeclareMarriageZodiac.Create(StringDefines.Key_31370, 8, StringDefines.Key_31371, 1));
     data.Add(9, DeclareMarriageZodiac.Create(StringDefines.Key_31372, 9, StringDefines.Key_31373, 1));
     data.Add(10, DeclareMarriageZodiac.Create(StringDefines.Key_31374, 10, StringDefines.Key_31375, 1));
     data.Add(11, DeclareMarriageZodiac.Create(StringDefines.Key_31376, 11, StringDefines.Key_31377, 1));
     data.Add(12, DeclareMarriageZodiac.Create(StringDefines.Key_31378, 12, StringDefines.Key_31379, 1));
 }
コード例 #3
0
        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[]> >("DataMarriageZodiac");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataMarriageZodiac = require 'Lua/Config/DataMarriageZodiac'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataMarriageZodiac");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareMarriageZodiac>(12);
                    foreach (var item in dic)
                    {
                        DeclareMarriageZodiac tmp = new DeclareMarriageZodiac();
                        tmp.Att   = CfgStringLua.Get(item.Value[0]);
                        tmp.Level = item.Value[1];
                        tmp.Name  = CfgStringLua.Get(item.Value[2]);
                        tmp.Radio = item.Value[3];

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