def SetChannel(self, ch): self.SetChannelInfo(ch) self.stream.SetConnectInfo(twix_work.IP, self.ChannelPort(ch, 0), twix_work.IP, self.ChannelPort("LOGIN")) net.SetMarkServer(twix_work.IP, self.ChannelPort("LOGO")) app.SetGuildMarkPath("10.tga") app.SetGuildSymbolPath("10") net.SetServerInfo(self.ChannelPort(ch, 2))
def __OnClickChannel4Button(self): global DEINEIP global AUTHPORT global CH4PORT self.stream.SetConnectInfo(DEINEIP, CH4PORT, DEINEIP, AUTHPORT) net.SetServerInfo("Channel 4") net.SetMarkServer(DEINEIP, CH4PORT) self.serverInfo.SetText("Channel 4") app.SetGuildMarkPath("10.tga") app.SetGuildSymbolPath("10")
def SetChannel(self, ch): self.channelID = ch for i in xrange(4): if not self.channelID == i: self.channelLabel[i][0].SetColor(0x00000000) self.channelLabel[i][1].SetOutline(0) self.stream.SetConnectInfo("144.91.65.109", self.ChannelPort(ch, 0), "144.91.65.109", self.ChannelPort("LOGIN")) GFHhg54GHGhh45GHGH.SetMarkServer("144.91.65.109", self.ChannelPort("LOGO")) app.SetGuildMarkPath("10.tga") app.SetGuildSymbolPath("10") GFHhg54GHGhh45GHGH.SetServerInfo(self.ChannelPort(ch, 2))
def __OnClickSelectServerButton(self): if IsFullBackImage(): self.GetChild("bg1").Hide() self.GetChild("bg2").Show() regionID = self.__GetRegionID() serverID = self.__GetServerID() channelID = self.__GetChannelID() if (not serverInfo.REGION_DICT.has_key(regionID)): self.PopupNotifyMessage(localeInfo.CHANNEL_SELECT_REGION) return if (not serverInfo.REGION_DICT[regionID].has_key(serverID)): self.PopupNotifyMessage(localeInfo.CHANNEL_SELECT_SERVER) return try: channelDict = serverInfo.REGION_DICT[regionID][serverID]["channel"] except KeyError: return try: state = channelDict[channelID]["state"] except KeyError: self.PopupNotifyMessage(localeInfo.CHANNEL_SELECT_CHANNEL) return # 상태가 FULL 과 같으면 진입 금지 if state == serverInfo.STATE_DICT[3]: self.PopupNotifyMessage(localeInfo.CHANNEL_NOTIFY_FULL) return self.__SaveChannelInfo() try: serverName = serverInfo.REGION_DICT[regionID][serverID]["name"] channelName = serverInfo.REGION_DICT[regionID][serverID]["channel"][channelID]["name"] addrKey = serverInfo.REGION_DICT[regionID][serverID]["channel"][channelID]["key"] if "천마 서버" == serverName: app.ForceSetLocale("ymir", "locale/ymir") elif "쾌도 서버" == serverName: app.ForceSetLocale("we_korea", "locale/we_korea") except: print " ERROR __OnClickSelectServerButton(%d, %d, %d)" % (regionID, serverID, channelID) serverName = localeInfo.CHANNEL_EMPTY_SERVER channelName = localeInfo.CHANNEL_NORMAL % channelID self.__SetServerInfo("%s, %s " % (serverName, channelName)) try: ip = serverInfo.REGION_DICT[regionID][serverID]["channel"][channelID]["ip"] tcp_port = serverInfo.REGION_DICT[regionID][serverID]["channel"][channelID]["tcp_port"] except: import exception exception.Abort("LoginWindow.__OnClickSelectServerButton - 서버 선택 실패") try: account_ip = serverInfo.REGION_AUTH_SERVER_DICT[regionID][serverID]["ip"] account_port = serverInfo.REGION_AUTH_SERVER_DICT[regionID][serverID]["port"] except: account_ip = 0 account_port = 0 try: markKey = regionID*1000 + serverID*10 markAddrValue=serverInfo.MARKADDR_DICT[markKey] net.SetMarkServer(markAddrValue["ip"], markAddrValue["tcp_port"]) app.SetGuildMarkPath(markAddrValue["mark"]) # GUILD_SYMBOL app.SetGuildSymbolPath(markAddrValue["symbol_path"]) # END_OF_GUILD_SYMBOL except: import exception exception.Abort("LoginWindow.__OnClickSelectServerButton - 마크 정보 없음") if app.USE_OPENID and not app.OPENID_TEST : ## 2012.07.19 OpenID : 김용욱 # 채널 선택 화면에서 "확인"(SelectServerButton) 을 눌렀을때, # 로그인 화면으로 넘어가지 않고 바로 서버에 OpenID 인증키를 보내도록 수정 self.stream.SetConnectInfo(ip, tcp_port, account_ip, account_port) self.Connect(0, 0) else : self.stream.SetConnectInfo(ip, tcp_port, account_ip, account_port) self.__OpenLoginBoard()
def __OnClickSelectServerButton(self): if IsFullBackImage(): self.GetChild("bg1").Show() self.GetChild("bg2").Hide() regionID = self.__GetRegionID() serverID = self.__GetServerID() channelID = self.__GetChannelID() if (not serverInfo.REGION_DICT.has_key(regionID)): self.PopupNotifyMessage(locale.CHANNEL_SELECT_REGION) return if (not serverInfo.REGION_DICT[regionID].has_key(serverID)): self.PopupNotifyMessage(locale.CHANNEL_SELECT_SERVER) return try: channelDict = serverInfo.REGION_DICT[regionID][serverID]["channel"] except KeyError: return try: state = channelDict[channelID]["state"] except KeyError: self.PopupNotifyMessage(locale.CHANNEL_SELECT_CHANNEL) return # »óÅ°¡ FULL °ú °°Àžžé ÁøÀÔ ±ÝÁö if state == serverInfo.STATE_DICT[3]: self.PopupNotifyMessage(locale.CHANNEL_NOTIFY_FULL) return self.__SaveChannelInfo() try: channelName = serverInfo.REGION_DICT[regionID][serverID][ "channel"][channelID]["name"] addrKey = serverInfo.REGION_DICT[regionID][serverID]["channel"][ channelID]["key"] except: print " ERROR __OnClickSelectServerButton(%d, %d, %d)" % ( regionID, serverID, channelID) channelName = locale.CHANNEL_NORMAL % channelID self.__SetServerInfo("%s, %s " % (channelName)) try: ip = serverInfo.REGION_DICT[regionID][serverID]["channel"][ channelID]["ip"] tcp_port = serverInfo.REGION_DICT[regionID][serverID]["channel"][ channelID]["tcp_port"] except: import exception exception.Abort( "LoginWindow.__OnClickSelectServerButton - Œ¹ö Œ±Åà œÇÆÐ") try: account_ip = serverInfo.REGION_AUTH_SERVER_DICT[regionID][ serverID]["ip"] account_port = serverInfo.REGION_AUTH_SERVER_DICT[regionID][ serverID]["port"] except: account_ip = 0 account_port = 0 try: markKey = regionID * 1000 + serverID * 10 markAddrValue = serverInfo.MARKADDR_DICT[markKey] net.SetMarkServer(markAddrValue["ip"], markAddrValue["tcp_port"]) app.SetGuildMarkPath(markAddrValue["mark"]) # GUILD_SYMBOL app.SetGuildSymbolPath(markAddrValue["symbol_path"]) # END_OF_GUILD_SYMBOL except: import exception exception.Abort( "LoginWindow.__OnClickSelectServerButton - ž¶Å© Á€ºž ŸøÀœ") self.stream.SetConnectInfo(ip, tcp_port, account_ip, account_port) self.__OpenLoginBoard()
def __OpenServerBoard(self): global DEINEIP global CH1PORT global AUTHPORT global CH2PORT global CHANNELAZ self.stream.SetConnectInfo(DEINEIP, CH1PORT, DEINEIP, AUTHPORT) net.SetServerInfo("Channel 1") net.SetMarkServer(DEINEIP, CH1PORT) self.serverInfo.SetText("Channel 1") app.SetGuildMarkPath("10.tga") app.SetGuildSymbolPath("10") self.Channel1Button.SetEvent( ui.__mem_func__(self.__OnClickChannel1Button)) self.Channel2Button.SetEvent( ui.__mem_func__(self.__OnClickChannel2Button)) self.Channel3Button.SetEvent( ui.__mem_func__(self.__OnClickChannel3Button)) self.Channel4Button.SetEvent( ui.__mem_func__(self.__OnClickChannel4Button)) if CHANNELAZ == 1: self.Channel2Button.Hide() self.Channel3Button.Hide() self.Channel4Button.Hide() elif CHANNELAZ == 2: self.Channel3Button.Hide() self.Channel4Button.Hide() elif CHANNELAZ == 3: self.Channel4Button.Hide() self.BGBoard.Hide() print "XMAS_SNOW ON" background.EnableSnow(1) self.serverExitButton.SetEvent( ui.__mem_func__(self.__OnClickExitServerButton)) self.serverExitButton.SetText(locale.UI_CLOSE) # RUNUP_MATRIX_AUTH if IsRunupMatrixAuth(): self.matrixQuizBoard.Hide() # RUNUP_MATRIX_AUTH_END # NEWCIBN_PASSPOD_AUTH if IsNEWCIBNPassPodAuth(): self.passpodBoard.Hide() # NEWCIBN_PASSPOD_AUTH_END self.serverBoard.SetPosition(self.xServerBoard, wndMgr.GetScreenHeight()) self.serverBoard.Hide() if self.virtualKeyboard: self.virtualKeyboard.Show() self.AccountBoard.Show() self.AccEditBoard.Hide() self.__LoadACCNames() if app.loggined: self.Connect(self.id, self.pwd) self.connectBoard.Hide() self.loginBoard.Hide() elif not self.stream.isAutoLogin: self.connectBoard.Show() self.loginBoard.Show() ## if users have the login infomation, then don't initialize.2005.9 haho if self.idEditLine == None: self.idEditLine.SetText("") if self.pwdEditLine == None: self.pwdEditLine.SetText("") self.idEditLine.SetFocus() global SKIP_LOGIN_PHASE if SKIP_LOGIN_PHASE: if not self.loginInfo: self.connectBoard.Hide()