Beispiel #1
0
    void QuickEquipStrength(PackBtnType packBtnType)
    {
        var m_isConsumeEnough = m_equipListBehaviour.CurrrEquipDetails.m_equipStrenUpgradeProperty.EnoughToStren;

        if (true)
        {
            if (m_isConsumeEnough)
            {
                ItemFielInfo selectedEquip      = m_equipListBehaviour.CurrrEquipDetails.CurrItemFielInfo;
                var          playerLv           = PlayerManager.Instance.FindHeroDataModel().UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_LEVEL;
                var          wantedStrengthenLv = packBtnType == PackBtnType.QuickStrengthen?
                                                  selectedEquip.equipmentEntity.EQUIP_FIELD_STRONGE_LEVEL + 1
                        :selectedEquip.equipmentEntity.EQUIP_FIELD_START_LEVEL + 1;
                if (playerLv < wantedStrengthenLv)
                {
                    //                  IDS_I3_55   强化等级不能高于自身等级。
                    //                      IDS_I3_56   星阶等级不能高于自身等级。
                    string tipsIDS = packBtnType == PackBtnType.QuickStrengthen?"IDS_I3_55":"IDS_I3_56";
                    MessageBox.Instance.ShowTips(3, LanguageTextManager.GetString(tipsIDS), 1);
                }
                else
                {
                    var byStrengthType = (byte)((packBtnType == PackBtnType.QuickStrengthen)?Equipment_Strength_Type.EQUIPMENT_NORMAL_STRENGTH_TYPE:Equipment_Strength_Type.EQUIPMENT_START_STRENGTH_TYPE);

                    SGoodsOperateQuickSmelt_CS sGoodsOperateQuickSmelt_CS = new SGoodsOperateQuickSmelt_CS();
                    sGoodsOperateQuickSmelt_CS.byStrengthType = byStrengthType;
                    sGoodsOperateQuickSmelt_CS.dGoodsID       = (uint)selectedEquip.LocalItemData._goodID;
                    sGoodsOperateQuickSmelt_CS.uidGoods       = selectedEquip.equipmentEntity.SMsg_Header.uidEntity;
                    NetServiceManager.Instance.EquipStrengthenService.SendGoodsOperateQuickSmeltCommand(sGoodsOperateQuickSmelt_CS);
                    m_isStrengthBack  = false;
                    m_currStrenghType = packBtnType;
                }
            }
            else
            {
                //Tips系统  提示  升星 "材料不足"  / 强化 到快速购买
                if (packBtnType == PackBtnType.QuickUpgradeStar)
                {
                    MessageBox.Instance.ShowTips(3, LanguageTextManager.GetString("IDS_I3_54"), 1);
                }
                else
                {
//                    MessageBox.Instance.Show(1,"", LanguageTextManager.GetString("IDS_I3_50"),LanguageTextManager.GetString("IDS_I3_44"),LanguageTextManager.GetString("IDS_I3_61")
//                                             ,()=>{SoundManager.Instance.PlaySoundEffect("Sound_Button_Equipment_Cancel");MessageBox.Instance.CloseMsgBox();}
//                    ,()=>{SoundManager.Instance.PlaySoundEffect("Sound_Button_Equipment_Confirm");
//                        //TODO  打开快速购买界面
//                    });
                    MessageBox.Instance.ShowNotEnoughMoneyMsg(() => { SoundManager.Instance.PlaySoundEffect("Sound_Button_Equipment_Cancel"); MessageBox.Instance.CloseMsgBox(); });
                }
            }
        }
    }
Beispiel #2
0
    /// <summary>
    /// 发送装备强化十次指令
    /// </summary>
    /// <param name="sMsgGoodsOperateEquipmentStrength"></param>
    public void SendGoodsOperateQuickSmeltCommand(SGoodsOperateQuickSmelt_CS sGoodsOperateQuickSmelt_CS)
    {
        Package pkg = sGoodsOperateQuickSmelt_CS.GeneratePackage();

        this.Request(pkg);
    }