少年修仙传客户端代码仓库
client_Hale
2019-01-21 93ed577890717a45d33b208ce7cebe3890874f2e
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
6个文件已修改
147 ■■■■■ 已修改文件
Core/ResModule/SceneLoader.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/Dungeon/DungeonStage.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Chat/ChatTip.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Login/LoginModel.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Message/RichShowPlayerEvent.cs 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Tip/PlayerDetails.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/ResModule/SceneLoader.cs
@@ -11,7 +11,7 @@
        if (AssetSource.sceneFromEditor)
        {
#if UNITY_EDITOR
            var path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath, "Scene/", folder, "/", name, ".png");
            var path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath, "Scene/", folder, "/", name, ".jpg");
            texture2D = UnityEditor.AssetDatabase.LoadAssetAtPath<Texture2D>(path);
#endif
        }
Fight/Stage/Dungeon/DungeonStage.cs
@@ -26,7 +26,7 @@
        SoundPlayer.Instance.UnLoadMusic(mapResConfig.Music);
        SoundPlayer.Instance.PlayBackGroundMusic(mapResConfig.Music);
        SceneResourcesReplace();
        // 做一些前期战斗的预加载
        // if (!PreFightMission.Instance.IsFinished())
        // {
@@ -416,15 +416,19 @@
    private void SceneResourceReplace10010()
    {
        var config = Config.Instance.Get<SceneReplaceConfig>(100101);
        if (config != null)
        for (var i = 100101; i <= 100109; i++)
        {
            var groundTexture = SceneLoader.LoadTexture(config.folder, config.resourceName);
            var @object = GameObject.Find(config.objectPath);
            var config = Config.Instance.Get<SceneReplaceConfig>(i);
            if (config != null)
            {
                var groundTexture = SceneLoader.LoadTexture(config.folder, config.resourceName);
                var @object = GameObject.Find(config.objectPath);
            var renderer = @object.GetComponent<Renderer>();
            renderer.material.SetTexture("_MainTex", groundTexture);
                var renderer = @object.GetComponent<Renderer>();
                renderer.material.SetTexture("_MainTex", groundTexture);
            }
        }
    }
System/Chat/ChatTip.cs
@@ -229,6 +229,11 @@
        {
            ChatCtrl.Inst.presentChatType = ChatInfoType.Fairy;
        }
        if (ChatCtrl.Inst.presentChatType == ChatInfoType.CrossServer
            && !FuncOpen.Instance.IsFuncOpen(162))
        {
            ChatCtrl.Inst.presentChatType = ChatInfoType.World;
        }
        WindowCenter.Instance.Open<ChatWin>();
    }
System/Login/LoginModel.cs
@@ -176,13 +176,7 @@
            {
                AccountLogin(sdkLoginResult.account, _ip, _port, _gamePort);
            }
            else
            {
                if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Yl)
                {
                    SDKUtility.Instance.FreePlatformLogin();
                }
            }
            else             {                 if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Yl                 || (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Yj                  && SDKUtility.Yj_AppID.Equals("hwgame")))                 {                     SDKUtility.Instance.FreePlatformLogin();                 }             }
        }
        public void ReAccountLogin()
System/Message/RichShowPlayerEvent.cs
@@ -1,37 +1,59 @@
using Snxxz.UI;
using System;
using System.Collections.Generic;
using UnityEngine;
public class RichShowPlayerEvent : TRichTextEvent
{
    public RichShowPlayerEvent()
    {
        RichTextMgr.Inst.RegisterEvent(RichTextEventEnum.SHOWPLAYER, this);
    }
    public override bool Execute(RichTextEventEnum type, RichTextMgr.HrefInfo href)
    {
        switch (type)
        {
            case RichTextEventEnum.SHOWPLAYER:
                {
                    uint id = 0;
                    if (uint.TryParse(href.mSplits["showplayer"], out id))
                    {
                        if (id == PlayerDatas.Instance.baseData.PlayerID)
                        {
                            return false;
                        }
                        PlayerDetails.ShowPlayerDetails((int)id, null);
                    }
                }
                break;
        }
        return false;
    }
    public override string GetDisplay(RichTextEventEnum type, Dictionary<string, string> dic)
    {
        return string.Empty;
    }
}
using Snxxz.UI;
using System;
using System.Collections.Generic;
using UnityEngine;
public class RichShowPlayerEvent : TRichTextEvent
{
    public RichShowPlayerEvent()
    {
        RichTextMgr.Inst.RegisterEvent(RichTextEventEnum.SHOWPLAYER, this);
    }
    public override bool Execute(RichTextEventEnum type, RichTextMgr.HrefInfo href)
    {
        switch (type)
        {
            case RichTextEventEnum.SHOWPLAYER:
                {
                    uint id = 0;
                    if (uint.TryParse(href.mSplits["showplayer"], out id))
                    {
                        if (id == PlayerDatas.Instance.baseData.PlayerID)
                        {
                            return false;
                        }
                        var serverGroupId = 0;
                        if (href.mSplits.ContainsKey("servergroupid"))
                        {
                            int.TryParse(href.mSplits["servergroupid"], out serverGroupId);
                        }
                        if (serverGroupId != 0 && serverGroupId != PlayerDatas.Instance.baseData.ServerGroupId)
                        {
                            var name = string.Empty;
                            if (href.mSplits.ContainsKey("name"))
                            {
                                name = href.mSplits["name"];
                            }
                            var level = 0;
                            if (href.mSplits.ContainsKey("level"))
                            {
                                int.TryParse(href.mSplits["level"], out level);
                            }
                            PlayerDetails.ShowCrossServerPlayer((int)id, level, name, serverGroupId);
                        }
                        else
                        {
                            PlayerDetails.ShowPlayerDetails((int)id, null);
                        }
                    }
                }
                break;
        }
        return false;
    }
    public override string GetDisplay(RichTextEventEnum type, Dictionary<string, string> dic)
    {
        return string.Empty;
    }
}
System/Tip/PlayerDetails.cs
@@ -40,6 +40,24 @@
            }
        }
        public static void ShowCrossServerPlayer(int playerId, int level, string name, int serverGroupId)
        {
            openType = OpenType.CrossPlayer;
            PlayerID = playerId;
            LV = level;
            Job = 1;
            RealmLV = 0;
            PlayerName = name;
            OnlineType = 0;
            IsInTeam = 0;
            ServerGroupId = serverGroupId;
            if (!WindowCenter.Instance.IsOpen<PlayerDetailWin>())
            {
                WindowCenter.Instance.Open<PlayerDetailWin>();
            }
        }
        public static void ShowAreaPlayer(int _playerId)
        {
            openType = OpenType.Default;