Last change
on this file since 5 was 5, checked in by george, 16 years ago |
- Přidáno: Třída Emulator pro zastřešení funkcí kolem emulátorů.
- Přidáno: Metody pro spuštění a zastavení emulátoru.
|
File size:
1.1 KB
|
Line | |
---|
1 | <?php
|
---|
2 |
|
---|
3 | class Emulator extends Module
|
---|
4 | {
|
---|
5 | var $Id;
|
---|
6 | var $Emulator;
|
---|
7 |
|
---|
8 | function __construct($Database, $Id)
|
---|
9 | {
|
---|
10 | $this->Database = $Database;
|
---|
11 | $this->Id = $Id;
|
---|
12 | $DbResult = $this->Database->query('SELECT * FROM `Emulator` WHERE `Id`='.$Id);
|
---|
13 | $this->Emulator = $DbResult->fetch_assoc();
|
---|
14 | $DbResult = $this->Database->query('SELECT * FROM `ClientVersion` WHERE `Id`='.$this->Emulator['ClientVersion']);
|
---|
15 | $this->Emulator['ClientVersion'] = $DbResult->fetch_assoc();
|
---|
16 | }
|
---|
17 |
|
---|
18 | function AddTask($Title, $Task)
|
---|
19 | {
|
---|
20 | $this->Database->insert('Task', array('Server' => 0, 'Title' => $Title, 'Time' => 'NOW()', 'CommandList' => implode("\n", $Task)));
|
---|
21 | }
|
---|
22 |
|
---|
23 | function Add()
|
---|
24 | {
|
---|
25 | $this->AddTask('Vytovření nového emulátoru', array(
|
---|
26 | 'ln -s wowclient/'.$this->Emulator['ClientVersion']['Version'].'/maps emu/mangos/'.$this->Emulator['Revision'].'/mangos/maps',
|
---|
27 | 'ln -s wowclient/'.$this->Emulator['ClientVersion']['Version'].'/dbc emu/mangos/'.$this->Emulator['Revision'].'/mangos/dbc',
|
---|
28 | ));
|
---|
29 | }
|
---|
30 |
|
---|
31 | function GetList()
|
---|
32 | {
|
---|
33 | }
|
---|
34 |
|
---|
35 | function Download()
|
---|
36 | {
|
---|
37 | }
|
---|
38 |
|
---|
39 | function Compile()
|
---|
40 | {
|
---|
41 | }
|
---|
42 | }
|
---|
43 |
|
---|
44 | ?>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.