Clone of UAS2 @ https://github.com/drudgedance/uas2

CommandParser.h 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /*
  2. * This file is part of UAS2.
  3. *
  4. * UAS2 is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * UAS2 is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. * You should have received a copy of the GNU General Public License
  14. * along with UASv1; if not, write to the Free Software
  15. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  16. */
  17. /**
  18. * @file CommandParser.h
  19. */
  20. #ifndef __COMMANDPARSER_H
  21. #define __COMMANDPARSER_H
  22. #include "MasterServer.h"
  23. #include "VersionNo.h"
  24. class cClient;
  25. class cCommandParser
  26. {
  27. friend class cMasterServer;
  28. friend class cLifestone;
  29. public:
  30. cCommandParser ( ) {}
  31. ~cCommandParser ( ) {}
  32. private:
  33. static BOOL Help ( char *szText, BYTE bAccessLevel );
  34. static BOOL Turn ( char *szHeading );
  35. static BOOL Telemap ( char *szLocation );
  36. static BOOL TeleLoc ( char *szLocation );
  37. static BOOL TeleTown ( char *szTown );
  38. static BOOL SpawnItem ( char *szItem );
  39. static BOOL SpawnItemLB ( char *szItem );
  40. static BOOL Munster ( );
  41. static BOOL Dungeon ( char *szDungeon );
  42. static BOOL Particle ( char *szParticle );
  43. static BOOL SoundEffect ( char *szSound );
  44. static BOOL Animation ( char *szAnimation );
  45. static BOOL Punch ( );
  46. static BOOL DungeonList ( char *szDungeonGroup );
  47. static BOOL RemoveInventory ( );
  48. static BOOL SpawnMonster ( char *szText );
  49. static BOOL SpawnSave ( char *szText );
  50. static BOOL Spawntype ( char *szText );
  51. static BOOL SpawnPlayer ( );
  52. static BOOL SpawnPortal ( );
  53. static BOOL RecordLocation ( );
  54. static BOOL RecordLifestone ( cLocation pcLoc, DWORD dwGUID );
  55. static BOOL SpwnID ( char *szText );
  56. static BOOL SpawnID ( char *szText );
  57. static BOOL GlobalChat ( char *szText );
  58. static BOOL ClearObjects ( );
  59. static BOOL WorldBroadcast ( char *szText );
  60. static BOOL GotoCharacter ( char *szText );
  61. static BOOL GetCharacter ( char *szText );
  62. static BOOL ReturnCharacter ( char *szText );
  63. static BOOL SendCharacter ( char *szText );
  64. static BOOL Home ();
  65. static BOOL Invisible ();
  66. static BOOL Visible ();
  67. static BOOL Who ();
  68. static BOOL SetModel ( char *szText );
  69. static BOOL SetScale ( char *szText );
  70. static BOOL Acid ( char *szText );
  71. // static BOOL SaveNPC ( char *szText );
  72. static BOOL Version ();
  73. static BOOL Wear ();
  74. static BOOL Remove ();
  75. static BOOL ODOA ();
  76. static BOOL RandomPyreals ();
  77. static inline BOOL FormatError( char *szCommand )
  78. {
  79. cMasterServer::ServerMessage( ColorRed, m_pcClient, "Error in %s syntax, check !help", szCommand );
  80. return FALSE;
  81. }
  82. static cClient *m_pcClient;
  83. };
  84. static byte text[64] = { 0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,
  85. 0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,
  86. 0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x20,0x2E};
  87. #endif // #ifndef __COMMANDPARSER_H