Jump to content

Alignment refresh problem


Recommended Posts

Hey there,

I have a bit of problem with the alignment refresh. The problem is that it "crashes" and doesn't show the numbers as it should.

 

Pics of err:

 

spacer.png

 

spacer.png

 

 

Can someone help me with it?

 

Here the syserr:

Spoiler

0419 10:27:24564 :: Traceback (most recent call last):

0419 10:27:24564 ::   File "game.py", line 610, in OnChangePKMode

0419 10:27:24565 ::   File "interfaceModule.py", line 801, in OnChangePKMode

0419 10:27:24565 ::   File "uiCharacter.py", line 584, in RefreshAlignment

0419 10:27:24566 ::   File "uiToolTip.py", line 150, in AlignHorizonalCenter

 

game.py ( line 610 ):

Spoiler

    def OnChangePKMode(self):

        self.interface.OnChangePKMode()

        try:
            self.__NotifyError(localeInfo.OPTION_PVPMODE_MESSAGE_DICT[player.GetPKMode()])
        except KeyError:
            print "UNKNOWN PVPMode[%d]" % (player.GetPKMode())

        if constInfo.PVPMODE_TEST_ENABLE:
            curPKMode = player.GetPKMode()
            alignment, grade = chr.testGetPKData()
            self.pkModeNameDict = { 0 : "PEACE", 1 : "REVENGE", 2 : "FREE", 3 : "PROTECT", }
            self.testPKMode.SetText("Current PK Mode : " + self.pkModeNameDict.get(curPKMode, "UNKNOWN"))
            self.testAlignment.SetText("Current Alignment : " + str(alignment) + " (" + localeInfo.TITLE_NAME_LIST[grade] + ")")

 

interfaceModule.py ( line 801 ):

Spoiler

    def OnChangePKMode(self):
        self.wndCharacter.RefreshAlignment()
        self.dlgSystem.OnChangePKMode()

 

uiCharacter.py ( line 584 ):

Spoiler

    def RefreshAlignment(self):
        point, grade = player.GetAlignmentData()

        import colorInfo
        COLOR_DICT = {    0 : colorInfo.TITLE_RGB_GOOD_4,
                        1 : colorInfo.TITLE_RGB_GOOD_3,
                        2 : colorInfo.TITLE_RGB_GOOD_2,
                        3 : colorInfo.TITLE_RGB_GOOD_1,
                        4 : colorInfo.TITLE_RGB_NORMAL,
                        5 : colorInfo.TITLE_RGB_EVIL_1,
                        6 : colorInfo.TITLE_RGB_EVIL_2,
                        7 : colorInfo.TITLE_RGB_EVIL_3,
                        8 : colorInfo.TITLE_RGB_EVIL_4, }
        colorList = COLOR_DICT.get(grade, colorInfo.TITLE_RGB_NORMAL)
        gradeColor = ui.GenerateColor(colorList[0], colorList[1], colorList[2])

        self.toolTipAlignment.ClearToolTip()
        self.toolTipAlignment.AutoAppendTextLine(localeInfo.TITLE_NAME_LIST[grade], gradeColor)
        self.toolTipAlignment.AutoAppendTextLine(localeInfo.ALIGNMENT_NAME + str(point))
        self.toolTipAlignment.AlignHorizonalCenter()

 

uiToolTip.py ( line 150 ):

Spoiler

    def AlignHorizonalCenter(self):
        for child in self.childrenList:
            (x, y)=child.GetLocalPosition()
            child.SetPosition(self.toolTipWidth/2, y)

        self.ResizeToolTip()

 

 

Thanks in advance!

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.