From 10b4bfe74e3452f830115ab71a316102733b7122 Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期一, 12 十一月 2018 19:56:58 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/Chat/ChatCenter.cs | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/System/Chat/ChatCenter.cs b/System/Chat/ChatCenter.cs
index 38081ee..20cc9ed 100644
--- a/System/Chat/ChatCenter.cs
+++ b/System/Chat/ChatCenter.cs
@@ -26,6 +26,7 @@
WindowCenter.Instance.windowAfterOpenEvent += WindowAfterOpenEvent;
StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
PlayerRealmData.OnPlayerCollectEnd += OnPlayerCollectEnd;
+ SnxxzGame.Instance.AddApplicationOutAction(OnApplicationQuit);
var time = bandTime;
banTimeArray[0] = time.Year;
@@ -45,6 +46,7 @@
public int chatCharacterLimit { get; private set; }
public int bugleItem { get; private set; }
+ public bool beforeDungeon { get; private set; }
public List<ChatInfoType> chatChannels { get; private set; }
public int chatInputLength { get; set; }
@@ -69,6 +71,12 @@
repeatCountLimit = int.Parse(config.Numerical2);
maliceCheckCount = int.Parse(config.Numerical3);
maliceLimitCount = int.Parse(config.Numerical4);
+
+ config = Config.Instance.Get<FuncConfigConfig>("LocalChatHistoryCount");
+ if (config != null)
+ {
+ LocalChatHistory.localSaveCount = int.Parse(config.Numerical1);
+ }
}
public event Action<string, bool, bool> UpdateChatValueEvent;
@@ -186,6 +194,15 @@
{
openChatAfterCollect = false;
}
+ if (!beforeDungeon && isDungeon)
+ {
+ LocalChatHistory.Read();
+ }
+ if (beforeDungeon && !isDungeon)
+ {
+ LocalChatHistory.Save();
+ }
+ beforeDungeon = isDungeon;
}
void ClearAllVoice()
@@ -1016,6 +1033,11 @@
}
#endregion
+ private void OnApplicationQuit()
+ {
+ LocalChatHistory.Save();
+ }
+
}
}
--
Gitblit v1.8.0