Tipologie server:Server File Play
*Resursă folosită: Ovinetwork
*ServerFiles utilizat:ServerFile Play
*Syserr: -
Poză:
*Detalii suplimentare: Intru in serverinfo.py Schimb 'ip' cu ip sv meu si imi da erroare asta nu`mi dau seama unde e ascuns ip.
Cod: Selectaţi tot
import locale
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
if locale.IsEUROPE():
STATE_NONE = '|cffFF4500|hOFF'
STATE_DICT = {
0 : '....',
1 : '|cff00ff00|hNORM',
2 : '|cff00ff00|hBUSY',
3 : '|cff00ff00|hFULL',
}
CHANNELS1 = [
{'name':'CH1','ip':'localhost','tcp_port':21000,'udp_port':21000,'state':STATE_NONE,},
{'name':'CH2','ip':'localhost','tcp_port':22000,'udp_port':22000,'state':STATE_NONE,},
]
MARK1 = { 'ip' : 'localhost', 'tcp_port' : 21000, 'mark' : '10.tga', 'symbol_path' : '10', }
AUTH1 = {'ip':'localhost','port':41010, }
NAME1 = { 'name' : 'Metin2'}
REGION0_ORDER_LIST = [
(NAME1, AUTH1, MARK1, CHANNELS1),
]
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
TESTADDR = { 'ip' : 'localhost', 'tcp_port' : 50000, 'udp_port' : 50000, }





de