import os
import app
import locale
import debugInfo
CHINA_PORT = 50000
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():
STATE_NONE = "Offline"
STATE_DICT = {
0 : "Offline",
1 : "Online",
2 : "Busy",
3 : "Plin"
}
SERVER01_CHANNEL_DICT = {
1:{"key":11,"name":"CH1 ","ip":"92.114.32.197","tcp_port":12345,"udp_port":12345,"state":STATE_NONE,},
2:{"key":12,"name":"CH2 ","ip":"92.114.32.197","tcp_port":13250,"udp_port":13250,"state":STATE_NONE,},
}
MARKADDR_DICT = {
10 : { "ip" : "92.114.32.197", "tcp_port" : 50000, "mark" : "10.tga", "symbol_path" : "10", },
}
REGION_NAME_DICT = {
0 : "ITALY",
}
REGION_AUTH_SERVER_DICT = {
0 : {
1 : { "ip":"92.114.32.197", "port":12345, },
}
}
REGION_DICT = {
0 : {
1 : { "name" : "Metin2Angel", "channel" : SERVER01_CHANNEL_DICT, },
},
}
if locale.IsTAIWAN():
name = app.GetLocalePath().replace("/", "_") + ".addr"
path = os.sep.join(("pack", name))
if os.access(path, os.R_OK):
print "load_locale_addr:", path
data = app.LoadLocaleAddr(path)
import cPickle
import cStringIO
info = cPickle.load(cStringIO.StringIO(data))
STATE_NONE = "Offline"
STATE_DICT = {
0 : "Offline",
1 : "Online",
2 : "Busy",
3 : "Plin"
}
REGION_NAME_DICT = info["NAME"]
REGION_AUTH_SERVER_DICT = info["AUTHADDR"]
REGION_DICT = info["GAMEADDR"]
MARKADDR_DICT = info["MARKADDR"]
import app
import locale
import debugInfo
CHINA_PORT = 50000
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():
STATE_NONE = "Offline"
STATE_DICT = {
0 : "Offline",
1 : "Online",
2 : "Busy",
3 : "Plin"
}
SERVER01_CHANNEL_DICT = {
1:{"key":11,"name":"CH1 ","ip":"92.114.32.197","tcp_port":12345,"udp_port":12345,"state":STATE_NONE,},
2:{"key":12,"name":"CH2 ","ip":"92.114.32.197","tcp_port":13250,"udp_port":13250,"state":STATE_NONE,},
}
MARKADDR_DICT = {
10 : { "ip" : "92.114.32.197", "tcp_port" : 50000, "mark" : "10.tga", "symbol_path" : "10", },
}
REGION_NAME_DICT = {
0 : "ITALY",
}
REGION_AUTH_SERVER_DICT = {
0 : {
1 : { "ip":"92.114.32.197", "port":12345, },
}
}
REGION_DICT = {
0 : {
1 : { "name" : "Metin2Angel", "channel" : SERVER01_CHANNEL_DICT, },
},
}
if locale.IsTAIWAN():
name = app.GetLocalePath().replace("/", "_") + ".addr"
path = os.sep.join(("pack", name))
if os.access(path, os.R_OK):
print "load_locale_addr:", path
data = app.LoadLocaleAddr(path)
import cPickle
import cStringIO
info = cPickle.load(cStringIO.StringIO(data))
STATE_NONE = "Offline"
STATE_DICT = {
0 : "Offline",
1 : "Online",
2 : "Busy",
3 : "Plin"
}
REGION_NAME_DICT = info["NAME"]
REGION_AUTH_SERVER_DICT = info["AUTHADDR"]
REGION_DICT = info["GAMEADDR"]
MARKADDR_DICT = info["MARKADDR"]
Porturiile din ch1
HOSTNAME: channel1_1
CHANNEL: 1
PORT: 12345
P2P_PORT: 50000
DB_PORT: 15000
DB_ADDR: localhost
si mai e
HOSTNAME: channel1_2
CHANNEL: 1
PORT: 13250
P2P_PORT: 55000
DB_PORT: 15000
DB_ADDR: localhost
HOSTNAME: channel1_1
CHANNEL: 1
PORT: 12345
P2P_PORT: 50000
DB_PORT: 15000
DB_ADDR: localhost
si mai e
HOSTNAME: channel1_2
CHANNEL: 1
PORT: 13250
P2P_PORT: 55000
DB_PORT: 15000
DB_ADDR: localhost
si din ch2
HOSTNAME: channel2_1
CHANNEL: 2
PORT: 12346
P2P_PORT: 60000
DB_PORT: 15000
DB_ADDR: localhost
si mai e
HOSTNAME: channel2_2
CHANNEL: 2
PORT: 13500
P2P_PORT: 67750
DB_PORT: 15000
DB_ADDR: localhost
HOSTNAME: channel2_1
CHANNEL: 2
PORT: 12346
P2P_PORT: 60000
DB_PORT: 15000
DB_ADDR: localhost
si mai e
HOSTNAME: channel2_2
CHANNEL: 2
PORT: 13500
P2P_PORT: 67750
DB_PORT: 15000
DB_ADDR: localhost


