def RefreshRankingBoard(self):
        self.AllClear()
        self.PageControl()
        for line, ResultSlotList in self.ResultSlotList.items():
            linewpage = line + self.NowStartLineNumber + (
                self.Page - 1) * ranking.RANK_SHOW_COUNT
            if linewpage >= ranking.GetRankCount():
                break
            (name, level, job, empire,
             guild) = ranking.GetRankByLine(linewpage)
            ResultSlotList[self.SLOT_RANKING].SetText(str(linewpage + 1))
            ResultSlotList[self.SLOT_NAME].SetText(name)
            ResultSlotList[self.SLOT_LEVEL].SetText(str(level))
            ResultSlotList[self.SLOT_GUILD_NAME].SetText(guild)
            self.ResultButtonList[line].Show()
            if player.GetName() == name:
                self.ResultButtonList[line].Down()

        self.MyResultSlotList[self.SLOT_NAME].SetText(player.GetName())
        self.MyResultSlotList[self.SLOT_LEVEL].SetText(
            str(player.GetStatus(player.LEVEL)))
        if player.GetGuildID():
            self.MyResultSlotList[self.SLOT_GUILD_NAME].SetText(
                player.GetGuildName())
        MyRank = ranking.GetRankMyLine()
        if MyRank:
            self.MyResultSlotList[self.SLOT_RANKING].SetText(str(MyRank))
        self.ScrollBar.SetMiddleBarSize(
            float(self.MAX_LINE_COUNT) / float(self.CheckNowItemCount()))
	def AddRank(self, line, name, members, time, last = None):
		if self.rankData != None:
			if localeInfo.IsARABIC():
				str_lineUp = "d:/ymir work/ui/game/guild/dragonlairranking/line_up_ae.sub"
				str_lineDown = "d:/ymir work/ui/game/guild/dragonlairranking/line_down_ae.sub"
			else:
				str_lineUp = "d:/ymir work/ui/game/guild/dragonlairranking/line_up.sub"
				str_lineDown = "d:/ymir work/ui/game/guild/dragonlairranking/line_down.sub"
			
			if self.rankData["ID"][line]:
				if last != None:
					self.rankData["ID"][line].SetText(str(last))
				else:
					self.rankData["ID"][line].SetText(str(line + 1))
				
				self.rankData["NAME"][line].SetText(str(name))
				self.rankData["MEMBERS"][line].SetText(str(members))
				self.rankData["TIME"][line].SetText(str(time))
				
				if player.GetGuildName() == str(name):
					self.rankLine[line].LoadImage(str_lineUp)
				else:
					self.rankLine[line].LoadImage(str_lineDown)
Пример #3
0
	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)