PlayerCreator.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:1k
源码类别:

模拟服务器

开发平台:

C/C++

  1. #ifndef CPlayerCreatorH
  2. #define CPlayerCreatorH
  3. #include "S3DBInterface.h"
  4. class CPlayerCreator
  5. {
  6. public:
  7. #define MAX_PLAYERTYPE_VALUE 10
  8. #define MAX_NEWPLAYER_BUFFER 5000
  9. #define PLAYERCREATOR_FILE "settings\Player\NewPlayer%02d.ini"
  10. typedef struct tagRoleGeneratorParam
  11. {
  12. char szName[32];
  13. int nSeries;
  14. int nSex;
  15. } ROLEPARAM, NEAR *PROLEPARAM, FAR *LPROLEPARAM;
  16. private:
  17. BYTE* m_pRoleData[MAX_PLAYERTYPE_VALUE];
  18. public:
  19. CPlayerCreator();
  20. ~CPlayerCreator();
  21. bool Init();
  22. const TRoleData* GetRoleData( unsigned int &uDataLength, LPROLEPARAM lpParam );
  23. private:
  24. bool GetRoleDataFromIni( BYTE* pData, const char* szFileName );
  25. };
  26. #endif