public virtual void RecoverFreeSpin(Dictionary <string, string> dataList, int iBetAmount = 0) { m_Stage = STAGE.STAGE_FREESPIN; int id = int.Parse(dataList["SLOTID"]); SlotReel FreespinReel = m_SlotReels[id]; if (dataList.ContainsKey("FGRS") && !string.IsNullOrEmpty(dataList["FGRS"].Trim())) { m_SpinResult = m_SlotReels[0].PlayGame(iBetAmount); int[] reelstops = StringUtility.StringToIntArray(dataList["FGRS"], ' '); FreespinReel.Recover(reelstops, iBetAmount); int iCurrentSpin = int.Parse(dataList["CURRENTSPIN"]); int iFSTotalWin = int.Parse(dataList["FSTOTALWIN"]); int iTotalSpin = int.Parse(dataList["TOTALSPIN"]); m_SpinResult.ClearTiggerLine(); m_SpinResult.ReadyForSpin = true; m_SpinResult.setBonusId(0, 0, 0); m_SpinResult.FreePlay = true; m_SpinResult.BaseWinAmount = int.Parse(dataList["BGWINAMOUNT"]); FreespinReel.RestoreFreeSpinProperties(iCurrentSpin, iTotalSpin, iFSTotalWin); m_SpinResult.FreeSpinProp = FreespinReel.getFreeSpinProperties(); } else { m_bRecover = true; int[] reelstops = StringUtility.StringToIntArray(dataList["BGRS"], ' '); m_SlotReels[0].Recover(reelstops, iBetAmount); m_Stage = STAGE.STAGE_IDLE; } }
public virtual void GameResults(SpinResult e) { //base.GameResults(e); if (m_Stage == STAGE.STAGE_FREESPIN) { if (!m_SpinResult.FreePlay) { m_Stage = STAGE.STAGE_IDLE; m_CurrentSlotReel = m_SlotReels[0]; m_SpinResult.FreePlay = false; } m_SpinResult.ReadyForSpin = ReadyForSpin();//true; } m_GameResult?.Invoke(e); }
public virtual void LoadXML(string sXMLFileName) { m_xmlDocument = new XmlDocument(); try { m_xmlDocument.Load(sXMLFileName); } catch (Exception e) { ThrowError("Game Engine Error!! Load Paytable xml error"); Log("Game Engine Error: SlotEngine::LoadXML() - " + e.Message); } XmlNode engineNode = m_xmlDocument.SelectSingleNode("ENGINE"); XmlNodeList childNodes = engineNode.ChildNodes; m_iBetCredits = int.Parse(engineNode.Attributes["credits"].Value); if (engineNode.Attributes["waypay"] != null) { m_bWayPay = bool.Parse(engineNode.Attributes["waypay"].Value); } for (int i = 0; i < childNodes.Count; i++) { XmlNode node = childNodes[i]; switch (node.Name) { case "SLOT": { int iSlotId = int.Parse(node.Attributes["id"].Value); SlotReel reel = new SlotReel(iSlotId, node, m_bWayPay); reel.LoadXML(node); m_SlotReels.Add(iSlotId, reel); break; } } } m_CurrentSlotReel = m_SlotReels[0]; }
public void setSlotReel(SlotReel pSlotReel) { m_SlotReel = pSlotReel; }