Esempio n. 1
0
        // Token: 0x0600FBB7 RID: 64439 RVA: 0x00422F8C File Offset: 0x0042118C
        private void EquipmentDepotUIController_OnEquipmentWear(int heroId, ulong instanceId, int slot)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_EquipmentDepotUIController_OnEquipmentWearInt32UInt64Int32_hotfix != null)
            {
                this.m_EquipmentDepotUIController_OnEquipmentWearInt32UInt64Int32_hotfix.call(new object[]
                {
                    this,
                    heroId,
                    instanceId2,
                    slot2
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            int   slot                 = slot2;
            ulong instanceId           = instanceId2;
            EquipmentDepotUITask $this = this;
            EquipmentWearNetTask equipmentWearNetTask = new EquipmentWearNetTask(heroId, instanceId);

            equipmentWearNetTask.EventOnStop += delegate(Task task)
            {
                EquipmentWearNetTask equipmentWearNetTask2 = task as EquipmentWearNetTask;
                if (equipmentWearNetTask2.Result == 0)
                {
                    $this.m_slot       = slot;
                    $this.m_instanceId = instanceId;
                    $this.EquipmentDepotUIController_OnReturn();
                }
                else
                {
                    CommonUIController.Instance.ShowErrorMessage(equipmentWearNetTask2.Result, 2f, null, true);
                }
            };
            equipmentWearNetTask.Start(null);
        }
Esempio n. 2
0
        // Token: 0x0600FBB9 RID: 64441 RVA: 0x00423124 File Offset: 0x00421324
        private void EquipmentDepotUIController_OnEquipmentTakeOff(int heroId, int slot, Action OnEnd)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_EquipmentDepotUIController_OnEquipmentTakeOffInt32Int32Action_hotfix != null)
            {
                this.m_EquipmentDepotUIController_OnEquipmentTakeOffInt32Int32Action_hotfix.call(new object[]
                {
                    this,
                    heroId,
                    slot,
                    OnEnd2
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            Action OnEnd = OnEnd2;
            EquipmentDepotUITask    $this = this;
            EquipmentTakeOffNetTask equipmentTakeOffNetTask = new EquipmentTakeOffNetTask(heroId, slot);

            equipmentTakeOffNetTask.EventOnStop += delegate(Task task)
            {
                EquipmentTakeOffNetTask equipmentTakeOffNetTask2 = task as EquipmentTakeOffNetTask;
                if (equipmentTakeOffNetTask2.Result == 0)
                {
                    if (OnEnd != null)
                    {
                        OnEnd();
                    }
                    else
                    {
                        $this.EquipmentDepotUIController_OnReturn();
                    }
                }
                else
                {
                    CommonUIController.Instance.ShowErrorMessage(equipmentTakeOffNetTask2.Result, 2f, null, true);
                }
            };
            equipmentTakeOffNetTask.Start(null);
        }