Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Problem: Client Edenium (Niemożliwa zmiana nazwy, zmiana nazwy zapisu kont)


Rekomendowane odpowiedzi

Opublikowano

Witam, chciałbym bazować na plikach serwerowych Edenium ale mam problem z zmianą nazwy clienta, zmieniam normalnie w root Locale.py a niestety wgl. nie działa nie zmienia się, kolejnym problemem jest to że nie mogę zmienić zapisu plików kont, z edenium zmieniam na moją nazwę serwera i niestety nic to nie daje, client się uruchamia i zamyka po owej zmianie, zmieniłem wszystko jak mogłem, możliwe że jest jeszcze gdzieś jakiś zapis z tego, proszę o pomoc.

 

Plik w którym zmieniałem nazwę z edenium na moją (intrologin.py):

 

 

import dbg
import app
import net
import ui
import ime
import snd
import wndMgr
import musicInfo
import serverInfo
import systemSetting
import ServerStateChecker
import localeInfo
import constInfo
import uiCommon
import time
import ServerCommandParser
import ime
import uiScriptLocale
import os
 
RUNUP_MATRIX_AUTH = FALSE
NEWCIBN_PASSPOD_AUTH = FALSE
 
LOGIN_DELAY_SEC = 0.0
SKIP_LOGIN_PHASE = FALSE
SKIP_LOGIN_PHASE_SUPPORT_CHANNEL = FALSE
FULL_BACK_IMAGE = FALSE
 
## URLS
HOMEPAGE_URL = "http://alceas.pl"
FORUM_URL = "http://forum.alceas.pl"
FACEBOOK_URL = "http://facebook.com/Alceas"
## URLS
 
PASSPOD_MSG_DICT = {}
 
if localeInfo.IsNEWCIBN() or localeInfo.IsCIBN10():
LOGIN_DELAY_SEC = 20.0
FULL_BACK_IMAGE = TRUE
NEWCIBN_PASSPOD_AUTH = TRUE
PASSPOD_MSG_DICT = {
"PASERR1" : localeInfo.LOGIN_FAILURE_PASERR1,
"PASERR2" : localeInfo.LOGIN_FAILURE_PASERR2,
"PASERR3" : localeInfo.LOGIN_FAILURE_PASERR3,
"PASERR4" : localeInfo.LOGIN_FAILURE_PASERR4,
"PASERR5" : localeInfo.LOGIN_FAILURE_PASERR5,
}
 
elif localeInfo.IsYMIR() or localeInfo.IsCHEONMA():
FULL_BACK_IMAGE = TRUE
 
elif localeInfo.IsHONGKONG():
FULL_BACK_IMAGE = TRUE
RUNUP_MATRIX_AUTH = TRUE 
PASSPOD_MSG_DICT = {
"NOTELE" : localeInfo.LOGIN_FAILURE_NOTELEBLOCK,
}
 
elif localeInfo.IsJAPAN():
FULL_BACK_IMAGE = TRUE
 
def IsFullBackImage():
global FULL_BACK_IMAGE
return FULL_BACK_IMAGE
 
def IsLoginDelay():
global LOGIN_DELAY_SEC
if LOGIN_DELAY_SEC > 0.0:
return TRUE
else:
return FALSE
 
def IsRunupMatrixAuth():
global RUNUP_MATRIX_AUTH
return RUNUP_MATRIX_AUTH 
 
def IsNEWCIBNPassPodAuth():
global NEWCIBN_PASSPOD_AUTH
return NEWCIBN_PASSPOD_AUTH
 
def GetLoginDelay():
global LOGIN_DELAY_SEC
return LOGIN_DELAY_SEC
 
app.SetGuildMarkPath("test")
 
class ConnectingDialog(ui.ScriptWindow):
 
def __init__(self):
ui.ScriptWindow.__init__(self)
self.__LoadDialog()
self.eventTimeOver = lambda *arg: None
self.eventExit = lambda *arg: None
 
def __del__(self):
ui.ScriptWindow.__del__(self)
 
def __LoadDialog(self):
try:
PythonScriptLoader = ui.PythonScriptLoader()
PythonScriptLoader.LoadScriptFile(self, "UIScript/ConnectingDialog.py")
 
self.board = self.GetChild("board")
self.message = self.GetChild("message")
self.countdownMessage = self.GetChild("countdown_message")
 
except:
import exception
exception.Abort("ConnectingDialog.LoadDialog.BindObject")
 
def Open(self, waitTime):
curTime = time.clock()
self.endTime = curTime + waitTime
 
self.Lock()
self.SetCenterPosition()
self.SetTop()
self.Show() 
 
def Close(self):
self.Unlock()
self.Hide()
 
def Destroy(self):
self.Hide()
self.ClearDictionary()
 
def SetText(self, text):
self.message.SetText(text)
 
def SetCountDownMessage(self, waitTime):
self.countdownMessage.SetText("%.0f%s" % (waitTime, localeInfo.SECOND))
 
def SAFE_SetTimeOverEvent(self, event):
self.eventTimeOver = ui.__mem_func__(event)
 
def SAFE_SetExitEvent(self, event):
self.eventExit = ui.__mem_func__(event)
 
def OnUpdate(self):
lastTime = max(0, self.endTime - time.clock())
if 0 == lastTime:
self.Close()
self.eventTimeOver()
else:
self.SetCountDownMessage(self.endTime - time.clock())
 
def OnPressExitKey(self):
#self.eventExit()
return TRUE
 
class LoginWindow(ui.ScriptWindow):
 
IS_TEST = net.IsTest()
 
def __init__(self, stream):
print "NEW LOGIN WINDOW  ----------------------------------------------------------------------------"
ui.ScriptWindow.__init__(self)
net.SetPhaseWindow(net.PHASE_WINDOW_LOGIN, self)
net.SetAccountConnectorHandler(self)
 
self.matrixInputChanceCount = 0
self.lastLoginTime = 0
self.inputDialog = None
self.connectingDialog = None
self.stream=stream
self.isNowCountDown=FALSE
self.isStartError=FALSE
 
self.xServerBoard = 0
self.yServerBoard = 0
self.saved = {
"aneris_save_01" : 0,
"aneris_save_02" : 0,
"aneris_save_03" : 0,
"aneris_save_04" : 0,
"aneris_save_05" : 0}
 
self.loadingImage = None
 
def __del__(self):
net.ClearPhaseWindow(net.PHASE_WINDOW_LOGIN, self)
net.SetAccountConnectorHandler(0)
ui.ScriptWindow.__del__(self)
print "---------------------------------------------------------------------------- DELETE LOGIN WINDOW"
 
def Open(self):
ServerStateChecker.Create(self)
 
print "LOGIN WINDOW OPEN ----------------------------------------------------------------------------"
 
self.loginFailureMsgDict={
#"DEFAULT" : locale.LOGIN_FAILURE_UNKNOWN,
 
"ALREADY" : localeInfo.LOGIN_FAILURE_ALREAY,
"NOID" : localeInfo.LOGIN_FAILURE_NOT_EXIST_ID,
"WRONGPWD" : localeInfo.LOGIN_FAILURE_WRONG_PASSWORD,
"FULL" : localeInfo.LOGIN_FAILURE_TOO_MANY_USER,
"SHUTDOWN" : localeInfo.LOGIN_FAILURE_SHUTDOWN,
"REPAIR" : localeInfo.LOGIN_FAILURE_REPAIR_ID,
"BLOCK" : localeInfo.LOGIN_FAILURE_BLOCK_ID,
"WRONGMAT" : localeInfo.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER,
"QUIT" : localeInfo.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER_TRIPLE,
"BESAMEKEY" : localeInfo.LOGIN_FAILURE_BE_SAME_KEY,
"NOTAVAIL" : localeInfo.LOGIN_FAILURE_NOT_AVAIL,
"NOBILL" : localeInfo.LOGIN_FAILURE_NOBILL,
"BLKLOGIN" : localeInfo.LOGIN_FAILURE_BLOCK_LOGIN,
"WEBBLK" : localeInfo.LOGIN_FAILURE_WEB_BLOCK,
}
 
self.loginFailureFuncDict = {
"WRONGPWD" : self.__DisconnectAndInputPassword,
"WRONGMAT" : self.__DisconnectAndInputMatrix,
"QUIT" : app.Exit,
}
 
self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight())
self.SetWindowName("LoginWindow")
 
if not self.__LoadScript(uiScriptLocale.LOCALE_UISCRIPT_PATH + "LoginWindow.py"):
dbg.TraceError("LoginWindow.Open - __LoadScript Error")
return
 
# if app.loggined:
# self.loginFailureFuncDict = {
# "WRONGPWD" : app.Exit,
# "WRONGMAT" : app.Exit,
# "QUIT" : app.Exit,
# }
 
if musicInfo.loginMusic != "":
snd.SetMusicVolume(systemSetting.GetMusicVolume())
snd.FadeInMusic("BGM/"+musicInfo.loginMusic)
 
snd.SetSoundVolume(systemSetting.GetSoundVolume())
 
# pevent key "[" "]"
ime.AddExceptKey(91)
ime.AddExceptKey(93)
 
self.Show()
 
global SKIP_LOGIN_PHASE
if SKIP_LOGIN_PHASE:
if self.isStartError:
self.connectBoard.Hide()
self.loginBoard.Hide()
self.serverBoard.Hide()
self.PopupNotifyMessage(localeInfo.LOGIN_CONNECT_FAILURE, self.__ExitGame)
return
 
if self.loginInfo:
self.serverBoard.Hide()
else:
# self.__RefreshServerList()
self.__OpenServerBoard()
else:
connectingIP = self.stream.GetConnectAddr()
if connectingIP:
if app.USE_OPENID and not app.OPENID_TEST :
# self.__RefreshServerList()
self.__OpenServerBoard()
else:
# self.__OpenLoginBoard()
if IsFullBackImage():
self.GetChild("bg1").Hide()
self.GetChild("bg2").Show()
 
else:
# self.__RefreshServerList()
self.__OpenServerBoard()
 
app.ShowCursor()
 
def Close(self):
 
if self.connectingDialog:
self.connectingDialog.Close()
self.connectingDialog = None
 
ServerStateChecker.Initialize(self)
 
print "---------------------------------------------------------------------------- CLOSE LOGIN WINDOW "
#
# selectMusic이 없으면 BGM이 끊기므로 두개 다 체크한다. 
#
if musicInfo.loginMusic != "" and musicInfo.selectMusic != "":
snd.FadeOutMusic("BGM/"+musicInfo.loginMusic)
 
## NOTE : idEditLine와 pwdEditLine은 이벤트가 서로 연결 되어있어서
##        Event를 강제로 초기화 해주어야만 합니다 - [levites]
self.idEditLine.SetTabEvent(0)
self.idEditLine.SetReturnEvent(0)
self.pwdEditLine.SetReturnEvent(0)
self.pwdEditLine.SetTabEvent(0)
 
self.connectBoard = None
self.loginBoard = None
self.idEditLine = None
self.pwdEditLine = None
self.inputDialog = None
self.connectingDialog = None
self.loadingImage = None
 
self.serverBoard = None
 
# RUNUP_MATRIX_AUTH
self.matrixQuizBoard = None
self.matrixAnswerInput = None
self.matrixAnswerOK = None
self.matrixAnswerCancel = None
# RUNUP_MATRIX_AUTH_END
 
# NEWCIBN_PASSPOD_AUTH
self.passpodBoard = None
self.passpodAnswerInput = None
self.passpodAnswerOK = None
self.passpodAnswerCancel = None
# NEWCIBN_PASSPOD_AUTH_END
 
self.KillFocus()
self.Hide()
 
self.stream.popupWindow.Close()
self.loginFailureFuncDict=None
 
ime.ClearExceptKey()
 
app.HideCursor()
 
def __SaveChannelInfo(self):
try:
file=open("channel.inf", "w")
file.write("%d %d %d" % (self.__GetServerID(), self.__GetChannelID(), self.__GetRegionID()))
except:
print "LoginWindow.__SaveChannelInfo - SaveError"
 
def __LoadChannelInfo(self):
try:
file=open("channel.inf")
lines=file.readlines()
 
if len(lines)>0:
tokens=lines[0].split()
 
selServerID=int(tokens[0])
selChannelID=int(tokens[1])
 
if len(tokens) == 3:
regionID = int(tokens[2])
 
return regionID, selServerID, selChannelID
 
except:
print "LoginWindow.__LoadChannelInfo - OpenError"
return -1, -1, -1
 
def __ExitGame(self):
app.Exit()
 
def SetIDEditLineFocus(self):
if self.idEditLine != None:
self.idEditLine.SetFocus()
 
def SetPasswordEditLineFocus(self):
if localeInfo.IsEUROPE():
if self.idEditLine != None: #0000862: [M2EU] 로그인창 팝업 에러: 종료시 먼저 None 설정됨
self.idEditLine.SetText("")
self.idEditLine.SetFocus() #0000685: [M2EU] 아이디/비밀번호 유추 가능 버그 수정: 무조건 아이디로 포커스가 가게 만든다
 
if self.pwdEditLine != None: #0000862: [M2EU] 로그인창 팝업 에러: 종료시 먼저 None 설정됨
self.pwdEditLine.SetText("")
else:
if self.pwdEditLine != None:
self.pwdEditLine.SetFocus() 
 
def OnEndCountDown(self):
self.isNowCountDown = FALSE
self.OnConnectFailure()
 
def OnConnectFailure(self):
 
if self.isNowCountDown:
return
 
snd.PlaySound("sound/ui/loginfail.wav")
 
if self.connectingDialog:
self.connectingDialog.Close()
self.connectingDialog = None
 
# if app.loggined:
# self.PopupNotifyMessage(localeInfo.LOGIN_CONNECT_FAILURE, self.__ExitGame)
# else:
self.PopupNotifyMessage(localeInfo.LOGIN_CONNECT_FAILURE, self.SetPasswordEditLineFocus)
 
def OnHandShake(self):
if not IsLoginDelay():
snd.PlaySound("sound/ui/loginok.wav")
self.PopupDisplayMessage(localeInfo.LOGIN_CONNECT_SUCCESS)
 
def OnLoginStart(self):
if not IsLoginDelay():
self.PopupDisplayMessage(localeInfo.LOGIN_PROCESSING)
 
def OnLoginFailure(self, error):
if self.connectingDialog:
self.connectingDialog.Close()
self.connectingDialog = None
 
try:
loginFailureMsg = self.loginFailureMsgDict[error]
except KeyError:
if PASSPOD_MSG_DICT:
try:
loginFailureMsg = PASSPOD_MSG_DICT[error]
except KeyError:
loginFailureMsg = localeInfo.LOGIN_FAILURE_UNKNOWN + error
else:
loginFailureMsg = localeInfo.LOGIN_FAILURE_UNKNOWN  + error
 
 
#0000685: [M2EU] 아이디/비밀번호 유추 가능 버그 수정: 무조건 패스워드로 포커스가 가게 만든다
loginFailureFunc=self.loginFailureFuncDict.get(error, self.SetPasswordEditLineFocus)
 
# if app.loggined:
# self.PopupNotifyMessage(loginFailureMsg, self.__ExitGame)
# else:
self.PopupNotifyMessage(loginFailureMsg, loginFailureFunc)
 
snd.PlaySound("sound/ui/loginfail.wav")
 
def __DisconnectAndInputID(self):
if self.connectingDialog:
self.connectingDialog.Close()
self.connectingDialog = None
 
self.SetIDEditLineFocus()
net.Disconnect()
 
def __DisconnectAndInputPassword(self):
if self.connectingDialog:
self.connectingDialog.Close()
self.connectingDialog = None
 
self.SetPasswordEditLineFocus()
net.Disconnect()
 
def __DisconnectAndInputMatrix(self):
if self.connectingDialog:
self.connectingDialog.Close()
self.connectingDialog = None
 
self.stream.popupWindow.Close()
self.matrixInputChanceCount -= 1
 
if self.matrixInputChanceCount <= 0:
self.__OnCloseInputDialog()
 
elif self.inputDialog:
self.inputDialog.Show()
 
def __LoadScript(self, fileName):
try:
pyScrLoader = ui.PythonScriptLoader()
pyScrLoader.LoadScriptFile(self, fileName)
except:
import exception
exception.Abort("LoginWindow.__LoadScript.LoadObject")
 
try:
GetObject=self.GetChild
self.deletePassword = self.GetChild("delete_password")
self.serverBoard = GetObject("ServerBoard")
self.serverExitButton = GetObject("ServerExitButton")
self.connectBoard = GetObject("ConnectBoard")
self.idEditLine = GetObject("ID_Line")
self.pwdEditLine = GetObject("Password_Line")
self.serverInfo = GetObject("ConnectName")
self.selectConnectButton = GetObject("SelectConnectButton")
self.loginButton = GetObject("btnLogin")
self.chBtn1 = GetObject("selectChannel1")
self.chBtn1_ok = GetObject("selectChannel1_ok")
self.chBtn2 = GetObject("selectChannel2")
self.chBtn2_ok = GetObject("selectChannel2_ok")
self.chBtn3 = GetObject("selectChannel3")
self.chBtn3_ok = GetObject("selectChannel3_ok")
self.chBtn4 = GetObject("selectChannel4")
self.chBtn4_ok = GetObject("selectChannel4_ok")
self.chBtn5 = GetObject("selectChannel5")
self.chBtn5_ok = GetObject("selectChannel5_ok")
 
self.passwordPanel = {
"aneris_save_01" : self.GetChild("aneris_save_01"),
"aneris_save_02" : self.GetChild("aneris_save_02"),
"aneris_save_03" : self.GetChild("aneris_save_03"),
"aneris_save_04" : self.GetChild("aneris_save_04"),
"aneris_save_05" : self.GetChild("aneris_save_05")}
 
self.deletePassword.SetEvent(ui.__mem_func__(self.__OnClickDeleteButton))
for (slot, passButton) in self.passwordPanel.items():
passButton.SetEvent(ui.__mem_func__(self.SavePassword), slot)
for i in xrange(1, 6):
if len(open("dane/aneris_save_0%s" % i, "r").read()) > 2:
self.GetChild("aneris_save_0%s_text" % i).SetText(str(open("dane/aneris_save_0%s" % i, "r").read().split("/")[0]))
self.saved["aneris_save_0%s" % i] = 1
 
except:
import exception
exception.Abort("LoginWindow.__LoadScript.BindObject")
 
if self.IS_TEST:
self.selectConnectButton.Hide()
else:
self.selectConnectButton.SetEvent(ui.__mem_func__(self.__OnClickSelectConnectButton))
 
self.serverBoard.OnKeyUp = ui.__mem_func__(self.__ServerBoard_OnKeyUp)
self.xServerBoard, self.yServerBoard = self.serverBoard.GetLocalPosition()
 
self.chBtn1_ok.Hide()
self.chBtn2_ok.Hide()
self.chBtn3_ok.Hide()
self.chBtn4_ok.Hide()
self.chBtn5_ok.Hide()
self.chBtn1.SetEvent(ui.__mem_func__(self.__OnClickChannel1))
self.chBtn2.SetEvent(ui.__mem_func__(self.__OnClickChannel2))
self.chBtn3.SetEvent(ui.__mem_func__(self.__OnClickChannel3))
self.chBtn4.SetEvent(ui.__mem_func__(self.__OnClickChannel4))
self.chBtn5.SetEvent(ui.__mem_func__(self.__OnClickChannel5))
self.serverExitButton.SetEvent(ui.__mem_func__(self.__OnClickExitButton))
 
self.loginButton.SetEvent(ui.__mem_func__(self.__OnClickLoginButton))
 
self.idEditLine.SetReturnEvent(ui.__mem_func__(self.pwdEditLine.SetFocus))
self.idEditLine.SetTabEvent(ui.__mem_func__(self.pwdEditLine.SetFocus))
self.idEditLine.SetFocus()
 
self.pwdEditLine.SetReturnEvent(ui.__mem_func__(self.__OnClickLoginButton))
self.pwdEditLine.SetTabEvent(ui.__mem_func__(self.idEditLine.SetFocus))
 
self.__OnClickChannel(1)
 
if IsFullBackImage():
self.GetChild("bg1").Show()
self.GetChild("bg2").Hide()
return 1
 
def __OnClickDeleteButton(self):
import uiCommon
deleteBoard = uiCommon.InputDialogWithDescription()
deleteBoard.SetTitle("Usuwanie slotu danych")
deleteBoard.SetAcceptEvent(ui.__mem_func__(self.Accept))
deleteBoard.SetCancelEvent(ui.__mem_func__(self.Cancel))
deleteBoard.SetMaxLength(1)
deleteBoard.SetBoardWidth(200)
deleteBoard.SetDescription("Wpisz slot danych do usuniecia (1-5):")
deleteBoard.Open()
self.deleteBoard = deleteBoard
def Accept(self):
self.slots = ["aneris_save_01", "aneris_save_02", "aneris_save_03", "aneris_save_04", "aneris_save_05"]
deleteSlot = self.deleteBoard.GetText()
 
if int(deleteSlot) > 5:
self.stream.popupWindow.Open("Nie znaleziono slotu", self.EmptyFunc, locale.UI_CANCEL)
return
 
self.saved[self.slots[int(deleteSlot)-1]] = 0
 
self.GetChild("aneris_save_0%s_text" % deleteSlot).SetText("Brak danych")
self.GetChild("aneris_save_0%s" % deleteSlot).SetUp()
open("dane/aneris_save_0%s" % deleteSlot, "w").write("/") 
return self.Cancel()
 
def Cancel(self):
self.deleteBoard.Close()
self.deleteBoard = None
return TRUE 
def SavePassword(self, slot):
id = self.idEditLine.GetText()
pwd = self.pwdEditLine.GetText()
self.pwdir = "dane/%s" % str(slot)
 
if self.saved[slot] == 1:
data = open(self.pwdir, "r").read().split("/")
self.idEditLine.SetText(data[0])
self.pwdEditLine.SetText(data[1])
#self.stream.popupWindow.Open("Dane zostaly usuniete", self.DeletePassword, locale.UI_CANCEL)
#self.saved[slot] = 0
return
 
if len(id) == 0 or len(pwd) == 0:
self.PopupNotifyMessage("Nie zapisano", self.EmptyFunc)
return
 
self.saved[slot] = 1
 
self.GetChild("%s_text" % str(slot)).SetText(str(id))
 
open(self.pwdir, "w").write("%s/%s" % (str(id), str(pwd)))
def Connect(self, id, pwd):
if constInfo.SEQUENCE_PACKET_ENABLE:
net.SetPacketSequenceMode()
 
if IsLoginDelay():
loginDelay = GetLoginDelay()
self.connectingDialog = ConnectingDialog()
self.connectingDialog.Open(loginDelay)
self.connectingDialog.SAFE_SetTimeOverEvent(self.OnEndCountDown)
self.connectingDialog.SAFE_SetExitEvent(self.OnPressExitKey)
self.isNowCountDown = TRUE
else:
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(localeInfo.LOGIN_CONNETING, self.SetPasswordEditLineFocus, localeInfo.UI_CANCEL)
 
self.stream.SetLoginInfo(id, pwd)
self.stream.Connect()
 
def __OnClickExitButton(self):
self.stream.SetPhaseWindow(0)
 
def __SetServerInfo(self, name):
net.SetServerInfo(name.strip())
self.serverInfo.SetText(name)
 
def PopupDisplayMessage(self, msg):
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(msg)
 
def PopupNotifyMessage(self, msg, func=0):
if not func:
func=self.EmptyFunc
 
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(msg, func, localeInfo.UI_OK)
 
# RUNUP_MATRIX_AUTH
def BINARY_OnRunupMatrixQuiz(self, quiz):
if not IsRunupMatrixAuth():
return
 
id = self.GetChild("RunupMatrixID")
id.SetText(self.idEditLine.GetText())
 
code = self.GetChild("RunupMatrixCode")
 
code.SetText("".join(["[%c,%c]" % (quiz[i], quiz[i+1]) for i in xrange(0, len(quiz), 2)]))
 
self.stream.popupWindow.Close()
self.serverBoard.Hide()
self.connectBoard.Hide()
self.loginBoard.Hide()
self.matrixQuizBoard.Show()
self.matrixAnswerInput.SetFocus()
 
def __OnClickMatrixAnswerOK(self):
answer = self.matrixAnswerInput.GetText()
 
print "matrix_quiz.ok"
net.SendRunupMatrixCardPacket(answer)
self.matrixQuizBoard.Hide() 
 
self.stream.popupWindow.Close()
self.stream.popupWindow.Open("WAITING FOR MATRIX AUTHENTICATION", 
self.__OnClickMatrixAnswerCancel, 
localeInfo.UI_CANCEL)
 
def __OnClickMatrixAnswerCancel(self):
print "matrix_quiz.cancel"
 
if self.matrixQuizBoard:
self.matrixQuizBoard.Hide() 
 
if self.connectBoard:
self.connectBoard.Show() 
 
if self.loginBoard:
self.loginBoard.Show()
 
# RUNUP_MATRIX_AUTH_END
 
# NEWCIBN_PASSPOD_AUTH
def BINARY_OnNEWCIBNPasspodRequest(self):
if not IsNEWCIBNPassPodAuth():
return
 
if self.connectingDialog:
self.connectingDialog.Close()
self.connectingDialog = None
 
self.stream.popupWindow.Close()
self.serverBoard.Hide()
self.connectBoard.Hide()
self.loginBoard.Hide()
self.passpodBoard.Show()
self.passpodAnswerInput.SetFocus()
 
def BINARY_OnNEWCIBNPasspodFailure(self):
if not IsNEWCIBNPassPodAuth():
return
 
def __OnClickNEWCIBNPasspodAnswerOK(self):
answer = self.passpodAnswerInput.GetText()
 
print "passpod.ok"
net.SendNEWCIBNPasspodAnswerPacket(answer)
self.passpodAnswerInput.SetText("")
self.passpodBoard.Hide() 
 
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(localeInfo.WAIT_FOR_PASSPOD, 
self.__OnClickNEWCIBNPasspodAnswerCancel, 
localeInfo.UI_CANCEL)
 
def __OnClickNEWCIBNPasspodAnswerCancel(self):
print "passpod.cancel"
 
if self.passpodBoard:
self.passpodBoard.Hide() 
 
if self.connectBoard:
self.connectBoard.Show() 
 
if self.loginBoard:
self.loginBoard.Show()
 
# NEWCIBN_PASSPOD_AUTH_END
 
 
def OnMatrixCard(self, row1, row2, row3, row4, col1, col2, col3, col4):
 
if self.connectingDialog:
self.connectingDialog.Close()
self.connectingDialog = None
 
self.matrixInputChanceCount = 3
 
self.stream.popupWindow.Close()
 
# CHINA_MATRIX_CARD_BUG_FIX
## A~Z 까지 26 이내의 값이 들어있어야만 한다.
## Python Exception Log 에서 그 이상의 값이 들어있어서 에러 방지
## 헌데 왜 한국쪽 로그에서 이게 활용되는지는 모르겠음
row1 = min(30, row1)
row2 = min(30, row2)
row3 = min(30, row3)
row4 = min(30, row4)
# END_OF_CHINA_MATRIX_CARD_BUG_FIX
 
row1 = chr(row1 + ord('A'))
row2 = chr(row2 + ord('A'))
row3 = chr(row3 + ord('A'))
row4 = chr(row4 + ord('A'))
col1 = col1 + 1
col2 = col2 + 1
col3 = col3 + 1
col4 = col4 + 1
 
inputDialog = uiCommon.InputDialogWithDescription2()
inputDialog.SetMaxLength(8)
inputDialog.SetAcceptEvent(ui.__mem_func__(self.__OnAcceptMatrixCardData))
inputDialog.SetCancelEvent(ui.__mem_func__(self.__OnCancelMatrixCardData))
inputDialog.SetTitle(localeInfo.INPUT_MATRIX_CARD_TITLE)
inputDialog.SetDescription1(localeInfo.INPUT_MATRIX_CARD_NUMBER)
inputDialog.SetDescription2("%c%d %c%d %c%d %c%d" % (row1, col1,
row2, col2,
row3, col3,
row4, col4))
 
inputDialog.Open()
self.inputDialog = inputDialog
 
def __OnAcceptMatrixCardData(self):
text = self.inputDialog.GetText()
net.SendChinaMatrixCardPacket(text)
if self.inputDialog:
self.inputDialog.Hide()
self.PopupNotifyMessage(localeInfo.LOGIN_PROCESSING)
return TRUE
 
def __OnCancelMatrixCardData(self):
self.SetPasswordEditLineFocus()
self.__OnCloseInputDialog()
self.__DisconnectAndInputPassword()
return TRUE
 
def __OnCloseInputDialog(self):
if self.inputDialog:
self.inputDialog.Close()
self.inputDialog = None
return TRUE
 
def OnPressExitKey(self):
self.stream.popupWindow.Close()
self.stream.SetPhaseWindow(0)
return TRUE
 
def OnExit(self):
self.stream.popupWindow.Close()
self.stream.popupWindow.Open(localeInfo.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER_TRIPLE, app.Exit, localeInfo.UI_OK)
 
def OnUpdate(self):
ServerStateChecker.Update()
 
def EmptyFunc(self):
pass
 
#####################################################################################
 
def __ServerBoard_OnKeyUp(self, key):
if self.serverBoard.IsShow():
if app.DIK_RETURN==key:
self.__OnClickSelectServerButton()
return TRUE
 
def __GetRegionID(self):
return 0
 
def __GetServerID(self):
return 0
#return self.serverList.GetSelectedItem()
 
def __GetChannelID(self):
return 0
#return self.channelList.GetSelectedItem()
 
# SEVER_LIST_BUG_FIX
def __ServerIDToServerIndex(self, regionID, targetServerID):
try:
regionDict = serverInfo.REGION_DICT[regionID]
except KeyError:
return -1
 
retServerIndex = 0
for eachServerID, regionDataDict in regionDict.items():
if eachServerID == targetServerID:
return retServerIndex
 
retServerIndex += 1 
 
return -1
 
def __ChannelIDToChannelIndex(self, channelID):
return channelID - 1
# END_OF_SEVER_LIST_BUG_FIX
 
def __OpenServerBoard(self):
 
loadRegionID, loadServerID, loadChannelID = self.__LoadChannelInfo()
 
serverIndex = self.__ServerIDToServerIndex(loadRegionID, loadServerID)
channelIndex = self.__ChannelIDToChannelIndex(loadChannelID)
 
## Show/Hide 코드에 문제가 있어서 임시 - [levites]
self.serverBoard.SetPosition(self.xServerBoard, self.yServerBoard)
self.serverBoard.Show()
self.connectBoard.Hide()
 
def __OnSelectSettlementArea(self):
# SEVER_LIST_BUG_FIX
regionID = self.__GetRegionID()
serverID = self.serverListOnRegionBoard.GetSelectedItem()
 
serverIndex = self.__ServerIDToServerIndex(regionID, serverID)
# END_OF_SEVER_LIST_BUG_FIX
 
self.__OnSelectServer()
 
def __OnSelectServer(self):
self.__OnCloseInputDialog()
self.__RequestServerStateList()
self.__RefreshServerStateList()
 
def __RequestServerStateList(self):
regionID = self.__GetRegionID()
serverID = self.__GetServerID()
 
try:
channelDict = serverInfo.REGION_DICT[regionID][serverID]["channel"]
except:
print " __RequestServerStateList - serverInfo.REGION_DICT(%d, %d)" % (regionID, serverID)
return
 
ServerStateChecker.Initialize();
for id, channelDataDict in channelDict.items():
key=channelDataDict["key"]
ip=channelDataDict["ip"]
udp_port=channelDataDict["udp_port"]
ServerStateChecker.AddChannel(key, ip, udp_port)
 
ServerStateChecker.Request()
 
def __GetChannelName(self, regionID, selServerID, selChannelID):
try:
return serverInfo.REGION_DICT[regionID][selServerID]["channel"][selChannelID]["name"]
except KeyError:
if 9==selChannelID:
return localeInfo.CHANNEL_PVP
else:
return localeInfo.CHANNEL_NORMAL % (selChannelID)
 
def NotifyChannelState(self, addrKey, state):
try:
stateName=serverInfo.STATE_DICT[state]
except:
stateName=serverInfo.STATE_NONE
 
regionID=int(addrKey/1000)
serverID=int(addrKey/10) % 100
channelID=addrKey%10
 
try:
serverInfo.REGION_DICT[regionID][serverID]["channel"][channelID]["state"] = stateName
self.__RefreshServerStateList()
 
except:
import exception
exception.Abort(localeInfo.CHANNEL_NOT_FIND_INFO)
 
def __OnClickExitServerButton(self):
print "exit server"
# self.__OpenLoginBoard() 
 
if IsFullBackImage():
self.GetChild("bg1").Hide()
self.GetChild("bg2").Show()
 
 
def __OnClickSelectConnectButton(self):
if IsFullBackImage():
self.GetChild("bg1").Show()
self.GetChild("bg2").Hide()
# self.__RefreshServerList()
self.__OpenServerBoard()
 
def __OnClickLoginButton(self):
id = self.idEditLine.GetText()
pwd = self.pwdEditLine.GetText() 
 
if len(id)==0:
self.PopupNotifyMessage(localeInfo.LOGIN_INPUT_ID, self.SetIDEditLineFocus)
return
 
if len(pwd)==0:
self.PopupNotifyMessage(localeInfo.LOGIN_INPUT_PASSWORD, self.SetPasswordEditLineFocus)
return
 
self.Connect(id, pwd)
 
def __OnClickChannel(self, channel):
if IsFullBackImage():
self.GetChild("bg1").Hide()
self.GetChild("bg2").Show()
 
regionID = 0
serverID = 1
channelID = channel
 
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.ForceSetlocaleInfo("ymir", "localeInfo/ymir")
elif "쾌도 서버" == serverName: 
app.ForceSetlocaleInfo("we_korea", "localeInfo/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 :
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)
 
def __OnClickChannel1(self):
self.chBtn2_ok.Hide()
self.chBtn3_ok.Hide()
self.chBtn4_ok.Hide()
self.chBtn5_ok.Hide()
self.chBtn1_ok.Show()
self.__OnClickChannel(1)
 
def __OnClickChannel2(self):
self.chBtn1_ok.Hide()
self.chBtn3_ok.Hide()
self.chBtn4_ok.Hide()
self.chBtn5_ok.Hide()
self.chBtn2_ok.Show()
self.__OnClickChannel(2)
 
def __OnClickChannel3(self):
self.chBtn1_ok.Hide()
self.chBtn2_ok.Hide()
self.chBtn4_ok.Hide()
self.chBtn5_ok.Hide()
self.chBtn3_ok.Show()
self.__OnClickChannel(3)
 
def __OnClickChannel4(self):
self.chBtn1_ok.Hide()
self.chBtn3_ok.Hide()
self.chBtn2_ok.Hide()
self.chBtn5_ok.Hide()
self.chBtn4_ok.Show()
self.__OnClickChannel(4)
 
def __OnClickChannel5(self):
self.chBtn1_ok.Hide()
self.chBtn3_ok.Hide()
self.chBtn4_ok.Hide()
self.chBtn2_ok.Hide()
self.chBtn5_ok.Show()
self.__OnClickChannel(5)
 
def __OnClickChannel6(self):
self.__OnClickChannel(6)
 
def __OnClickChannel7(self):
self.__OnClickChannel(7)
 
def __OnClickChannel8(self):
self.__OnClickChannel(8)
 
def __ClickForum(self):
global FORUM_URL
os.system("start " + str(FORUM_URL))
 
def __ClickHomepage(self):
global HOMEPAGE_URL
os.system("start " + str(HOMEPAGE_URL))
 
def __ClickFacebook(self):
global FACEBOOK_URL
os.system("start " + str(FACEBOOK_URL))
 
 

 

 

 

Proszę o pomoc ;]

image.png

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...