Ejemplo n.º 1
0
        internal void Init(MailSystem mailSystem)
        {
            m_MailSystem = mailSystem;
            mailSystem.RegisterModuleMailHandler(ModuleMailTypeEnum.GowModule, this);

            GowFormulaConfig cfg1 = GowConfigProvider.Instance.GetGowFormulaConfig((int)GowFormulaConfig.FormulaNameEnum.Upper);
            GowFormulaConfig cfg2 = GowConfigProvider.Instance.GetGowFormulaConfig((int)GowFormulaConfig.FormulaNameEnum.Lower);
            GowFormulaConfig cfg3 = GowConfigProvider.Instance.GetGowFormulaConfig((int)GowFormulaConfig.FormulaNameEnum.K2_1);
            GowFormulaConfig cfg4 = GowConfigProvider.Instance.GetGowFormulaConfig((int)GowFormulaConfig.FormulaNameEnum.K2_2);
            GowFormulaConfig cfg5 = GowConfigProvider.Instance.GetGowFormulaConfig((int)GowFormulaConfig.FormulaNameEnum.K1);
            GowFormulaConfig cfg6 = GowConfigProvider.Instance.GetGowFormulaConfig((int)GowFormulaConfig.FormulaNameEnum.K3);
            GowFormulaConfig cfg7 = GowConfigProvider.Instance.GetGowFormulaConfig((int)GowFormulaConfig.FormulaNameEnum.TC);

            if (null != cfg1 && cfg1.m_Value > 0)
            {
                m_Upper = cfg1.m_Value;
            }
            if (null != cfg2 && cfg2.m_Value > 0)
            {
                m_Lower = cfg2.m_Value;
            }
            if (null != cfg3 && cfg3.m_Value > 0)
            {
                m_K2_1 = cfg3.m_Value;
            }
            if (null != cfg4 && cfg4.m_Value > 0)
            {
                m_K2_2 = cfg4.m_Value;
            }
            if (null != cfg5 && cfg5.m_Value > 0)
            {
                m_K1 = cfg5.m_Value;
            }
            if (null != cfg6 && cfg6.m_Value > 0)
            {
                m_K3 = cfg6.m_Value;
            }
            if (null != cfg7 && cfg7.m_Value > 0)
            {
                m_TC = cfg7.m_Value;
            }
            List <GowTimeConfig> times = GowConfigProvider.Instance.GowTimeConfigMgr.GetData();

            foreach (GowTimeConfig cfg in times)
            {
                if ((int)GowTimeConfig.TimeTypeEnum.PrizeTime == cfg.m_Type)
                {
                    m_PrizeTime = new Time(cfg.m_StartHour, cfg.m_StartMinute, cfg.m_StartSecond);
                }
                else
                {
                    GowTime time = new GowTime();
                    time.m_StartTime = new Time(cfg.m_StartHour, cfg.m_StartMinute, cfg.m_StartSecond);
                    time.m_EndTime   = new Time(cfg.m_EndHour, cfg.m_EndMinute, cfg.m_EndSecond);
                    m_GowTimes.Add(time);
                }
            }
            InitGowRankData();
            InitGowPrizeData();
        }
Ejemplo n.º 2
0
 internal PrizeManager(Rank <ArenaInfo> rank, List <ArenaPrizeConfig> prize_rules, SimpleTime prizetime, MailSystem mailsystem)
 {
     m_Rank             = rank;
     m_PrizeRules       = prize_rules;
     m_PrizePresentTime = prizetime;
     m_MailSystem       = mailsystem;
     m_NextPrizeDate    = ArenaSystem.GetNextExcuteDate(m_PrizePresentTime);
     if (m_MailSystem != null)
     {
         m_MailSystem.RegisterModuleMailHandler(ModuleMailTypeEnum.ArenaModule, this);
     }
 }
Ejemplo n.º 3
0
 internal bool Init(MailSystem mailsystem)
 {
     m_BaseConfig = ArenaConfigProvider.Instance.BaseConfig.GetDataById(1);
     if (m_BaseConfig == null)
     {
         return(false);
     }
     m_MaxParterLimit    = m_BaseConfig.MaxParterLimit;
     m_MailSystem        = mailsystem;
     ArenaInfo.PrizeTime = m_BaseConfig.PrizeSettlementTime;
     return(true);
 }
Ejemplo n.º 4
0
 internal void Init()
 {
     m_MailSystem = new MailSystem();
 }