Clone of UAS2 @ https://github.com/drudgedance/uas2

TreasureGen.h 7.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. /*
  2. * This file is part of UAS2.
  3. *
  4. * UAS2 is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * UAS2 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 UASv1; if not, write to the Free Software
  15. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  16. */
  17. /**
  18. * @file TreasureGen.h
  19. */
  20. #ifndef __TREASUREGEN_H
  21. #define __TREASUREGEN_H
  22. #include <algorithm>
  23. #include "Object.h"
  24. #include "cItemModels.h"
  25. #include "Avatar.h"
  26. #include "Client.h"
  27. class TreasureGen
  28. {
  29. public:
  30. DWORD mob_lvl;
  31. int t_lvl;
  32. float workmanship;
  33. int value;
  34. int burden;
  35. void GenerateCorpseTreasure(cCorpse *Corpse, cMonster *Mob, cClient *pcClient);
  36. void GenerateChestTreasure(cChest *Chest, cClient *pcClient);
  37. /** @name Player Inventory Item Creation Functions
  38. * Functions to create items in avatars' inventory.
  39. *
  40. * @param *who - A pointer to the client object.
  41. * @param ItemModelID - The item model ID of the item to create.
  42. *
  43. * Author: Cubem0j0
  44. * @{
  45. */
  46. void CreateAmmo (cClient *who, DWORD ItemModelID);
  47. void CreateArmor (cClient *who, DWORD ItemModelID);
  48. void CreateBook (cClient *who, DWORD ItemModelID, DWORD GUID);
  49. void CreateClothes (cClient *who, DWORD ItemModelID);
  50. void CreateFoci (cClient *who, DWORD ItemModelID);
  51. void CreateFood (cClient *who, DWORD ItemModelID, DWORD GUID);
  52. void CreateGem (cClient *who, DWORD ItemModelID, DWORD GUID);
  53. void CreateHealingKit (cClient *who, DWORD ItemModelID);
  54. void CreateJewelry (cClient *who, DWORD ItemModelID);
  55. void CreateLockpicks (cClient *who, DWORD ItemModelID);
  56. void CreateManastone (cClient *who, DWORD ItemModelID);
  57. void CreateMisc (cClient *who, DWORD ItemModelID);
  58. void CreatePack (cClient *who, DWORD ItemModelID);
  59. void CreatePlants (cClient *who, DWORD ItemModelID);
  60. //k109: Adding amount to pyreals
  61. void CreatePyreals (cClient *who, DWORD ItemModelID, DWORD Value, WORD Stack);
  62. void CreateSalvage (cClient *who, DWORD ItemModelID);
  63. void CreateScrolls (cClient *who, DWORD ItemModelID);
  64. void CreateShield (cClient *who, DWORD ItemModelID);
  65. void CreateSpellComponents (cClient *who, DWORD ItemModelID, DWORD GUID);
  66. void CreateTradeNotes (cClient *who, DWORD ItemModelID);
  67. void CreateTradeSkillMats (cClient *who, DWORD ItemModelID);
  68. void CreateWand (cClient *who, DWORD ItemModelID, DWORD GUID);
  69. void CreateWeapon (cClient *who, DWORD ItemModelID, DWORD GUID, DWORD fEquipped);
  70. //@}
  71. /** @name Landblock Item Creation Functions
  72. * Functions to create items at landblock locations.
  73. *
  74. * @param Loc - The location to spawn the object (i.e. m_pcAvatar->m_Location OR m_NPC->m_Location).
  75. * @param ItemModelID - The item model ID of the item to create.
  76. *
  77. * Author: Cubem0j0
  78. * @{
  79. */
  80. void CreateAmmo (cLocation Loc, DWORD ItemModelID);
  81. void CreateArmor (cLocation Loc, DWORD ItemModelID);
  82. void CreateBook (cLocation Loc, DWORD ItemModelID);
  83. void CreateClothes (cLocation Loc, DWORD ItemModelID);
  84. void CreateFoci (cLocation Loc, DWORD ItemModelID);
  85. void CreateFood (cLocation Loc, DWORD ItemModelID);
  86. void CreateGem (cLocation Loc, DWORD ItemModelID);
  87. void CreateHealingKit (cLocation Loc, DWORD ItemModelID);
  88. void CreateJewelry (cLocation Loc, DWORD ItemModelID);
  89. void CreateLockpicks (cLocation Loc, DWORD ItemModelID);
  90. void CreateManastone (cLocation Loc, DWORD ItemModelID);
  91. void CreateMisc (cLocation Loc, DWORD ItemModelID);
  92. void CreatePack (cLocation Loc, DWORD ItemModelID);
  93. void CreatePlants (cLocation Loc, DWORD ItemModelID);
  94. //k109: Adding amount to pyreals
  95. void CreatePyreals (cLocation Loc, DWORD ItemModelID, DWORD Value, WORD Stack);
  96. void CreateSalvage (cLocation Loc, DWORD ItemModelID);
  97. void CreateScrolls (cLocation Loc, DWORD ItemModelID);
  98. void CreateShield (cLocation Loc, DWORD ItemModelID);
  99. void CreateSpellComponents (cLocation Loc, DWORD ItemModelID);
  100. void CreateTradeNotes (cLocation Loc, DWORD ItemModelID);
  101. void CreateTradeSkillMats (cLocation Loc, DWORD ItemModelID);
  102. void CreateWand (cLocation Loc, DWORD ItemModelID);
  103. void CreateWeapon (cLocation Loc, DWORD ItemModelID);
  104. //@}
  105. /** @name NPC Inventory Item Creation Functions
  106. * Functions to create items in NPCs' inventory.
  107. *
  108. * @param *pcObj - A pointer to the NPC object.
  109. * @param ItemModelID - The item model ID of the item to create.
  110. *
  111. * Author: Cubem0j0
  112. * @{
  113. */
  114. void CreateAmmo (cNPC *pcObj, DWORD ItemModelID);
  115. void CreateArmor (cNPC *pcObj, DWORD ItemModelID);
  116. void CreateBook (cNPC *pcObj, DWORD ItemModelID);
  117. void CreateClothes (cNPC *pcObj, DWORD ItemModelID);
  118. void CreateFoci (cNPC *pcObj, DWORD ItemModelID);
  119. void CreateFood (cNPC *pcObj, DWORD ItemModelID);
  120. void CreateGem (cNPC *pcObj, DWORD ItemModelID);
  121. void CreateHealingKit (cNPC *pcObj, DWORD ItemModelID);
  122. void CreateJewelry (cNPC *pcObj, DWORD ItemModelID);
  123. void CreateLockpicks (cNPC *pcObj, DWORD ItemModelID);
  124. void CreateManastone (cNPC *pcObj, DWORD ItemModelID);
  125. void CreateMisc (cNPC *pcObj, DWORD ItemModelID);
  126. void CreatePack (cNPC *pcObj, DWORD ItemModelID);
  127. void CreatePlants (cNPC *pcObj, DWORD ItemModelID);
  128. void CreatePyreals (cNPC *pcObj, DWORD ItemModelID, DWORD Value, WORD Stack);
  129. void CreateSalvage (cNPC *pcObj, DWORD ItemModelID);
  130. void CreateScrolls (cNPC *pcObj, DWORD ItemModelID);
  131. void CreateShield (cNPC *pcObj, DWORD ItemModelID);
  132. void CreateSpellComponents (cNPC *pcObj, DWORD ItemModelID);
  133. void CreateTradeNotes (cNPC *pcObj, DWORD ItemModelID);
  134. void CreateTradeSkillMats (cNPC *pcObj, DWORD ItemModelID);
  135. void CreateWand (cNPC *pcObj, DWORD ItemModelID);
  136. void CreateWeapon (cNPC *pcObj, DWORD ItemModelID);
  137. //@}
  138. /** @name Corpse Inventory Item Creation Functions
  139. * Functions to create items in corpses' inventory.
  140. *
  141. * @param *pcObj - A pointer to the corpse object.
  142. * @param ItemModelID - The item model ID of the item to create.
  143. *
  144. * Author: Cubem0j0
  145. * @{
  146. */
  147. void CreateAmmo (cCorpse *pcObj, DWORD ItemModelID);
  148. void CreateArmor (cCorpse *pcObj, DWORD ItemModelID);
  149. void CreateBook (cCorpse *pcObj, DWORD ItemModelID);
  150. void CreateClothes (cCorpse *pcObj, DWORD ItemModelID);
  151. void CreateFoci (cCorpse *pcObj, DWORD ItemModelID);
  152. void CreateFood (cCorpse *pcObj, DWORD ItemModelID);
  153. void CreateGem (cCorpse *pcObj, DWORD ItemModelID);
  154. void CreateHealingKit (cCorpse *pcObj, DWORD ItemModelID);
  155. void CreateJewelry (cCorpse *pcObj, DWORD ItemModelID);
  156. void CreateLockpicks (cCorpse *pcObj, DWORD ItemModelID);
  157. void CreateManastone (cCorpse *pcObj, DWORD ItemModelID);
  158. void CreateMisc (cCorpse *pcObj, DWORD ItemModelID);
  159. void CreatePack (cCorpse *pcObj, DWORD ItemModelID);
  160. void CreatePlants (cCorpse *pcObj, DWORD ItemModelID);
  161. void CreatePyreals (cCorpse *pcObj, DWORD ItemModelID, DWORD Value, WORD Stack);
  162. void CreateSalvage (cCorpse *pcObj, DWORD ItemModelID);
  163. void CreateScrolls (cCorpse *pcObj, DWORD ItemModelID);
  164. void CreateShield (cCorpse *pcObj, DWORD ItemModelID);
  165. void CreateSpellComponents (cCorpse *pcObj, DWORD ItemModelID);
  166. void CreateTradeNotes (cCorpse *pcObj, DWORD ItemModelID);
  167. void CreateTradeSkillMats (cCorpse *pcObj, DWORD ItemModelID);
  168. void CreateWand (cCorpse *pcObj, DWORD ItemModelID);
  169. void CreateWeapon (cCorpse *pcObj, DWORD ItemModelID);
  170. //@}
  171. };
  172. #endif