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()))
Exemple #2
0
        def setMeleyMap(self):
            mapName = background.GetCurrentMapName()
            if mapName == "metin2_map_n_flame_dragon":
                if player.GetGuildID() != 0 and player.GetPKMode(
                ) != player.PK_MODE_GUILD:
                    for btn in self.pvpModeButtonDict.values():
                        btn.SetUp()

                    net.SendChatPacket("/pkmode 4", chat.CHAT_TYPE_TALKING)
                    self.pvpModeButtonDict[player.PK_MODE_GUILD].Down()
	def BULID_EnterGuildArea(self, areaID):
		# GUILD_BUILDING
		mainCharacterName = player.GetMainCharacterName()
		masterName = guild.GetGuildMasterName()

		if mainCharacterName != masterName:
			return

		if areaID != player.GetGuildID():
			return
		# END_OF_GUILD_BUILDING

		self.wndGameButton.ShowBuildButton()
Exemple #4
0
	def __OnClickPvPModeGuildButton(self):
		if self.__CheckPvPProtectedLevelPlayer():
			return

		self.__RefreshPVPButtonList()

		if 0 == player.GetGuildID():
			chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.OPTION_PVPMODE_CANNOT_SET_GUILD_MODE)
			return

		if constInfo.PVPMODE_ENABLE:
			net.SendChatPacket("/pkmode 4", chat.CHAT_TYPE_TALKING)
		else:
			chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.OPTION_PVPMODE_NOT_SUPPORT)