コード例 #1
0
    private void GoodsOperateSmeltHandle(INotifyArgs inotifyArgs)
    {
        SMsgGoodsOperateEquipmentStrength_SC sMsgGoodsOperateEquipmentStrength_SC = (SMsgGoodsOperateEquipmentStrength_SC)inotifyArgs;

        GameObject eff = null;

        if (sMsgGoodsOperateEquipmentStrength_SC.bySucess == 0)
        {
            //失败
            SoundManager.Instance.PlaySoundEffect("Sound_UIEff_Equipment_Fail");
            eff = m_currStrenghType == PackBtnType.Strength?StrengthFailedEff:StarUpgradeFailedEff;
        }
        else
        {
            //成功
            SoundManager.Instance.PlaySoundEffect("Sound_UIEff_Equipment_Success");
            m_equipListBehaviour.StrenAndStarUpgradeSuccess();
            eff = m_currStrenghType == PackBtnType.Strength?StrengthSuccessEff:StarUpgradeSuccessEff;
            if (m_currStrenghType == PackBtnType.StarUpgrade)
            {
                var starUpgradePos = m_equipListBehaviour.CurrrEquipDetails.m_equipItemMainProperty.StarLev.transform.position;
                StartCoroutine(GoodsOperateSmeltEff(StrengthUpgradeEff, starUpgradePos));
            }
        }
        StartCoroutine(GoodsOperateSmeltEff(eff, null));

        var byStrengthType = (Equipment_Strength_Type)sMsgGoodsOperateEquipmentStrength_SC.byStrengthType;

        TraceUtil.Log(SystemModel.Rocky, (byStrengthType == Equipment_Strength_Type.EQUIPMENT_NORMAL_STRENGTH_TYPE?"普通强化返回":"星阶升级返回") + sMsgGoodsOperateEquipmentStrength_SC.bySucess.ToString());
    }
コード例 #2
0
    /// <summary>
    /// S发送强化应答给C
    /// </summary>
    /// <param name="dataBuffer"></param>
    /// <param name="socketID"></param>
    /// <returns></returns>
    CommandCallbackType ReceiveGoodsOperate_SmeltCommand(byte[] dataBuffer, int socketID)
    {
        var sMsgGoodsOperateEquipmentStrength_SC = SMsgGoodsOperateEquipmentStrength_SC.ParseResultPackage(dataBuffer);

        RaiseEvent(EventTypeEnum.GoodsOperateSmelt.ToString(), sMsgGoodsOperateEquipmentStrength_SC);
        return(CommandCallbackType.Continue);
    }
コード例 #3
0
    public byte bySucess;                    //强化是否成功(0表示失败,1表示成功)
    public static SMsgGoodsOperateEquipmentStrength_SC ParseResultPackage(byte[] pkgData)
    {
        var entity = new SMsgGoodsOperateEquipmentStrength_SC();

        entity.byStrengthType = pkgData[0];
        entity.bySucess       = pkgData[1];
        return(entity);
    }
コード例 #4
0
    /// <summary>
    /// 升星强化成功
    /// </summary>
    /// <param name="inotifyArgs">Inotify arguments.</param>
    private void GoodsOperateSmeltHandle(INotifyArgs inotifyArgs)
    {
        SMsgGoodsOperateEquipmentStrength_SC sMsgGoodsOperateEquipmentStrength_SC = (SMsgGoodsOperateEquipmentStrength_SC)inotifyArgs;

        m_isStrengthBack = true;
        GameObject eff = null;

        if (sMsgGoodsOperateEquipmentStrength_SC.bySucess == 0)
        {
            //失败
            SoundManager.Instance.PlaySoundEffect("Sound_UIEff_Equipment_Fail");
            if (EquipmentUpgradeDataManger.Instance.CurrentType == UpgradeType.Strength)
            {
                eff = StrengthFailedEff;
            }
            else
            {
                eff = StarUpgradeFailedEff;
            }
        }
        else
        {
            ContainerInfomanager.Instance.CheckShowEquipmentEff();
            SoundManager.Instance.PlaySoundEffect("Sound_UIEff_Equipment_Success");
            if (EquipmentUpgradeDataManger.Instance.CurrentType == UpgradeType.Strength)
            {
                eff = StrengthSuccessEff;
            }
            else
            {
                eff = StarUpgradeSuccessEff;
            }
            RefreshEachListItem();
        }
        eff.SetActive(true);
        var byStrengthType = (Equipment_Strength_Type)sMsgGoodsOperateEquipmentStrength_SC.byStrengthType;

        Point_Eff.ClearChild();
        StartCoroutine(GoodsOperateSmeltEff(eff, null));
        TraceUtil.Log(SystemModel.Rocky, (byStrengthType == Equipment_Strength_Type.EQUIPMENT_NORMAL_STRENGTH_TYPE?"普通强化返回":"星阶升级返回") + sMsgGoodsOperateEquipmentStrength_SC.bySucess.ToString());
    }