SpawnLists.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. //devn00b: added spawn location overrides, added these to accomodate.
  46. int32 lvl_override;
  47. int32 hp_override;
  48. int32 mp_override;
  49. int32 str_override;
  50. int32 sta_override;
  51. int32 wis_override;
  52. int32 int_override;
  53. int32 agi_override;
  54. int32 heat_override;
  55. int32 cold_override;
  56. int32 magic_override;
  57. int32 mental_override;
  58. int32 divine_override;
  59. int32 disease_override;
  60. int32 poison_override;
  61. int32 difficulty_override; //aka EncounterLevel
  62. };
  63. class SpawnLocation{
  64. public:
  65. SpawnLocation(){
  66. x = 0;
  67. y = 0;
  68. z = 0;
  69. heading = 0;
  70. total_percentage = 0;
  71. x_offset = 0;
  72. y_offset = 0;
  73. z_offset = 0;
  74. placement_id = 0;
  75. pitch = 0;
  76. roll = 0;
  77. grid_id = 0;
  78. conditional = 0;
  79. }
  80. ~SpawnLocation(){
  81. for(int32 i=0;i<entities.size();i++)
  82. safe_delete(entities[i]);
  83. }
  84. void AddSpawn(SpawnEntry* entity){ entities.push_back(entity); }
  85. vector<SpawnEntry*> entities;
  86. float x;
  87. float y;
  88. float z;
  89. float heading;
  90. float x_offset;
  91. float y_offset;
  92. float z_offset;
  93. int32 placement_id;
  94. float pitch;
  95. float roll;
  96. float total_percentage;
  97. int32 grid_id;
  98. string script;
  99. int8 conditional;
  100. };
  101. #endif