From 93ed577890717a45d33b208ce7cebe3890874f2e Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期一, 21 一月 2019 14:39:12 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/Message/RichShowPlayerEvent.cs | 96 +++++++++++++++++++------------
System/Tip/PlayerDetails.cs | 18 ++++++
System/Login/LoginModel.cs | 8 --
Fight/Stage/Dungeon/DungeonStage.cs | 18 +++--
Core/ResModule/SceneLoader.cs | 2
System/Chat/ChatTip.cs | 5 +
6 files changed, 95 insertions(+), 52 deletions(-)
diff --git a/Core/ResModule/SceneLoader.cs b/Core/ResModule/SceneLoader.cs
index ebf1eaa..f22c209 100644
--- a/Core/ResModule/SceneLoader.cs
+++ b/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
}
diff --git a/Fight/Stage/Dungeon/DungeonStage.cs b/Fight/Stage/Dungeon/DungeonStage.cs
index 62eb90c..799b55b 100644
--- a/Fight/Stage/Dungeon/DungeonStage.cs
+++ b/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);
+ }
}
+
}
diff --git a/System/Chat/ChatTip.cs b/System/Chat/ChatTip.cs
index d9067ce..57a67e9 100644
--- a/System/Chat/ChatTip.cs
+++ b/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>();
}
diff --git a/System/Login/LoginModel.cs b/System/Login/LoginModel.cs
index 0aa04f8..612b862 100644
--- a/System/Login/LoginModel.cs
+++ b/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()
diff --git a/System/Message/RichShowPlayerEvent.cs b/System/Message/RichShowPlayerEvent.cs
index 787c6f7..65eaab9 100644
--- a/System/Message/RichShowPlayerEvent.cs
+++ b/System/Message/RichShowPlayerEvent.cs
@@ -1,37 +1,59 @@
-锘縰sing 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;
- }
-}
+锘縰sing 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;
+ }
+}
diff --git a/System/Tip/PlayerDetails.cs b/System/Tip/PlayerDetails.cs
index 1f8892f..a25a0ee 100644
--- a/System/Tip/PlayerDetails.cs
+++ b/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;
--
Gitblit v1.8.0