少年修仙传客户端代码仓库
client_linchunjie
2019-02-21 11971eedb6531fa41b33111e917d877e5aed7e1a
Merge branch 'master' into TreasureRevise

Conflicts:
14个文件已修改
242 ■■■■■ 已修改文件
Core/Camera/CameraController.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Login/Launch.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Login/LaunchPostProcess.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/SnxxzGame.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/SDK/SDKUtility.cs 88 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/LaunchPostProcessWrap.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonModel.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/TargetBriefInfoWin.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FakeDungeon/FakeDemonJarDungeonStage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/DemonJarBossLifeBarWin.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Login/LoginModel.cs 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/NewBieGuidance/NewBieCenter.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Team/TeamModel.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/Camera/CameraController.cs
@@ -110,6 +110,8 @@
    public void ResetOriginal()
    {
        SnxxzGame.Instance.StopAllCameraCo();
        StopAllCoroutines();
        RotationDamping = 0.02f;
        ZoomDamping = 0.02f;
        sceneDistance = Distance = originalDistance;
Core/GameEngine/Login/Launch.cs
@@ -284,7 +284,13 @@
            }
        }
#endif
#if UNITY_EDITOR
            if (!AssetSource.allFromEditor)
            {
                FileExtersion.DirectoryCopy(ResourcesPath.CONFIG_FODLER, ResourcesPath.Instance.StreamingAssetPath + "config");
                FileExtersion.DirectoryCopy(ResourcesPath.ResourcesOutPath + "BuiltIn", ResourcesPath.Instance.StreamingAssetPath + "builtin");
            }
#endif
            if (!firstLaunch)
            {
                done = true;
Core/GameEngine/Login/LaunchPostProcess.cs
@@ -2,7 +2,6 @@
using System.Collections.Generic;
using UnityEngine;
using Snxxz.UI;
using System;
[XLua.LuaCallCSharp]
@@ -11,14 +10,13 @@
    bool m_Completed = false;
    public bool completed { get { return m_Completed; } set { m_Completed = value; } }
    public float progress { get { return Mathf.Clamp01((Time.time - startTime) * 0.1f + ConfigInitiator.progress * 0.7f); } }
    float startTime = 0f;
    DateTime startTime;
    public void Begin()
    {
        completed = false;
        startTime = Time.time;
        startTime = DateTime.Now;
        ConfigInitiator.Init();
    }
@@ -26,6 +24,8 @@
    {
        if (!completed && ConfigInitiator.done)
        {
            DebugEx.LogFormat("解析配置表耗时:{0}", (DateTime.Now - startTime).TotalMilliseconds);
            try
            {
                InGameDownLoad.Instance.ParseRewardConfig();
@@ -43,8 +43,6 @@
                {
                    AssetDeCompressTask.Delete7zFiles(ResourcesPath.Instance.ExternalStorePath);
                }
                DebugEx.LogFormat("解析配置表耗时:{0}", Time.time - startTime);
            }
            catch (Exception ex)
            {
Core/GameEngine/SnxxzGame.cs
@@ -220,6 +220,12 @@
        }
    }
    public void StopAllCameraCo()
    {
        StopCoroutine("Co_ResetCamera");
        StopCoroutine("Co_MovingCamera");
    }
    private IEnumerator Co_MovingCamera(int _type)
    {
        var _areaCamera = AreaCameraConfig.Get(_type);
Core/SDK/SDKUtility.cs
@@ -27,11 +27,18 @@
        Js = 4,// 极速
        Yj = 5,// 易接
        Yl = 6,// 易乐
        Xn = 7,// 小牛
        Cjm = 8,// 超级梦
    }
    public E_ChannelPlatform ChannelPlatform { get; set; }
    public static string Yj_AppID
    {
        get; private set;
    }
    public static string Yj_Version
    {
        get; private set;
    }
@@ -118,6 +125,7 @@
    {
        Yj_AppID = string.Empty;
        Yj_SpID = string.Empty;
        Yj_Version = string.Empty;
        RegistrationID = string.Empty;
        AssetCopyFinished = false;
        ChannelPlatform = E_ChannelPlatform.Free;
@@ -350,6 +358,20 @@
                {
                    _result = "yileplatform";
                }
                else if (ChannelPlatform == E_ChannelPlatform.Xn)
                {
                    using (AndroidJavaClass _jc = new AndroidJavaClass("com.secondworld.univeralsdk.UniversalUtil"))
                    {
                        _result = _jc.CallStatic<string>("getMetaString", "XnAppID");
                    }
                }
                else if (ChannelPlatform == E_ChannelPlatform.Cjm)
                {
                    using (AndroidJavaClass _jc = new AndroidJavaClass("com.secondworld.univeralsdk.UniversalUtil"))
                    {
                        _result = _jc.CallStatic<string>("getMetaString", "SUPERDREAM_APPID");
                    }
                }
                break;
            case RuntimePlatform.IPhonePlayer:
                _result = "ios";//ios平台固定返回ios
@@ -453,6 +475,14 @@
                        {
                            ChannelPlatform = E_ChannelPlatform.Yl;
                        }
                        else if (_channelPlatform.Equals("xn"))
                        {
                            ChannelPlatform = E_ChannelPlatform.Xn;
                        }
                        else if (_channelPlatform.Equals("cjm"))
                        {
                            ChannelPlatform = E_ChannelPlatform.Cjm;
                        }
                    }
                }
@@ -468,6 +498,27 @@
                        Yj_SpID = _json["yj_spid"].ToString();
                    }
                }
                else if (ChannelPlatform == E_ChannelPlatform.Xn)
                {
                    if (_dict.Contains("xnappid"))
                    {
                        Yj_AppID = _json["xnappid"].ToString();
                    }
                    if (_dict.Contains("xnversion"))
                    {
                        Yj_Version = _json["xnversion"].ToString();
                    }
                }
                else if (ChannelPlatform == E_ChannelPlatform.Cjm)
                {
                    if (_dict.Contains("cjmappid"))
                    {
                        Yj_AppID = _json["cjmappid"].ToString();
                    }
                }
                if (_dict.Contains("banhao"))
                {
@@ -866,6 +917,14 @@
        {
            m_PaymentTable["RechargeChannel"] = "6";
        }
        else if (ChannelPlatform == E_ChannelPlatform.Xn)
        {
            m_PaymentTable["RechargeChannel"] = "7";
        }
        else if (ChannelPlatform == E_ChannelPlatform.Cjm)
        {
            m_PaymentTable["RechargeChannel"] = "8";
        }
        var _stringBuilder = new System.Text.StringBuilder();
        var _md5Body = _stringBuilder.Append(m_PaymentTable["AppID"]).
@@ -907,29 +966,20 @@
                        m_Json["mount"] = money;
                        m_Json["cpInfo"] = cpInfo;
                        m_Json["title"] = title;
                        if(ChannelPlatform == E_ChannelPlatform.Mr
                        || ChannelPlatform == E_ChannelPlatform.Sp
                        || ChannelPlatform == E_ChannelPlatform.Yl)
                        {
                            m_Json["roleID"] = PlayerDatas.Instance.baseData.PlayerID;
                            m_Json["roleName"] = PlayerDatas.Instance.baseData.PlayerName;
                            m_Json["level"] = PlayerDatas.Instance.baseData.LV.ToString();
                            m_Json["sid"] = ServerListCenter.Instance.currentServer.region_flag;
                        }
                        m_Json["roleID"] = PlayerDatas.Instance.baseData.PlayerID;
                        m_Json["roleName"] = PlayerDatas.Instance.baseData.PlayerName;
                        m_Json["level"] = PlayerDatas.Instance.baseData.LV.ToString();
                        m_Json["sid"] = ServerListCenter.Instance.currentServer.region_flag;
                        m_Json["serverName"] = ServerListCenter.Instance.currentServer.name;
                        m_Json["familyName"] = PlayerDatas.Instance.baseData.FamilyName;
                        m_Json["job"] = PlayerDatas.Instance.baseData.Job.ToString();
                        m_Json["money"] = PlayerDatas.Instance.baseData.Gold.ToString();
                        m_Json["gameName"] = VersionConfig.Get().productName;
                        m_Json["vipLevel"] = PlayerDatas.Instance.baseData.VIPLv.ToString();
                        if (ChannelPlatform == E_ChannelPlatform.Mr)
                        {
                            m_Json["notifyurl"] = _json["notifyurl"];
                        }
                        else if(ChannelPlatform == E_ChannelPlatform.Sp)
                        {
                            m_Json["serverName"] = ServerListCenter.Instance.currentServer.name;
                            m_Json["familyName"] = PlayerDatas.Instance.baseData.FamilyName;
                            m_Json["job"] = PlayerDatas.Instance.baseData.Job.ToString();
                            m_Json["money"] = PlayerDatas.Instance.baseData.Gold.ToString();
                            m_Json["gameName"] = VersionConfig.Get().productName;
                            m_Json["vipLevel"] = PlayerDatas.Instance.baseData.VIPLv.ToString();
                        }
#if UNITY_IOS
                        m_Json["identifier"] = VersionConfig.Get().bundleIdentifier;
Lua/Gen/LaunchPostProcessWrap.cs
@@ -21,13 +21,12 @@
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            System.Type type = typeof(LaunchPostProcess);
            Utils.BeginObjectRegister(type, L, translator, 0, 1, 2, 1);
            Utils.BeginObjectRegister(type, L, translator, 0, 1, 1, 1);
            
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "Begin", _m_Begin);
            
            
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "completed", _g_get_completed);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "progress", _g_get_progress);
            
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "completed", _s_set_completed);
            
@@ -113,20 +112,6 @@
            
                LaunchPostProcess gen_to_be_invoked = (LaunchPostProcess)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushboolean(L, gen_to_be_invoked.completed);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_progress(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                LaunchPostProcess gen_to_be_invoked = (LaunchPostProcess)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushnumber(L, gen_to_be_invoked.progress);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs
@@ -73,6 +73,10 @@
        public void OnSwitchAccount()
        {
            IsMatching = false;
            if (clientMatchClock!=null )
            {
                clientMatchClock.Stop();
            }
        }
        public void OnPlayerLoginOk()
@@ -467,12 +471,13 @@
                    GameNetSystem.Instance.PushPackage(onMatchPackage, ServerType.Main);
                    var randomWaitSeconds = UnityEngine.Random.Range(3, 8);
                    clientMatchClock = Clock.Create(DateTime.Now + new TimeSpan(randomWaitSeconds * TimeSpan.TicksPerSecond), () =>
                   {
                       if (StageLoad.Instance.stageType == Stage.E_StageType.Dungeon)
                       {
                           ClientCrossServerOneVsOne.FakeMatchOk();
                       }
                   });
                    {
                        IsMatching = false;
                        if (GameNetSystem.Instance.netState == GameNetSystem.NetState.Connected)
                        {
                            ClientCrossServerOneVsOne.FakeMatchOk();
                        }
                    });
                }
                else
                {
System/Dungeon/DungeonModel.cs
@@ -1207,9 +1207,9 @@
        public void RequestChallangeDungeon(int _dataMapId, int _lineId)
        {
            var dungeonConfig = DungeonConfig.Get(GetDungeonId(_dataMapId, _lineId));
            if (!AssetSource.sceneFromEditor)
            {
                var dungeonConfig = DungeonConfig.Get(GetDungeonId(_dataMapId, _lineId));
                var assetValid = true;
                if (dungeonConfig != null)
                {
@@ -1223,6 +1223,13 @@
                }
            }
            var model = ModelCenter.Instance.GetModel<CrossServerOneVsOneModel>();
            if (model.IsMatching)
            {
                SysNotifyMgr.Instance.ShowTip("CrossMatching8", dungeonConfig.MapID);
                return;
            }
            if (CrossServerLogin.Instance.IsEnterCrossServerPreparing())
            {
                return;
System/Dungeon/TargetBriefInfoWin.cs
@@ -96,8 +96,8 @@
            {
                instanceId = _instanceId,
                npcId = _npcId,
                hp = boss.ActorInfo.RealHp,
                maxHp = boss.ActorInfo.RealMaxHp,
                hp = _hp,
                maxHp = _maxHp,
                level = boss.ActorInfo.LV
            };
        }
System/FakeDungeon/FakeDemonJarDungeonStage.cs
@@ -349,7 +349,7 @@
        if (_victimId == boss.ServerInstID)
        {
            TargetBriefInfo.OnRefreshBossLifeBar(_victimId, 0, 0, 0);
            TargetBriefInfo.OnRefreshBossLifeBar(_victimId, boss.NpcConfig.NPCID, (ulong)Random.Range(0, 1000), 1000);
        }
    }
System/FindPrecious/DemonJarBossLifeBarWin.cs
@@ -26,14 +26,11 @@
        bool inited = false;
        long m_CurrentHp = BOSSHP_TOTAL;
        long currentHp
        {
            get
            {
        long currentHp {
            get {
                return m_CurrentHp;
            }
            set
            {
            set {
                if (value <= 0)
                {
                    m_CurrentHp = 0;
@@ -97,7 +94,14 @@
                bossInfo = TargetBriefInfo.bossInfo;
                if (bossInfo.instanceId != 0)
                {
                    RefreshBossLifeBar();
                    if (inited)
                    {
                        RefreshBossLifeBar();
                    }
                    else
                    {
                        InitBossLifeBar();
                    }
                }
            }
        }
@@ -119,14 +123,16 @@
            }
        }
        public void InitBossLifeBar()
        void InitBossLifeBar()
        {
            m_BossLifeBar.gameObject.SetActive(true);
            var npcConfig = NPCConfig.Get(TargetBriefInfo.bossInfo.npcId);
            currentHp = (long)(model.mission.remainHPPer * 0.000001d * BOSSHP_TOTAL);
            m_BossLifeBar.SetBaseInfo(TargetBriefInfo.bossInfo.npcId, (ulong)currentHp, BOSSHP_TOTAL, npcConfig.NPCLV);
            inited = true;
            var config = NPCConfig.Get(TargetBriefInfo.bossInfo.npcId);
            if (config!=null)
            {
                m_BossLifeBar.gameObject.SetActive(true);
                currentHp = (long)(model.mission.remainHPPer * 0.000001d * BOSSHP_TOTAL);
                m_BossLifeBar.SetBaseInfo(TargetBriefInfo.bossInfo.npcId, (ulong)currentHp, BOSSHP_TOTAL, config.NPCLV);
                inited = true;
            }
        }
        private void UpdateServerRemainHP()
System/Login/LoginModel.cs
@@ -16,7 +16,8 @@
        public SDKUtility.FP_LoginOk sdkLoginResult;
        public SDKUtility.FP_CheckIDAuthentication sdkIDCheckIDAuthentication;
        public string localSaveAccountName {
        public string localSaveAccountName
        {
            get { return LocalSave.GetString(USER_ACCOUNT); }
            set { LocalSave.SetString(USER_ACCOUNT, value); }
        }
@@ -25,19 +26,22 @@
        public event Action accountBindOkEvent;
        bool m_ReconnecBackGround = false;
        public bool reconnectBackGround {
        public bool reconnectBackGround
        {
            get { return m_ReconnecBackGround; }
            set { m_ReconnecBackGround = value; }
        }
        bool m_OnCreateRole = false;
        public bool onCreateRole {
        public bool onCreateRole
        {
            get { return m_OnCreateRole; }
            set { m_OnCreateRole = value; }
        }
        bool m_Busy = false;
        public bool busy {
        public bool busy
        {
            get { return m_Busy; }
            set { m_Busy = value; }
        }
@@ -329,8 +333,27 @@
                    {
                        send.IDType = 6;
                    }
                    else if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Xn)
                    {
                        send.IDType = 7;
                        send.Extra += ("|" + SDKUtility.Yj_AppID + "|" + SDKUtility.Yj_Version);
                        send.ExtraLen = (byte)send.Extra.Length;
                    }
                    else if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Cjm)
                    {
                        send.IDType = 8;
                        send.Extra += ("|" + SDKUtility.Yj_AppID + "|" + SDKUtility.Instance.FreePlatformInfo.token);
                        send.ExtraLen = (byte)send.Extra.Length;
                    }
                    send.AccID = sdkLoginResult.account;
                    send.Password = sdkLoginResult.token;
                    if (SDKUtility.Instance.ChannelPlatform != SDKUtility.E_ChannelPlatform.Cjm)
                    {
                        send.Password = sdkLoginResult.token;
                    }
                    else
                    {
                        send.Password = "";
                    }
                    send.MAC = DeviceUtility.GetMac();
                    send.Version = _serverInfo.Version;
                    send.LineNO = 255;
System/NewBieGuidance/NewBieCenter.cs
@@ -198,7 +198,7 @@
        {
            var guideRecord = currentGuide;
            currentGuide = 0;
            WindowCenter.Instance.Close<NewBieWin>();
            WindowCenter.Instance.CloseImmediately("NewBieWin");
            if (!completeGuidesBuf.Contains(guideRecord))
            {
@@ -378,7 +378,7 @@
            GameNetSystem.Instance.SendInfo(send);
            currentGuide = 0;
            WindowCenter.Instance.Close<NewBieWin>();
            WindowCenter.Instance.CloseImmediately("NewBieWin");
            var allGuideKeys = GuideConfig.GetKeys();
            for (int i = 0; i < allGuideKeys.Count; i++)
@@ -396,7 +396,7 @@
            GameNetSystem.Instance.SendInfo(send);
            currentGuide = 0;
            WindowCenter.Instance.Close<NewBieWin>();
            WindowCenter.Instance.CloseImmediately("NewBieWin");
            completeGuidesBuf.Clear();
        }
System/Team/TeamModel.cs
@@ -629,6 +629,12 @@
        public void RequestPrepareEnterDungeon(bool _prepare)
        {
            var crossServerOneVsOneModel = ModelCenter.Instance.GetModel<CrossServerOneVsOneModel>();
            if (crossServerOneVsOneModel.IsMatching)
            {
                crossServerOneVsOneModel.SendCrossMatch(0);
            }
            var sendInfo = new CB909_tagCGTeamMemberPrepare();
            sendInfo.PrepareState = (byte)(_prepare ? 1 : 2);
            GameNetSystem.Instance.SendInfo(sendInfo);