import os import app import localeInfo import debugInfo CHINA_PORT = 50000 STATE_NONE = open("lib/xml/dom/kapali.cfg").read() SERVER_NAME = "|cffffc700test" SERVER2_NAME = "|cffffc700test" SERVER_IP = "185.78.86.09" SERVER2_IP = "192.168.1.1" CH1_PORT = 19910 CH2_PORT = 19920 CH3_PORT = 19930 CH4_PORT = 19940 AUTH_PORT = 10610 def BuildServerList(orderList): retMarkAddrDict = {} retAuthAddrDict = {} retRegion0 = {} ridx = 1 for region, auth, mark, channels in orderList: cidx = 1 channelDict = {} for channel in channels: key = ridx * 10 + cidx channel["key"] = key channelDict[cidx] = channel cidx += 1 region["channel"] = channelDict retRegion0[ridx] = region retAuthAddrDict[ridx] = auth retMarkAddrDict[ridx*10] = mark ridx += 1 return retRegion0, retAuthAddrDict, retMarkAddrDict app.ServerName = None STATE_DICT = { 0 : "|cFFFF0000|hBakimda!", 1 : "|cffFFC125NORM", 2 : "|cffFFC125FULL", 3 : "|cffFFC125Busy" } SERVER01_CHANNEL_DICT = { 1:{"key":11,"name":"|cffffc700CH1","ip": SERVER_IP,"tcp_port": CH1_PORT,"udp_port": CH1_PORT,"state":STATE_NONE,}, 2:{"key":12,"name":"|cffffc700CH2","ip": SERVER_IP,"tcp_port": CH2_PORT,"udp_port": CH2_PORT,"state":STATE_NONE,}, 3:{"key":13,"name":"|cffffc700CH3","ip": SERVER_IP,"tcp_port": CH3_PORT,"udp_port": CH3_PORT,"state":STATE_NONE,}, 4:{"key":14,"name":"|cffffc700CH4","ip": SERVER_IP,"tcp_port": CH4_PORT,"udp_port": CH4_PORT,"state":STATE_NONE,}, } SERVER02_CHANNEL_DICT = { 1:{"key":21,"name":"|cffffc700CH1","ip": SERVER2_IP,"tcp_port": CH1_PORT,"udp_port": CH1_PORT,"state":STATE_NONE,}, 2:{"key":22,"name":"|cffffc700CH2","ip": SERVER2_IP,"tcp_port": CH2_PORT,"udp_port": CH2_PORT,"state":STATE_NONE,}, 3:{"key":23,"name":"|cffffc700CH3","ip": SERVER2_IP,"tcp_port": CH3_PORT,"udp_port": CH3_PORT,"state":STATE_NONE,}, 4:{"key":24,"name":"|cffffc700CH4","ip": SERVER2_IP,"tcp_port": CH4_PORT,"udp_port": CH4_PORT,"state":STATE_NONE,}, } REGION_NAME_DICT = { 0 : "Turkey", } REGION_AUTH_SERVER_DICT = { 0 : { 1 : { "ip": SERVER_IP,"port":AUTH_PORT, }, 2 : { "ip": SERVER2_IP,"port":AUTH_PORT, }, } } REGION_DICT = { 0 : { 1 : { "name" : SERVER_NAME,"channel" : SERVER01_CHANNEL_DICT, }, 2 : { "name" : SERVER2_NAME,"channel" : SERVER02_CHANNEL_DICT, }, }, } MARKADDR_DICT = { 10 : { "ip" : SERVER_IP,"tcp_port" : CH1_PORT, "mark" : "10.tga", "symbol_path" : "10", }, 20 : { "ip" : SERVER2_IP,"tcp_port" : CH1_PORT, "mark" : "20.tga", "symbol_path" : "20", }, } TESTADDR = { "ip" : SERVER_IP,"tcp_port" : CHINA_PORT, "udp_port" : CHINA_PORT, }