public static void DoCoinTweenEnd()
        {
            if (PVESettleView._coinLTD != null && PVESettleView._coinTweenText != null)
            {
                PVESettleView._coinTweenText.text = string.Format("+{0}", PVESettleView._coinTo.ToString("N0"));
                if (PVESettleView._coinMulti != null && Singleton <BattleStatistic> .GetInstance().acntInfo != null)
                {
                    COMDT_ACNT_INFO acntInfo = Singleton <BattleStatistic> .GetInstance().acntInfo;

                    CUICommonSystem.AppendMultipleText(PVESettleView._coinTweenText, CUseable.GetMultiple(acntInfo.dwPvpSettleBaseCoin, ref PVESettleView._coinMulti, 0, -1));
                }
                PVESettleView._coinLTD.cancel();
                PVESettleView._coinLTD       = null;
                PVESettleView._coinTweenText = null;
                PVESettleView._coinMulti     = null;
            }
        }
Exemple #2
0
 public static void DoCoinTweenEnd()
 {
     if ((_coinLTD != null) && (_coinTweenText != null))
     {
         _coinTweenText.text = string.Format("+{0}", _coinTo.ToString("N0"));
         if (Singleton <BattleStatistic> .GetInstance().multiDetail != null)
         {
             CUICommonSystem.AppendMultipleText(_coinTweenText, CUseable.GetMultiple(ref Singleton <BattleStatistic> .GetInstance().multiDetail, 0, -1));
         }
         _coinLTD.cancel();
         _coinLTD       = null;
         _coinTweenText = null;
     }
     if (_continueBtn != null)
     {
         _continueBtn.CustomSetActive(true);
         _continueBtn = null;
     }
 }
        public static void DoCoinTweenEnd()
        {
            if (CSettlementView._coinLTD != null && CSettlementView._coinTweenText != null)
            {
                CSettlementView._coinTweenText.set_text(string.Format("+{0}", CSettlementView._coinTo.ToString("N0")));
                COMDT_ACNT_INFO acntInfo = Singleton <BattleStatistic> .GetInstance().acntInfo;

                if (Singleton <BattleStatistic> .GetInstance().multiDetail != null)
                {
                    CUICommonSystem.AppendMultipleText(CSettlementView._coinTweenText, CUseable.GetMultiple(acntInfo.dwPvpSettleBaseCoin, ref Singleton <BattleStatistic> .GetInstance().multiDetail, 0, -1));
                }
                CSettlementView._coinLTD.cancel();
                CSettlementView._coinLTD       = null;
                CSettlementView._coinTweenText = null;
            }
            if (CSettlementView._continueBtn != null)
            {
                CSettlementView._continueBtn.CustomSetActive(true);
                CSettlementView._continueBtn = null;
            }
        }
Exemple #4
0
        private void SetItem(CUseable usable, GameObject uiNode, bool received, bool ready, uint vipLv)
        {
            SevenDayCheckHelper component = uiNode.GetComponent <SevenDayCheckHelper>();
            Image component2 = component.Icon.GetComponent <Image>();

            CUIUtility.SetImageSprite(component2, usable.GetIconPath(), this._form, true, false, false, false);
            component.ItemName.GetComponent <Text>().text = usable.m_name;
            if (vipLv > 0u)
            {
                component.NobeRoot.CustomSetActive(true);
                MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(component.Nobe.GetComponent <Image>(), (int)vipLv, false);
            }
            else
            {
                component.NobeRoot.CustomSetActive(false);
            }
            if (usable.m_type == 4 || usable.m_type == 7 || (usable.m_type == 2 && CItem.IsHeroExperienceCard(usable.m_baseID)) || (usable.m_type == 2 && CItem.IsSkinExChangeCoupons(usable.m_baseID)))
            {
                component.IconBg.CustomSetActive(true);
            }
            else
            {
                component.IconBg.CustomSetActive(false);
            }
            Transform transform = component.Tiyan.transform;

            if (transform != null)
            {
                if (usable.m_type == 2 && CItem.IsHeroExperienceCard(usable.m_baseID))
                {
                    transform.gameObject.CustomSetActive(true);
                    transform.GetComponent <Image>().SetSprite(CUIUtility.GetSpritePrefeb(CExperienceCardSystem.HeroExperienceCardMarkPath, false, false), false);
                }
                else if (usable.m_type == 2 && CItem.IsSkinExperienceCard(usable.m_baseID))
                {
                    transform.gameObject.CustomSetActive(true);
                    transform.GetComponent <Image>().SetSprite(CUIUtility.GetSpritePrefeb(CExperienceCardSystem.SkinExperienceCardMarkPath, false, false), false);
                }
                else
                {
                    transform.gameObject.CustomSetActive(false);
                }
            }
            Transform transform2 = component.ItemNumText.transform;

            if (transform2 != null)
            {
                Text component3 = transform2.GetComponent <Text>();
                if (usable.m_stackCount < 10000)
                {
                    component3.text = usable.m_stackCount.ToString();
                }
                else
                {
                    component3.text = usable.m_stackCount / 10000 + "万";
                }
                CUICommonSystem.AppendMultipleText(component3, usable.m_stackMulti);
                if (usable.m_stackCount <= 1)
                {
                    component3.gameObject.CustomSetActive(false);
                    component.ItemNum.CustomSetActive(false);
                }
                else
                {
                    component.ItemNum.CustomSetActive(true);
                    component.ItemNumText.CustomSetActive(true);
                }
                if (usable.m_type == 5)
                {
                    if (((CSymbolItem)usable).IsGuildSymbol())
                    {
                        component3.text = string.Empty;
                    }
                    else
                    {
                        component3.text = usable.GetSalableCount().ToString();
                    }
                }
            }
            if (received)
            {
                component.GrayMask.CustomSetActive(true);
            }
            else
            {
                component.GrayMask.CustomSetActive(false);
            }
            if (ready)
            {
                component.Effect.CustomSetActive(true);
            }
            else
            {
                component.Effect.CustomSetActive(false);
            }
            CUIEventScript  component4  = uiNode.GetComponent <CUIEventScript>();
            stUIEventParams eventParams = new stUIEventParams
            {
                iconUseable = usable
            };

            component4.SetUIEvent(enUIEventType.Down, enUIEventID.Tips_ItemInfoOpen, eventParams);
            component4.SetUIEvent(enUIEventType.HoldEnd, enUIEventID.Tips_ItemInfoClose, eventParams);
            component4.SetUIEvent(enUIEventType.Click, enUIEventID.Tips_ItemInfoClose, eventParams);
            component4.SetUIEvent(enUIEventType.DragEnd, enUIEventID.Tips_ItemInfoClose, eventParams);
        }
        private static void ShowReward(CUIFormScript belongForm, COMDT_SETTLE_RESULT_DETAIL settleData)
        {
            if (Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo() == null)
            {
                return;
            }
            GameObject gameObject  = belongForm.transform.Find("Root/Panel_Award/Award/ItemAndCoin/Panel_Gold").gameObject;
            Text       component   = gameObject.transform.Find("GoldNum").gameObject.GetComponent <Text>();
            GameObject gameObject2 = gameObject.transform.Find("GoldMax").gameObject;

            if (settleData.stAcntInfo.bReachDailyLimit > 0)
            {
                gameObject2.CustomSetActive(true);
            }
            else
            {
                gameObject2.CustomSetActive(false);
            }
            component.text = "0";
            COMDT_REWARD_DETAIL stReward   = settleData.stReward;
            COMDT_ACNT_INFO     stAcntInfo = settleData.stAcntInfo;

            if (stAcntInfo != null)
            {
                GameObject         gameObject3 = belongForm.transform.FindChild("Root/Panel_Award/Award/Panel_PlayerExp/PvpExpNode").gameObject;
                Text               component2  = gameObject3.transform.FindChild("PvpExpTxt").gameObject.GetComponent <Text>();
                Text               component3  = gameObject3.transform.FindChild("AddPvpExpTxt").gameObject.GetComponent <Text>();
                RectTransform      component4  = gameObject3.transform.FindChild("PvpExpSliderBg/BasePvpExpSlider").gameObject.GetComponent <RectTransform>();
                RectTransform      component5  = gameObject3.transform.FindChild("PvpExpSliderBg/AddPvpExpSlider").gameObject.GetComponent <RectTransform>();
                Text               component6  = gameObject3.transform.FindChild("PlayerName").gameObject.GetComponent <Text>();
                CUIHttpImageScript component7  = gameObject3.transform.FindChild("HeadImage").gameObject.GetComponent <CUIHttpImageScript>();
                Text               component8  = gameObject3.transform.FindChild("PvpLevelTxt").gameObject.GetComponent <Text>();
                Image              component9  = gameObject3.transform.FindChild("NobeIcon").gameObject.GetComponent <Image>();
                MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(component9, (int)Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo().GetNobeInfo().stGameVipClient.dwCurLevel, false);

                Image component10 = gameObject3.transform.FindChild("HeadFrame").gameObject.GetComponent <Image>();
                MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(component10, (int)Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo().GetNobeInfo().stGameVipClient.dwHeadIconId);

                component8.text = string.Format("Lv.{0}", stAcntInfo.dwPvpLv.ToString());
                ResAcntPvpExpInfo dataByKey   = GameDataMgr.acntPvpExpDatabin.GetDataByKey((uint)((byte)stAcntInfo.dwPvpLv));
                GameObject        gameObject4 = gameObject3.transform.FindChild("ExpMax").gameObject;
                if (stAcntInfo.bExpDailyLimit == 0)
                {
                    gameObject4.CustomSetActive(false);
                }
                component2.text = string.Format("{0}/{1}", stAcntInfo.dwPvpExp, dataByKey.dwNeedExp);
                component3.text = string.Format("+{0}", stAcntInfo.dwPvpSettleExp);
                CUICommonSystem.AppendMultipleText(component3, CUseable.GetMultiple(stAcntInfo.dwPvpSettleBaseExp, ref settleData.stMultipleDetail, 15, -1));
                component6.text = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().Name;

                string headUrl = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().HeadUrl;

                if (!CSysDynamicBlock.bLobbyEntryBlocked)
                {
                    component7.SetImageUrl(headUrl);
                }
                if (stAcntInfo.dwPvpSettleExp > 0u)
                {
                    Singleton <CSoundManager> .GetInstance().PostEvent("UI_count_jingyan", null);
                }
                float num = 0f;
                if (stAcntInfo.dwPvpExp < stAcntInfo.dwPvpSettleExp)
                {
                    component4.sizeDelta     = new Vector2(num * 260f, component4.sizeDelta.y);
                    PVESettleView._lvUpGrade = stAcntInfo.dwPvpLv;
                }
                else
                {
                    num = (stAcntInfo.dwPvpExp - stAcntInfo.dwPvpSettleExp) / dataByKey.dwNeedExp;
                    component4.sizeDelta     = new Vector2(num * 260f, component4.sizeDelta.y);
                    PVESettleView._lvUpGrade = 0u;
                }
                float expTo = stAcntInfo.dwPvpExp / dataByKey.dwNeedExp;
                PVESettleView._expFrom      = num;
                PVESettleView._expTo        = expTo;
                component5.sizeDelta        = new Vector2(num * 260f, component5.sizeDelta.y);
                PVESettleView._expTweenRect = component5;
                PVESettleView._coinFrom     = 0f;
                PVESettleView._coinTo       = 0f;
                for (int i = 0; i < (int)stReward.bNum; i++)
                {
                    COMDT_REWARD_INFO cOMDT_REWARD_INFO = stReward.astRewardDetail[i];
                    byte bType = cOMDT_REWARD_INFO.bType;
                    if (bType == 11)
                    {
                        PVESettleView._coinTo    = cOMDT_REWARD_INFO.stRewardInfo.dwPvpCoin;
                        PVESettleView._coinMulti = settleData.stMultipleDetail;
                    }
                }
                PVESettleView._coinTweenText = component;
                PVESettleView.DoCoinAndExpTween();
            }
            ListView <COMDT_REWARD_INFO> listView = new ListView <COMDT_REWARD_INFO>();
            GameObject gameObject5 = belongForm.transform.Find("Root/Panel_Award/Award/Panel_QQVIPGold").gameObject;

            if (gameObject5 != null)
            {
                gameObject5.CustomSetActive(false);
            }
            GameObject gameObject6 = belongForm.transform.Find("Root/Panel_Award/Award/ItemAndCoin/FirstGain").gameObject;

            if (gameObject6 != null)
            {
                gameObject6.CustomSetActive(false);
            }
            for (int j = 0; j < (int)stReward.bNum; j++)
            {
                COMDT_REWARD_INFO cOMDT_REWARD_INFO = stReward.astRewardDetail[j];
                byte bType = cOMDT_REWARD_INFO.bType;
                if (bType != 6)
                {
                    if (bType == 11)
                    {
                        CUICommonSystem.AppendMultipleText(component, CUseable.GetMultiple(stAcntInfo.dwPvpSettleBaseCoin, ref settleData.stMultipleDetail, 0, -1));
                        if (gameObject5 != null)
                        {
                            gameObject5.CustomSetActive(false);
                            Text       component11 = gameObject5.transform.FindChild("Text_Value").gameObject.GetComponent <Text>();
                            GameObject gameObject7 = gameObject5.transform.FindChild("Icon_QQVIP").gameObject;
                            GameObject gameObject8 = gameObject5.transform.FindChild("Icon_QQSVIP").gameObject;
                            gameObject7.CustomSetActive(false);
                            gameObject8.CustomSetActive(false);
                            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

                            uint qqVipExtraCoin = CUseable.GetQqVipExtraCoin(cOMDT_REWARD_INFO.stRewardInfo.dwPvpCoin, ref settleData.stMultipleDetail, 0);
                            if (masterRoleInfo != null && qqVipExtraCoin > 0u)
                            {
                                component11.text = string.Format("+{0}", qqVipExtraCoin);
                                if (masterRoleInfo.HasVip(16))
                                {
                                    gameObject5.CustomSetActive(true);
                                    gameObject8.CustomSetActive(true);
                                }
                                else if (masterRoleInfo.HasVip(1))
                                {
                                    gameObject5.CustomSetActive(true);
                                    gameObject7.CustomSetActive(true);
                                }
                            }
                            gameObject5.CustomSetActive(false);
                        }
                    }
                }
                else
                {
                    listView.Add(stReward.astRewardDetail[j]);
                    if (gameObject6 != null)
                    {
                        gameObject6.CustomSetActive(false);
                    }
                }
            }
            GameObject gameObject9 = belongForm.transform.Find("Root/Panel_Award/Award/ItemAndCoin/itemCell").gameObject;

            gameObject9.CustomSetActive(false);
            if (listView.get_Count() > 0)
            {
                Text component12 = gameObject9.transform.FindChild("ItemName").gameObject.GetComponent <Text>();
                gameObject9.CustomSetActive(true);
                COMDT_REWARD_INFO cOMDT_REWARD_INFO = listView.get_Item(0);
                PVESettleView.SetItemEtcCell(belongForm, gameObject9, component12, cOMDT_REWARD_INFO, settleData);
            }
        }
        private void SetItem(CUseable usable, Transform uiNode, bool received, bool ready, uint vipLv, int elemIdx)
        {
            Transform transform = uiNode.transform.FindChild("DayBg/DayText");

            if (transform != null)
            {
                transform.GetComponent <Text>().set_text(string.Format("第{0}天", Day14CheckSystem.GetDay(elemIdx)));
            }
            Transform transform2 = uiNode.transform.FindChild("ItemIcon");

            if (transform2 != null)
            {
                CUIUtility.SetImageSprite(transform2.GetComponent <Image>(), usable.GetIconPath(), this._form, true, false, false, false);
            }
            Transform transform3 = uiNode.transform.FindChild("ItemName");

            if (transform3 != null)
            {
                transform3.GetComponent <Text>().set_text(usable.m_name);
            }
            Transform transform4 = uiNode.transform.FindChild("Bg");

            if (usable.m_type == COM_ITEM_TYPE.COM_OBJTYPE_HERO || usable.m_type == COM_ITEM_TYPE.COM_OBJTYPE_HEROSKIN || (usable.m_type == COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP && CItem.IsHeroExperienceCard(usable.m_baseID)) || (usable.m_type == COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP && CItem.IsSkinExChangeCoupons(usable.m_baseID)))
            {
                if (transform4)
                {
                    transform4.gameObject.CustomSetActive(true);
                }
            }
            else if (transform4)
            {
                transform4.gameObject.CustomSetActive(false);
            }
            Transform transform5 = uiNode.transform.FindChild("TiyanMask");

            if (transform5 != null)
            {
                if (usable.m_type == COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP && CItem.IsHeroExperienceCard(usable.m_baseID))
                {
                    transform5.gameObject.CustomSetActive(true);
                    transform5.GetComponent <Image>().SetSprite(CUIUtility.GetSpritePrefeb(CExperienceCardSystem.HeroExperienceCardMarkPath, false, false), false);
                }
                else if (usable.m_type == COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP && CItem.IsSkinExperienceCard(usable.m_baseID))
                {
                    transform5.gameObject.CustomSetActive(true);
                    transform5.GetComponent <Image>().SetSprite(CUIUtility.GetSpritePrefeb(CExperienceCardSystem.SkinExperienceCardMarkPath, false, false), false);
                }
                else
                {
                    transform5.gameObject.CustomSetActive(false);
                }
            }
            Transform transform6 = uiNode.transform.FindChild("ItemNum/ItemNumText");

            if (transform6 != null)
            {
                Text component = transform6.GetComponent <Text>();
                if (usable.m_stackCount < 10000)
                {
                    component.set_text(usable.m_stackCount.ToString());
                }
                else
                {
                    component.set_text(usable.m_stackCount / 10000 + "万");
                }
                CUICommonSystem.AppendMultipleText(component, usable.m_stackMulti);
                if (usable.m_stackCount <= 1)
                {
                    component.gameObject.CustomSetActive(false);
                    uiNode.transform.FindChild("ItemNum").gameObject.CustomSetActive(false);
                }
                else
                {
                    uiNode.transform.FindChild("ItemNum").gameObject.CustomSetActive(true);
                    transform6.gameObject.CustomSetActive(true);
                }
                if (usable.m_type == COM_ITEM_TYPE.COM_OBJTYPE_ITEMSYMBOL)
                {
                    if (((CSymbolItem)usable).IsGuildSymbol())
                    {
                        component.set_text(string.Empty);
                    }
                    else
                    {
                        component.set_text(usable.GetSalableCount().ToString());
                    }
                }
            }
            Transform transform7 = uiNode.transform.FindChild("LingQuGou");

            if (transform7)
            {
                if (received)
                {
                    transform7.gameObject.CustomSetActive(true);
                }
                else
                {
                    transform7.gameObject.CustomSetActive(false);
                }
            }
            Transform transform8 = uiNode.transform.FindChild("XiYou");

            if (transform8)
            {
                if (ready)
                {
                    transform8.gameObject.CustomSetActive(true);
                    Transform transform9 = transform8.transform.FindChild("Bg/Text");
                    if (transform9 != null)
                    {
                        transform9.GetComponent <Text>().set_text(string.Format("第{0}天", Day14CheckSystem.GetDay(elemIdx)));
                    }
                }
                else
                {
                    transform8.gameObject.CustomSetActive(false);
                }
            }
            CUIEventScript  component2  = uiNode.GetComponent <CUIEventScript>();
            stUIEventParams eventParams = new stUIEventParams
            {
                iconUseable = usable
            };

            component2.SetUIEvent(enUIEventType.Down, enUIEventID.Tips_ItemInfoOpen, eventParams);
            component2.SetUIEvent(enUIEventType.HoldEnd, enUIEventID.Tips_ItemInfoClose, eventParams);
            component2.SetUIEvent(enUIEventType.Click, enUIEventID.Tips_ItemInfoClose, eventParams);
            component2.SetUIEvent(enUIEventType.DragEnd, enUIEventID.Tips_ItemInfoClose, eventParams);
        }