9
3

AltAdvancement.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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 __AltAdvancement__
  17. #define __AltAdvancement__
  18. #include <vector>
  19. #include "../../common/types.h"
  20. #include "../../common/EQPacket.h"
  21. #include "../client.h"
  22. // defines for AA tabs based on group # from DB
  23. #define AA_CLASS 0
  24. #define AA_SUBCLASS 1
  25. #define AA_SHADOW 2
  26. #define AA_HEROIC 3
  27. #define AA_TRADESKILL 4
  28. #define AA_PRESTIGE 5
  29. #define AA_TRADESKILL_PRESTIGE 6
  30. #define AA_DRAGON 7
  31. #define AA_DRAGONCLASS 8
  32. #define AA_FARSEAS 9
  33. struct AltAdvanceData
  34. {
  35. int32 spellID;
  36. int8 min_level;
  37. int32 spell_crc;
  38. string name;
  39. string description;
  40. int8 group;
  41. int16 icon;
  42. int16 icon2;
  43. int8 col;
  44. int8 row;
  45. int8 rankCost;
  46. int8 maxRank;
  47. int32 rankPrereqID;
  48. int8 rankPrereq;
  49. int8 class_req;
  50. int8 tier;
  51. int8 req_points;
  52. int16 req_tree_points;
  53. string class_name;
  54. string subclass_name;
  55. string line_title;
  56. int8 title_level;
  57. int32 node_id;
  58. };
  59. class MasterAAList
  60. {
  61. public:
  62. MasterAAList();
  63. ~MasterAAList();
  64. /// <summary>Sorts the Alternate Advancements for the given client, creates and sends the OP_AdventureList packet.</summary>
  65. /// <param name='client'>The Client calling this function</param>
  66. /// <returns>EQ2Packet*</returns>
  67. EQ2Packet* GetAAListPacket(Client* client);
  68. /// <summary>Add Alternate Advancement data to the global list.</summary>
  69. /// <param name='data'>The Alternate Advancement data to add.</param>
  70. void AddAltAdvancement(AltAdvanceData* data);
  71. /// <summary>Get the total number of Alternate Advancements in the global list.</summary>
  72. int Size();
  73. /// <summary>Get the Alternate Advancement data for the given spell.</summary>
  74. /// <param name='spellID'>Spell ID to get Alternate Advancement data for.</param>
  75. AltAdvanceData* GetAltAdvancement(int32 spellID);
  76. /// <summary>empties the master Alternate Advancement list</summary>
  77. void DestroyAltAdvancements();
  78. void DisplayAA(Client* client,int8 newtemplate,int8 changemode);
  79. private:
  80. vector <AltAdvanceData*> AAList;
  81. Mutex MMasterAAList;
  82. };
  83. struct TreeNodeData
  84. {
  85. int32 classID;
  86. int32 treeID;
  87. int32 AAtreeID;
  88. };
  89. class MasterAANodeList
  90. {
  91. public:
  92. MasterAANodeList();
  93. ~MasterAANodeList();
  94. void AddTreeNode(TreeNodeData* data);
  95. int Size();
  96. void DestroyTreeNodes();
  97. vector<TreeNodeData*> GetTreeNodes();
  98. private:
  99. vector<TreeNodeData*> TreeNodeList;
  100. };
  101. #endif