summaryrefslogtreecommitdiff
path: root/servergreps/hercules/packets.py
blob: 7638957289d8aee1bed4659f916c9853481e9c77 (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#! /usr/bin/env python2
# -*- coding: utf8 -*-
#
# Copyright (C) 2015-2016  Evol Online
# Author: Andrei Karas (4144)

import sys

from src.brathena import Brathena
from src.hercules import Hercules
from src.manaplus import ManaPlus
from src.ragemu import Ragemu
from src.rathena import Rathena
from src.reporter import Reporter
from src.threeceam import Threeceam


def showHelp():
    print("Usage: packets.py hercules dir version")
    exit(1)


if len(sys.argv) != 4:
    showHelp()

codeDir = sys.argv[1]
packetDir = sys.argv[2]
packetVersion = sys.argv[3]

hercules = Hercules()
hercules.dirName = "hercules"
hercules.reportName = "hercules"
rathena = Rathena()
rathena.dirName = "rathena"
rathena.reportName = "rathena"
brathena = Brathena()
brathena.dirName = "brathena"
brathena.reportName = "brathena"
ragemu = Ragemu()
ragemu.dirName = "ragemu"
ragemu.reportName = "ragemu"
threeceam = Threeceam()
threeceam.dirName = "3ceam"
threeceam.reportName = "3ceam"

manaplus = ManaPlus()
reporter = Reporter()
reporter.packetDir = packetDir;

hercules.prepareTempFiles(codeDir, packetDir, packetVersion)
hercules.processPackets(packetDir, packetVersion)
rathena.prepareTempFiles("rathena", packetDir, packetVersion)
rathena.processPackets(packetDir, packetVersion)
brathena.prepareTempFiles("brathena", packetDir, packetVersion)
brathena.processPackets(packetDir, packetVersion)
ragemu.prepareTempFiles("ragemu", packetDir, packetVersion)
ragemu.processPackets(packetDir, packetVersion)
threeceam.prepareTempFiles("3ceam", packetDir, packetVersion)
threeceam.processPackets(packetDir, packetVersion)

manaplus.processPackets(packetVersion);
reporter.reportManaplus(hercules, manaplus)
reporter.reportHercules(hercules)
reporter.reportRathena(hercules, rathena)
reporter.reportHerculesFork(hercules, brathena, "brAthena")
reporter.reportHerculesFork(hercules, ragemu, "RagEmu")
reporter.reportThreeceam(hercules, threeceam)