少年修仙传客户端代码仓库
client_linchunjie
2018-10-10 b2e56a100d2a2cb2c5b5441913318c90ceeca025
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
10个文件已修改
205 ■■■■ 已修改文件
System/DailyQuest/DailyQuestData.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/PlayerMethodData.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/PlayerPackModels.cs 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/PlayerStarNumWin.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Login/LoginModel.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/VipInvest/CheckDisplay.cs 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/VipInvest/RotatePointer.cs 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/VipInvest/WheelOfFortuneModel.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/VipInvest/WheelOfFortuneWin.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Welfare/AwardExchangeWin.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/DailyQuest/DailyQuestData.cs
@@ -291,7 +291,7 @@
                for (int i = 0; i < hourMinutes.Count; i++)
                {
                    var hourMinute = hourMinutes[i];
                    if (hour <= hourMinute.hourEnd && minute <= hourMinute.minuteEnd)
                    if (hour < hourMinute.hourEnd || (hour == hourMinute.hourEnd && minute <= hourMinute.minuteEnd))
                    {
                        _hourMinute = hourMinute;
                        break;
@@ -322,7 +322,7 @@
            for (int i = 0; i < hourMinutes.Count; i++)
            {
                var hourMinute = hourMinutes[i];
                if (hour <= hourMinute.hourEnd && minute <= hourMinute.minuteEnd)
                if (hour < hourMinute.hourEnd || (hour == hourMinute.hourEnd && minute <= hourMinute.minuteEnd))
                {
                    _hourMinute = hourMinute;
                    break;
System/FairyAu/PlayerMethodData.cs
@@ -62,10 +62,21 @@
        PlayerDatas.Instance.fairyData.OnRefreshFairyMine -= OnRefreshFairyMine;
        PlayerDatas.Instance.fairyData.OnRefreshFairyInfo += OnRefreshFairyInfo;//加入仙盟
        PlayerDatas.Instance.fairyData.OnRefreshFairyMine += OnRefreshFairyMine;//退出仙盟
        PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting;//数据的刷新(h0418)
        PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;//数据的刷新(h0418)
        FairyAuMethodDic();
        FairyAuMethodRedPoint();
    }
    private void Updatefighting(PlayerDataRefresh obj)
    {
        if (obj == PlayerDataRefresh.LV)
        {
            FairyAuMethodDic();
            FairyAuMethodRedPoint();
        }
    }
    private void OnRefreshFairyInfo()//加入仙盟
    {
        FairyAuHallRedPoint();
System/KnapSack/Logic/PlayerPackModels.cs
@@ -550,6 +550,47 @@
            equipAttrActiveDict.TryGetValue(type,out cnt);
            return cnt;
        }
        public List<int> GetAddAttrIdByStars(out int starsCount)
        {
            starsCount = 0;
            List<int> activeIdlist = new List<int>();
            List<int> addIdlist = new List<int>();
            int activeStars = GetActiveCntByType(1);
            RoleEquipStarsConfig activeStarsConfig = RoleEquipStarsConfig.GetEquipStarsModel(activeStars);
            if(activeStarsConfig != null)
            {
                for(int i = 0; i < activeStarsConfig.attType.Length; i++)
                {
                    activeIdlist.Add(activeStarsConfig.attType[i]);
                }
            }
            List<RoleEquipStarsConfig> starsConfigs = Config.Instance.GetAllValues<RoleEquipStarsConfig>();
            for (int i = 0; i < starsConfigs.Count; i++)
            {
                bool isAddId = false;
                RoleEquipStarsConfig starsConfig = starsConfigs[i];
                if (activeStars < starsConfig.countNeed)
                {
                    for(int j = 0; j < starsConfig.attType.Length; j++)
                    {
                        int attrId = starsConfig.attType[j];
                        if (!activeIdlist.Contains(attrId))
                        {
                            isAddId = true;
                            addIdlist.Add(attrId);
                        }
                    }
                }
                if(isAddId)
                {
                    starsCount = starsConfig.countNeed;
                    break;
                }
            }
            return addIdlist;
        }
        #endregion
        #endregion
System/KnapSack/Logic/PlayerStarNumWin.cs
@@ -23,6 +23,7 @@
        [SerializeField] Button activityBtn;
        [SerializeField] Text activeBtnText;
        [SerializeField] UIEffect successEffect;
        [SerializeField] Text addAttrText;
        private int _curStarsCount;
        private PlayerPropertyConfig _playerProModel;
@@ -155,6 +156,27 @@
                nextNoActObj.SetActive(true);
                RefreshActiveBtnUI(false);
            }
            int addAttrStarsNum = 0;
            List<int> addIdlist = playerPack.GetAddAttrIdByStars(out addAttrStarsNum);
            if(addIdlist.Count > 0)
            {
                addAttrText.gameObject.SetActive(true);
                string addAttr = "";
                for(int i = 0; i < addIdlist.Count; i++)
                {
                    PlayerPropertyConfig propertyConfig = Config.Instance.Get<PlayerPropertyConfig>(addIdlist[i]);
                    if(propertyConfig != null)
                    {
                        addAttr = StringUtility.Contact(addAttr, propertyConfig.Name);
                    }
                }
                addAttrText.text = Language.Get("KnapS148",addAttrStarsNum,addAttr);
            }
            else
            {
                addAttrText.gameObject.SetActive(false);
            }
        }
        private void RefreshActiveBtnUI(bool isActive)
System/Login/LoginModel.cs
@@ -296,6 +296,8 @@
                    }else if(SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Js)
                    {
                        send.IDType = 4;
                        send.Extra += ("|" + sdkLoginResult.token);
                        send.ExtraLen = (byte)send.Extra.Length;
                    }
                    send.AccID = sdkLoginResult.account;
                    send.Password = sdkLoginResult.token;
System/Vip/VipInvest/CheckDisplay.cs
@@ -5,10 +5,12 @@
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using System;
namespace Snxxz.UI {
    public class CheckDisplay:MonoBehaviour {
        public static event Action EndOfFlashing;
        [SerializeField] Image m_Image1;
        [SerializeField] Image m_Image2;
        [SerializeField] Image m_Image3;
@@ -17,8 +19,32 @@
        [SerializeField] Image m_Image6;
        [SerializeField] Image m_Image7;
        [SerializeField] Image m_Image8;
        [SerializeField] Image m_Image9;
        [SerializeField] Image m_Image9;
        [Header("闪烁时间")]
        public float FlashingTime = 2f;
        private float _time=0;
        bool IsBool = false;
        private void OnEnable()
        {
            IsBool = false;
            _time = 0;
        }
        private void LateUpdate()
        {
            if (IsBool)
            {
                _time += Time.deltaTime;
                if (FlashingTime < _time)
                {
                    CloseAll();
                    if (EndOfFlashing != null)
                    {
                        EndOfFlashing();
                    }
                }
            }
        }
        public void CloseAll()
        {
            m_Image1.gameObject.SetActive(false);
@@ -30,6 +56,8 @@
            m_Image7.gameObject.SetActive(false);
            m_Image8.gameObject.SetActive(false);
            m_Image9.gameObject.SetActive(false);
            IsBool = false;
            _time = 0;
        }
        public void ShowSelected(int Index)
@@ -63,9 +91,8 @@
                case 9:
                    m_Image9.gameObject.SetActive(true);
                    break;
            }
            IsBool = true;
        }
    }
System/Vip/VipInvest/RotatePointer.cs
@@ -8,9 +8,10 @@
using DG.Tweening;
using System;
namespace Snxxz.UI {
    public class RotatePointer:MonoBehaviour {
namespace Snxxz.UI
{
    public class RotatePointer : MonoBehaviour
    {
        public bool _isRotate = false;//是否旋转      
        public float Speed = 2000;//旋转速度
        public float Angle = 0; // 这个是设置停止的角度
@@ -23,7 +24,7 @@
        [Header("加速减速时间")]
        public float SpeedTime = 1;
        [Header("最小速度")]
        public float MinSpeed= 400;
        public float MinSpeed = 400;
        [Header("最大速度")]
        public float MaxSpeed = 800;
        WheelOfFortuneModel wheelOfFortuneModel { get { return ModelCenter.Instance.GetModel<WheelOfFortuneModel>(); } }
@@ -40,17 +41,14 @@
        }
        private void OnEnable()
        {
        }
        }
        void Update()
        {
            if (!_isRotate)
            {
                if (-Angle != transform.eulerAngles.z)
            {
                if (Math.Abs((360 - Angle) - transform.eulerAngles.z) > 2)
                {
                    transform.localRotation = Quaternion.Euler(0, 0, -Angle);
                    m_CheckDisplay.ShowSelected(wheelOfFortuneModel.Lattice);
@@ -59,16 +57,12 @@
                        IsButtonShow(true);
                    }
                    IsRotateBool = false;
                }
                }
                return; //不旋转结束
            }
            if (IsRotateBool)
            {
                _time += Time.deltaTime;
                if (_time < SpeedTime)//匀加速
                {
                    Speed = MinSpeed + Acceleration * _time;
@@ -99,7 +93,7 @@
                    //这里有个360,使用来防止指针回转的,如果不加这个360,你会看到指针倒退
                    Sequence sequence = DOTween.Sequence();
                    sequence.Append(transform.DORotate(new Vector3(0, 0, -(360 + Angle)), 2f, RotateMode.FastBeyond360));
                    sequence.AppendCallback(()=>
                    sequence.AppendCallback(() =>
                    {
                        _isRotate = false; // 设置不旋转
                        if (IsButtonShow != null)
@@ -107,17 +101,15 @@
                            IsButtonShow(true);
                        }
                        m_CheckDisplay.ShowSelected(wheelOfFortuneModel.Lattice);
                    });
                    });
                    IsRotateBool = false;
                }
               // DebugEx.LogError(transform.eulerAngles.z);
            }
            }
        }
        //外部调用,初始化时间和打开旋转
        //外部调用,初始化时间和打开旋转,设置停止角度
        public void SetTime(bool _bool)
        {
            _time =0;
            _time = 0;
            Angle = wheelOfFortuneModel.AngleSave;
            if (_bool)
            {
@@ -129,14 +121,7 @@
                IsRotateBool = true;
                _isRotate = true;
            }
        }
        private void TweenOver()
        {
        }
        //外部调用,设置停止角度
        }
    }
}
System/Vip/VipInvest/WheelOfFortuneModel.cs
@@ -39,17 +39,17 @@
            var BindJadewheel = Config.Instance.Get<FuncConfigConfig>("BindJadeWheelCfg");
            NeedJade = int.Parse(BindJadewheel.Numerical1);
            AngleList = JsonMapper.ToObject<double[][]>(BindJadewheel.Numerical5);
            for (int i = 0; i < AngleList.Length; i++)
            {
                if (AngleDic.Count <= 0)
                {
                    int Type = i + 1;
                    AngleClass angleClass = new AngleClass();
                    angleClass.AngleStart = (float)AngleList[i][0];
                    angleClass.AngleEnd = (float)AngleList[i][1];
                    AngleDic.Add(Type, angleClass);
                }
            }
            if (AngleDic.Count <= 0)
            {
                for (int i = 0; i < AngleList.Length; i++)
                {
                    int Type = i + 1;
                    AngleClass angleClass = new AngleClass();
                    angleClass.AngleStart = (float)AngleList[i][0];
                    angleClass.AngleEnd = (float)AngleList[i][1];
                    AngleDic.Add(Type, angleClass);
                }
            }
        }
        public override void UnInit()
@@ -93,8 +93,8 @@
            {
                if (AngleDic.ContainsKey(Lattice))
                {
                    float flo = UnityEngine.Random.Range(AngleDic[Lattice].AngleStart + 0.05f, AngleDic[Lattice].AngleEnd - 0.05f);
                    float flo = UnityEngine.Random.Range(AngleDic[Lattice].AngleStart + 1f, AngleDic[Lattice].AngleEnd - 1f);
                    flo = (float)Math.Round((double)flo, 2);
                    if (flo > 360f)
                    {
                        flo = flo - 360f;
@@ -108,7 +108,6 @@
                }
                RedPoint();
            }
        }
        public void StartTheDraw()//开始抽奖
        {
@@ -154,7 +153,6 @@
            return 0;
        }
    }
}
System/Vip/VipInvest/WheelOfFortuneWin.cs
@@ -55,7 +55,8 @@
        protected override void OnAfterOpen()
        {
            wheelOfFortuneModel.WheelOfFortuneUpdate += WheelOfFortuneUpdate;
            RotatePointer.IsButtonShow += IsButtonShow;
            RotatePointer.IsButtonShow += IsButtonShow;
            CheckDisplay.EndOfFlashing += EndOfFlashing;
            if (wheelOfFortuneModel.redPointStre1.state == RedPointState.Simple)
            {
                int GetDayOfYear = DateTime.Now.DayOfYear;
@@ -68,10 +69,14 @@
        protected override void OnPreClose()
        {
            wheelOfFortuneModel.WheelOfFortuneUpdate -= WheelOfFortuneUpdate;
            RotatePointer.IsButtonShow -= IsButtonShow;
            RotatePointer.IsButtonShow -= IsButtonShow;
            CheckDisplay.EndOfFlashing -= EndOfFlashing;
        }
        private void EndOfFlashing()
        {
            TiedJadeChange();
        }
        private void WheelOfFortuneUpdate(float Angel)
        {
@@ -87,8 +92,7 @@
        private void OnClickButton()
        {
            m_CheckDisplay.CloseAll();
            wheelOfFortuneModel.StartTheDraw();//开始抽奖
            m_RotatePointer.SetTime(m_Toggle.isOn);
            wheelOfFortuneModel.StartTheDraw();//开始抽奖
        }
        private void OnClickToggle(bool _bool)
        {
System/Welfare/AwardExchangeWin.cs
@@ -60,6 +60,7 @@
                tables["accid"] = SDKUtility.Instance.FreePlatformInfo.account;
                tables["sid"] = ServerListCenter.Instance.currentServer.region_flag.ToString();
                tables["pushurl"] = ServerListCenter.Instance.currentServer.region_domain;
                tables["spid"] = VersionConfig.Get().SpID;
                HttpRequest.Instance.RequestHttpGet(StringUtility.Contact(exchangeUrl, HttpRequest.HashtablaToString(tables)), HttpRequest.defaultHttpContentType, 1, null);
            }
        }