少年修仙传客户端代码仓库
client_Zxw
2018-11-22 b2924946e3929e21eaac25ab6d84c3d9f173facb
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
7个文件已修改
209 ■■■■■ 已修改文件
Core/SDK/SDKUtility.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/ClientVersion/VersionConfig.cs 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/ClientVersion/VersionUtility.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Login/LoginModel.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Strengthening/EquipReinforceWin.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Strengthening/EquipWashModel.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Strengthening/WashTips.cs 110 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/SDK/SDKUtility.cs
@@ -28,6 +28,16 @@
    public E_ChannelPlatform ChannelPlatform { get; set; }
    public static string Yj_AppID
    {
        get; private set;
    }
    public static string Yj_SpID
    {
        get; private set;
    }
    /// <summary>
    /// sdk初始化是否完成标识
    /// 客户端一般需要等待这个值为true才继续逻辑
@@ -98,6 +108,8 @@
    public void Init()
    {
        Yj_AppID = string.Empty;
        Yj_SpID = string.Empty;
        RegistrationID = string.Empty;
        AssetCopyFinished = false;
        ChannelPlatform = E_ChannelPlatform.Free;
@@ -402,9 +414,21 @@
                        else if (_channelPlatform.Equals("yj"))
                        {
                            ChannelPlatform = E_ChannelPlatform.Yj;
                        }
                    }
                }
                if (_dict.Contains("yj_appid"))
                {
                    Yj_AppID = _json["yj_appid"].ToString();
                }
                if (_dict.Contains("yj_spid"))
                {
                    Yj_SpID = _json["yj_spid"].ToString();
                }
                break;
            case CodeA2U.PushClientID:
                RegistrationID = _json["clientID"].ToString();
@@ -628,7 +652,6 @@
    public UnityAction onFreePlatformPayCancel;
    public UnityAction onFreePlatformBindOk;
    public UnityAction onFreePlatformBindFail;
    public class FP_LoginOk
    {
        public string account;
@@ -935,16 +958,6 @@
        if (_iDict.Contains("timeStamp"))
        {
            FreePlatformInfo.timeStamp = (string)json["timeStamp"];
        }
        if (_iDict.Contains("yjSdkId"))
        {
            FreePlatformInfo.yjSdkId = (string)json["yjSdkId"];
        }
        if (_iDict.Contains("yjAppId"))
        {
            FreePlatformInfo.yjAppId = (string)json["yjAppId"];
        }
        FreePlatformInfo.phone = 0;
System/ClientVersion/VersionConfig.cs
@@ -13,10 +13,30 @@
    public const string VERSION_ALTERNATIVE = "1.2.0";
    [SerializeField] public string m_AppId = string.Empty;
    public string appId { get { return m_AppId; } }
    public string appId
    {
        get
        {
            if (!string.IsNullOrEmpty(SDKUtility.Yj_AppID))
            {
                return SDKUtility.Yj_AppID;
            }
            return m_AppId;
        }
    }
    [SerializeField] public string m_SpID = string.Empty;
    public string SpID { get { return m_SpID; } }
    public string SpID
    {
        get
        {
            if (!string.IsNullOrEmpty(SDKUtility.Yj_SpID))
            {
                return SDKUtility.Yj_SpID;
            }
            return m_SpID;
        }
    }
    [SerializeField] VersionAuthority m_VersionAuthority;
    public VersionAuthority versionAuthority { get { return m_VersionAuthority; } }
@@ -28,8 +48,10 @@
    public string clientPackageFlag { get { return m_ClientPackageFlag; } }
    [SerializeField] int m_Branch = 0;
    public int branch {
        get {
    public int branch
    {
        get
        {
            if (DebugUtility.Instance.debugAccount && DebugUtility.Instance.debugBranch >= 0)
            {
                return DebugUtility.Instance.debugBranch;
@@ -69,25 +91,29 @@
    public string appleDeveloperTeamID { get { return m_AppleDeveloperTeamID; } }
    [SerializeField] bool m_DebugVersion = false;
    public bool debugVersion {
    public bool debugVersion
    {
        get { return m_DebugVersion; }
        set { m_DebugVersion = value; }
    }
    [SerializeField] bool m_IsBanShu = false;
    public bool isBanShu {
    public bool isBanShu
    {
        get { return m_IsBanShu; }
        set { m_IsBanShu = value; }
    }
    [SerializeField] string m_BuildTime;
    public string buildTime {
    public string buildTime
    {
        get { return m_BuildTime; }
        set { m_BuildTime = value; }
    }
    [SerializeField] int m_BuildIndex;
    public int buildIndex {
    public int buildIndex
    {
        get { return m_BuildIndex; }
        set { m_BuildIndex = value; }
    }
System/ClientVersion/VersionUtility.cs
@@ -33,9 +33,11 @@
    public bool completed { get { return step == Step.Completed; } }
    Step m_Step = Step.None;
    public Step step {
    public Step step
    {
        get { return m_Step; }
        private set {
        private set
        {
            if (m_Step != value)
            {
                m_Step = value;
System/Login/LoginModel.cs
@@ -311,8 +311,8 @@
                    else if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Yj)
                    {
                        send.IDType = 5;
                        send.Extra += ("|" + SDKUtility.Instance.FreePlatformInfo.yjSdkId + "|" +
                                       SDKUtility.Instance.FreePlatformInfo.yjAppId + "|" +
                        send.Extra += ("|" + SDKUtility.Yj_SpID + "|" +
                                       SDKUtility.Yj_AppID + "|" +
                                       SDKUtility.Instance.FreePlatformInfo.accountID);
                        send.ExtraLen = (byte)send.Extra.Length;
                    }
System/Strengthening/EquipReinforceWin.cs
@@ -189,6 +189,7 @@
        private void OnClickEquipSuit()
        {
            equipWashModel.SetCurWashModel(0);
            if (StrengthenPnl.gameObject.activeSelf)
            {
                StrengthenPnl.gameObject.SetActive(false);
@@ -202,6 +203,7 @@
        private void OnClickWingsRefine()
        {
            equipWashModel.SetCurWashModel(0);
            if (StrengthenPnl.gameObject.activeSelf)
            {
                StrengthenPnl.gameObject.SetActive(false);
@@ -216,6 +218,7 @@
        private void OnClickInlayTitle()
        {
            equipWashModel.SetCurWashModel(0);
            if (StrengthenPnl.gameObject.activeSelf)
            {
                StrengthenPnl.gameObject.SetActive(false);
@@ -229,6 +232,7 @@
        private void OnClickStrengthTitle()
        {
            equipWashModel.SetCurWashModel(0);
            StrengthenPnl.gameObject.SetActive(true);
            _InlaidGemPanel.gameObject.SetActive(false);
            WashTip.gameObject.SetActive(false);
System/Strengthening/EquipWashModel.cs
@@ -160,6 +160,14 @@
        CheckIsMasterLv();
    }
    #region 设置当前洗练的数据
    public int curWashEquip { get; private set;}
    public void SetCurWashModel(int index)
    {
        curWashEquip = index;
    }
    #endregion
    #region 解析本地数据
    public int mustWashMatId { get; private set;}
    private void ParseFuncConfig()
System/Strengthening/WashTips.cs
@@ -54,8 +54,6 @@
    private ItemModel _itemModel; //洗练的装备
    private int[] _costMoneylist = null;
    private List<WashProCount> _washInfolist;
    private int curWashEquip = 0;
    EquipWashModel _equipWashModel;
    EquipWashModel equipWashModel
    {
@@ -116,16 +114,17 @@
    private void OnEnable()
    {    
        jumpToWashId = 0;
        guideEffect = null;
        //_equipWashCtrl.mScrollRect.verticalNormalizedPosition = 1;
        #region 初始化监听和数据
        curWashEquip = 0;
        isOpenPrompting = true;
        _attackWashPro.toggleIsOn = false;
        _lifeWashPro.toggleIsOn = false;
        _ignoreDefenceWashPro.toggleIsOn = false;
        if(equipWashModel.curWashEquip == 0)
        {
            _attackWashPro.toggleIsOn = false;
            _lifeWashPro.toggleIsOn = false;
            _ignoreDefenceWashPro.toggleIsOn = false;
            isOpenPrompting = true;
            jumpToWashId = 0;
        }
        _equipWashCtrl.lockType = EnhanceLockType.KeepVertical;
        _cancelBtn.onClick.AddListener(OnClickCancelBtn);
        _upgradeBtn.onClick.AddListener(OnClickUpGradeBtn);
@@ -145,6 +144,10 @@
        _washMasterBtn.onClick.RemoveAllListeners();
        equipWashModel.RefreshWashModelEvent -= RefreshModel;
        playerPack.RefreshItemCountAct -= RefreshCostItem;
        if(!WindowJumpMgr.Instance.IsJumpState)
        {
            equipWashModel.SetCurWashModel(0);
        }
    }
    private void CheckJumpToModel()
@@ -152,61 +155,65 @@
        _attackWashPro.isShowPerfectEffect = false;
        _lifeWashPro.isShowPerfectEffect = false;
        _ignoreDefenceWashPro.isShowPerfectEffect = false;
        if (AchievementGoto.guideAchievementId != 0)
        SuccessConfig successConfig = Config.Instance.Get<SuccessConfig>(AchievementGoto.guideAchievementId);
        if (successConfig != null && successConfig.Type == 66)
        {
            SuccessConfig successConfig = Config.Instance.Get<SuccessConfig>(AchievementGoto.guideAchievementId);
            if(successConfig.Type == 66)
            bool isWash = false;
            for (int i = 0; i < _washInfolist.Count; i++)
            {
                bool isWash = false;
                for(int i = 0; i < _washInfolist.Count; i++)
                WashProCount washPro = _washInfolist[i];
                ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptEquip, washPro.EquipPlace);
                if (itemModel != null)
                {
                    WashProCount washPro = _washInfolist[i];
                    ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptEquip,washPro.EquipPlace);
                    if(itemModel != null)
                    var washModel = EquipWashConfig.GetEquipWashData(equipWashModel.OnGetWashType(washPro.EquipPlace), washPro.XLAttrLV);
                    if (washModel != null
                        && equipWashModel.IsEnoughMat(washModel.washConfig)
                        && equipWashModel.IsCanWash(itemModel))
                    {
                        var washModel = EquipWashConfig.GetEquipWashData(equipWashModel.OnGetWashType(washPro.EquipPlace), washPro.XLAttrLV);
                        if (washModel!= null
                            && equipWashModel.IsEnoughMat(washModel.washConfig)
                            && equipWashModel.IsCanWash(itemModel))
                        {
                            jumpToWashId = washPro.EquipPlace;
                            isWash = true;
                            curWashEquip = i;
                            _equipWashCtrl.JumpIndex(curWashEquip);
                            _equipWashCtrl.m_Scorller.RefreshActiveCellViews();
                            break;
                        }
                        jumpToWashId = washPro.EquipPlace;
                        isWash = true;
                        equipWashModel.SetCurWashModel(i);
                        _equipWashCtrl.JumpIndex(equipWashModel.curWashEquip);
                        _equipWashCtrl.m_Scorller.RefreshActiveCellViews();
                        break;
                    }
                }
                if(!isWash)
                {
                    MessageWin.Inst.ShowFixedTip(Language.Get("Material101"));
                }
                else
                {
                    guideEffect = AchievementGuideEffectPool.Require(1);
                    guideEffect.transform.SetParentEx(_washBtn.transform,Vector3.zero,Quaternion.identity,Vector3.one);
                }
                AchievementGoto.guideAchievementId = 0;
            }
            if (!isWash)
            {
                MessageWin.Inst.ShowFixedTip(Language.Get("Material101"));
            }
            else
            {
                guideEffect = AchievementGuideEffectPool.Require(1);
                guideEffect.transform.SetParentEx(_washBtn.transform, Vector3.zero, Quaternion.identity, Vector3.one);
            }
            AchievementGoto.guideAchievementId = 0;
        }
        else
        {
            curWashEquip = equipWashModel.JumpToIndex;
            _equipWashCtrl.JumpIndex(curWashEquip);
            _equipWashCtrl.m_Scorller.RefreshActiveCellViews();
            if(equipWashModel.curWashEquip != 0)
            {
                _equipWashCtrl.JumpIndex(equipWashModel.curWashEquip);
                _equipWashCtrl.m_Scorller.RefreshActiveCellViews();
            }
            else
            {
                equipWashModel.SetCurWashModel(equipWashModel.JumpToIndex);
                _equipWashCtrl.JumpIndex(equipWashModel.curWashEquip);
                _equipWashCtrl.m_Scorller.RefreshActiveCellViews();
            }
        }
        OnClickWashCellToggle(_washInfolist[curWashEquip],curWashEquip);
        OnClickWashCellToggle(_washInfolist[equipWashModel.curWashEquip], equipWashModel.curWashEquip);
        StartCoroutine(SetOffestPos());
    }
    private IEnumerator SetOffestPos()
    {
        yield return null;
        if (curWashEquip != 0)
        if (equipWashModel.curWashEquip != 0)
        {
            _equipWashCtrl.JumpIndex(-offest, 0, EnhancedUI.EnhancedScroller.EnhancedScroller.TweenType.immediate);
        }
@@ -227,7 +234,7 @@
    public void RefreshModel()
    {
        CreateEquipWashCell();
        OnClickWashCellToggle(_washInfolist[curWashEquip], curWashEquip);
        OnClickWashCellToggle(_washInfolist[equipWashModel.curWashEquip], equipWashModel.curWashEquip);
    }
@@ -237,7 +244,7 @@
        if(equipWashCell != null)
        {
            WashProCount washPro = _washInfolist[cell.index];
            equipWashCell.SetDisplayModel(washPro, equipWashModel.washEquipRedPointlist[cell.index].id,cell.index,curWashEquip);
            equipWashCell.SetDisplayModel(washPro, equipWashModel.washEquipRedPointlist[cell.index].id,cell.index, equipWashModel.curWashEquip);
            equipWashCell.cellToggle.RemoveAllListeners();
            equipWashCell.cellToggle.AddListener(()=>
            {
@@ -249,7 +256,7 @@
    private void OnClickWashCellToggle(WashProCount washPro,int index)
    {
        if (curWashEquip != index)
        if (equipWashModel.curWashEquip != index)
        {
            _attackWashPro.isShowPerfectEffect = false;
            _lifeWashPro.isShowPerfectEffect = false;
@@ -313,7 +320,7 @@
        RefreshSpecWashUI();
        ChangeBtn();
        curWashEquip = index;
        equipWashModel.SetCurWashModel(index);
        equipWashModel.washBtnRedpoint.state = equipWashModel.washEquipRedPointlist[index].state;
        _equipWashCtrl.m_Scorller.RefreshActiveCellViews();
    }
@@ -625,9 +632,8 @@
                                    mustWashEffect.Play();
                                    equipWashModel.SendWashQuest(_washProModel.EquipPlace, GetWashCheckUseGoldAttr());
                                }
                                isOpenPrompting = !isToggle;
                            }
                            isOpenPrompting = !isToggle;
                        });
                    }
                    else