From d70f834b4de0d8e0e5d922f7e78e5183292bab1d Mon Sep 17 00:00:00 2001 From: cidoku Date: Tue, 1 Apr 2025 19:56:42 -0300 Subject: [PATCH] fix pair charname when it's unicode --- gameview.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gameview.py b/gameview.py index 369c53f..648278d 100644 --- a/gameview.py +++ b/gameview.py @@ -472,11 +472,11 @@ class AOCharMovie(QtGui.QLabel): def play_talking(self, p_char, p_emote, scaling = SCALING_AUTO): p_char = p_char.lower() - gif_path = AOpath + 'characters/' + p_char + '/(b)' + p_emote + '.gif' + #gif_path = AOpath + 'characters/' + p_char + '/(b)' + p_emote + '.gif' self.m_movie.stop() self.clear() - self.m_movie.setFileName(gif_path) + #self.m_movie.setFileName(gif_path) self.m_movie.jumpToFrame(0) self.play_once = False @@ -486,11 +486,11 @@ class AOCharMovie(QtGui.QLabel): def play_idle(self, p_char, p_emote, scaling = SCALING_AUTO): p_char = p_char.lower() - gif_path = AOpath + 'characters/' + p_char + '/(a)' + p_emote + '.gif' + #gif_path = AOpath + 'characters/' + p_char + '/(a)' + p_emote + '.gif' self.m_movie.stop() self.clear() - self.m_movie.setFileName(gif_path) + #self.m_movie.setFileName(gif_path) self.m_movie.jumpToFrame(0) self.play_once = False @@ -2740,6 +2740,7 @@ class GUI(QtGui.QWidget): self.icchatinput.insert(" ") m_chatmessage[CHARNAME] = m_chatmessage[CHARNAME].decode("utf-8") + m_chatmessage[OTHER_NAME] = m_chatmessage[OTHER_NAME].decode("utf-8") m_chatmessage[SHOWNAME] = m_chatmessage[SHOWNAME].decode('utf-8') f_char = m_chatmessage[CHARNAME] @@ -2751,7 +2752,7 @@ class GUI(QtGui.QWidget): timestamp = "[%d:%.2d] " % (t[3], t[4]) if not self.demo_playing else "" if f_char.lower() != self.charlist[f_char_id][0].lower(): - logcharname = self.charlist[f_char_id][0] + ' (' + f_char.decode("utf-8") + ')' + logcharname = self.charlist[f_char_id][0] + ' (' + f_char + ')' chatmsg = m_chatmessage[CHATMSG]