示例#1
0
        public void Recover(Dictionary <string, string> dataList, string sTicket = "", int iBetAmount = 0)
        {
            if (dataList.ContainsKey("ENGINESTAGE"))
            {
                m_Stage = (STAGE)Enum.Parse(typeof(STAGE), dataList["ENGINESTAGE"]);
            }
            if (dataList.ContainsKey("BGRS"))
            {
                int[] reelstops = StringUtility.StringToIntArray(dataList["BGRS"], ' ');
                m_SlotReels[0].Recover(reelstops, iBetAmount);
                m_SpinResult = m_SlotReels[0].PlayGame(iBetAmount);
                //NEW
                m_SpinResult.BaseWinAmount = m_SpinResult.getWinAmount();
            }
            m_iBetLevel = iBetAmount;

            for (int i = 0; i < m_SlotReels.Count; i++)
            {
                m_SlotReels[i].SetSlotFeatureBetLevel(m_iBetLevel);
            }

            if (m_Stage == STAGE.STAGE_STARTGAME)
            {
                m_bRecover = true;
                int[] reelstops = StringUtility.StringToIntArray(dataList["BGRS"], ' ');
                m_SlotReels[0].Recover(reelstops, iBetAmount);
                m_Stage = STAGE.STAGE_IDLE;
            }
            if (m_Stage == STAGE.STAGE_FREESPIN)
            {
                RecoverFreeSpin(dataList);
            }
            else if (m_Stage == STAGE.STAGE_BONUS)
            {
                bool bBonusStarted = false;
                if (dataList.ContainsKey("BONUSSTARTED"))
                {
                    bBonusStarted = bool.Parse(dataList["BONUSSTARTED"]);
                }
                if (bBonusStarted)
                {
                    m_SpinResult.BaseWinAmount = int.Parse(dataList["BGWINAMOUNT"]);
                    //m_iBaseWinAmount = m_SpinResult.BaseWinAmount;
                    m_Stage = STAGE.STAGE_BONUS;
                    RecoverBonusSpin(dataList, iBetAmount);
                }
                else
                {
                    m_bRecover = true;
                    m_Stage    = STAGE.STAGE_BONUS;
                    RecoverBonusSpin(dataList, iBetAmount);
                    int[] reelstops = StringUtility.StringToIntArray(dataList["BGRS"], ' ');
                    m_SlotReels[0].Recover(reelstops, iBetAmount);
                    m_Stage = STAGE.STAGE_IDLE;
                }
            }
            else if (m_Stage == STAGE.STAGE_SLOTFEATURE)
            {
                m_SpinResult.BaseWinAmount = m_SpinResult.getWinAmount();
                //m_iBaseWinAmount = m_SpinResult.BaseWinAmount;
            }

            if (m_Stage == STAGE.STAGE_IDLE && dataList.ContainsKey("ENGINEBONUSID"))
            {
                if (dataList.ContainsKey("BONUSSTARTED") && bool.Parse(dataList["BONUSSTARTED"]))
                {
                    RecoverBonusSpin(dataList, iBetAmount);
                }
            }
        }