From 84198eaf5a3fa897f645110fa148a489d76ca2ff Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期一, 05 十一月 2018 09:48:54 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/NewBieGuidance/NewBieCenter.cs | 50 +++++++--
System/Team/TeamPrepareWin.cs | 10 +-
/dev/null | 68 -------------
System/Team/TeamAssistTipWin.cs | 92 ++++++++++++++++++
System/Hero/HeroAIRecorder.cs | 29 +++++
System/Team/TeamAssistTipWin.cs.meta | 4
System/NewBieGuidance/NewBieWin.cs | 3
System/MainInterfacePanel/MapSwitchingBehaviour.cs | 12 +-
System/Team/MyTeamWin.cs | 2
System/Team/TeamModel.cs | 14 --
System/Hero/HeroAIRecorder.cs.meta | 4
11 files changed, 174 insertions(+), 114 deletions(-)
diff --git a/System/Hero/Equipment.cs b/System/Hero/Equipment.cs
deleted file mode 100644
index c8000c7..0000000
--- a/System/Hero/Equipment.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-锘�//--------------------------------------------------------
-// [Author]: 绗簩涓栫晫
-// [ Date ]: Wednesday, August 09, 2017
-//--------------------------------------------------------
-using UnityEngine;
-using System.Collections;
-using System;
-
-namespace Snxxz.UI {
-
- public class Equipment {
- public event Action levelUpEvent;
- public event Action starUpEvent;
-
- public int instanceId {
- get; private set;
- }
-
- public int configId {
- get; private set;
- }
-
- int m_Level = 0;
- public int level {
- get {
- return m_Level;
- }
- set {
- if(m_Level != value) {
- m_Level = value;
- if(levelUpEvent != null) {
- levelUpEvent();
- }
- }
- }
- }
-
- int m_Star = 0;
- public int star {
- get {
- return m_Star;
- }
- set {
- if(m_Star != value) {
- m_Star = value;
- if(starUpEvent != null) {
- starUpEvent();
- }
- }
- }
- }
-
-
- public Equipment(int _instanceId,int _configId) {
- this.instanceId = _instanceId;
- this.configId = _configId;
- }
-
- public static int Compare(Equipment _a,Equipment _b) {
- return _a.configId > _b.configId ? -1 : 1;
- }
-
- }
-
-}
-
-
-
diff --git a/System/Hero/HeroAIRecorder.cs b/System/Hero/HeroAIRecorder.cs
new file mode 100644
index 0000000..d8bcb82
--- /dev/null
+++ b/System/Hero/HeroAIRecorder.cs
@@ -0,0 +1,29 @@
+锘縰sing System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class HeroAIRecorder
+{
+
+ public static bool autoHandupRecord {
+ get; private set;
+ }
+
+ public static int moveToNPCRecord {
+ get; private set;
+ }
+
+ public static void Record()
+ {
+ autoHandupRecord = PlayerDatas.Instance.hero.aiHandler.IsAuto();
+ moveToNPCRecord = MapTransferUtility.Instance.NpcID;
+ }
+
+ public static void ClearRecord()
+ {
+ autoHandupRecord = false;
+ moveToNPCRecord = 0;
+ }
+
+
+}
diff --git a/System/Hero/Equipment.cs.meta b/System/Hero/HeroAIRecorder.cs.meta
similarity index 75%
copy from System/Hero/Equipment.cs.meta
copy to System/Hero/HeroAIRecorder.cs.meta
index b198db0..8250b72 100644
--- a/System/Hero/Equipment.cs.meta
+++ b/System/Hero/HeroAIRecorder.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: f88ee90289d2a9441b1729c63f6ad209
-timeCreated: 1502241484
+guid: 06b217e97ec00664ea3cc63c13fc534c
+timeCreated: 1541148769
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/System/MainInterfacePanel/MapSwitchingBehaviour.cs b/System/MainInterfacePanel/MapSwitchingBehaviour.cs
index 5aac8e5..6945c81 100644
--- a/System/MainInterfacePanel/MapSwitchingBehaviour.cs
+++ b/System/MainInterfacePanel/MapSwitchingBehaviour.cs
@@ -57,13 +57,13 @@
private void OnClickMapSwitch()
{
- if (PlayerDatas.Instance.extersion.bossState == 1)
- {
- SysNotifyMgr.Instance.ShowTip("Task_Transfer1");
- return;
- }
+ //if (PlayerDatas.Instance.extersion.bossState == 1)
+ //{
+ // SysNotifyMgr.Instance.ShowTip("Task_Transfer1");
+ // return;
+ //}
ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"),
- "What锛熺郴涓嶇郴瑕侀��鍑哄幓", (bool isOk) =>
+ Language.Get("ZLMapQuit"), (bool isOk) =>
{
if (isOk)
{
diff --git a/System/NewBieGuidance/NewBieCenter.cs b/System/NewBieGuidance/NewBieCenter.cs
index 58cd9b4..6fd11df 100644
--- a/System/NewBieGuidance/NewBieCenter.cs
+++ b/System/NewBieGuidance/NewBieCenter.cs
@@ -16,21 +16,18 @@
{
int m_CurrentGuide = 0;
- public int currentGuide
- {
+ public int currentGuide {
get { return m_CurrentGuide; }
set { m_CurrentGuide = value; }
}
int m_GuideStep = 0;
- public int guideStep
- {
+ public int guideStep {
get { return m_GuideStep; }
private set { m_GuideStep = value; }
}
- public bool inGuiding
- {
+ public bool inGuiding {
get { return currentGuide != 0; }
}
@@ -157,12 +154,15 @@
FunctionalGuideCenter.Instance.RemoveAllUnderWayGuide();
currentGuide = _id;
- MapTransferUtility.Instance.Clear();
if (PlayerDatas.Instance.hero != null)
{
+ HeroAIRecorder.Record();
PlayerDatas.Instance.hero.Behaviour.StopHandupAI();
PlayerDatas.Instance.hero.StopPathFind();
}
+
+ MapTransferUtility.Instance.Clear();
+
var config = Config.Instance.Get<GuideConfig>(currentGuide);
guideStep = config.Steps.Length > 0 ? config.Steps[0] : 0;
@@ -208,17 +208,12 @@
send.IsOK = 1;
GameNetSystem.Instance.SendInfo(send);
- var guideConfig = Config.Instance.Get<GuideConfig>(guideRecord);
- var functionOpenConfig = Config.Instance.Get<FuncOpenLVConfig>(guideConfig.Condition);
- if (functionOpenConfig != null && functionOpenConfig.ContinueTask == 1)
- {
- taskmodel.AutomaticTripToTask(taskmodel.currentMission);
- }
-
if (guideCompletedEvent != null)
{
guideCompletedEvent(guideRecord);
}
+
+ Postprocessing(guideRecord);
}
public void RemoveNewBieGuide(int _id)
@@ -463,6 +458,33 @@
}
}
+ private void Postprocessing(int guideId)
+ {
+ var guideConfig = Config.Instance.Get<GuideConfig>(guideId);
+ var functionOpenConfig = Config.Instance.Get<FuncOpenLVConfig>(guideConfig.Condition);
+ if (functionOpenConfig != null && functionOpenConfig.ContinueTask == 1)
+ {
+ taskmodel.AutomaticTripToTask(taskmodel.currentMission);
+ }
+ else
+ {
+ if (HeroAIRecorder.autoHandupRecord)
+ {
+ if (PlayerDatas.Instance.hero != null)
+ {
+ PlayerDatas.Instance.hero.Behaviour.StartHandupAI();
+ }
+ }
+
+ if (HeroAIRecorder.moveToNPCRecord != 0)
+ {
+ MapTransferUtility.Instance.MoveToNPC(HeroAIRecorder.moveToNPCRecord);
+ }
+
+ HeroAIRecorder.ClearRecord();
+ }
+ }
+
}
}
diff --git a/System/NewBieGuidance/NewBieWin.cs b/System/NewBieGuidance/NewBieWin.cs
index 17faf0e..ff9f4da 100644
--- a/System/NewBieGuidance/NewBieWin.cs
+++ b/System/NewBieGuidance/NewBieWin.cs
@@ -69,6 +69,7 @@
protected override void OnPreClose()
{
+ NewBieCenter.Instance.guideStepChangeEvent -= OnStepChange;
if (NewBieCenter.Instance.currentGuide != 0)
{
m_newBieGuideUsher.Stop();
@@ -76,8 +77,6 @@
m_ClickTarget = null;
NewBieCenter.Instance.FinishCurrentGuideWithoutCloseWin();
}
-
- NewBieCenter.Instance.guideStepChangeEvent -= OnStepChange;
}
protected override void OnAfterClose()
diff --git a/System/Team/MyTeamWin.cs b/System/Team/MyTeamWin.cs
index 13210b5..dfb51cd 100644
--- a/System/Team/MyTeamWin.cs
+++ b/System/Team/MyTeamWin.cs
@@ -160,7 +160,7 @@
{
if (model.myTeam.iamCaptainer)
{
- model.RecordHeroAI();
+ HeroAIRecorder.Record();
}
GroupDungeonChallengeProcessor.Instance.GroupChallengeDungeon(model.myTeam.mission.mapId, model.myTeam.mission.mapEx, false);
}
diff --git a/System/Team/TeamAssistTipWin.cs b/System/Team/TeamAssistTipWin.cs
new file mode 100644
index 0000000..1507243
--- /dev/null
+++ b/System/Team/TeamAssistTipWin.cs
@@ -0,0 +1,92 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Friday, November 02, 2018
+//--------------------------------------------------------
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+using TableConfig;
+
+namespace Snxxz.UI
+{
+ public class TeamAssistTipWin : Window
+ {
+ [SerializeField] Text m_Target;
+ [SerializeField] Text m_AssistPointOnce;
+ [SerializeField] Text m_AssistPointAccumulative;
+ [SerializeField] Button m_AssistShop;
+
+ TeamModel model { get { return ModelCenter.Instance.GetModel<TeamModel>(); } }
+ DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
+
+ #region Built-in
+ protected override void BindController()
+ {
+ }
+
+ protected override void AddListeners()
+ {
+ m_AssistShop.AddListener(GotoShop);
+ }
+
+ protected override void OnPreOpen()
+ {
+ DisplayTarget();
+ DisplayAssistPoint();
+ }
+
+ protected override void OnAfterOpen()
+ {
+ }
+
+ protected override void OnPreClose()
+ {
+ }
+
+ protected override void OnAfterClose()
+ {
+ }
+ #endregion
+
+ private void DisplayTarget()
+ {
+ var mapId = model.myTeam.mission.mapId;
+ var lineId = model.myTeam.mission.mapEx;
+
+ var dungeonId = dungeonModel.GetDungeonId(mapId, lineId);
+ var config = Config.Instance.Get<DungeonConfig>(dungeonId);
+ if (config != null)
+ {
+ m_Target.text = Language.Get("", config.FBName);
+ }
+ else
+ {
+ m_Target.text = "";
+ }
+ }
+
+ private void DisplayAssistPoint()
+ {
+ var onceAssist = 100;
+ m_AssistPointOnce.text = Language.Get("", onceAssist);
+
+ var totalAssist = 1000;
+ var accumulativeAssist = 800;
+ m_AssistPointAccumulative.text = Language.Get("", accumulativeAssist, totalAssist);
+ }
+
+ private void GotoShop()
+ {
+
+ }
+
+ }
+
+}
+
+
+
+
diff --git a/System/Hero/Equipment.cs.meta b/System/Team/TeamAssistTipWin.cs.meta
similarity index 75%
rename from System/Hero/Equipment.cs.meta
rename to System/Team/TeamAssistTipWin.cs.meta
index b198db0..e2c849e 100644
--- a/System/Hero/Equipment.cs.meta
+++ b/System/Team/TeamAssistTipWin.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: f88ee90289d2a9441b1729c63f6ad209
-timeCreated: 1502241484
+guid: b0bc4e032dad22e4fbb0e9d769334b56
+timeCreated: 1541151094
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/System/Team/TeamModel.cs b/System/Team/TeamModel.cs
index e19e6df..4c520b8 100644
--- a/System/Team/TeamModel.cs
+++ b/System/Team/TeamModel.cs
@@ -1204,20 +1204,6 @@
return index;
}
- public bool autoHandupRecord = false;
- public int moveToNPCRecord = 0;
- public void RecordHeroAI()
- {
- autoHandupRecord = PlayerDatas.Instance.hero.aiHandler.IsAuto();
- moveToNPCRecord = MapTransferUtility.Instance.NpcID;
- }
-
- public void ClearHeroAIRecord()
- {
- autoHandupRecord = false;
- moveToNPCRecord = 0;
- }
-
public void OnMapInitOk()
{
var mapConfig = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID);
diff --git a/System/Team/TeamPrepareWin.cs b/System/Team/TeamPrepareWin.cs
index 8a2d8a4..03caf4c 100644
--- a/System/Team/TeamPrepareWin.cs
+++ b/System/Team/TeamPrepareWin.cs
@@ -58,7 +58,7 @@
rejectManual = false;
if (!model.myTeam.iamCaptainer)
{
- model.RecordHeroAI();
+ HeroAIRecorder.Record();
}
PlayerDatas.Instance.hero.Behaviour.StopHandupAI();
@@ -102,7 +102,7 @@
{
if (rejectManual || model.teamPrepare.isError || model.teamPrepare.IsReject())
{
- if (model.autoHandupRecord)
+ if (HeroAIRecorder.autoHandupRecord)
{
if (PlayerDatas.Instance.hero != null)
{
@@ -110,13 +110,13 @@
}
}
- if (model.moveToNPCRecord != 0)
+ if (HeroAIRecorder.moveToNPCRecord != 0)
{
- MapTransferUtility.Instance.MoveToNPC(model.moveToNPCRecord);
+ MapTransferUtility.Instance.MoveToNPC(HeroAIRecorder.moveToNPCRecord);
}
}
- model.ClearHeroAIRecord();
+ HeroAIRecorder.ClearRecord();
model.memberPrepareStateChangeEvent -= ShowPrepareStates;
}
--
Gitblit v1.8.0