Kirooos

Untitled

Jun 1st, 2025
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. #include "dungeon.h"
  2.  
  3. enum
  4. {
  5. REGEN_TYPE_MOB,
  6. REGEN_TYPE_GROUP,
  7. REGEN_TYPE_EXCEPTION,
  8. REGEN_TYPE_GROUP_GROUP,
  9. REGEN_TYPE_ANYWHERE,
  10. REGEN_TYPE_MAX_NUM
  11. };
  12.  
  13. typedef struct regen
  14. {
  15. LPREGEN prev, next;
  16. long lMapIndex;
  17. int type;
  18. int sx, sy, ex, ey;
  19. BYTE z_section;
  20.  
  21. BYTE direction;
  22.  
  23. DWORD time;
  24.  
  25. int max_count;
  26. int count;
  27. int vnum;
  28.  
  29. bool is_aggressive;
  30.  
  31. LPEVENT event;
  32.  
  33. size_t id; // to help dungeon regen identification
  34.  
  35. regen() :
  36. prev(NULL), next(NULL),
  37. lMapIndex(0),
  38. type(0),
  39. sx(0), sy(0), ex(0), ey(0),
  40. z_section(0),
  41. direction(0),
  42. time(0),
  43. max_count(0),
  44. count(0),
  45. vnum(0),
  46. is_aggressive(0),
  47. event(NULL),
  48. id(0)
  49. {}
  50. } REGEN;
  51.  
  52. EVENTINFO(regen_event_info)
  53. {
  54. LPREGEN regen;
  55.  
  56. regen_event_info()
  57. : regen( 0 )
  58. {
  59. }
  60. };
  61.  
  62. typedef regen_event_info REGEN_EVENT_INFO;
  63.  
  64. typedef struct regen_exception
  65. {
  66. LPREGEN_EXCEPTION prev, next;
  67.  
  68. int sx, sy, ex, ey;
  69. BYTE z_section;
  70. } REGEN_EXCEPTION;
  71.  
  72. class CDungeon;
  73.  
  74. EVENTINFO(dungeon_regen_event_info)
  75. {
  76. LPREGEN regen;
  77. CDungeon::IdType dungeon_id;
  78.  
  79. dungeon_regen_event_info()
  80. : regen( 0 )
  81. , dungeon_id( 0 )
  82. {
  83. }
  84. };
  85.  
  86. #ifdef ENABLE_ATLAS_BOSS
  87. extern bool regen_load(const char *filename, long lMapIndex, int base_x, int base_y, bool bossFile = false);
  88. #else
  89. extern bool regen_load(const char *filename, long lMapIndex, int base_x, int base_y);
  90. #endif
  91. extern bool regen_do(const char* filename, long lMapIndex, int base_x, int base_y, LPDUNGEON pDungeon, bool bOnce = true );
  92. extern bool regen_load_in_file(const char* filename, long lMapIndex, int base_x, int base_y );
  93. extern void regen_free();
  94.  
  95. extern bool is_regen_exception(long x, long y);
  96. extern void regen_reset(int x, int y);
  97.  
Advertisement
Add Comment
Please, Sign In to add comment