Dow.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. namespace GameQ\Protocols;
  19. use GameQ\Buffer;
  20. /**
  21. * Class Dow
  22. *
  23. * Apparently the player response is incomplete as there is no information being returned for that packet
  24. *
  25. * @package GameQ\Protocols
  26. * @author Austin Bischoff <[email protected]>
  27. */
  28. class Dow extends Source
  29. {
  30. /**
  31. * String name of this protocol class
  32. *
  33. * @type string
  34. */
  35. protected $name = 'dow';
  36. /**
  37. * Longer string name of this protocol class
  38. *
  39. * @type string
  40. */
  41. protected $name_long = "Days of War";
  42. /**
  43. * Normalize main fields
  44. *
  45. * @var array
  46. */
  47. protected $normalize = [
  48. // General
  49. 'general' => [
  50. // target => source
  51. 'gametype' => 'G_s',
  52. 'hostname' => 'ONM_s',
  53. 'mapname' => 'MPN_s',
  54. 'maxplayers' => 'P_i',
  55. 'numplayers' => 'N_i',
  56. ],
  57. // Individual
  58. 'player' => [
  59. 'name' => 'name',
  60. 'score' => 'score',
  61. 'time' => 'time',
  62. ],
  63. ];
  64. }