Riferimento: Corazza Invisibile
#Al posto dell'ip corrente inserire l'ip del dedicato/hamachi con .100 finale (solo per hoster)
#Nella porta AUTH invece mettere la porta scelta per l'auth appunto, di default è 11002
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 = "Online"
STATE_DICT = {
0 : "Offline",
1 : "Normale",
2 : "Affollato",
3 : "Pieno"
}
SERVER01_CHANNEL_DICT = {
1:{"key":11,"name":"CH1 ","ip":"25.205.200.100","tcp_port":13000,"udp_port":13000,"state":STATE_NONE,},
}
MARKADDR_DICT = {
10 : { "ip" : "25.205.200.100", "tcp_port" : 13000, "mark" : "10.tga", "symbol_path" : "10", },
}
REGION_NAME_DICT = {
0 : "ITALY",
}
REGION_AUTH_SERVER_DICT = {
0 : {
1 : { "ip":"25.205.200.100", "port":11002, },
}
}
REGION_DICT = {
0 : {
1 : { "name" : "QUI HO MESSO IL NOME DEL SERVER", "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 = "..."
STATE_DICT = {
0 : "....",
1 : "NORM",
2 : "BUSY",
3 : "FULL"
}
REGION_NAME_DICT = info["NAME"]
REGION_AUTH_SERVER_DICT = info["AUTHADDR"]
REGION_DICT = info["GAMEADDR"]
MARKADDR_DICT = info["MARKADDR"]