SpawnLists.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. EQ2Emulator: Everquest II Server Emulator
  3. Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
  4. This file is part of EQ2Emulator.
  5. EQ2Emulator is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU 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. EQ2Emulator 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #ifndef EQ2_SPAWN_LISTS
  17. #define EQ2_SPAWN_LISTS
  18. #include "../common/types.h"
  19. #include <vector>
  20. #define SPAWN_ENTRY_TYPE_NPC 0
  21. #define SPAWN_ENTRY_TYPE_OBJECT 1
  22. #define SPAWN_ENTRY_TYPE_WIDGET 2
  23. #define SPAWN_ENTRY_TYPE_SIGN 3
  24. #define SPAWN_ENTRY_TYPE_GROUNDSPAWN 4
  25. struct EntityCommand{
  26. string name;
  27. float distance;
  28. string error_text;
  29. string command;
  30. int16 cast_time;
  31. int32 spell_visual;
  32. };
  33. struct SpawnEntry{
  34. int32 spawn_entry_id;
  35. int32 spawn_location_id;
  36. int8 spawn_type;
  37. int32 spawn_id;
  38. float spawn_percentage;
  39. int32 respawn;
  40. int32 expire_time;
  41. int32 expire_offset;
  42. };
  43. class SpawnLocation{
  44. public:
  45. SpawnLocation(){
  46. x = 0;
  47. y = 0;
  48. z = 0;
  49. heading = 0;
  50. total_percentage = 0;
  51. x_offset = 0;
  52. y_offset = 0;
  53. z_offset = 0;
  54. placement_id = 0;
  55. pitch = 0;
  56. roll = 0;
  57. grid_id = 0;
  58. conditional = 0;
  59. }
  60. ~SpawnLocation(){
  61. for(int32 i=0;i<entities.size();i++)
  62. safe_delete(entities[i]);
  63. }
  64. void AddSpawn(SpawnEntry* entity){ entities.push_back(entity); }
  65. vector<SpawnEntry*> entities;
  66. float x;
  67. float y;
  68. float z;
  69. float heading;
  70. float x_offset;
  71. float y_offset;
  72. float z_offset;
  73. int32 placement_id;
  74. float pitch;
  75. float roll;
  76. float total_percentage;
  77. int32 grid_id;
  78. string script;
  79. int8 conditional;
  80. };
  81. #endif