def __GetTotalDefText(self):
defValue=player.GetStatus(player.DEF_GRADE)
if constInfo.ADD_DEF_BONUS_ENABLE:
defValue+=player.GetStatus(player.DEF_BONUS)
return "%d" % (defValue)
def RefreshStatus(self):
if self.isLoaded==0:
return
try:
self.GetChild("Level_Value").SetText(str(player.GetStatus(player.LEVEL)))
self.GetChild("Exp_Value").SetText(str(unsigned32(player.GetEXP())))
self.GetChild("RestExp_Value").SetText(str(unsigned32(player.GetStatus(player.NEXT_EXP)) - unsigned32(player.GetStatus(player.EXP))))
self.GetChild("HP_Value").SetText(str(player.GetStatus(player.HP)) + '/' + str(player.GetStatus(player.MAX_HP)))
self.GetChild("SP_Value").SetText(str(player.GetStatus(player.SP)) + '/' + str(player.GetStatus(player.MAX_SP)))
self.GetChild("STR_Value").SetText(str(player.GetStatus(player.ST)))
self.GetChild("DEX_Value").SetText(str(player.GetStatus(player.DX)))
self.GetChild("HTH_Value").SetText(str(player.GetStatus(player.HT)))
self.GetChild("INT_Value").SetText(str(player.GetStatus(player.IQ)))
self.GetChild("ATT_Value").SetText(self.__GetTotalAtkText())
self.GetChild("DEF_Value").SetText(self.__GetTotalDefText())
self.GetChild("MATT_Value").SetText(self.__GetTotalMagAtkText())
#self.GetChild("MATT_Value").SetText(str(player.GetStatus(player.MAG_ATT)))
self.GetChild("MDEF_Value").SetText(str(player.GetStatus(player.MAG_DEF)))
self.GetChild("ASPD_Value").SetText(str(player.GetStatus(player.ATT_SPEED)))
self.GetChild("MSPD_Value").SetText(str(player.GetStatus(player.MOVING_SPEED)))
self.GetChild("CSPD_Value").SetText(str(player.GetStatus(player.CASTING_SPEED)))
self.GetChild("ER_Value").SetText(str(player.GetStatus(player.EVADE_RATE)))
except:
#import exception
#exception.Abort("CharacterWindow.RefreshStatus.BindObject")
## °ÔÀÓÀÌ Æ¨°Ü ¹ö¸²
pass
self.__RefreshStatusPlusButtonList()
self.__RefreshStatusMinusButtonList()
self.RefreshAlignment()
if self.refreshToolTip:
self.refreshToolTip()
def __RefreshStatusPlusButtonList(self):
if self.isLoaded==0:
return
statusPlusPoint=player.GetStatus(player.STAT)
if statusPlusPoint>0:
self.statusPlusValue.SetText(str(statusPlusPoint))
self.statusPlusLabel.Show()
self.ShowStatusPlusButtonList()
self.ShowStatusHizliPlusButtonList()
else:
self.statusPlusValue.SetText(str(0))
self.statusPlusLabel.Hide()
self.HideStatusPlusButtonList()
self.HideStatusHizliPlusButtonList()
statusPlusPoint=player.GetStatus(player.STAT)
if statusPlusPoint>0:
self.statusPlusValue.SetText(str(statusPlusPoint))
self.statusPlusLabel.Show()
self.ShowStatusPlusButtonList()
else:
self.statusPlusValue.SetText(str(0))
self.statusPlusLabel.Hide()
self.HideStatusPlusButtonList()
def __RefreshStatusMinusButtonList(self):
if self.isLoaded==0:
return
statusMinusPoint=self.__GetStatMinusPoint()
if statusMinusPoint>0:
self.__ShowStatusMinusButtonList()
else:
self.__HideStatusMinusButtonList()
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.AppendSpace(2)
if point >= 30000:
self.toolTipAlignment.AutoAppendTextLine(localeInfo.ALIGN_BONUS_GOOD_7_A, self.toolTipAlignment.POSITIVE_COLOR)
self.toolTipAlignment.AutoAppendTextLine(localeInfo.ALIGN_BONUS_GOOD_7_B, self.toolTipAlignment.POSITIVE_COLOR)
self.toolTipAlignment.AppendSpace(2)
elif point >= 25000:
self.toolTipAlignment.AutoAppendTextLine(localeInfo.ALIGN_BONUS_GOOD_6_A, self.toolTipAlignment.POSITIVE_COLOR)
self.toolTipAlignment.AutoAppendTextLine(localeInfo.ALIGN_BONUS_GOOD_6_B, self.toolTipAlignment.POSITIVE_COLOR)
self.toolTipAlignment.AppendSpace(2)
elif point >= 18000:
self.toolTipAlignment.AutoAppendTextLine(localeInfo.ALIGN_BONUS_GOOD_5_A, self.toolTipAlignment.POSITIVE_COLOR)
self.toolTipAlignment.AutoAppendTextLine(localeInfo.ALIGN_BONUS_GOOD_5_B, self.toolTipAlignment.POSITIVE_COLOR)
self.toolTipAlignment.AppendSpace(2)
elif point >= 12000:
self.toolTipAlignment.AutoAppendTextLine(localeInfo.ALIGN_BONUS_GOOD_4_A, self.toolTipAlignment.POSITIVE_COLOR)
self.toolTipAlignment.AutoAppendTextLine(localeInfo.ALIGN_BONUS_GOOD_4_B, self.toolTipAlignment.POSITIVE_COLOR)
self.toolTipAlignment.AppendSpace(2)
elif point >= 8000:
self.toolTipAlignment.AutoAppendTextLine(localeInfo.ALIGN_BONUS_GOOD_3_A, self.toolTipAlignment.POSITIVE_COLOR)
self.toolTipAlignment.AutoAppendTextLine(localeInfo.ALIGN_BONUS_GOOD_3_B, self.toolTipAlignment.POSITIVE_COLOR)
self.toolTipAlignment.AppendSpace(2)
elif point >= 4000:
self.toolTipAlignment.AutoAppendTextLine(localeInfo.ALIGN_BONUS_GOOD_2_A, self.toolTipAlignment.POSITIVE_COLOR)
self.toolTipAlignment.AutoAppendTextLine(localeInfo.ALIGN_BONUS_GOOD_2_B, self.toolTipAlignment.POSITIVE_COLOR)
self.toolTipAlignment.AppendSpace(2)
elif point >= 1000:
self.toolTipAlignment.AutoAppendTextLine(localeInfo.ALIGN_BONUS_GOOD_1_A, self.toolTipAlignment.POSITIVE_COLOR)
self.toolTipAlignment.AutoAppendTextLine(localeInfo.ALIGN_BONUS_GOOD_1_B, self.toolTipAlignment.POSITIVE_COLOR)
self.toolTipAlignment.AppendSpace(2)
#self.toolTipAlignment.AutoAppendTextLine(localeInfo.ACHIEVEMENT_NAME + str(player.GetAchievementPoint()))
#self.toolTipAlignment.AppendSpace(2)
self.toolTipAlignment.AlignHorizonalCenter()
self.toolTipAlignment.AlignHorizonalCenter()