summaryrefslogtreecommitdiff
path: root/hercules/code/server/tmw/main.py
blob: 28318773bd3414808712b68dc94b0614a43d9b44 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#! /usr/bin/env python
# -*- coding: utf8 -*-
#
# Copyright (C) 2014  Evol Online
# Author: Andrei Karas (4144)

from code.server.account import *
from code.server.accreg import *
from code.server.party import *
from code.server.storage import *
from code.server.db.char import *
from code.server.db.charregnumdb import *
from code.server.db.inventory import *
from code.server.db.skill import *
from code.server.tmw.athena import *
from code.server.tmw.consts import *
from code.server.tmw.itemdb import *
from code.server.tmw.mobdb import *
from code.server.tmw.mobskilldb import *
from code.server.tmw.npcs import *
from code.server.utils import *
from code.server.questsdb import *
from code.serverutils import *

def serverTmwMain(isNew):
    try:
        cleanServerData()
    except:
        print "Updating server"
    createMainScript()
    items = convertItemDb(isNew)
    npcIds = Set()
    convertNpcs(items, npcIds)
    convertMobDb(items)
    quests = dict()
    convertConsts(quests, npcIds)
    convertMobSkillDb()

def dbTmwMain():
    convertAccount()
    users = readAthena()
    saveCharTable(users)
    saveCharRegNumDbTable(users)
    saveSkillTable(users)
    saveInventoryTable(users)
    convertStorage()
    convertAccReg()
    convertParty(users)