Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import app
- import locale
- import debugInfo
- 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
- if (locale.IsEUROPE() and app.GetLocalePath()):
- STATE_NONE = "Inchis"
- STATE_DICT = {
- 0 : "Inchis",
- 1 : "Normal",
- 2 : "OCUPAT",
- 3 : "PLIN"
- }
- SERVER01_CHANNEL = [
- {"name":"CH1 ","ip":"87.243.7.168","tcp_port":19210,"udp_port":19210,"state":STATE_NONE,},
- {"name":"CH2 ","ip":"87.243.7.168","tcp_port":19220,"udp_port":19220,"state":STATE_NONE,},
- ]
- SERVER02_CHANNEL = [
- {"name":"CH1 ","ip":"86.105.195.1141","tcp_port":13910,"udp_port":13910,"state":STATE_NONE,},
- {"name":"CH2 ","ip":"86.105.195.1141","tcp_port":13920,"udp_port":13920,"state":STATE_NONE,},
- {"name":"CH3 ","ip":"86.105.195.1141","tcp_port":13930,"udp_port":13930,"state":STATE_NONE,},
- {"name":"CH4 ","ip":"86.105.195.1141","tcp_port":13940,"udp_port":13940,"state":STATE_NONE,},
- ]
- SERVER01_MARK = { "ip" : "87.243.7.168", "tcp_port" : 19210, "mark" : "20.tga", "symbol_path" : "20",}
- SERVER02_MARK = { "ip" : "87.243.7.168", "tcp_port" : 13910, "mark" : "10.tga", "symbol_path" : "10",}
- SERVER01_AUTH = { "ip":"87.243.7.168", "port":14210, } #PVP World
- SERVER02_AUTH = { "ip":"86.105.195.1141", "port":14010, } #PVM World
- SERVER01 = { "name" : "Metin2Fly-Zone Server PVP FUN" }
- SERVER02 = { "name" : "Metin2Fly-Zone Server Beta" }
- TESTADDR = { "ip" : "210.123.10.153", "tcp_port" : 50000, "udp_port" : 50000, }
- REGION0_ORDER_LIST = [
- (SERVER01, SERVER01_AUTH, SERVER01_MARK, SERVER01_CHANNEL),
- (SERVER02, SERVER02_AUTH, SERVER02_MARK, SERVER02_CHANNEL),
- ]
- # BUILD
- NEW_REGION0, NEW_REGION0_AUTH_SERVER_DICT, NEW_MARKADDR_DICT = BuildServerList(REGION0_ORDER_LIST)
- # RESULT
- NEW_REGION_NAME_DICT = {
- 0 : "ROMANIA",
- }
- NEW_REGION_AUTH_SERVER_DICT = {
- 0 : NEW_REGION0_AUTH_SERVER_DICT,
- }
- NEW_REGION_DICT = {
- 0 : NEW_REGION0,
- }
- MARKADDR_DICT = NEW_MARKADDR_DICT
- REGION_DICT = NEW_REGION_DICT
- REGION_NAME_DICT = NEW_REGION_NAME_DICT
- REGION_AUTH_SERVER_DICT = NEW_REGION_AUTH_SERVER_DICT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement