public override void Initialize()
 {
     tabIndex   = 0;
     resultData = (SmithManager.ResultData)GameSection.GetEventData();
     type       = EquipDialogType.RESULT;
     base.Initialize();
 }
    protected override void Send()
    {
        SmithManager.ResultData result_data = new SmithManager.ResultData();
        GameSection.SetEventData(result_data);
        GameSection.StayEvent();
        MonoBehaviourSingleton <SmithManager> .I.SendCreateEquipItem(GetCreateEquiptableID(), delegate(Error err, EquipItemInfo create_item)
        {
            switch (err)
            {
            case Error.None:
                result_data.itemData = create_item;
                MonoBehaviourSingleton <UIAnnounceBand> .I.isWait = true;
                GameSection.ResumeEvent(true, null);
                break;

            case Error.WRN_SMITH_OVER_EQUIP_ITEM_NUM:
                GameSection.ChangeStayEvent("CREATE_OVER_EQUIP", null);
                GameSection.ResumeEvent(true, null);
                break;

            default:
                GameSection.ResumeEvent(false, null);
                break;
            }
        });
    }
 public override void Initialize()
 {
     //IL_0057: Unknown result type (might be due to invalid IL or missing references)
     object[] array = GameSection.GetEventData() as object[];
     resultData = (array[0] as SmithManager.ResultData);
     isGreat    = (bool)array[1];
     materials  = (array[2] as SkillItemInfo[]);
     isExceed   = (bool)array[3];
     SetToggle((Enum)UI.TGL_DIRECTION, true);
     this.StartCoroutine(DoInitialize());
 }
    private void OnQuery_SmithExceedConfirm_YES()
    {
        if (smithData == null)
        {
            GameSection.StopEvent();
        }
        else
        {
            EquipItemInfo selectEquipData = smithData.selectEquipData;
            if (selectEquipData == null)
            {
                GameSection.StopEvent();
            }
            else
            {
                SmithManager.ResultData result_data = new SmithManager.ResultData();
                result_data.beforeRarity    = (int)selectEquipData.tableData.rarity;
                result_data.beforeLevel     = selectEquipData.level;
                result_data.beforeMaxLevel  = selectEquipData.tableData.maxLv;
                result_data.beforeExceedCnt = selectEquipData.exceed;
                result_data.beforeAtk       = selectEquipData.atk;
                result_data.beforeDef       = selectEquipData.def;
                result_data.beforeHp        = selectEquipData.hp;
                result_data.beforeElemAtk   = selectEquipData.elemAtk;
                result_data.beforeElemDef   = selectEquipData.elemDef;
                result_data.isExceed        = true;
                EquipItemExceedTable.EquipItemExceedData equipItemExceedDataIncludeLimited = Singleton <EquipItemExceedTable> .I.GetEquipItemExceedDataIncludeLimited(selectEquipData.tableData);

                if (equipItemExceedDataIncludeLimited == null || equipItemExceedDataIncludeLimited.exceed.Length - 1 < selectIndex)
                {
                    GameSection.StopEvent();
                }
                else
                {
                    uint itemId = equipItemExceedDataIncludeLimited.exceed[selectIndex].itemId;
                    GameSection.StayEvent();
                    MonoBehaviourSingleton <SmithManager> .I.SendExceedEquipItem(selectEquipData.uniqueID, itemId, delegate(Error err, EquipItemInfo exceed_equip_item)
                    {
                        bool flag = err == Error.None;
                        GameSection.ResumeEvent(flag, null);
                        if (flag)
                        {
                            result_data.itemData = exceed_equip_item;
                            GameSection.SetEventData(result_data);
                        }
                    });
                }
            }
        }
    }
Пример #5
0
 private SmithManager.ResultData CreateResultData()
 {
     SmithManager.ResultData resultData = new SmithManager.ResultData();
     resultData.beforeRarity    = (int)itemInfo.tableData.rarity;
     resultData.beforeLevel     = itemInfo.level;
     resultData.beforeMaxLevel  = itemInfo.tableData.maxLv;
     resultData.beforeExceedCnt = itemInfo.exceed;
     resultData.beforeAtk       = itemInfo.atk;
     resultData.beforeDef       = itemInfo.def;
     resultData.beforeHp        = itemInfo.hp;
     resultData.beforeElemAtk   = itemInfo.elemAtk;
     resultData.beforeElemDef   = itemInfo.elemDef;
     return(resultData);
 }
Пример #6
0
    protected override void Send()
    {
        SmithManager.SmithGrowData smithData = MonoBehaviourSingleton <SmithManager> .I.GetSmithData <SmithManager.SmithGrowData>();

        if (smithData == null)
        {
            GameSection.StopEvent();
        }
        else
        {
            EquipItemInfo selectEquipData = smithData.selectEquipData;
            if (selectEquipData == null)
            {
                GameSection.StopEvent();
            }
            else
            {
                SmithManager.ResultData result_data = new SmithManager.ResultData();
                result_data.beforeRarity    = (int)selectEquipData.tableData.rarity;
                result_data.beforeLevel     = selectEquipData.level;
                result_data.beforeMaxLevel  = selectEquipData.tableData.maxLv;
                result_data.beforeExceedCnt = selectEquipData.exceed;
                result_data.beforeAtk       = selectEquipData.atk;
                result_data.beforeDef       = selectEquipData.def;
                result_data.beforeHp        = selectEquipData.hp;
                result_data.beforeElemAtk   = selectEquipData.elemAtk;
                result_data.beforeElemDef   = selectEquipData.elemDef;
                GameSection.SetEventData(result_data);
                isNotifySelfUpdate = true;
                GameSection.StayEvent();
                MonoBehaviourSingleton <SmithManager> .I.SendGrowEquipItem(selectEquipData.uniqueID, aimLv, delegate(Error err, EquipItemInfo grow_item)
                {
                    if (err == Error.None)
                    {
                        aimLv = grow_item.level + 1;
                        result_data.itemData = grow_item;
                        MonoBehaviourSingleton <UIAnnounceBand> .I.isWait = true;
                        GameSection.ResumeEvent(true, null);
                    }
                    else
                    {
                        isNotifySelfUpdate = false;
                        GameSection.ResumeEvent(false, null);
                    }
                });
            }
        }
    }
    public override void Initialize()
    {
        //IL_009b: Unknown result type (might be due to invalid IL or missing references)
        object[] array = GameSection.GetEventData() as object[];
        resultData = (SmithManager.ResultData)array[0];
        isGreat    = (bool)array[1];
        isExceed   = (bool)array[2];
        SkillItemInfo skillItemInfo = resultData.itemData as SkillItemInfo;

        if (isExceed && resultData.beforeExceedCnt < skillItemInfo.exceedCnt)
        {
            isPlayExceedAnimation = true;
        }
        GameSection.SetEventData(new object[2]
        {
            ItemDetailEquip.CURRENT_SECTION.UI_PARTS,
            resultData.itemData
        });
        this.StartCoroutine(DoInitialize());
    }
Пример #8
0
    protected override void Send()
    {
        SmithManager.SmithGrowData data = MonoBehaviourSingleton <SmithManager> .I.GetSmithData <SmithManager.SmithGrowData>();

        if (data == null)
        {
            GameSection.StopEvent();
        }
        else
        {
            SmithManager.ResultData result_data = new SmithManager.ResultData();
            GameSection.SetEventData(result_data);
            GameSection.StayEvent();
            MonoBehaviourSingleton <SmithManager> .I.SendEvolveEquipItem(data.evolveData.evolveBeforeEquipData.uniqueID, data.evolveData.GetEvolveTable().id, selectedUniqueIdList, delegate(Error err, EquipItemInfo evolve_item)
            {
                if (err == Error.None)
                {
                    result_data.itemData                 = evolve_item;
                    result_data.beforeRarity             = (int)data.evolveData.evolveBeforeEquipData.tableData.rarity;
                    result_data.beforeLevel              = data.evolveData.evolveBeforeEquipData.level;
                    result_data.beforeMaxLevel           = data.evolveData.evolveBeforeEquipData.tableData.maxLv;
                    result_data.beforeExceedCnt          = data.evolveData.evolveBeforeEquipData.exceed;
                    result_data.beforeAtk                = data.evolveData.evolveBeforeEquipData.atk;
                    result_data.beforeDef                = data.evolveData.evolveBeforeEquipData.def;
                    result_data.beforeHp                 = data.evolveData.evolveBeforeEquipData.hp;
                    result_data.beforeElemAtk            = data.evolveData.evolveBeforeEquipData.elemAtk;
                    result_data.beforeElemDef            = data.evolveData.evolveBeforeEquipData.elemDef;
                    SmithManager.SmithGrowData smithData = MonoBehaviourSingleton <SmithManager> .I.GetSmithData <SmithManager.SmithGrowData>();
                    smithData.selectEquipData            = evolve_item;
                    MonoBehaviourSingleton <SmithManager> .I.CreateLocalInventory();
                    MonoBehaviourSingleton <UIAnnounceBand> .I.isWait = true;
                    GameSection.ResumeEvent(true, null);
                }
                else
                {
                    GameSection.ResumeEvent(false, null);
                }
            });
        }
    }
Пример #9
0
 private void OnQuery_SmithShadowEvolveConfirm_YES()
 {
     SmithManager.ResultData result_data = CreateResultData();
     GameSection.SetEventData(result_data);
     GameSection.StayEvent();
     MonoBehaviourSingleton <SmithManager> .I.SendShadowEvolveEquipItem(itemInfo.uniqueID, createData.needMaterial[0].itemID, delegate(Error error, EquipItemInfo info)
     {
         if (error == Error.None)
         {
             result_data.itemData = info;
             SmithManager.SmithGrowData smithData = MonoBehaviourSingleton <SmithManager> .I.GetSmithData <SmithManager.SmithGrowData>();
             smithData.selectEquipData            = info;
             MonoBehaviourSingleton <SmithManager> .I.CreateLocalInventory();
             MonoBehaviourSingleton <UIAnnounceBand> .I.isWait = true;
             GameSection.ResumeEvent(true, null);
         }
         else
         {
             GameSection.ResumeEvent(false, null);
         }
     });
 }
Пример #10
0
    private void OnQuery_DECISION()
    {
        StringBuilder stringBuilder = new StringBuilder();

        if (isRareConfirm || isEquipConfirm || isExceedConfirm)
        {
            stringBuilder.Append("[BB]");
            stringBuilder.AppendLine(base.sectionData.GetText("TEXT_INCLUDE_CONFIRM"));
            if (isRareConfirm)
            {
                stringBuilder.AppendLine(base.sectionData.GetText("TEXT_INCLUDE_RARE"));
            }
            if (isEquipConfirm)
            {
                stringBuilder.AppendLine(base.sectionData.GetText("TEXT_INCLUDE_EQUIP"));
            }
            if (isExceedConfirm)
            {
                stringBuilder.AppendLine(base.sectionData.GetText("TEXT_INCLUDE_EXCEED"));
            }
            stringBuilder.AppendLine(string.Empty);
            stringBuilder.Append(base.sectionData.GetText("TEXT_GROW_CONFIRM"));
            GameSection.ChangeEvent("INCLUDE_RARE", stringBuilder.ToString());
        }
        else
        {
            GameSection.StayEvent();
            if (isExceed)
            {
                MonoBehaviourSingleton <SmithManager> .I.SendExceedSkill(baseSkill, material, delegate(SkillItemInfo ret_skill_item, bool isGreat)
                {
                    if (ret_skill_item != null)
                    {
                        SmithManager.ResultData resultData2 = new SmithManager.ResultData
                        {
                            itemData        = ret_skill_item,
                            beforeRarity    = baseSkill.tableData.rarity,
                            beforeMaxLevel  = baseSkill.tableData.GetMaxLv(ret_skill_item.exceedCnt),
                            beforeExceedCnt = baseSkill.exceedCnt,
                            beforeLevel     = baseSkill.level,
                            beforeExp       = baseSkill.exp,
                            beforeAtk       = baseSkill.atk,
                            beforeDef       = baseSkill.def,
                            beforeHp        = baseSkill.hp,
                            beforeElemAtk   = baseSkill.elemAtk,
                            beforeElemDef   = baseSkill.elemDef
                        };
                        GameSection.ChangeStayEvent("DECISION", new object[4]
                        {
                            resultData2,
                            isGreat,
                            material,
                            isExceed
                        });
                        MonoBehaviourSingleton <UIAnnounceBand> .I.isWait = true;
                        GameSection.ResumeEvent(true, null);
                    }
                    else
                    {
                        GameSection.ResumeEvent(false, null);
                    }
                });
            }
            else
            {
                MonoBehaviourSingleton <SmithManager> .I.SendGrowSkill(baseSkill, material, delegate(SkillItemInfo ret_skill_item, bool is_great)
                {
                    if (ret_skill_item != null)
                    {
                        SmithManager.ResultData resultData = new SmithManager.ResultData
                        {
                            itemData        = ret_skill_item,
                            beforeRarity    = baseSkill.tableData.rarity,
                            beforeMaxLevel  = baseSkill.tableData.GetMaxLv(ret_skill_item.exceedCnt),
                            beforeExceedCnt = baseSkill.exceedCnt,
                            beforeLevel     = baseSkill.level,
                            beforeExp       = baseSkill.exp,
                            beforeAtk       = baseSkill.atk,
                            beforeDef       = baseSkill.def,
                            beforeHp        = baseSkill.hp,
                            beforeElemAtk   = baseSkill.elemAtk,
                            beforeElemDef   = baseSkill.elemDef
                        };
                        GameSection.ChangeStayEvent("DECISION", new object[4]
                        {
                            resultData,
                            is_great,
                            material,
                            isExceed
                        });
                        MonoBehaviourSingleton <UIAnnounceBand> .I.isWait = true;
                        GameSection.ResumeEvent(true, null);
                    }
                    else
                    {
                        GameSection.ResumeEvent(false, null);
                    }
                });
            }
        }
    }