From d22e1d381c323905697642db78c843fa1761e0ce Mon Sep 17 00:00:00 2001 From: YongAn404 Date: Mon, 26 Aug 2024 20:17:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E5=A4=9A=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Core/FramePlayer.cs | 4 ++-- Core/Manager/HintManager.cs | 4 ++++ Core/Manager/MusicManager.cs | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Core/FramePlayer.cs b/Core/FramePlayer.cs index 2aa9ec7..2dfebb0 100644 --- a/Core/FramePlayer.cs +++ b/Core/FramePlayer.cs @@ -73,8 +73,7 @@ private static void OnStaticVerified(VerifiedEventArgs args) } private static void OnStaticDestroying(DestroyingEventArgs args) { - FramePlayer fPlayer = args.Player.ToFPlayer(); - fPlayer.Invalid(); + args.Player.ToFPlayer().Invalid(); } private static void OnStaticWaitingForPlayers() { @@ -253,6 +252,7 @@ public static FramePlayer Get(int numId) public void Invalid() { Events.Handlers.FramePlayer.OnInvalidFramePlayer(new InvalidFramePlayerEventArgs(this)); + dictionary.Remove(ExPlayer.Id); HintManager?.Clean(); ExPlayer = null; } diff --git a/Core/Manager/HintManager.cs b/Core/Manager/HintManager.cs index bae3348..fd42a81 100644 --- a/Core/Manager/HintManager.cs +++ b/Core/Manager/HintManager.cs @@ -42,6 +42,8 @@ public IEnumerator Update() used = 20; + text[used] = ""; + if (ChatTexts.Count > 28 - used) { for (int i = 0; i < ChatTexts.Count - (28 - used); i++) @@ -65,6 +67,8 @@ public IEnumerator Update() } } + used = 29; + if (usedMex - RoleText.Count < used + MessageTexts.Count + 1) { for (int i = 0; i < usedMex - RoleText.Count - (used + MessageTexts.Count + 1); i++) diff --git a/Core/Manager/MusicManager.cs b/Core/Manager/MusicManager.cs index 23ea966..693787d 100644 --- a/Core/Manager/MusicManager.cs +++ b/Core/Manager/MusicManager.cs @@ -77,7 +77,7 @@ public AudioPlayerBase Play(string musicFile, string npcId, string npcName, Trac audioPlayerBase.AudioToPlay = playerListId; } - audioPlayerBase.Enqueue(@$"{Paths.Plugins}\{Server.Port}\YongAnPluginData\{musicFile}.ogg", 0); + audioPlayerBase.Enqueue($"{Paths.Plugins}/{Server.Port}/YongAnPluginData/{musicFile}.ogg", 0); audioPlayerBase.Volume = volume; audioPlayerBase.Loop = isLoop; audioPlayerBase.Play(0);