def LoadMap(self):
background.Initialize()
for i in xrange(self.SLOT_COUNT):
id = net.GetAccountCharacterSlotDataInteger(i, net.ACCOUNT_CHARACTER_SLOT_ID)
if id == 0:
GetObject=self.dlgBoard.GetChild
self.backGroundImg1 = GetObject("BackGround")
self.backGroundImg1.Show()
else:
self.backGroundImg1.Hide()
MAPS_LIST = [
{"x": 30000, "y": 40000, "map_name": "metin2_map_a1"},
{"x": 12300, "y": 32100, "map_name": "metin2_map_n_desert_01"},
{"x": 78300, "y": 84400, "map_name": "map_a2"},
{"x": 78000, "y": 62000, "map_name": "map_n_snowm_01"},
{"x": 86100, "y": 55600, "map_name": "metin2_map_b1"},
{"x": 35600, "y": 50200, "map_name": "metin2_map_c1"},
]
map_random = MAPS_LIST[app.GetRandom(0,len(MAPS_LIST)-1)]
background.LoadMap(map_random["map_name"], map_random["x"], map_random["y"], 0)
background.SetShadowLevel(background.SHADOW_ALL)
chr.SelectInstance(self.slot)
player.SetMainCharacterIndex(self.slot)
chr.SetPixelPosition(map_random["x"], map_random["y"])