SpawnLists.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. #include <map>
  21. #define SPAWN_ENTRY_TYPE_NPC 0
  22. #define SPAWN_ENTRY_TYPE_OBJECT 1
  23. #define SPAWN_ENTRY_TYPE_WIDGET 2
  24. #define SPAWN_ENTRY_TYPE_SIGN 3
  25. #define SPAWN_ENTRY_TYPE_GROUNDSPAWN 4
  26. struct EntityCommand{
  27. string name;
  28. float distance;
  29. string error_text;
  30. string command;
  31. int16 cast_time;
  32. int32 spell_visual;
  33. map<int32, bool> allow_or_deny; // this is a map of player IDs and whether they are allowed on the command or denied
  34. bool default_allow_list; // if set to false then its a defaultDenyList
  35. };
  36. struct SpawnEntry{
  37. int32 spawn_entry_id;
  38. int32 spawn_location_id;
  39. int8 spawn_type;
  40. int32 spawn_id;
  41. float spawn_percentage;
  42. int32 respawn;
  43. int32 expire_time;
  44. int32 expire_offset;
  45. int32 lvl_override;
  46. int32 hp_override;
  47. int32 mp_override;
  48. };
  49. class SpawnLocation{
  50. public:
  51. SpawnLocation(){
  52. x = 0;
  53. y = 0;
  54. z = 0;
  55. heading = 0;
  56. total_percentage = 0;
  57. x_offset = 0;
  58. y_offset = 0;
  59. z_offset = 0;
  60. placement_id = 0;
  61. pitch = 0;
  62. roll = 0;
  63. grid_id = 0;
  64. conditional = 0;
  65. }
  66. ~SpawnLocation(){
  67. for(int32 i=0;i<entities.size();i++)
  68. safe_delete(entities[i]);
  69. }
  70. void AddSpawn(SpawnEntry* entity){ entities.push_back(entity); }
  71. vector<SpawnEntry*> entities;
  72. float x;
  73. float y;
  74. float z;
  75. float heading;
  76. float x_offset;
  77. float y_offset;
  78. float z_offset;
  79. int32 placement_id;
  80. float pitch;
  81. float roll;
  82. float total_percentage;
  83. int32 grid_id;
  84. string script;
  85. int8 conditional;
  86. };
  87. #endif