public void CollectStatistics() { m_iPlaySpinCount += 1; if (!m_bWayPay) { List <WinLine> winningLines = m_Winlines.getWinLines(); for (int i = 0; i < winningLines.Count; i++) { if (winningLines[i].LineID != -1) { m_WinLineFoundCount[winningLines[i].LineID] += 1; } int symbolStatIndex = getSymbolStatIndex(winningLines[i].SymbolId); SymbolStatistics symStat = m_SymbolStats[symbolStatIndex]; symStat.symbolCount += 1; m_SymbolStats[symbolStatIndex].iTotalWinAmount += winningLines[i].getWinAmount(); symStat.numofSymCountList[winningLines[i].NumOfSymbols] += 1; } } else { List <WayPayWin> waypayWins = m_WayPay.getWayPayWins(); for (int i = 0; i < waypayWins.Count; i++) { int symbolStatIndex = getSymbolStatIndex(waypayWins[i].SymbolId); SymbolStatistics symStat = m_SymbolStats[symbolStatIndex]; symStat.symbolCount += 1; m_SymbolStats[symbolStatIndex].iTotalWinAmount += waypayWins[i].getWinAmount(); symStat.numofSymCountList[waypayWins[i].NumOfSymbols] += 1; } } m_iTotalWinAmount += m_SpinResult.getWinAmount(); }
public bool LoadXML(XmlNode node) { XmlNodeList childNodes = node.ChildNodes; m_SlotColumns = new List <int[]>(); m_WildSymbolsID = new List <int>(); m_WinningLines = new List <int[]>(); int iNumOfColumns = int.Parse(node.Attributes["col"].Value); int iNumOfRows = int.Parse(node.Attributes["row"].Value); m_iSlotId = int.Parse(node.Attributes["id"].Value); m_iExtraWilds = new List <int>(); int iNumOfPositions = iNumOfColumns * iNumOfRows; for (int i = 0; i < iNumOfPositions; i++) { m_iExtraWilds.Add(0); } if (bool.Parse(node.Attributes["freespin"].Value) == true) { m_FreeSpinProperties = new FreeSpinProperties(); m_FreeSpinProperties.FreeSpinsTotal = node.Attributes["freespincount"] != null?int.Parse(node.Attributes["freespincount"].Value) : 0; m_FreeSpinStopsTickets = new List <string>(); } for (int count = 0; count < iNumOfColumns; count++) { m_SlotColumns.Add(new int[iNumOfRows]); m_iReelStops = new List <int>();//new int[iNumOfColumns]; for (int i = 0; i < iNumOfColumns; i++) { m_iReelStops.Add(0); } } for (int i = 0; i < childNodes.Count; i++) { switch (childNodes[i].Name) { case "REELS": { m_ReelStripList = new List <int[]>(); if (!CreateReelStips(childNodes[i])) { return(false); } } break; case "WINNING_LINES": { if (!m_bWayPay) { m_WinningLines = new List <int[]>(); if (!CreateWinningLines(childNodes[i])) { return(false); } m_Winlines = new Winlines(); m_Winlines.CreateWinLines(m_WinningLines); m_Winlines.BuildTree(); } } break; case "PAYTABLE": { m_Paytable = new Paytable(childNodes[i]); } break; case "WILDS": { int[] wildList = StringUtility.StringToIntArray(childNodes[i].Attributes["id"].Value, ' '); for (int wildcount = 0; wildcount < wildList.Length; wildcount++) { m_WildSymbolsID.Add(wildList[wildcount]); } } break; case "TRIGGER": { TriggerSymbol triggerSym = new TriggerSymbol(); if (childNodes[i].Attributes["triggertype"] != null) { if (childNodes[i].Attributes["triggertype"].Value == "slotfeature") { triggerSym.triggerType = TriggerSymbol.TYPE.SLOT_FEATURE; } else { triggerSym.triggerType = TriggerSymbol.TYPE.BONUS; } } else { triggerSym.triggerType = TriggerSymbol.TYPE.BONUS; } triggerSym.iSymbolId = int.Parse(childNodes[i].Attributes["symbolid"].Value); triggerSym.iNumOfSymbols = int.Parse(childNodes[i].Attributes["numofsymbol"].Value); if (childNodes[i].Attributes["bonusgame"] != null) { triggerSym.iBonusId = int.Parse(childNodes[i].Attributes["bonusgame"].Value); } if (childNodes[i].Attributes["slotfeature"] != null) { triggerSym.iBonusId = int.Parse(childNodes[i].Attributes["slotfeature"].Value); } m_TriggerSymbols.Add(triggerSym); } break; case "SCATTER": { ScatterSymbol scatterSym = new ScatterSymbol(); scatterSym.iSymbolId = int.Parse(childNodes[i].Attributes["symbolid"].Value); scatterSym.iNumOfSymbols = int.Parse(childNodes[i].Attributes["numofsymbol"].Value); scatterSym.iCredits = int.Parse(childNodes[i].Attributes["extracredits"].Value); scatterSym.iMultiplier = int.Parse(childNodes[i].Attributes["multiplier"].Value); m_ScatterSymbols.Add(scatterSym); } break; } } #if _SIMULATOR List <Symbol> AllSymbols = m_Paytable.GetAllSymbols(); for (int i = 0; i < AllSymbols.Count; i++) { SymbolStatistics symStat = new SymbolStatistics(); symStat.numofSymCountList = new Dictionary <int, int>(); symStat.iSymbolid = AllSymbols[i].SymbolId; symStat.symbolCount = 0; symStat.iTotalWinAmount = 0; Dictionary <int, int> symbolPaytable = AllSymbols[i].getPayoutList(); foreach (KeyValuePair <int, int> entry in symbolPaytable) { symStat.numofSymCountList.Add(entry.Key, 0); } m_SymbolStats.Add(symStat); } for (int i = 0; i < m_WinningLines.Count; i++) { m_WinLineFoundCount.Add(0); } for (int i = 0; i < m_ScatterSymbols.Count; i++) { if (StatsContainSymbol(m_ScatterSymbols[i].iSymbolId)) { SymbolStatistics stat = getSymbolStat(m_ScatterSymbols[i].iSymbolId); stat.numofSymCountList.Add(m_ScatterSymbols[i].iNumOfSymbols, 0); } else { SymbolStatistics symStat = new SymbolStatistics(); symStat.numofSymCountList = new Dictionary <int, int>(); symStat.iSymbolid = m_ScatterSymbols[i].iSymbolId; symStat.symbolCount = 0; symStat.iTotalWinAmount = 0; symStat.numofSymCountList.Add(m_ScatterSymbols[i].iNumOfSymbols, 0); m_SymbolStats.Add(symStat); } } #endif return(true); }