Ejemplo n.º 1
0
    private void SetZPos(CommonDialog cd)
    {
        DepthController component = base.gameObject.GetComponent <DepthController>();

        if (null != cd)
        {
            CMD component2 = cd.gameObject.GetComponent <CMD>();
            if (null != component2 && (null != component2.PartsTitle || component2.requestMenu))
            {
                float   dlgpitch      = GUIManager.GetDLGPitch();
                float   z             = cd.gameObject.transform.localPosition.z;
                float   z2            = base.gameObject.transform.localPosition.z;
                float   num           = z + dlgpitch / 2f;
                int     add           = (int)(-(int)num) - (int)(-(int)z2);
                Vector3 localPosition = base.gameObject.transform.localPosition;
                localPosition.z = num;
                base.gameObject.transform.localPosition = localPosition;
                component.AddWidgetDepth(base.transform, add);
            }
        }
        else
        {
            float   z3             = base.gameObject.transform.localPosition.z;
            int     add2           = (int)(-(int)this.orgPosZ) - (int)(-(int)z3);
            Vector3 localPosition2 = base.gameObject.transform.localPosition;
            localPosition2.z = this.orgPosZ;
            base.gameObject.transform.localPosition = localPosition2;
            component.AddWidgetDepth(base.transform, add2);
        }
    }
Ejemplo n.º 2
0
    protected void SetIcons(string path, List <UISprite> list, GameWebAPI.RespDataCM_LoginBonus.LoginReward[] rewardList)
    {
        int    num  = 1;
        string name = path + num;

        if (base.transform.Find(name) == null)
        {
            return;
        }
        UISprite component = base.transform.Find(name).GetComponent <UISprite>();

        while (component != null)
        {
            list.Add(component);
            if (rewardList.Length < num)
            {
                component.gameObject.SetActive(false);
            }
            else
            {
                int    num2            = num - 1;
                string rewardIcon      = this.GetRewardIcon(rewardList[num2]);
                string assetCategoryId = rewardList[num2].assetCategoryId;
                string assetValue      = rewardList[num2].assetValue;
                if (string.IsNullOrEmpty(assetCategoryId) || string.IsNullOrEmpty(rewardIcon) || this.textureCategoryList.Contains(assetCategoryId.ToInt32()))
                {
                    component.gameObject.SetActive(false);
                }
                else if (assetCategoryId.ToInt32() == 17)
                {
                    GameWebAPI.RespDataMA_ChipM.Chip chipMainData = ChipDataMng.GetChipMainData(assetValue);
                    ChipDataMng.MakePrefabByChipData(chipMainData, component.gameObject, component.transform.localPosition, component.transform.localScale, null, -1, -1, true);
                }
                else if (assetCategoryId.ToInt32() == 1)
                {
                    this.monsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(MonsterDataMng.Instance().CreateMonsterDataByMID(assetValue), Vector3.one, Vector3.zero, component.transform, true, false);
                    this.monsterIcon.ResizeIcon(component.width, component.height);
                    if (null != this.monsterIcon)
                    {
                        DepthController depthController = this.monsterIcon.GetDepthController();
                        if (null != depthController)
                        {
                            depthController.AddWidgetDepth(this.monsterIcon.transform, component.depth + 1);
                        }
                    }
                }
                else
                {
                    component.spriteName = rewardIcon;
                }
            }
            num++;
            name = path + num;
            if (!(base.transform.Find(name) != null))
            {
                break;
            }
            component = base.transform.Find(name).GetComponent <UISprite>();
        }
    }
Ejemplo n.º 3
0
    public void ResetDepthToOriginal()
    {
        DepthController component  = this.goBASE.GetComponent <DepthController>();
        UIWidget        component2 = this.goBASE.GetComponent <UIWidget>();

        component.AddWidgetDepth(base.transform, this.originalDepth - component2.depth);
    }
Ejemplo n.º 4
0
    public static void MakePrefabByChipData(GameWebAPI.RespDataMA_ChipM.Chip masterChip, GameObject emptyObject, Vector3 position, Vector3 scale, Action <ChipIcon> actCB = null, int texSizeWidth = -1, int texSizeHeight = -1, bool colliderEnable = true)
    {
        Action <UnityEngine.Object> actEnd = delegate(UnityEngine.Object obj)
        {
            GameObject gameObject = UnityEngine.Object.Instantiate(obj) as GameObject;
            gameObject.transform.SetParent(emptyObject.transform.parent);
            gameObject.transform.localPosition = position;
            gameObject.transform.localScale    = scale;
            BoxCollider component = gameObject.GetComponent <BoxCollider>();
            if (component != null)
            {
                component.enabled = colliderEnable;
            }
            UIWidget        component2 = emptyObject.GetComponent <UIWidget>();
            DepthController component3 = gameObject.GetComponent <DepthController>();
            component3.AddWidgetDepth(component2.depth);
            ChipIcon component4 = gameObject.GetComponent <ChipIcon>();
            component4.SetData(masterChip, texSizeWidth, texSizeHeight);
            if (actCB != null)
            {
                actCB(component4);
            }
        };

        AssetDataMng.Instance().LoadObjectASync("UICommon/ListParts/ListPartsChip", actEnd);
    }
Ejemplo n.º 5
0
 private void SetDigimonIcon()
 {
     if (this.data.leaderMonsterId == "0")
     {
         this.data.leaderMonsterId = "81";
     }
     if (string.IsNullOrEmpty(this.data.leaderMonsterId))
     {
         this.goMONSTER_ICON.SetActive(false);
         return;
     }
     if (this.digimonData == null)
     {
         this.digimonData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.data.leaderMonsterId);
         this.csMonsIcon  = GUIMonsterIcon.MakePrefabByMonsterData(this.digimonData, this.goMONSTER_ICON.transform.localScale, this.goMONSTER_ICON.transform.localPosition, this.goMONSTER_ICON.transform.parent, true, true);
         UIWidget component  = this.goMONSTER_ICON.GetComponent <UIWidget>();
         UIWidget component2 = this.csMonsIcon.gameObject.GetComponent <UIWidget>();
         if (component != null && component2 != null)
         {
             int             add        = component.depth - component2.depth;
             DepthController component3 = this.csMonsIcon.gameObject.GetComponent <DepthController>();
             component3.AddWidgetDepth(this.csMonsIcon.transform, add);
         }
         this.goMONSTER_ICON.SetActive(false);
     }
     else
     {
         this.digimonData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.data.leaderMonsterId);
         this.csMonsIcon.RefreshPrefabByMonsterData(this.digimonData);
     }
 }
        private void SetSelectedCharChg(MonsterData monster)
        {
            this.changeMonsterData = monster;
            if (null != this.goMN_ICON_CHG_2)
            {
                UnityEngine.Object.Destroy(this.goMN_ICON_CHG_2);
            }
            Transform      transform      = this.goMN_ICON_CHG.transform;
            GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(this.changeMonsterData, transform.localScale, transform.localPosition, transform.parent, true, false);

            this.goMN_ICON_CHG_2 = guimonsterIcon.gameObject;
            this.goMN_ICON_CHG_2.SetActive(true);
            guimonsterIcon.Data = this.changeMonsterData;
            guimonsterIcon.SetTouchAct_S(new Action <MonsterData>(this.actRemoveChg));
            guimonsterIcon.SetTouchAct_L(new Action <MonsterData>(this.ActMIconLong));
            UIWidget component  = this.goMN_ICON_CHG.GetComponent <UIWidget>();
            UIWidget component2 = guimonsterIcon.gameObject.GetComponent <UIWidget>();

            if (component != null && component2 != null)
            {
                int             add        = component.depth - component2.depth;
                DepthController component3 = guimonsterIcon.gameObject.GetComponent <DepthController>();
                component3.AddWidgetDepth(guimonsterIcon.transform, add);
            }
            this.goMN_ICON_CHG.SetActive(false);
            guimonsterIcon.Gimmick = ExtraEffectUtil.IsExtraEffectMonster(this.changeMonsterData, this.effectArray);
            this.SetChangeMonsterData();
        }
    private void ShowIcon()
    {
        if (this.goMN_ICON_CHG_2 != null)
        {
            UnityEngine.Object.DestroyImmediate(this.goMN_ICON_CHG_2);
        }
        GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(this.data, this.goMN_ICON.transform.localScale, this.goMN_ICON.transform.localPosition, this.goMN_ICON.transform.parent, true, false);

        this.goMN_ICON_CHG_2 = guimonsterIcon.gameObject;
        this.goMN_ICON_CHG_2.SetActive(true);
        guimonsterIcon.Data = this.data;
        guimonsterIcon.SetTouchAct_L(new Action <MonsterData>(this.actMIconLong));
        UIWidget component  = this.goMN_ICON.GetComponent <UIWidget>();
        UIWidget component2 = guimonsterIcon.gameObject.GetComponent <UIWidget>();

        if (component != null && component2 != null)
        {
            int             add        = component.depth - component2.depth;
            DepthController component3 = guimonsterIcon.gameObject.GetComponent <DepthController>();
            component3.AddWidgetDepth(guimonsterIcon.transform, add);
        }
        BoxCollider component4 = this.goMN_ICON.GetComponent <BoxCollider>();
        BoxCollider component5 = guimonsterIcon.GetComponent <BoxCollider>();

        if (component4 != null && component5 != null)
        {
            component5.center = component4.center;
            component5.size   = component4.size;
        }
        this.goMN_ICON.SetActive(false);
    }
 private void UpdateMonsterIcon()
 {
     if (!this.isUpdate)
     {
         if (this.RespDataChatMessageDataResult.type != 3)
         {
             this.ngTX_USERNAME.text = this.RespDataChatMessageDataResult.userInfo.nickname;
             TitleDataMng.SetTitleIcon(this.RespDataChatMessageDataResult.userInfo.titleId, this.ngTITLE_ICON.GetComponent <UITexture>());
             this.thumbMid = this.RespDataChatMessageDataResult.userInfo.monsterId;
             MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.thumbMid);
             if (monsterData != null)
             {
                 GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.ngMONSTER_ICON.transform.localScale, this.ngMONSTER_ICON.transform.localPosition, this.ngMONSTER_ICON.transform.parent, true, true);
                 guimonsterIcon.onTouchEnded += delegate(Touch touch, Vector2 pos, bool flag)
                 {
                     this.OnThumbnailClicked();
                 };
                 DepthController depthController = guimonsterIcon.GetDepthController();
                 depthController.AddWidgetDepth(guimonsterIcon.transform, 1200);
             }
         }
         if (this.RespDataChatMessageDataResult.type == 4 && DataMng.Instance().UserId != this.RespDataChatMessageDataResult.userId)
         {
             this.ngMULTICODE_BCOL.size = new Vector3(this.ngMULTICODE_BCOL.size.x, this.ngMULTICODE_BCOL.size.y, 5f);
         }
         this.isUpdate = true;
     }
 }
Ejemplo n.º 9
0
    private void ShowParam()
    {
        this.md_favo = MonsterDataMng.Instance().CreateMonsterDataByMID(CMD_PartsFriendCheckScreen.data.monsterData.monsterId);
        GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(this.md_favo, this.goMN_ICON.transform.localScale, this.goMN_ICON.transform.localPosition, this.goMN_ICON.transform.parent, true, false);

        this.goMN_ICON_2 = guimonsterIcon.gameObject;
        this.goMN_ICON_2.SetActive(true);
        guimonsterIcon.Data = this.md_favo;
        guimonsterIcon.SetTouchAct_S(new Action <MonsterData>(this.actMIconLong));
        guimonsterIcon.SetTouchAct_L(new Action <MonsterData>(this.actMIconLong));
        UIWidget component  = this.goMN_ICON.GetComponent <UIWidget>();
        UIWidget component2 = guimonsterIcon.gameObject.GetComponent <UIWidget>();

        if (component != null && component2 != null)
        {
            int             add        = component.depth - component2.depth;
            DepthController component3 = guimonsterIcon.gameObject.GetComponent <DepthController>();
            component3.AddWidgetDepth(guimonsterIcon.transform, add);
        }
        this.goMN_ICON.SetActive(false);
        TitleDataMng.SetTitleIcon(CMD_PartsFriendCheckScreen.data.userData.titleId, this.goTITLE_ICON.GetComponent <UITexture>());
        this.ngTX_NICKNAME.text   = CMD_PartsFriendCheckScreen.data.userData.nickname;
        this.ngTX_EXP.text        = CMD_PartsFriendCheckScreen.data.userData.description;
        this.ngTX_LAST_LOGIN.text = StringMaster.GetString("Friend-12") + CMD_PartsFriendCheckScreen.data.userData.loginTime;
    }
Ejemplo n.º 10
0
 private GameObject SetSelectedCharChg(MonsterData md, GameObject goEmpty, GameObject goIcon, int inum)
 {
     if (md != null)
     {
         if (goIcon != null)
         {
             UnityEngine.Object.DestroyImmediate(goIcon);
         }
         GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(md, goEmpty.transform.localScale, goEmpty.transform.localPosition, goEmpty.transform.parent, true, false);
         goIcon = guimonsterIcon.gameObject;
         goIcon.SetActive(true);
         guimonsterIcon.Data = md;
         if (inum == 0)
         {
             guimonsterIcon.SetTouchAct_S(new Action <MonsterData>(this.ActMIconShort_0));
             this.SetBaseTouchAct_L(guimonsterIcon);
         }
         else if (inum == 1)
         {
             guimonsterIcon.SetTouchAct_S(new Action <MonsterData>(this.ActMIconShort_1));
             this.SetPartnerTouchAct_L(guimonsterIcon);
         }
         UIWidget component  = goEmpty.GetComponent <UIWidget>();
         UIWidget component2 = guimonsterIcon.gameObject.GetComponent <UIWidget>();
         if (component != null && component2 != null)
         {
             int             add        = component.depth - component2.depth;
             DepthController component3 = guimonsterIcon.gameObject.GetComponent <DepthController>();
             component3.AddWidgetDepth(guimonsterIcon.transform, add);
         }
         goEmpty.SetActive(false);
     }
     return(goIcon);
 }
Ejemplo n.º 11
0
 private void SetSelectedChar()
 {
     if (CMD_DeckList.SelectMonsterData != null)
     {
         Transform      transform      = this.goMN_ICON_NOW.transform;
         GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(CMD_DeckList.SelectMonsterData, transform.localScale, transform.localPosition, transform.parent, true, false);
         this.goMN_ICON_NOW_2 = guimonsterIcon.gameObject;
         this.goMN_ICON_NOW_2.SetActive(true);
         guimonsterIcon.Data = CMD_DeckList.SelectMonsterData;
         guimonsterIcon.SetTouchAct_L(new Action <MonsterData>(this.ActMIconLong));
         UIWidget component  = this.goMN_ICON_NOW.GetComponent <UIWidget>();
         UIWidget component2 = guimonsterIcon.gameObject.GetComponent <UIWidget>();
         if (null != component && null != component2)
         {
             int             add        = component.depth - component2.depth;
             DepthController component3 = guimonsterIcon.gameObject.GetComponent <DepthController>();
             component3.AddWidgetDepth(guimonsterIcon.transform, add);
         }
         this.goMN_ICON_NOW.SetActive(false);
         QuestBonusPack questBonusPack = new QuestBonusPack
         {
             bonusChipIds   = QuestBonusFilter.GetActivateBonusChips(CMD_DeckList.SelectMonsterData, this.questBonusPack.bonusChipIds),
             eventBonuses   = QuestBonusFilter.GetActivateEventBonuses(this.bonusTargetCheck, CMD_DeckList.SelectMonsterData, this.questBonusPack.eventBonuses),
             dungeonBonuses = QuestBonusFilter.GetActivateDungeonBonuses(this.bonusTargetCheck, CMD_DeckList.SelectMonsterData, this.questBonusPack.dungeonBonuses)
         };
         guimonsterIcon.Gimmick = questBonusPack.ExistBonus();
     }
 }
Ejemplo n.º 12
0
 private void SetSelectedCharChg()
 {
     if (this.DataChg != null)
     {
         if (null != this.goMN_ICON_CHG_2)
         {
             UnityEngine.Object.DestroyImmediate(this.goMN_ICON_CHG_2);
         }
         Transform      transform      = this.goMN_ICON_CHG.transform;
         GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(this.DataChg, transform.localScale, transform.localPosition, transform.parent, true, false);
         this.goMN_ICON_CHG_2 = guimonsterIcon.gameObject;
         this.goMN_ICON_CHG_2.SetActive(true);
         guimonsterIcon.Data = this.DataChg;
         guimonsterIcon.SetTouchAct_S(new Action <MonsterData>(this.actRemoveChg));
         guimonsterIcon.SetTouchAct_L(new Action <MonsterData>(this.ActMIconLong));
         UIWidget component  = this.goMN_ICON_CHG.GetComponent <UIWidget>();
         UIWidget component2 = guimonsterIcon.gameObject.GetComponent <UIWidget>();
         if (null != component && null != component2)
         {
             int             add        = component.depth - component2.depth;
             DepthController component3 = guimonsterIcon.gameObject.GetComponent <DepthController>();
             component3.AddWidgetDepth(guimonsterIcon.transform, add);
         }
         this.goMN_ICON_CHG.SetActive(false);
         QuestBonusPack questBonusPack = new QuestBonusPack
         {
             bonusChipIds   = QuestBonusFilter.GetActivateBonusChips(this.DataChg, this.questBonusPack.bonusChipIds),
             eventBonuses   = QuestBonusFilter.GetActivateEventBonuses(this.bonusTargetCheck, this.DataChg, this.questBonusPack.eventBonuses),
             dungeonBonuses = QuestBonusFilter.GetActivateDungeonBonuses(this.bonusTargetCheck, this.DataChg, this.questBonusPack.dungeonBonuses)
         };
         guimonsterIcon.Gimmick = questBonusPack.ExistBonus();
     }
     this.ShowChgInfo();
 }
    private void ShowInfo()
    {
        GameWebAPI.RespDataWD_GetDungeonInfo.Dungeons dungeon = this.dungeonData.dungeon;
        ClassSingleton <PartyBossIconsAccessor> .Instance.StageEnemies = dungeon.encountEnemies;
        this.ngTX_A_STAGE_DNG_NUMBER.text   = this.dungeonNo;
        this.ngTX_A_STAGE_DNG_TITLE.text    = this.dungeonData.worldDungeonM.name;
        this.ngTX_A_STAGE_DNG_DESCRIPT.text = this.dungeonData.worldDungeonM.description;
        this.getEXPLabel.text     = dungeon.exp.ToString();
        this.getClusterLabel.text = StringFormat.Cluster(dungeon.money);
        int num = 0;
        int i;

        for (i = 0; i < dungeon.encountEnemies.Length; i++)
        {
            if (num >= this.goENCOUNT_MONS_LIST.Count)
            {
                break;
            }
            GameWebAPI.RespDataWD_GetDungeonInfo.EncountEnemy encountEnemy = dungeon.encountEnemies[i];
            if (encountEnemy.type == 2 || encountEnemy.type == 4)
            {
                string text = encountEnemy.monsterId.ToString();
                if (!string.IsNullOrEmpty(text))
                {
                    MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(text);
                    if (monsterData != null)
                    {
                        GUIMonsterIcon  guimonsterIcon  = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.goENCOUNT_MONS_LIST[num].transform.localScale, this.goENCOUNT_MONS_LIST[num].transform.localPosition, this.goENCOUNT_MONS_LIST[num].transform.parent, true, false);
                        DepthController depthController = guimonsterIcon.GetDepthController();
                        depthController.AddWidgetDepth(guimonsterIcon.transform, 40);
                        guimonsterIcon.SetTouchAct_S(delegate(MonsterData tappedMonsterData)
                        {
                            this.ActCallBackEncMons(tappedMonsterData, encountEnemy.resistanceId);
                        });
                        this.goENCOUNT_MONS_LIST[num].SetActive(false);
                        num++;
                    }
                }
            }
        }
        if (this.dungeonData.dungeon.isExtraWave == 1 && num < this.goENCOUNT_MONS_LIST.Count)
        {
            GUIMonsterIcon guimonsterIcon2 = GUIMonsterIcon.MakeQuestionPrefab(this.goENCOUNT_MONS_LIST[num].transform.localScale, this.goENCOUNT_MONS_LIST[num].transform.localPosition, (int)(this.goENCOUNT_MONS_LIST[num].transform.localPosition.z + 35f), this.goENCOUNT_MONS_LIST[num].transform.parent);
            guimonsterIcon2.SetTouchAct_S(null);
            guimonsterIcon2.SetTouchAct_L(null);
        }
        while (i < this.goENCOUNT_MONS_LIST.Count)
        {
            this.goENCOUNT_MONS_LIST[i].SetActive(false);
            i++;
        }
        this.ShowDropItems();
        this.goContentsROOT.SetActive(true);
        this.goPointContentsROOT.SetActive(true);
        this.bonusPointUI.Initialize(this.areaId, this.dungeonData.worldDungeonM.worldStageId, this.dungeonData.worldDungeonM.worldDungeonId);
        this.bonusPointUI.SetBonusUI();
    }
Ejemplo n.º 14
0
    private void SetInitLabel()
    {
        this.lbUserName.text = this.data.ownerName;
        this.lbComment.text  = this.data.introduction;
        TitleDataMng.SetTitleIcon(this.data.titleId, this.goTitleIcon.GetComponent <UITexture>());
        GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM[] worldStageM  = MasterDataMng.Instance().RespDataMA_WorldStageM.worldStageM;
        GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM   worldStageM2 = worldStageM.SingleOrDefault((GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM x) => x.worldStageId == this.data.worldStageId);
        this.lbQuestName.text = worldStageM2.name + "\n" + this.data.dungeonName;
        string moodType = this.data.moodType;

        if (moodType != null)
        {
            if (moodType == "1")
            {
                this.lbMoodType.text = StringMaster.GetString("RecruitRule-06");
                goto IL_125;
            }
            if (moodType == "2")
            {
                this.lbMoodType.text = StringMaster.GetString("RecruitRule-07");
                goto IL_125;
            }
            if (!(moodType == "3"))
            {
            }
        }
        this.lbMoodType.text = StringMaster.GetString("RecruitRule-08");
IL_125:
        this.lbNowMemberNum.text = string.Format(StringMaster.GetString("SystemFraction"), this.data.memberCount, 3);
        if (!this.isOpenedQuest)
        {
            this.bgFrame.color     = ConstValue.DEFAULT_COLOR;
            this.lbUserName.color  = ConstValue.DEACTIVE_BUTTON_LABEL;
            this.lbQuestName.color = ConstValue.DEACTIVE_BUTTON_LABEL;
            this.lbComment.color   = ConstValue.DEACTIVE_BUTTON_LABEL;
        }
        if (this.data.ownerMonsterId != null)
        {
            MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.data.ownerMonsterId);
            if (monsterData != null)
            {
                GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.goMasterIcon.transform.localScale, this.goMasterIcon.transform.localPosition, this.goMasterIcon.transform.parent, true, false);
                UIWidget       component      = base.gameObject.GetComponent <UIWidget>();
                if (component != null)
                {
                    DepthController depthController = guimonsterIcon.GetDepthController();
                    depthController.AddWidgetDepth(guimonsterIcon.transform, component.depth + 2);
                }
            }
        }
    }
Ejemplo n.º 15
0
    private void SetInitLabel()
    {
        this.lbUserName.text    = this.friendData.userData.nickname;
        this.lbUserComment.text = this.friendData.userData.description;
        this.lbLastLogin.text   = this.friendData.userData.loginTime;
        TitleDataMng.SetTitleIcon(this.friendData.userData.titleId, this.goTitleIcon.GetComponent <UITexture>());
        MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.friendData.monsterData.monsterId);

        if (monsterData != null)
        {
            GUIMonsterIcon  guimonsterIcon  = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.goMonsterIcon.transform.localScale, this.goMonsterIcon.transform.localPosition, this.goMonsterIcon.transform.parent, true, false);
            DepthController depthController = guimonsterIcon.GetDepthController();
            depthController.AddWidgetDepth(guimonsterIcon.transform, 1800);
        }
    }
Ejemplo n.º 16
0
 private void ShowMonsterIcons()
 {
     for (int i = 0; i < this.goMN_ICON_LIST.Count; i++)
     {
         if (CMD_MonsterGashaResult.DataList.Count > i)
         {
             Transform      transform      = this.goMN_ICON_LIST[i].transform;
             GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(CMD_MonsterGashaResult.DataList[i], transform.localScale, transform.localPosition, transform.parent, true, false);
             guimonsterIcon.New = CMD_MonsterGashaResult.IconNewFlagList[i];
             this.monsterIconList.Add(guimonsterIcon);
             guimonsterIcon.SetTouchAct_S(new Action <MonsterData>(this.ActMIconLong));
             guimonsterIcon.SetTouchAct_L(new Action <MonsterData>(this.ActMIconLong));
             UIWidget component = guimonsterIcon.gameObject.GetComponent <UIWidget>();
             if (null != this.prizeEfcDirector && null != this.prizeEfcCont)
             {
                 this.prizeEfcCont.gameObject.SetActive(true);
                 GameObject   gameObject = UnityEngine.Object.Instantiate <GameObject>(this.prizeEfcCont.gameObject);
                 PrizeEfcCont component2 = gameObject.GetComponent <PrizeEfcCont>();
                 component2.prizeEfcDir             = this.prizeEfcDirector;
                 component2.transform.parent        = guimonsterIcon.transform;
                 component2.transform.localPosition = Vector3.zero;
                 component2.transform.localScale    = Vector3.one;
                 component2.Data = CMD_MonsterGashaResult.DataList[i];
                 component2.SetParam();
                 UIWidget component3 = component2.gameObject.GetComponent <UIWidget>();
                 if (null != component3 && null != component)
                 {
                     int             add        = component.depth - component3.depth;
                     DepthController component4 = component2.gameObject.GetComponent <DepthController>();
                     component4.AddWidgetDepth(component4.transform, add);
                 }
             }
             UIWidget component5 = this.goMN_ICON_LIST[i].GetComponent <UIWidget>();
             if (null != component5 && null != component)
             {
                 int             add2       = component5.depth - component.depth;
                 DepthController component6 = guimonsterIcon.gameObject.GetComponent <DepthController>();
                 component6.AddWidgetDepth(guimonsterIcon.transform, add2);
             }
             this.goMN_ICON_LIST[i].SetActive(false);
         }
         else
         {
             this.goMN_ICON_LIST[i].SetActive(false);
         }
     }
 }
Ejemplo n.º 17
0
    private void ShowLevelUpAnimation()
    {
        string          path            = "UICommon/Parts/LevelUp";
        GameObject      original        = Resources.Load(path, typeof(GameObject)) as GameObject;
        GameObject      gameObject      = UnityEngine.Object.Instantiate <GameObject>(original);
        DepthController depthController = gameObject.AddComponent <DepthController>();
        Transform       transform       = gameObject.transform;
        int             depth           = this.rightUpBG.depth;

        depthController.AddWidgetDepth(transform, depth + 10);
        transform.parent        = this.LevelUpRoot;
        transform.localPosition = Vector3.zero;
        transform.localScale    = Vector3.one;
        Animation component = gameObject.GetComponent <Animation>();

        component.Play("LevelUp");
        this.ShowParticle();
    }
Ejemplo n.º 18
0
    private void CreateIcon(GameWebAPI.RespDataMA_ChipM.Chip masterChip, GameObject goEmpty)
    {
        Action <UnityEngine.Object> actEnd = delegate(UnityEngine.Object obj)
        {
            GameObject gameObject = UnityEngine.Object.Instantiate(obj) as GameObject;
            gameObject.transform.SetParent(goEmpty.transform.parent);
            gameObject.transform.localPosition = goEmpty.transform.localPosition;
            gameObject.transform.localScale    = new Vector3(0.92f, 0.92f, 1f);
            UIWidget        component  = goEmpty.GetComponent <UIWidget>();
            DepthController component2 = gameObject.GetComponent <DepthController>();
            component2.AddWidgetDepth(component.depth);
            ChipIcon component3 = gameObject.GetComponent <ChipIcon>();
            component3.SetData(masterChip, -1, -1);
            NGUITools.DestroyImmediate(goEmpty);
        };

        AssetDataMng.Instance().LoadObjectASync("UICommon/ListParts/ListPartsChip", actEnd);
    }
Ejemplo n.º 19
0
    private GUIMonsterIcon ShowCreateIcon(MonsterData md, GameObject goEmpty)
    {
        Transform      transform      = goEmpty.transform;
        GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(md, transform.localScale, transform.localPosition, transform.parent, true, false);

        guimonsterIcon.SetTouchAct_S(new Action <MonsterData>(this.ActMIconS_Remove));
        guimonsterIcon.SetTouchAct_L(new Action <MonsterData>(this.ActMIconLong));
        guimonsterIcon.transform.localScale = new Vector3(0.84f, 0.84f, 1f);
        UIWidget component  = goEmpty.GetComponent <UIWidget>();
        UIWidget component2 = guimonsterIcon.gameObject.GetComponent <UIWidget>();

        if (null != component && null != component2)
        {
            int             add        = component.depth - component2.depth;
            DepthController component3 = guimonsterIcon.gameObject.GetComponent <DepthController>();
            component3.AddWidgetDepth(guimonsterIcon.transform, add);
        }
        goEmpty.SetActive(false);
        return(guimonsterIcon);
    }
Ejemplo n.º 20
0
 private void SetInitLabel()
 {
     this.lbUserName.text = this.data.userInfo.nickname;
     this.lbComment.text  = string.Format(StringMaster.GetString("ColosseumMockInvitation"), this.data.userInfo.nickname);
     TitleDataMng.SetTitleIcon(this.data.userInfo.titleId, this.goTitleIcon.GetComponent <UITexture>());
     if (this.data.userInfo.monsterId != null)
     {
         MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.data.userInfo.monsterId);
         if (monsterData != null)
         {
             GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.goMasterIcon.transform.localScale, this.goMasterIcon.transform.localPosition, this.goMasterIcon.transform.parent, true, false);
             UIWidget       component      = base.gameObject.GetComponent <UIWidget>();
             if (component != null)
             {
                 DepthController depthController = guimonsterIcon.GetDepthController();
                 depthController.AddWidgetDepth(guimonsterIcon.transform, component.depth + 2);
             }
         }
     }
 }
Ejemplo n.º 21
0
    private void CreateIcon(int index, MonsterData md, GameObject goEmpty)
    {
        Transform      transform      = goEmpty.transform;
        GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(md, transform.localScale, transform.localPosition, transform.parent, true, false);

        guimonsterIcon.playSelectSE         = false;
        guimonsterIcon.SendMoveToParent     = false;
        guimonsterIcon.CancelTouchEndByMove = false;
        guimonsterIcon.gameObject.name      = "MonsterIcon " + index.ToString();
        UIWidget component  = goEmpty.GetComponent <UIWidget>();
        UIWidget component2 = guimonsterIcon.gameObject.GetComponent <UIWidget>();

        if (component != null && component2 != null)
        {
            int             add        = component.depth - component2.depth;
            DepthController component3 = guimonsterIcon.GetComponent <DepthController>();
            component3.AddWidgetDepth(guimonsterIcon.transform, add);
        }
        NGUITools.DestroyImmediate(goEmpty);
    }
 private void UpdateMonsterIcon()
 {
     if (!this.isUpdate)
     {
         MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.thumbMid);
         if (monsterData != null)
         {
             GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.ngMONSTER_ICON.transform.localScale, this.ngMONSTER_ICON.transform.localPosition, this.ngMONSTER_ICON.transform.parent, true, true);
             int            add            = 1600;
             UISprite       component      = this.ngMONSTER_ICON.GetComponent <UISprite>();
             if (component != null)
             {
                 add = component.depth;
             }
             DepthController depthController = guimonsterIcon.GetDepthController();
             depthController.AddWidgetDepth(guimonsterIcon.transform, add);
         }
         global::Debug.Log("==================================================================== GUIListChatMemberParts MID = " + this.thumbMid);
         this.isUpdate = true;
     }
 }
Ejemplo n.º 23
0
    public static void CreateChipIcon(GameWebAPI.RespDataMA_ChipM.Chip data, UITexture baseIcon, Action <ChipIcon> callback = null)
    {
        Action <UnityEngine.Object> actEnd = delegate(UnityEngine.Object obj)
        {
            GameObject gameObject = UnityEngine.Object.Instantiate(obj) as GameObject;
            gameObject.transform.SetParent(baseIcon.transform);
            gameObject.transform.localPosition = Vector3.zero;
            gameObject.transform.localScale    = Vector3.one;
            DepthController component = gameObject.GetComponent <DepthController>();
            component.AddWidgetDepth(baseIcon.depth);
            ChipIcon component2 = gameObject.GetComponent <ChipIcon>();
            component2.SetData(data, -1, -1);
            baseIcon.mainTexture = null;
            if (callback != null)
            {
                callback(component2);
            }
        };

        AssetDataMng.Instance().LoadObjectASync("UICommon/Parts/Parts_ChipThumbnail", actEnd);
    }
Ejemplo n.º 24
0
    public void SetParam(GameWebAPI.RespDataMA_ChipM.Chip data)
    {
        this.titleLabel.text = data.name;
        this.textLabel.text  = data.detail;
        this.iconSprite.gameObject.SetActive(false);
        this.iconTexture.gameObject.SetActive(true);
        Action <UnityEngine.Object> actEnd = delegate(UnityEngine.Object obj)
        {
            GameObject gameObject = UnityEngine.Object.Instantiate(obj) as GameObject;
            gameObject.transform.SetParent(this.iconTexture.transform.parent);
            gameObject.transform.localPosition = this.iconTexture.transform.localPosition;
            gameObject.transform.localScale    = Vector3.one;
            DepthController component = gameObject.GetComponent <DepthController>();
            component.AddWidgetDepth(this.iconTexture.depth);
            ChipIcon component2 = gameObject.GetComponent <ChipIcon>();
            component2.SetData(data, -1, -1);
            gameObject.GetComponent <BoxCollider>().enabled = false;
        };

        AssetDataMng.Instance().LoadObjectASync("UICommon/ListParts/ListPartsChip", actEnd);
    }
 private void UpdateMonsterIcon()
 {
     if (!this.isUpdateMIcon && this.data != null)
     {
         this.md_favo = MonsterDataMng.Instance().CreateMonsterDataByMID(this.data.monsterData.monsterId);
         GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(this.md_favo, this.goMN_ICON.transform.localScale, this.goMN_ICON.transform.localPosition, this.goMN_ICON.transform.parent, true, true);
         this.goMN_ICON_2 = guimonsterIcon.gameObject;
         this.goMN_ICON_2.SetActive(true);
         guimonsterIcon.SetTouchAct_S(new Action <MonsterData>(this.actMIconLong));
         guimonsterIcon.SetTouchAct_L(new Action <MonsterData>(this.actMIconLong));
         UIWidget component  = this.goMN_ICON.GetComponent <UIWidget>();
         UIWidget component2 = guimonsterIcon.gameObject.GetComponent <UIWidget>();
         if (component != null && component2 != null)
         {
             int             add        = component.depth - component2.depth;
             DepthController component3 = guimonsterIcon.gameObject.GetComponent <DepthController>();
             component3.AddWidgetDepth(guimonsterIcon.transform, add);
         }
         this.goMN_ICON.SetActive(false);
         this.isUpdateMIcon = true;
     }
 }
Ejemplo n.º 26
0
    private void ShowNextMonsterIcon()
    {
        Transform transform = this.goMONS_NEXT.transform;

        this.csNextMons = GUIMonsterIcon.MakePrefabByMonsterData(this.data.md_next, transform.localScale, transform.localPosition, transform.parent, true, false);
        this.goMONS_NEXT.SetActive(false);
        if (!MonsterPicturebookData.ExistPicturebook(this.data.md_next.monsterMG.monsterCollectionId))
        {
            this.csNextMons.SortMess = StringMaster.GetString("EvolutionUnkown");
            this.csNextMons.SetSortMessageColor(this.iconTextColor);
        }
        this.csNextMons.SetTouchAct_L(new Action <MonsterData>(this.OnLongPushedMonsterIcon));
        UIWidget component  = this.goMONS_NEXT.GetComponent <UIWidget>();
        UIWidget component2 = this.csNextMons.gameObject.GetComponent <UIWidget>();

        if (component != null && component2 != null)
        {
            int             add        = component.depth - component2.depth;
            DepthController component3 = this.csNextMons.gameObject.GetComponent <DepthController>();
            component3.AddWidgetDepth(this.csNextMons.gameObject.transform, add);
        }
    }
Ejemplo n.º 27
0
    public void SetData(MonsterData monsterData)
    {
        this.goMN_DescriptionTXT.text = string.Format(StringMaster.GetString("CharaTapFriendshipUp"), monsterData.monsterMG.monsterName);
        this.monsterBasicInfo.SetMonsterData(monsterData);
        this.monsterStatusList.SetValues(monsterData, false, false);
        this.monsterMedalList.SetValues(monsterData.userMonster);
        Transform      transform      = this.goMN_ICON_NOW.transform;
        GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, transform.localScale, transform.localPosition, transform.parent, true, false);

        guimonsterIcon.Data = monsterData;
        guimonsterIcon.SetTouchAct_L(new Action <MonsterData>(this.ActMIconLong));
        UIWidget component  = this.goMN_ICON_NOW.GetComponent <UIWidget>();
        UIWidget component2 = guimonsterIcon.gameObject.GetComponent <UIWidget>();

        if (component != null && component2 != null)
        {
            int             add        = component.depth - component2.depth;
            DepthController component3 = guimonsterIcon.gameObject.GetComponent <DepthController>();
            component3.AddWidgetDepth(guimonsterIcon.transform, add);
        }
        this.goMN_ICON_NOW.SetActive(false);
    }
 private void SetSelectedChar()
 {
     if (CMD_ChangeMonster.SelectMonsterData != null)
     {
         Transform      transform      = this.goMN_ICON_NOW.transform;
         GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(CMD_ChangeMonster.SelectMonsterData, transform.localScale, transform.localPosition, transform.parent, true, false);
         this.goMN_ICON_NOW_2 = guimonsterIcon.gameObject;
         this.goMN_ICON_NOW_2.SetActive(true);
         guimonsterIcon.Data = CMD_ChangeMonster.SelectMonsterData;
         guimonsterIcon.SetTouchAct_L(new Action <MonsterData>(this.ActMIconLong));
         UIWidget component  = this.goMN_ICON_NOW.GetComponent <UIWidget>();
         UIWidget component2 = guimonsterIcon.gameObject.GetComponent <UIWidget>();
         if (null != component && null != component2)
         {
             int             add        = component.depth - component2.depth;
             DepthController component3 = guimonsterIcon.gameObject.GetComponent <DepthController>();
             component3.AddWidgetDepth(guimonsterIcon.transform, add);
         }
         this.goMN_ICON_NOW.SetActive(false);
         guimonsterIcon.Gimmick = ExtraEffectUtil.IsExtraEffectMonster(CMD_ChangeMonster.SelectMonsterData, this.effectArray);
     }
 }
Ejemplo n.º 29
0
    private void SetSelectedCharChg()
    {
        if (this.DataChg != null)
        {
            if (this.goLeftLargeMonsterIcon != null)
            {
                UnityEngine.Object.Destroy(this.goLeftLargeMonsterIcon);
            }
            if (this.goMN_ICON_CHG == null)
            {
                return;
            }
            Transform transform = this.goMN_ICON_CHG.transform;
            this.leftLargeMonsterIcon   = GUIMonsterIcon.MakePrefabByMonsterData(this.DataChg, transform.localScale, transform.localPosition, transform.parent, true, false);
            this.goLeftLargeMonsterIcon = this.leftLargeMonsterIcon.gameObject;
            this.goLeftLargeMonsterIcon.SetActive(true);
            this.leftLargeMonsterIcon.Data = this.DataChg;
            this.chipBaseSelect.SetSelectedCharChg(this.DataChg);
            GUIMonsterIcon icon = ClassSingleton <GUIMonsterIconList> .Instance.GetIcon(this.DataChg);

            this.iconGrayOut.SetSelect(icon);
            this.iconGrayOut.SelectIcon(this.leftLargeMonsterIcon);
            this.leftLargeMonsterIcon.SetTouchAct_L(new Action <MonsterData>(this.ActMIconLong));
            this.leftLargeMonsterIcon.Lock = this.DataChg.userMonster.IsLocked;
            UIWidget component  = this.goMN_ICON_CHG.GetComponent <UIWidget>();
            UIWidget component2 = this.leftLargeMonsterIcon.gameObject.GetComponent <UIWidget>();
            if (component != null && component2 != null)
            {
                int             add        = component.depth - component2.depth;
                DepthController component3 = this.leftLargeMonsterIcon.gameObject.GetComponent <DepthController>();
                component3.AddWidgetDepth(this.leftLargeMonsterIcon.transform, add);
            }
            this.goMN_ICON_CHG.SetActive(false);
            this.ShowChgInfo();
        }
    }
Ejemplo n.º 30
0
    public void SetDetail(GameWebAPI.RespDataMS_EventExchangeInfoLogic.Result.Detail exchangeInfo, int selectItemNum, Action <ExchangeItem> touchEvent)
    {
        this.onPushedButton = touchEvent;
        GUICollider component = this.pushedButton.GetComponent <GUICollider>();

        component.onTouchEnded += delegate(Touch touch, Vector2 pos, bool flag)
        {
            this.onPushedButton(this);
        };
        this.selectNum = selectItemNum;
        int.TryParse(exchangeInfo.eventExchangeDetailId, out this.exchangeDetailId);
        this.exchangeItemData = exchangeInfo.item;
        string text  = string.Empty;
        string value = string.Empty;

        this.exchangeInfoData = exchangeInfo;
        this.viewIcon.gameObject.SetActive(true);
        this.viewIconTexture.gameObject.SetActive(false);
        GameWebAPI.RespDataMA_GetAssetCategoryM.AssetCategoryM assetCategory = MasterDataMng.Instance().RespDataMA_AssetCategoryM.GetAssetCategory(exchangeInfo.assetCategoryId);
        string text2 = string.Empty;

        if (assetCategory != null)
        {
            text2 = assetCategory.assetTitle;
        }
        this.exchangeDetailCategoryID = exchangeInfo.assetCategoryId;
        MasterDataMng.AssetCategory assetCategory2 = (MasterDataMng.AssetCategory) int.Parse(exchangeInfo.assetCategoryId);
        this.numCountLabel.text = "1";
        switch (assetCategory2)
        {
        case MasterDataMng.AssetCategory.MONSTER:
        {
            text = string.Empty;
            if (this.micon != null)
            {
                UnityEngine.Object.Destroy(this.micon.gameObject);
            }
            this.viewIcon.gameObject.SetActive(false);
            MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(exchangeInfo.assetValue);
            this.exchangeDetailName = monsterData.monsterMG.monsterName;
            this.micon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, new Vector3(1f, 1f, 1f), new Vector3(-165f, 25f, 0f), this.iconRoot.transform, true, false);
            UIWidget component2 = base.gameObject.GetComponent <UIWidget>();
            if (component2 != null)
            {
                DepthController component3 = this.micon.GetComponent <DepthController>();
                if (component3 != null)
                {
                    component3.AddWidgetDepth(this.micon.transform, component2.depth + 10);
                }
            }
            this.micon.GetDepthController();
            BoxCollider component4 = this.micon.gameObject.GetComponent <BoxCollider>();
            if (component4 != null)
            {
                component4.enabled = false;
            }
            break;
        }

        case MasterDataMng.AssetCategory.DIGI_STONE:
            text = "Common02_LB_Stone";
            this.exchangeDetailName = text2;
            break;

        case MasterDataMng.AssetCategory.LINK_POINT:
            text = "Common02_LB_Link";
            this.exchangeDetailName = text2;
            break;

        case MasterDataMng.AssetCategory.TIP:
            text = "Common02_LB_Chip";
            this.exchangeDetailName = text2;
            break;

        default:
            switch (assetCategory2)
            {
            case MasterDataMng.AssetCategory.MEAT:
                text = "Common02_item_meat";
                this.exchangeDetailName = text2;
                goto IL_567;

            case MasterDataMng.AssetCategory.SOUL:
            {
                this.exchangeDetailName = text2;
                GameWebAPI.RespDataMA_GetSoulM.SoulM soul = MasterDataMng.Instance().RespDataMA_SoulM.GetSoul(exchangeInfo.assetValue);
                value = soul.soulName;
                this.viewIconTexture.gameObject.SetActive(true);
                string evolveItemIconPathByID = ClassSingleton <EvolutionData> .Instance.GetEvolveItemIconPathByID(exchangeInfo.assetValue);

                NGUIUtil.ChangeUITextureFromFile(this.viewIconTexture, evolveItemIconPathByID, false);
                this.viewIcon.gameObject.SetActive(false);
                goto IL_567;
            }

            case MasterDataMng.AssetCategory.FACILITY_KEY:
            {
                this.viewIconTexture.gameObject.SetActive(true);
                this.viewIcon.gameObject.SetActive(false);
                FacilityConditionM[] facilityCondition         = FarmDataManager.GetFacilityCondition(exchangeInfo.assetValue);
                FacilityConditionM   facilityConditionM        = facilityCondition.FirstOrDefault((FacilityConditionM x) => int.Parse(x.conditionType) == 1);
                FacilityM            facilityMasterByReleaseId = FarmDataManager.GetFacilityMasterByReleaseId(facilityConditionM.releaseId);
                NGUIUtil.ChangeUITextureFromFile(this.viewIconTexture, facilityMasterByReleaseId.GetIconPath(), false);
                FacilityKeyM facilityKeyMaster = FarmDataManager.GetFacilityKeyMaster(exchangeInfo.assetValue);
                if (facilityKeyMaster != null)
                {
                    this.exchangeDetailName = facilityKeyMaster.facilityKeyName;
                }
                goto IL_567;
            }

            case MasterDataMng.AssetCategory.CHIP:
            {
                GameWebAPI.RespDataMA_ChipM.Chip chipMainData = ChipDataMng.GetChipMainData(exchangeInfo.assetValue);
                ChipDataMng.MakePrefabByChipData(chipMainData, this.viewIcon.gameObject, this.viewIcon.gameObject.transform.localPosition, this.viewIcon.gameObject.transform.localScale, null, 128, 128, false);
                this.exchangeDetailName = chipMainData.name;
                this.viewIcon.gameObject.SetActive(false);
                goto IL_567;
            }

            case MasterDataMng.AssetCategory.DUNGEON_TICKET:
            {
                this.viewIconTexture.gameObject.SetActive(true);
                this.viewIcon.gameObject.SetActive(false);
                GameWebAPI.RespDataMA_DungeonTicketMaster.DungeonTicketM dungeonTicketM = MasterDataMng.Instance().RespDataMA_DungeonTicketMaster.dungeonTicketM.FirstOrDefault((GameWebAPI.RespDataMA_DungeonTicketMaster.DungeonTicketM x) => exchangeInfo.assetValue == x.dungeonTicketId);
                if (dungeonTicketM != null)
                {
                    global::Debug.Log(dungeonTicketM.img);
                    NGUIUtil.ChangeUITextureFromFile(this.viewIconTexture, dungeonTicketM.img, false);
                    this.exchangeDetailName = dungeonTicketM.name;
                }
                goto IL_567;
            }
            }
            text = string.Empty;
            this.exchangeDetailName = StringMaster.GetString("Present-10");
            break;

        case MasterDataMng.AssetCategory.ITEM:
        {
            GameWebAPI.RespDataMA_GetItemM.ItemM itemM = MasterDataMng.Instance().RespDataMA_ItemM.GetItemM(exchangeInfo.assetValue);
            if (itemM != null)
            {
                this.exchangeDetailName = itemM.name;
                this.viewIconTexture.gameObject.SetActive(true);
                this.viewIcon.gameObject.SetActive(false);
                string largeImagePath = itemM.GetLargeImagePath();
                NGUIUtil.ChangeUITextureFromFile(this.viewIconTexture, largeImagePath, false);
            }
            break;
        }
        }
IL_567:
        if (!string.IsNullOrEmpty(text) && assetCategory2 != MasterDataMng.AssetCategory.MONSTER)
        {
            this.viewIcon.spriteName = text;
        }
        if (assetCategory2 == MasterDataMng.AssetCategory.TIP)
        {
            this.exchangeDetailNum = StringFormat.Cluster(exchangeInfo.assetNum);
        }
        else
        {
            this.exchangeDetailNum = exchangeInfo.assetNum;
        }
        if (assetCategory2 != MasterDataMng.AssetCategory.MONSTER)
        {
            this.titleLabel.text = string.Format(StringMaster.GetString("SystemItemCount"), this.exchangeDetailName, this.exchangeDetailNum);
        }
        else
        {
            this.titleLabel.text = this.exchangeDetailName;
        }
        if (!string.IsNullOrEmpty(value))
        {
            this.exchangeDetailName = value;
        }
        this.exchangeConsumeNum = exchangeInfo.needNum;
        this.buildNumLabel.text = this.exchangeConsumeNum;
        this.ExchangeIconSet(exchangeInfo);
        this.ResetNum(exchangeInfo);
        this.SetButton(exchangeInfo);
        this.ShowGUI();
    }