int GetAwardMoneyByYuanBaoAwardCount(int nAwardCount) { int nAwardCoin = 0; if (m_YuanBaoAwardCount >= 0 && m_YuanBaoAwardCount < MoneyTreeYuanBaoAwardTimes) { for (int i = 0; i < nAwardCount; i++) { Tab_MoneyTree MoneyTree = TableManager.GetMoneyTreeByID((MoneyTreeFreeAwardTimes + m_YuanBaoAwardCount + i), 0); if (MoneyTree != null) { nAwardCoin += MoneyTree.Money; } } } return((int)(m_fYuanbaoFactor * nAwardCoin)); }
int GetNeedYuanBaoByAwardCount(int nAwardCount) { int nNeedYuanBao = 0; if (m_YuanBaoAwardCount >= 0 && m_YuanBaoAwardCount < MoneyTreeYuanBaoAwardTimes) { for (int i = 0; i < nAwardCount; i++) { Tab_MoneyTree MoneyTree = TableManager.GetMoneyTreeByID(MoneyTreeFreeAwardTimes + m_YuanBaoAwardCount + i, 0); if (MoneyTree != null) { nNeedYuanBao += MoneyTree.BindYuanbao; } } } return(nNeedYuanBao); }