def __RegisterSkill(self): race = net.GetMainActorRace() group = net.GetMainActorSkillGroup() empire = net.GetMainActorEmpire() playerSettingModule.RegisterSkill(race, group, empire)
def __SelectSkillGroup(self, index): for btn in self.skillGroupButton: btn.SetUp() self.skillGroupButton[index].Down() if self.__CanUseHorseSkill(): if 0 == index: index = net.GetMainActorSkillGroup()-1 elif 1 == index: index = self.PAGE_HORSE self.curSelectedSkillGroup = index self.__SetSkillSlotData(net.GetMainActorRace(), index+1, net.GetMainActorEmpire())
def __CanUseSkillNow(self): if 0 == net.GetMainActorSkillGroup(): return False return True
def RefreshCharacter(self): if self.isLoaded==0: return ## Name try: characterName = player.GetName() guildName = player.GetGuildName() self.characterNameValue.SetText(characterName) self.guildNameValue.SetText(guildName) if not guildName: if localeInfo.IsARABIC(): self.characterNameSlot.SetPosition(190, 34) else: self.characterNameSlot.SetPosition(109, 34) self.guildNameSlot.Hide() else: if localeInfo.IsJAPAN(): self.characterNameSlot.SetPosition(143, 34) else: self.characterNameSlot.SetPosition(153, 34) self.guildNameSlot.Show() except: import exception exception.Abort("CharacterWindow.RefreshCharacter.BindObject") race = net.GetMainActorRace() group = net.GetMainActorSkillGroup() empire = net.GetMainActorEmpire() ## Job Text job = chr.RaceToJob(race) self.__SetJobText(job, group) ## FaceImage try: faceImageName = FACE_IMAGE_DICT[race] try: self.faceImage.LoadImage(faceImageName) except: print "CharacterWindow.RefreshCharacter(race=%d, faceImageName=%s)" % (race, faceImageName) self.faceImage.Hide() except KeyError: self.faceImage.Hide() ## GroupName self.__SetSkillGroupName(race, group) ## Skill if 0 == group: self.__SelectSkillGroup(0) else: self.__SetSkillSlotData(race, group, empire) if self.__CanUseHorseSkill(): self.__SelectSkillGroup(0)
def __CanUseSkillNow(self): if 0 == net.GetMainActorSkillGroup(): return FALSE return TRUE