From 26436be7f1ae7d7edae0d5b4bddf85cdf0367dfb Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期一, 21 一月 2019 11:34:47 +0800
Subject: [PATCH] Merge http://192.168.0.87:10010/r/snxxz_scripts into SpringFestival
---
Core/GameEngine/Model/ConfigManager.cs | 2
Core/MapEditor/Editor/MapEditor.cs | 38 ++
System/CrossServerOneVsOne/SeasonRewardCell.cs | 22 +
System/Login/LoginModel.cs | 22 +
Core/MapEditor/Behavior/Bhv_Trasfer.cs | 2
Core/GameEngine/Model/Config/SceneReplaceConfig.cs.meta | 12
Core/MapEditor/Behavior/Bhv_SceneObjectData.cs.meta | 12
System/CrossServerBoss/CrossServerBossModel.cs | 6
Core/MapEditor/Behavior/Bhv_Evt.cs | 4
Core/MapEditor/Editor/EditorResources/arrow_right.png | 0
Core/ResModule/SceneLoader.cs | 33 ++
Core/MapEditor/Editor/EditorResources/EditorSkin.guiskin | 68 ++++
Core/MapEditor/Editor/EditorResources/arrow_down.png | 0
Core/MapEditor/Behavior/Bhv_MapTrigger.cs | 4
System/Message/RichShowPlayerEvent.cs | 96 ++++--
Core/MapEditor/Behavior/Bhv_Evt_RefreshSceneObject.cs | 120 ++++++++
Lua/LuaUtility.cs | 4
System/GatheringSoul/GatheringSoulModel.cs | 38 +-
Fight/Stage/Dungeon/DungeonStage.cs | 33 ++
Core/MapEditor/Data/Event/Evt.cs | 3
Core/SDK/SDKUtility.cs | 16 +
Core/MapEditor/Editor/EditorResources/arrow_right.png.meta | 68 ++++
Core/ResModule/SceneLoader.cs.meta | 12
System/Chat/ChatTip.cs | 5
System/OpenServerActivity/OpenServiceAchievementCell.cs | 2
Core/MapEditor/Behavior/Bhv_SceneObjectData.cs | 23 +
System/FairyAu/FairyLeagueResPointBehaviour.cs | 2
Core/MapEditor/Behavior/Bhv_MonsterData.cs | 8
System/Tip/PlayerDetails.cs | 18 +
Core/MapEditor/Behavior/Bhv_Evt_RefreshSceneObject.cs.meta | 12
System/CrossServer/CrossServerUtility.cs | 1
Core/MapEditor/Behavior/Bhv_Evt_RefreshMonster.cs | 11
Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0418_tagObjInfoRefresh.cs | 9
Core/MapEditor/Editor/EditorResources/arrow_down.png.meta | 68 ++++
Utility/LocalSave.cs | 5
Core/GameEngine/Model/Config/SceneReplaceConfig.cs | 47 +++
System/CrossServerOneVsOne/CrossServerOneVsOneRewardModel.cs | 4
37 files changed, 728 insertions(+), 102 deletions(-)
diff --git a/Core/GameEngine/Model/Config/SceneReplaceConfig.cs b/Core/GameEngine/Model/Config/SceneReplaceConfig.cs
new file mode 100644
index 0000000..112034d
--- /dev/null
+++ b/Core/GameEngine/Model/Config/SceneReplaceConfig.cs
@@ -0,0 +1,47 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Friday, January 18, 2019
+//--------------------------------------------------------
+
+using UnityEngine;
+using System;
+
+namespace TableConfig {
+
+
+ public partial class SceneReplaceConfig : ConfigBase {
+
+ public int id { get ; private set ; }
+ public string objectPath { get ; private set; }
+ public string folder { get ; private set; }
+ public string resourceName { get ; private set; }
+
+ public override string getKey()
+ {
+ return id.ToString();
+ }
+
+ public override void Parse() {
+ try
+ {
+ id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
+
+ objectPath = rawContents[1].Trim();
+
+ folder = rawContents[2].Trim();
+
+ resourceName = rawContents[3].Trim();
+ }
+ catch (Exception ex)
+ {
+ DebugEx.Log(ex);
+ }
+ }
+
+ }
+
+}
+
+
+
+
diff --git a/Core/GameEngine/Model/Config/SceneReplaceConfig.cs.meta b/Core/GameEngine/Model/Config/SceneReplaceConfig.cs.meta
new file mode 100644
index 0000000..14ec867
--- /dev/null
+++ b/Core/GameEngine/Model/Config/SceneReplaceConfig.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 16f2983a4c91c6244ad11b4a75876f1f
+timeCreated: 1547778246
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/GameEngine/Model/ConfigManager.cs b/Core/GameEngine/Model/ConfigManager.cs
index c964b41..93ea9a6 100644
--- a/Core/GameEngine/Model/ConfigManager.cs
+++ b/Core/GameEngine/Model/ConfigManager.cs
@@ -224,6 +224,8 @@
AddAsyncTask<FashionDressCabinetConfig>();
AddAsyncTask<FashionDressConfig>();
AddAsyncTask<WeekPartyPointConfig>();
+ AddAsyncTask<SceneReplaceConfig>();
+
while (!AllCompleted())
{
var completedCount = 0;
diff --git a/Core/MapEditor/Behavior/Bhv_Evt.cs b/Core/MapEditor/Behavior/Bhv_Evt.cs
index c02087e..0b01ea1 100644
--- a/Core/MapEditor/Behavior/Bhv_Evt.cs
+++ b/Core/MapEditor/Behavior/Bhv_Evt.cs
@@ -9,10 +9,12 @@
public int id;
[HideInInspector]
public Evt.E_EventType type;
+
+#if UNITY_EDITOR
+
[HideInInspector]
protected bool showDetail = false;
-#if UNITY_EDITOR
public abstract bool DrawUI(GUISkin guiSkin);
public virtual void Save(BinaryWriter bw)
{
diff --git a/Core/MapEditor/Behavior/Bhv_Evt_RefreshMonster.cs b/Core/MapEditor/Behavior/Bhv_Evt_RefreshMonster.cs
index f6f20d8..25b5cef 100644
--- a/Core/MapEditor/Behavior/Bhv_Evt_RefreshMonster.cs
+++ b/Core/MapEditor/Behavior/Bhv_Evt_RefreshMonster.cs
@@ -20,10 +20,11 @@
public int conditionParam;
[HideInInspector]
public int overParam;
- [HideInInspector]
- private bool showMonsterList = false;
#if UNITY_EDITOR
+
+ [HideInInspector]
+ private bool showMonsterList = false;
public override void Save(BinaryWriter bw)
{
@@ -82,7 +83,7 @@
EditorGUILayout.BeginVertical(guiSkin.box);
EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
EditorGUI.indentLevel += 1;
- showDetail = EditorGUILayout.Foldout(showDetail, " ID:" + id + " | Type: " + type, true, guiSkin.toggle);
+ showDetail = EditorGUILayout.Foldout(showDetail, " ID:" + id + " | Type: " + type, true, guiSkin.customStyles[3]);
if (GUILayout.Button("瀹氫綅", guiSkin.button, GUILayout.Width(60), GUILayout.Height(22)))
{
Selection.activeGameObject = gameObject;
@@ -131,7 +132,7 @@
EditorGUILayout.BeginVertical(guiSkin.customStyles[1]);
EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
- showMonsterList = EditorGUILayout.Foldout(showMonsterList, " 鍒锋�垪琛�", true, guiSkin.toggle);
+ showMonsterList = EditorGUILayout.Foldout(showMonsterList, " 鍒锋�垪琛�", true, guiSkin.customStyles[3]);
if (GUILayout.Button("娣诲姞", guiSkin.button, GUILayout.Width(60), GUILayout.Height(22)))
{
var _go = new GameObject("RefreshMonster");
@@ -165,7 +166,7 @@
RaycastHit _hit;
Ray _ray = new Ray(_pos + Vector3.up * 100, Vector3.down);
- if (Physics.Raycast(_ray, out _hit, 200, 1 << LayerMask.NameToLayer("Walkable")))
+ if (Physics.Raycast(_ray, out _hit, 200, LayerUtility.WalkbleMask))
{
monsterList[i].transform.position = _hit.point;
}
diff --git a/Core/MapEditor/Behavior/Bhv_Evt_RefreshSceneObject.cs b/Core/MapEditor/Behavior/Bhv_Evt_RefreshSceneObject.cs
new file mode 100644
index 0000000..21ef2bf
--- /dev/null
+++ b/Core/MapEditor/Behavior/Bhv_Evt_RefreshSceneObject.cs
@@ -0,0 +1,120 @@
+锘縰sing System.Collections.Generic;
+using UnityEngine;
+using System.IO;
+
+#if UNITY_EDITOR
+using UnityEditor;
+#endif
+
+namespace H2Engine
+{
+ public class Bhv_Evt_RefreshSceneObject : Bhv_Evt
+ {
+ [HideInInspector]
+ public List<Bhv_SceneObjectData> sceneObjList = new List<Bhv_SceneObjectData>();
+
+#if UNITY_EDITOR
+
+ [HideInInspector]
+ private bool showSceneObjList = false;
+ [HideInInspector]
+ private string newSceneObjResName = "";
+
+ public override bool DrawUI(GUISkin guiSkin)
+ {
+ bool _result = false;
+ EditorGUILayout.BeginVertical(guiSkin.box);
+ EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
+ EditorGUI.indentLevel += 1;
+ showDetail = EditorGUILayout.Foldout(showDetail, " ID:" + id + " | Type: " + type, true, guiSkin.customStyles[3]);
+ if (GUILayout.Button("瀹氫綅", guiSkin.button, GUILayout.Width(60), GUILayout.Height(22)))
+ {
+ Selection.activeGameObject = gameObject;
+ if (Selection.activeGameObject)
+ {
+ SceneView.lastActiveSceneView.LookAt(Selection.activeGameObject.transform.position);
+ }
+ }
+ if (GUILayout.Button("鍒犻櫎", guiSkin.button, GUILayout.Width(60), GUILayout.Height(22)))
+ {
+ _result = true;
+ }
+ EditorGUILayout.EndHorizontal();
+
+ if (showDetail)
+ {
+ EditorGUILayout.BeginVertical(guiSkin.customStyles[1]);
+ EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
+ if (sceneObjList.Count > 0)
+ {
+ showSceneObjList = EditorGUILayout.Foldout(showSceneObjList, " 鍦烘櫙鐗╀欢鍒楄〃", true, guiSkin.customStyles[3]);
+ }
+ else
+ {
+ EditorGUILayout.LabelField(" 鍦烘櫙鐗╀欢鍒楄〃:", guiSkin.customStyles[0], GUILayout.Height(22), GUILayout.Width(100));
+ GUILayout.FlexibleSpace();
+ }
+ EditorGUILayout.LabelField("ResName:", guiSkin.customStyles[0], GUILayout.Height(22), GUILayout.Width(60));
+ newSceneObjResName = EditorGUILayout.TextField(newSceneObjResName, guiSkin.textField, GUILayout.Width(100), GUILayout.Height(20));
+ if (GUILayout.Button("娣诲姞", guiSkin.button, GUILayout.Width(60), GUILayout.Height(22)))
+ {
+ Debug.Log("!!!");
+ var _sceneObject = CreateSceneObject();
+ if (_sceneObject)
+ {
+ sceneObjList.Add(_sceneObject);
+ showSceneObjList = true;
+ }
+ }
+ EditorGUILayout.EndHorizontal();
+
+ if (showSceneObjList)
+ {
+
+ }
+ EditorGUILayout.EndVertical();
+ }
+
+ EditorGUI.indentLevel -= 1;
+ EditorGUILayout.EndVertical();
+ return _result;
+ }
+
+ private Bhv_SceneObjectData CreateSceneObject()
+ {
+ if (!string.IsNullOrEmpty(newSceneObjResName))
+ {
+ string _path = "Assets/ResourcesOut/Mob/Prefab_Race_" + newSceneObjResName + ".prefab";
+ var _obj = AssetDatabase.LoadAssetAtPath<GameObject>(_path);
+ if (!_obj)
+ {
+ Debug.LogError("鎵�瑕佸垱寤虹殑璧勬簮涓嶅瓨鍦�: " + _path);
+ return null;
+ }
+ _obj = Instantiate(_obj);
+ var _sceneObjData = _obj.AddComponent<Bhv_SceneObjectData>();
+ _sceneObjData.resName = newSceneObjResName;
+ RaycastHit _hit;
+ Ray _ray = SceneView.lastActiveSceneView.camera.ViewportPointToRay(new Vector3(.5f, .5f, 0));
+ if (Physics.Raycast(_ray, out _hit, 1000f, LayerUtility.WalkbleMask))
+ {
+ _sceneObjData.transform.position = _hit.point;
+ }
+ _sceneObjData.transform.SetParent(transform);
+ _sceneObjData.transform.eulerAngles = Vector3.zero;
+ _sceneObjData.transform.localScale = Vector3.one;
+
+ Selection.activeGameObject = _sceneObjData.gameObject;
+ if (Selection.activeGameObject)
+ {
+ SceneView.lastActiveSceneView.LookAt(Selection.activeGameObject.transform.position);
+ }
+
+ return _sceneObjData;
+ }
+ return null;
+ }
+#endif
+
+ }
+}
\ No newline at end of file
diff --git a/Core/MapEditor/Behavior/Bhv_Evt_RefreshSceneObject.cs.meta b/Core/MapEditor/Behavior/Bhv_Evt_RefreshSceneObject.cs.meta
new file mode 100644
index 0000000..54cb695
--- /dev/null
+++ b/Core/MapEditor/Behavior/Bhv_Evt_RefreshSceneObject.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2dbb0276e4facaa42986e94f476fc552
+timeCreated: 1547811633
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/MapEditor/Behavior/Bhv_MapTrigger.cs b/Core/MapEditor/Behavior/Bhv_MapTrigger.cs
index 084ee12..c482dbe 100644
--- a/Core/MapEditor/Behavior/Bhv_MapTrigger.cs
+++ b/Core/MapEditor/Behavior/Bhv_MapTrigger.cs
@@ -75,7 +75,7 @@
EditorGUILayout.BeginVertical(guiSkin.box);
EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
EditorGUI.indentLevel += 1;
- showDetail = EditorGUILayout.Foldout(showDetail, " 瑙﹀彂鍣↖D:" + id, true, guiSkin.toggle);
+ showDetail = EditorGUILayout.Foldout(showDetail, " 瑙﹀彂鍣↖D:" + id, true, guiSkin.customStyles[3]);
if (GUILayout.Button("鏌ユ壘", guiSkin.button, GUILayout.Width(60), GUILayout.Height(22)))
{
Selection.activeGameObject = gameObject;
@@ -97,7 +97,7 @@
EditorGUILayout.EndHorizontal();
EditorGUILayout.BeginVertical(guiSkin.customStyles[1]);
EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
- showEventList = EditorGUILayout.Foldout(showEventList, " 瑙﹀彂浜嬩欢鍒楄〃", true, guiSkin.toggle);
+ showEventList = EditorGUILayout.Foldout(showEventList, " 瑙﹀彂浜嬩欢鍒楄〃", true, guiSkin.customStyles[3]);
if (GUILayout.Button("娣诲姞", guiSkin.button, GUILayout.Width(60), GUILayout.Height(22)))
{
eventIDList.Add(0);
diff --git a/Core/MapEditor/Behavior/Bhv_MonsterData.cs b/Core/MapEditor/Behavior/Bhv_MonsterData.cs
index 6eac0a7..65ce843 100644
--- a/Core/MapEditor/Behavior/Bhv_MonsterData.cs
+++ b/Core/MapEditor/Behavior/Bhv_MonsterData.cs
@@ -14,9 +14,9 @@
{
bw.Write(npcID);
bw.Write(ai);
- bw.Write((float)System.Math.Round(transform.position.x));
- bw.Write((float)System.Math.Round(transform.position.y));
- bw.Write((float)System.Math.Round(transform.position.z));
+ bw.Write(Mathf.Round(transform.position.x));
+ bw.Write(Mathf.Round(transform.position.y));
+ bw.Write(Mathf.Round(transform.position.z));
}
public void Load(BinaryReader br)
@@ -27,7 +27,7 @@
float _y = br.ReadSingle();
float _z = br.ReadSingle();
transform.position = new Vector3(_x, _y, _z);
- name = npcID + "_RefreshMonster";
+ name = "RefreshMonster_" + npcID;
}
public void Export(BinaryWriter bw)
diff --git a/Core/MapEditor/Behavior/Bhv_SceneObjectData.cs b/Core/MapEditor/Behavior/Bhv_SceneObjectData.cs
new file mode 100644
index 0000000..f097e90
--- /dev/null
+++ b/Core/MapEditor/Behavior/Bhv_SceneObjectData.cs
@@ -0,0 +1,23 @@
+锘縰sing System.IO;
+using UnityEngine;
+
+public class Bhv_SceneObjectData : MonoBehaviour
+{
+ public string resName;
+
+ public void Save(BinaryWriter bw)
+ {
+ bw.Write(resName);
+ }
+
+ public void Load(BinaryReader br)
+ {
+ resName = br.ReadString();
+ name = "RefreshMonster_" + resName;
+ }
+
+ public void Export(BinaryWriter bw)
+ {
+ Save(bw);
+ }
+}
diff --git a/Core/MapEditor/Behavior/Bhv_SceneObjectData.cs.meta b/Core/MapEditor/Behavior/Bhv_SceneObjectData.cs.meta
new file mode 100644
index 0000000..82d3a64
--- /dev/null
+++ b/Core/MapEditor/Behavior/Bhv_SceneObjectData.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f67c2459d3466914fa155e24aeaf5eb0
+timeCreated: 1547812535
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/MapEditor/Behavior/Bhv_Trasfer.cs b/Core/MapEditor/Behavior/Bhv_Trasfer.cs
index 8a5859b..b5392ed 100644
--- a/Core/MapEditor/Behavior/Bhv_Trasfer.cs
+++ b/Core/MapEditor/Behavior/Bhv_Trasfer.cs
@@ -70,7 +70,7 @@
EditorGUILayout.BeginVertical(guiSkin.box);
EditorGUILayout.BeginHorizontal(GUILayout.Height(20));
EditorGUI.indentLevel += 1;
- showDetail = EditorGUILayout.Foldout(showDetail, " No." + mapData.transferList.IndexOf(this), true, guiSkin.toggle);
+ showDetail = EditorGUILayout.Foldout(showDetail, " No." + mapData.transferList.IndexOf(this), true, guiSkin.customStyles[3]);
if (GUILayout.Button("鍒犻櫎", guiSkin.button, GUILayout.Width(60), GUILayout.Height(20)))
{
_result = true;
diff --git a/Core/MapEditor/Data/Event/Evt.cs b/Core/MapEditor/Data/Event/Evt.cs
index 8cfa01a..cbfb208 100644
--- a/Core/MapEditor/Data/Event/Evt.cs
+++ b/Core/MapEditor/Data/Event/Evt.cs
@@ -7,7 +7,8 @@
{
public enum E_EventType
{
- Enemy
+ Enemy,
+ SceneObject
}
public int id;
diff --git a/Core/MapEditor/Editor/EditorResources/EditorSkin.guiskin b/Core/MapEditor/Editor/EditorResources/EditorSkin.guiskin
index 47c819d..8ec4c19 100644
--- a/Core/MapEditor/Editor/EditorResources/EditorSkin.guiskin
+++ b/Core/MapEditor/Editor/EditorResources/EditorSkin.guiskin
@@ -3,7 +3,7 @@
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
@@ -1551,6 +1551,72 @@
m_FixedHeight: 0
m_StretchWidth: 1
m_StretchHeight: 0
+ - m_Name: foldout
+ m_Normal:
+ m_Background: {fileID: 2800000, guid: 01e032f4a2cce914faef70fb2d628a27, type: 3}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 1, g: 1, b: 1, a: 1}
+ m_Hover:
+ m_Background: {fileID: 2800000, guid: 01e032f4a2cce914faef70fb2d628a27, type: 3}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 1, g: 1, b: 1, a: 1}
+ m_Active:
+ m_Background: {fileID: 2800000, guid: 2c7e968c8a062644f8f0634fbfcbaf6f, type: 3}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 1, g: 1, b: 1, a: 1}
+ m_Focused:
+ m_Background: {fileID: 2800000, guid: 01e032f4a2cce914faef70fb2d628a27, type: 3}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 1, g: 1, b: 1, a: 1}
+ m_OnNormal:
+ m_Background: {fileID: 2800000, guid: 2c7e968c8a062644f8f0634fbfcbaf6f, type: 3}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 1, g: 1, b: 1, a: 1}
+ m_OnHover:
+ m_Background: {fileID: 2800000, guid: 2c7e968c8a062644f8f0634fbfcbaf6f, type: 3}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 1, g: 1, b: 1, a: 1}
+ m_OnActive:
+ m_Background: {fileID: 2800000, guid: 2c7e968c8a062644f8f0634fbfcbaf6f, type: 3}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 1, g: 1, b: 1, a: 1}
+ m_OnFocused:
+ m_Background: {fileID: 2800000, guid: 2c7e968c8a062644f8f0634fbfcbaf6f, type: 3}
+ m_ScaledBackgrounds: []
+ m_TextColor: {r: 1, g: 1, b: 1, a: 1}
+ m_Border:
+ m_Left: 16
+ m_Right: 0
+ m_Top: 16
+ m_Bottom: 0
+ m_Margin:
+ m_Left: 4
+ m_Right: 4
+ m_Top: 4
+ m_Bottom: 4
+ m_Padding:
+ m_Left: 15
+ m_Right: 0
+ m_Top: 3
+ m_Bottom: 0
+ m_Overflow:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_Font: {fileID: 0}
+ m_FontSize: 12
+ m_FontStyle: 0
+ m_Alignment: 0
+ m_WordWrap: 0
+ m_RichText: 1
+ m_TextClipping: 1
+ m_ImagePosition: 0
+ m_ContentOffset: {x: 0, y: 0}
+ m_FixedWidth: 0
+ m_FixedHeight: 0
+ m_StretchWidth: 1
+ m_StretchHeight: 0
m_Settings:
m_DoubleClickSelectsWord: 1
m_TripleClickSelectsLine: 1
diff --git a/Core/MapEditor/Editor/EditorResources/arrow_down.png b/Core/MapEditor/Editor/EditorResources/arrow_down.png
new file mode 100644
index 0000000..80632fc
--- /dev/null
+++ b/Core/MapEditor/Editor/EditorResources/arrow_down.png
Binary files differ
diff --git a/Core/MapEditor/Editor/EditorResources/arrow_down.png.meta b/Core/MapEditor/Editor/EditorResources/arrow_down.png.meta
new file mode 100644
index 0000000..281a3c0
--- /dev/null
+++ b/Core/MapEditor/Editor/EditorResources/arrow_down.png.meta
@@ -0,0 +1,68 @@
+fileFormatVersion: 2
+guid: 2c7e968c8a062644f8f0634fbfcbaf6f
+timeCreated: 1547802123
+licenseType: Pro
+TextureImporter:
+ fileIDToRecycleName: {}
+ serializedVersion: 4
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 0
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spritePixelsToUnits: 100
+ alphaUsage: 1
+ alphaIsTransparency: 0
+ spriteTessellationDetail: -1
+ textureType: 0
+ textureShape: 1
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ platformSettings:
+ - buildTarget: DefaultTexturePlatform
+ maxTextureSize: 2048
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ spritePackingTag:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/MapEditor/Editor/EditorResources/arrow_right.png b/Core/MapEditor/Editor/EditorResources/arrow_right.png
new file mode 100644
index 0000000..d5b1ab0
--- /dev/null
+++ b/Core/MapEditor/Editor/EditorResources/arrow_right.png
Binary files differ
diff --git a/Core/MapEditor/Editor/EditorResources/arrow_right.png.meta b/Core/MapEditor/Editor/EditorResources/arrow_right.png.meta
new file mode 100644
index 0000000..517f876
--- /dev/null
+++ b/Core/MapEditor/Editor/EditorResources/arrow_right.png.meta
@@ -0,0 +1,68 @@
+fileFormatVersion: 2
+guid: 01e032f4a2cce914faef70fb2d628a27
+timeCreated: 1547802123
+licenseType: Pro
+TextureImporter:
+ fileIDToRecycleName: {}
+ serializedVersion: 4
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 0
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spritePixelsToUnits: 100
+ alphaUsage: 1
+ alphaIsTransparency: 0
+ spriteTessellationDetail: -1
+ textureType: 0
+ textureShape: 1
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ platformSettings:
+ - buildTarget: DefaultTexturePlatform
+ maxTextureSize: 2048
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ spritePackingTag:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/MapEditor/Editor/MapEditor.cs b/Core/MapEditor/Editor/MapEditor.cs
index c56e25c..346e3ef 100644
--- a/Core/MapEditor/Editor/MapEditor.cs
+++ b/Core/MapEditor/Editor/MapEditor.cs
@@ -100,7 +100,7 @@
EditorGUILayout.BeginVertical(gUISkin.box);
EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
EditorGUI.indentLevel += 1;
- _mapData.showTriggerList = EditorGUILayout.Foldout(_mapData.showTriggerList, " 瑙﹀彂鍣ㄥ垪琛�", true, gUISkin.toggle);
+ _mapData.showTriggerList = EditorGUILayout.Foldout(_mapData.showTriggerList, " 瑙﹀彂鍣ㄥ垪琛�", true, gUISkin.customStyles[3]);
EditorGUI.indentLevel -= 1;
if (GUILayout.Button("娣诲姞", gUISkin.button, GUILayout.Width(60), GUILayout.Height(22)))
{
@@ -134,7 +134,7 @@
EditorGUILayout.BeginVertical(gUISkin.box);
EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
EditorGUI.indentLevel += 1;
- _mapData.showEventList = EditorGUILayout.Foldout(_mapData.showEventList, " 浜嬩欢鍒楄〃", true, gUISkin.toggle);
+ _mapData.showEventList = EditorGUILayout.Foldout(_mapData.showEventList, " 浜嬩欢鍒楄〃", true, gUISkin.customStyles[3]);
EditorGUI.indentLevel -= 1;
eventType = (Evt.E_EventType)EditorGUILayout.EnumPopup(eventType, gUISkin.box, GUILayout.Height(22), GUILayout.Width(100));
if (GUILayout.Button("娣诲姞", gUISkin.button, GUILayout.Width(60), GUILayout.Height(22)))
@@ -169,7 +169,7 @@
EditorGUILayout.BeginVertical(gUISkin.box);
EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
EditorGUI.indentLevel += 1;
- _mapData.showTransferList = EditorGUILayout.Foldout(_mapData.showTransferList, " 浼犻�佺粍鍒楄〃", true, gUISkin.toggle);
+ _mapData.showTransferList = EditorGUILayout.Foldout(_mapData.showTransferList, " 浼犻�佺粍鍒楄〃", true, gUISkin.customStyles[3]);
EditorGUI.indentLevel -= 1;
if (GUILayout.Button("娣诲姞", gUISkin.button, GUILayout.Width(60), GUILayout.Height(22)))
{
@@ -198,6 +198,12 @@
/// 浼犻�佺偣鍒楄〃 End
/// --------------------------------------------------------------------------------
+ /// --------------------------------------------------------------------------------
+ /// 鍦烘櫙鐗╀欢鍒楄〃 Start
+
+ /// 鍦烘櫙鐗╀欢鍒楄〃 End
+ /// --------------------------------------------------------------------------------
+
EditorGUILayout.EndVertical();
if (GUI.changed)
@@ -223,11 +229,23 @@
if (type == Evt.E_EventType.Enemy)
{
- var _event = CreateNewGO(Bhv_MapData.NodeName_Event + RequestEventID());
+ var _event = CreateNewGO(Bhv_MapData.NodeName_Event + "RefreshEvemy_" + RequestEventID());
var _eventBhv = _event.AddComponent<Bhv_Evt_RefreshMonster>();
_eventBhv.type = type;
_event.transform.SetParent(_mapData.transform.Find(Bhv_MapData.NodeName_EventList));
_mapData.eventList.Add(_eventBhv);
+
+ _event.transform.position = SceneCameraRaycastPosition();
+ }
+ else if (type == Evt.E_EventType.SceneObject)
+ {
+ var _event = CreateNewGO(Bhv_MapData.NodeName_Event + "RefreshSceneObject_" + RequestEventID());
+ var _eventBhv = _event.AddComponent<Bhv_Evt_RefreshSceneObject>();
+ _eventBhv.type = type;
+ _event.transform.SetParent(_mapData.transform.Find(Bhv_MapData.NodeName_EventList));
+ _mapData.eventList.Add(_eventBhv);
+
+ _event.transform.position = SceneCameraRaycastPosition();
}
}
@@ -296,5 +314,17 @@
}
}
}
+
+ public static Vector3 SceneCameraRaycastPosition()
+ {
+ RaycastHit _hit;
+ Ray _ray = SceneView.lastActiveSceneView.camera.ViewportPointToRay(new Vector3(.5f, .5f, 0));
+ if (Physics.Raycast(_ray, out _hit, 1000f, LayerUtility.WalkbleMask))
+ {
+ return _hit.point;
+ }
+
+ return Vector3.zero;
+ }
}
}
\ No newline at end of file
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0418_tagObjInfoRefresh.cs b/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0418_tagObjInfoRefresh.cs
index 7b969ea..378d84c 100644
--- a/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0418_tagObjInfoRefresh.cs
+++ b/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0418_tagObjInfoRefresh.cs
@@ -36,7 +36,14 @@
return;
}
}
- }
+ }
+ if (vNetData.socketType == GameNetSystem.SocketType.CrossSever)
+ {
+ if (vNetData.RefreshType == (int)PlayerDataRefresh.FightPower)
+ {
+ return;
+ }
+ }
if (vNetData.RefreshType == (int)PlayerDataRefresh.OfficialRank)
{
diff --git a/Core/ResModule/SceneLoader.cs b/Core/ResModule/SceneLoader.cs
new file mode 100644
index 0000000..f22c209
--- /dev/null
+++ b/Core/ResModule/SceneLoader.cs
@@ -0,0 +1,33 @@
+锘縰sing System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class SceneLoader
+{
+
+ public static Texture2D LoadTexture(string folder, string name)
+ {
+ Texture2D texture2D = null;
+ if (AssetSource.sceneFromEditor)
+ {
+#if UNITY_EDITOR
+ var path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath, "Scene/", folder, "/", name, ".jpg");
+ texture2D = UnityEditor.AssetDatabase.LoadAssetAtPath<Texture2D>(path);
+#endif
+ }
+ else
+ {
+ var assetInfo = new AssetInfo(StringUtility.Contact("maps/", folder), name);
+ texture2D = AssetBundleUtility.Instance.Sync_LoadAsset(assetInfo) as Texture2D;
+ }
+
+ if (texture2D == null)
+ {
+ DebugEx.LogErrorFormat("SceneLoader.LoadTexture() => 鍔犺浇涓嶅埌璧勬簮: {0}.", name);
+ }
+
+ return texture2D;
+ }
+
+
+}
diff --git a/Core/ResModule/SceneLoader.cs.meta b/Core/ResModule/SceneLoader.cs.meta
new file mode 100644
index 0000000..341c974
--- /dev/null
+++ b/Core/ResModule/SceneLoader.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9965235d149da744dbefdf8340b2b351
+timeCreated: 1547718608
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/SDK/SDKUtility.cs b/Core/SDK/SDKUtility.cs
index df2ca42..a2ddd16 100644
--- a/Core/SDK/SDKUtility.cs
+++ b/Core/SDK/SDKUtility.cs
@@ -514,6 +514,7 @@
{
onFreePlatformLogoutOk();
}
+ FreePlatformInfo = null;
break;
case CodeA2U.FreePlatformLogoutFail:
if (onFreePlatformLogoutFail != null)
@@ -680,6 +681,10 @@
* ClientPackage鍚憇dk鍙戦�佸垎鍖卛d
*/
public const int ClientPackage = 400;
+ /**
+ * 鍙戦�佷簨浠�
+ */
+ public static int SendRegistEvent = 500;
}
#endregion
@@ -793,6 +798,10 @@
m_Json.Clear();
m_Json["code"] = CodeU2A.FreePlatformLogout;
SendMessageToSDK(m_Json);
+ if (ChannelPlatform == E_ChannelPlatform.Yl)
+ {
+ FreePlatformLogin();
+ }
#endif
}
@@ -1076,6 +1085,13 @@
SendMessageToSDK(m_Json);
}
+ public void SendRegistEvent()
+ {
+ m_Json.Clear();
+ m_Json["code"] = CodeU2A.SendRegistEvent;
+ SendMessageToSDK(m_Json);
+ }
+
public void CreateRoleOk(string roleID, string roleName, string time)
{
m_Json.Clear();
diff --git a/Fight/Stage/Dungeon/DungeonStage.cs b/Fight/Stage/Dungeon/DungeonStage.cs
index ecda7c3..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())
// {
@@ -401,4 +401,35 @@
break;
}
}
+
+ void SceneResourcesReplace()
+ {
+ switch (PlayerDatas.Instance.baseData.MapID)
+ {
+ case 10010:
+ SceneResourceReplace10010();
+ break;
+ default:
+ break;
+ }
+ }
+
+ private void SceneResourceReplace10010()
+ {
+ for (var i = 100101; i <= 100109; i++)
+ {
+ 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);
+ }
+ }
+
+ }
+
+
}
diff --git a/Lua/LuaUtility.cs b/Lua/LuaUtility.cs
index a7432cb..fc0ce7c 100644
--- a/Lua/LuaUtility.cs
+++ b/Lua/LuaUtility.cs
@@ -38,8 +38,10 @@
Do("global.define");
Do("global.stringutil");
Do("protocol.LuaProtocalRegister");
- Do("hotfix.hotfix");
+#if !UNITY_EDITOR
+ Do("hotfix.hotfix");
+#endif
lastGCTime = 0f;
}
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/CrossServer/CrossServerUtility.cs b/System/CrossServer/CrossServerUtility.cs
index 8ea2215..72b1a04 100644
--- a/System/CrossServer/CrossServerUtility.cs
+++ b/System/CrossServer/CrossServerUtility.cs
@@ -3,6 +3,7 @@
using UnityEngine;
using Snxxz.UI;
+[XLua.LuaCallCSharp]
public class CrossServerUtility
{
diff --git a/System/CrossServerBoss/CrossServerBossModel.cs b/System/CrossServerBoss/CrossServerBossModel.cs
index b110d70..a2ccf56 100644
--- a/System/CrossServerBoss/CrossServerBossModel.cs
+++ b/System/CrossServerBoss/CrossServerBossModel.cs
@@ -89,6 +89,12 @@
public void RequestEnter()
{
+ if (PlayerDatas.Instance.extersion.bossState == 1)
+ {
+ SysNotifyMgr.Instance.ShowTip("CrossMap11");
+ return;
+ }
+
var sendInfo = new CC105_tagCMEnterCrossServer();
sendInfo.DataMapID = DATA_MAPID;
diff --git a/System/CrossServerOneVsOne/CrossServerOneVsOneRewardModel.cs b/System/CrossServerOneVsOne/CrossServerOneVsOneRewardModel.cs
index 2e54106..f6b6825 100644
--- a/System/CrossServerOneVsOne/CrossServerOneVsOneRewardModel.cs
+++ b/System/CrossServerOneVsOne/CrossServerOneVsOneRewardModel.cs
@@ -405,13 +405,15 @@
{
Number = key;
}
- if (CrossServerOneVsOnePKSeason.Instance.SeasonState == 2 && !isbool)
+
+ if (CrossServerOneVsOnePKSeason.Instance.SeasonState == 2 && CrossServerOneVsOnePlayerInfo.Instance.Score != 0 && !isbool)
{
if ((MyRank > -1 && MyRank < Number) || SeasonRewardConfigDic.ContainsKey(Danlv))
{
Isbool = true;
}
}
+
if (Isbool)
{
redPointStre2.state = RedPointState.Simple;
diff --git a/System/CrossServerOneVsOne/SeasonRewardCell.cs b/System/CrossServerOneVsOne/SeasonRewardCell.cs
index d03e121..58eda54 100644
--- a/System/CrossServerOneVsOne/SeasonRewardCell.cs
+++ b/System/CrossServerOneVsOne/SeasonRewardCell.cs
@@ -298,16 +298,22 @@
private bool IsOnTheList()
{
bool Isbool = false;
- int Number = 0;
- var keyList = crossServerRewardModel.SeasonRewardDic.AwardDic.Keys.ToList();
- for (int i = 0; i < keyList.Count; i++)
+
+ if (CrossServerOneVsOnePlayerInfo.Instance.Score > 0)
{
- Number = keyList[i];
+ int Number = 0;
+ var keyList = crossServerRewardModel.SeasonRewardDic.AwardDic.Keys.ToList();
+ for (int i = 0; i < keyList.Count; i++)
+ {
+ Number = keyList[i];
+ }
+
+ if (crossServerRewardModel.MyRank > -1 && crossServerRewardModel.MyRank < Number)
+ {
+ Isbool = true;
+ }
}
- if (crossServerRewardModel.MyRank > -1 && crossServerRewardModel.MyRank < Number)
- {
- Isbool = true;
- }
+
return Isbool;
}
diff --git a/System/FairyAu/FairyLeagueResPointBehaviour.cs b/System/FairyAu/FairyLeagueResPointBehaviour.cs
index 325421a..0362f93 100644
--- a/System/FairyAu/FairyLeagueResPointBehaviour.cs
+++ b/System/FairyAu/FairyLeagueResPointBehaviour.cs
@@ -195,7 +195,7 @@
var _hero = PlayerDatas.Instance.hero;
if (_hero != null)
{
- _hero.Behaviour.StopHandupAI();
+ _hero.Behaviour.StopHandupAI(true);
SnxxzGame.Instance.StartCoroutine(Co_HeroMoveToPos(new Vector3(_buffPos.x, 0, _buffPos.y),
_help.fairyWarBuffs[_index].NPCID));
}
diff --git a/System/GatheringSoul/GatheringSoulModel.cs b/System/GatheringSoul/GatheringSoulModel.cs
index cfd6259..841f5ce 100644
--- a/System/GatheringSoul/GatheringSoulModel.cs
+++ b/System/GatheringSoul/GatheringSoulModel.cs
@@ -1643,37 +1643,27 @@
}
}
}
- GatherSoulItem coreItem;
- if (TryGetItem(coreHole, out coreItem) &&
- SatisfyLevelUp(coreItem, out error))
+ levelUpRedpointHole = -1;
+ var cost = 0;
+ for (int i = 0; i < count; i++)
{
- levelUpRedpointHole = coreHole;
- levelUpRedpoint.state = RedPointState.Simple;
- }
- else
- {
- levelUpRedpointHole = -1;
- var cost = 0;
- for (int i = 0; i < count; i++)
+ GatherSoulItem holeItem;
+ if (TryGetItem(i, out holeItem))
{
- GatherSoulItem holeItem;
- if (TryGetItem(i, out holeItem))
+ if (SatisfyLevelUp(holeItem, out error))
{
- if (SatisfyLevelUp(holeItem, out error))
+ if (RequireLevelUpCost(holeItem) < cost
+ || cost == 0)
{
- if (RequireLevelUpCost(holeItem) < cost
- || cost == 0)
- {
- cost = RequireLevelUpCost(holeItem);
- levelUpRedpointHole = i;
- }
+ cost = RequireLevelUpCost(holeItem);
+ levelUpRedpointHole = i;
}
}
}
- if (levelUpRedpointHole != -1)
- {
- levelUpRedpoint.state = RedPointState.Simple;
- }
+ }
+ if (levelUpRedpointHole != -1)
+ {
+ levelUpRedpoint.state = RedPointState.Simple;
}
}
#endregion
diff --git a/System/Login/LoginModel.cs b/System/Login/LoginModel.cs
index dee4bdb..0aa04f8 100644
--- a/System/Login/LoginModel.cs
+++ b/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; }
}
@@ -171,6 +175,13 @@
if (sdkLogined)
{
AccountLogin(sdkLoginResult.account, _ip, _port, _gamePort);
+ }
+ else
+ {
+ if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Yl)
+ {
+ SDKUtility.Instance.FreePlatformLogin();
+ }
}
}
@@ -315,7 +326,8 @@
SDKUtility.Yj_AppID + "|" +
SDKUtility.Instance.FreePlatformInfo.accountID);
send.ExtraLen = (byte)send.Extra.Length;
- }else if(SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Yl)
+ }
+ else if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Yl)
{
send.IDType = 6;
}
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/OpenServerActivity/OpenServiceAchievementCell.cs b/System/OpenServerActivity/OpenServiceAchievementCell.cs
index 2863132..3d9bd13 100644
--- a/System/OpenServerActivity/OpenServiceAchievementCell.cs
+++ b/System/OpenServerActivity/OpenServiceAchievementCell.cs
@@ -45,7 +45,7 @@
{
RemainingNum = (WeekPartyAction.TotalTimes - rewardNum) / WeekPartyAction.SingleTimes;
}
- if (WeekPartyAction.TotalTimes -carryOutNum> 0)
+ if (WeekPartyAction.TotalTimes -carryOutNum> 0 && RemainingNum>0)
{
m_TextA.text = Language.Get("OSA_1", RemainingNum);
}
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;
diff --git a/Utility/LocalSave.cs b/Utility/LocalSave.cs
index a270080..857f312 100644
--- a/Utility/LocalSave.cs
+++ b/Utility/LocalSave.cs
@@ -159,7 +159,7 @@
var intArray = new int[strArray.Length];
for (var i = 0; i < strArray.Length; i++)
{
- intArray[i] = int.Parse(strArray[i]);
+ int.TryParse(strArray[i], out intArray[i]);
}
return intArray;
@@ -176,7 +176,6 @@
}
sb.Remove(sb.Length - 1, 1);
-
PlayerPrefs.SetString(key, sb.ToString());
}
@@ -193,7 +192,7 @@
var array = new float[strArray.Length];
for (var i = 0; i < strArray.Length; i++)
{
- array[i] = float.Parse(strArray[i]);
+ float.TryParse(strArray[i], out array[i]);
}
return array;
--
Gitblit v1.8.0