fix pair charname when it's unicode
This commit is contained in:
parent
23cd025c3b
commit
d70f834b4d
11
gameview.py
11
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]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user