Exemple #1
0
    public void UpdateResultText()
    {
        //清空结果信息列表
        CleanResultText();
        //根据已获取的奖励ID,刷新奖励信息
        for (int i = 0; i < m_nMaxGainBonusCount; i++)
        {
            int nBonusID = GameManager.gameManager.PlayerDataPool.DailyLuckyDrawData.GetGainBonusID(i);
            if (nBonusID > 0)
            {
                Tab_DailyLuckyDrawBonusInfo BonusInfo = TableManager.GetDailyLuckyDrawBonusInfoByID(nBonusID, 0);
                if (null == BonusInfo)
                {
                    LogModule.DebugLog("DailyLuckyDrawBonusInfo.txt has not Line ID=" + nBonusID);
                    return;
                }
                //金钱提示
                if (BonusInfo.MoneyCount > 0)
                {
                    string MoneyResultText = "";
                    switch (BonusInfo.MoneyType)
                    {
                    case (int)MONEYTYPE.MONEYTYPE_YUANBAO:
                        MoneyResultText = StrDictionary.GetClientDictionaryString("#{1818}", BonusInfo.MoneyCount);
                        break;

                    case (int)MONEYTYPE.MONEYTYPE_COIN:
                        MoneyResultText = StrDictionary.GetClientDictionaryString("#{1819}", BonusInfo.MoneyCount);
                        break;

                    case (int)MONEYTYPE.MONEYTYPE_YUANBAO_BIND:
                        MoneyResultText = StrDictionary.GetClientDictionaryString("#{1820}", BonusInfo.MoneyCount);
                        break;

                    default:
                        break;
                    }
                    AddResultText(MoneyResultText);
                }
                //物品提示
                for (int ItemIndex = 0; ItemIndex < BonusInfo.ItemNum; ItemIndex++)
                {
                    int ItemID    = BonusInfo.GetItemIDbyIndex(ItemIndex);
                    int ItemCount = BonusInfo.GetItemCountbyIndex(ItemIndex);
                    if (ItemID >= 0 && ItemCount > 0)
                    {
                        Tab_CommonItem ItemInfo = TableManager.GetCommonItemByID(ItemID, 0);
                        if (null == ItemInfo)
                        {
                            LogModule.DebugLog("CommonItem.txt has not Line ID=" + ItemID);
                            return;
                        }
                        string ItemResultText = ItemInfo.Name + "*" + ItemCount.ToString();
                        AddResultText(ItemResultText);
                    }
                }
                //经验提示
                if (BonusInfo.Exp > 0)
                {
                    string ExpResultText = BonusInfo.Exp.ToString() + StrDictionary.GetClientDictionaryString("#{1325}");
                    AddResultText(ExpResultText);
                }
            }
        }
        UpdateResultTextLabel();
    }
Exemple #2
0
    //每日幸运抽奖
    void SetItemButtonImage_DailyLukcyDraw()
    {
//		int MaxGainBonusCount = GameManager.gameManager.PlayerDataPool.DailyLuckyDrawData.GetMaxGainBonusCount();
        //根据已获取的奖励ID,刷新奖励信息
        for (int i = 0; i < GameManager.gameManager.PlayerDataPool.DailyLuckyDrawData.GetMaxGainBonusCount(); i++)
        {
            int nBonusID = GameManager.gameManager.PlayerDataPool.DailyLuckyDrawData.GetGainBonusID(i);
            if (nBonusID > 0)
            {
                Tab_DailyLuckyDrawBonusInfo BonusInfo = TableManager.GetDailyLuckyDrawBonusInfoByID(nBonusID, 0);
                if (null == BonusInfo)
                {
                    LogModule.DebugLog("DailyLuckyDrawBonusInfo.txt has not Line ID=" + nBonusID);
                    return;
                }
                bool bShowItemImpact = (BonusInfo.RareDegree > (int)BONUSRAREDEGREE.DLD_BONUS_MIDDLE)?true:false;
                //金钱提示
                if (BonusInfo.MoneyCount > 0)
                {
                    string ImageName = "";
                    switch (BonusInfo.MoneyType)
                    {
                    case (int)MONEYTYPE.MONEYTYPE_YUANBAO:
                        ImageName = "bdyuanbao";
                        break;

                    case (int)MONEYTYPE.MONEYTYPE_COIN:
                        ImageName = "jinbi";
                        break;

                    case (int)MONEYTYPE.MONEYTYPE_YUANBAO_BIND:
                        ImageName = "bdyuanbao";
                        break;

                    default:
                        break;
                    }
                    AddItemInfo(ImageName, BonusInfo.MoneyCount.ToString(), "", bShowItemImpact);
                }
                //物品提示
                for (int ItemIndex = 0; ItemIndex < BonusInfo.ItemNum; ItemIndex++)
                {
                    int ItemID    = BonusInfo.GetItemIDbyIndex(ItemIndex);
                    int ItemCount = BonusInfo.GetItemCountbyIndex(ItemIndex);
                    if (ItemID >= 0 && ItemCount > 0)
                    {
                        Tab_CommonItem ItemInfo = TableManager.GetCommonItemByID(ItemID, 0);
                        if (null == ItemInfo)
                        {
                            LogModule.DebugLog("CommonItem.txt has not Line ID=" + ItemID);
                            return;
                        }
                        string strQualityIcon = "";
                        switch ((ItemQuality)ItemInfo.Quality)
                        {
                        case ItemQuality.QUALITY_WHITE:
                            strQualityIcon = "QualityGrey";
                            break;

                        case ItemQuality.QUALITY_GREEN:
                            strQualityIcon = "QualityGreen";
                            break;

                        case ItemQuality.QUALITY_BLUE:
                            strQualityIcon = "QualityBlue";
                            break;

                        case ItemQuality.QUALITY_PURPLE:
                            strQualityIcon = "QualityPurple";
                            break;

                        case ItemQuality.QUALITY_ORANGE:
                            strQualityIcon = "QualityYellow";
                            break;

                        case ItemQuality.QUALITY_RED:
                            strQualityIcon = "QualityDarkRed";
                            break;

                        case ItemQuality.QUALITY_GOLD:
                            strQualityIcon = "QualityGold";
                            break;

                        default:
                            strQualityIcon = "QualityGrey";
                            break;
                        }
                        AddItemInfo(ItemInfo.Icon, ItemInfo.Name, strQualityIcon, bShowItemImpact);
                    }
                }
                //经验提示
                if (BonusInfo.Exp > 0)
                {
                    AddItemInfo("jingyan", BonusInfo.Exp.ToString(), "", bShowItemImpact);
                }
            }
        }
    }