1: | <?php |
2: | /** |
3: | * This file is part of GameQ. |
4: | * |
5: | * GameQ is free software; you can redistribute it and/or modify |
6: | * it under the terms of the GNU Lesser General Public License as published by |
7: | * the Free Software Foundation; either version 3 of the License, or |
8: | * (at your option) any later version. |
9: | * |
10: | * GameQ is distributed in the hope that it will be useful, |
11: | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12: | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13: | * GNU Lesser General Public License for more details. |
14: | * |
15: | * You should have received a copy of the GNU Lesser General Public License |
16: | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17: | */ |
18: | |
19: | namespace GameQ\Protocols; |
20: | |
21: | /** |
22: | * Class Dow |
23: | * |
24: | * Apparently the player response is incomplete as there is no information being returned for that packet |
25: | * |
26: | * @package GameQ\Protocols |
27: | * @author Austin Bischoff <austin@codebeard.com> |
28: | */ |
29: | class Dow extends Source |
30: | { |
31: | /** |
32: | * String name of this protocol class |
33: | * |
34: | * @var string |
35: | */ |
36: | protected $name = 'dow'; |
37: | |
38: | /** |
39: | * Longer string name of this protocol class |
40: | * |
41: | * @var string |
42: | */ |
43: | protected $name_long = "Days of War"; |
44: | |
45: | /** |
46: | * Normalize main fields |
47: | * |
48: | * @var array |
49: | */ |
50: | protected $normalize = [ |
51: | // General |
52: | 'general' => [ |
53: | // target => source |
54: | 'gametype' => 'G_s', |
55: | 'hostname' => 'ONM_s', |
56: | 'mapname' => 'MPN_s', |
57: | 'maxplayers' => 'P_i', |
58: | 'numplayers' => 'N_i', |
59: | ], |
60: | // Individual |
61: | 'player' => [ |
62: | 'name' => 'name', |
63: | 'score' => 'score', |
64: | 'time' => 'time', |
65: | ], |
66: | ]; |
67: | } |
68: |