Beispiel #1
0
 public void UnLoad()
 {
     if (tMentorshipConfig != null)
     {
         tMentorshipConfig = null;
     }
     singleton = null;
 }
Beispiel #2
0
        // 初始化csv表
        protected void InitMentorshipConfigCsv(string stPath)
        {
            ScpReader reader = new ScpReader(stPath, true, 2);

            tMentorshipConfig = new SSchemeMentorshipConfig();

            for (int i = 0; i < (int)MentorshipConfigRow.EMT_ROW_MAX; i++)
            {
                switch (i)
                {
                case (int)MentorshipConfigRow.EMT_ROW_MENTORSHIP_MASTERNEEDLEVEL:
                {
                    tMentorshipConfig.nMasterNeedLevel = reader.GetInt(i, 1, 0);
                }
                break;

                case (int)MentorshipConfigRow.EMT_ROW_MENTORSHIP_PRENTICENEEDLEVEL:
                {
                    tMentorshipConfig.nPrenticeNeedLevel = reader.GetInt(i, 1, 0);
                }
                break;

                case (int)MentorshipConfigRow.EMT_ROW_MENTORSHIP_FMASTERCOUNT:
                {
                    tMentorshipConfig.nFormalMasterCount = reader.GetInt(i, 1, 0);
                }
                break;

                case (int)MentorshipConfigRow.EMT_ROW_MENTORSHIP_IMASTERCOUNT:
                {
                    tMentorshipConfig.nInternMasterCount = reader.GetInt(i, 1, 0);
                }
                break;

                case (int)MentorshipConfigRow.EMT_ROW_MENTORSHIP_FPRENTICECOUNT:
                {
                    tMentorshipConfig.nFormalPrenticeCount = reader.GetInt(i, 1, 0);
                }
                break;

                case (int)MentorshipConfigRow.EMT_ROW_MENTORSHIP_IPRENTICECOUNT:
                {
                    tMentorshipConfig.nInternPrenticeCount = reader.GetInt(i, 1, 0);
                }
                break;

                case (int)MentorshipConfigRow.EMT_ROW_MENTORSHIP_PFWINAWARDCOUNT:
                {
                    tMentorshipConfig.nPFWinAwardCount = reader.GetInt(i, 1, 0);
                }
                break;

                case (int)MentorshipConfigRow.EMT_ROW_MENTORSHIP_MFWINAWARDCOUNT:
                {
                    tMentorshipConfig.nMFWinAwardCount = reader.GetInt(i, 1, 0);
                }
                break;

                case (int)MentorshipConfigRow.EMT_ROW_MENTORSHIP_SERVERTIMELEN:
                {
                    tMentorshipConfig.nServerTimeLen = reader.GetInt(i, 1, 0);
                }
                break;

                case (int)MentorshipConfigRow.EMT_ROW_MENTORSHIP_WINSHIPVAL:
                {
                    tMentorshipConfig.nWinShipVal = reader.GetInt(i, 1, 0);
                }
                break;

                case (int)MentorshipConfigRow.EMT_ROW_MENTORSHIP_FAILSHIPVAL:
                {
                    tMentorshipConfig.nFailShipVal = reader.GetInt(i, 1, 0);
                }
                break;

                case (int)MentorshipConfigRow.EMT_ROW_MENTORSHIP_WEEKSHIPVAL:
                {
                    tMentorshipConfig.nWeekShipVal = reader.GetInt(i, 1, 0);
                }
                break;

                case (int)MentorshipConfigRow.EMT_ROW_MENTORSHIP_MFWINPRIZEID:
                {
                    tMentorshipConfig.nMFWinPrizeID = reader.GetInt(i, 1, 0);
                }
                break;

                case (int)MentorshipConfigRow.EMT_ROW_MENTORSHIP_PFWINPRIZEID:
                {
                    tMentorshipConfig.nPFWinPrizeID = reader.GetInt(i, 1, 0);
                }
                break;

                case (int)MentorshipConfigRow.EMT_ROW_MENTORSHIP_TIP:
                {
                    tMentorshipConfig.sMentorshipTip = reader.GetString(i, 1, string.Empty);
                }
                break;

                default:
                    break;
                }
            }
        }