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

TreasureGen.cpp 39KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764
  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.cpp
  19. * Encapsulates treasure generation functionality.
  20. */
  21. #include "Object.h"
  22. #include "cItemModels.h"
  23. #include "Avatar.h"
  24. #include "Client.h"
  25. #include "WorldManager.h"
  26. #include "TreasureGen.h"
  27. void TreasureGen::GenerateCorpseTreasure(cCorpse *Corpse, cMonster *Mob, cClient *pcClient)
  28. {
  29. //First, get the mobs level
  30. mob_lvl = Mob->m_dwLevel;
  31. //Base the treasure level off the mob level
  32. if(mob_lvl <= 5)
  33. {
  34. t_lvl = 1;
  35. }
  36. if(mob_lvl > 5 && mob_lvl <= 20)
  37. {
  38. t_lvl = 2;
  39. }
  40. if(mob_lvl > 20 && mob_lvl <= 30)
  41. {
  42. t_lvl = 3;
  43. }
  44. if(mob_lvl > 30 && mob_lvl <= 40)
  45. {
  46. t_lvl = 4;
  47. }
  48. if(mob_lvl > 40 && mob_lvl <= 60)
  49. {
  50. t_lvl = 5;
  51. }
  52. if(mob_lvl > 60 && mob_lvl <= 80)
  53. {
  54. t_lvl = 6;
  55. }
  56. if(mob_lvl > 80)
  57. {
  58. t_lvl = 7;
  59. }
  60. if(mob_lvl > 100)
  61. {
  62. t_lvl = 8;
  63. }
  64. //Roll a random number to see how many items exist on corpse
  65. int iAmt = rand() % 4 + 1;
  66. //Now select the types of items that will be created:
  67. int iType = rand() % 10 + 1;
  68. }
  69. void TreasureGen::GenerateChestTreasure(cChest *Chest, cClient *pcClient)
  70. {
  71. }
  72. /* GENERATE ITEM IN PLAYER INVENTORY */
  73. void TreasureGen::CreateAmmo(cClient *who, DWORD ItemModelID)
  74. {
  75. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  76. cAmmo* aAmmo = new cAmmo(cWorldManager::NewGUID_Object(),who->m_pcAvatar->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden, pcModel->m_wStack, pcModel->m_wStackLimit);
  77. who->AddPacket( WORLD_SERVER, aAmmo->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  78. who->m_pcAvatar->AddInventory(aAmmo);
  79. }
  80. void TreasureGen::CreateArmor(cClient *who, DWORD ItemModelID)
  81. {
  82. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  83. cArmor* aArmor = new cArmor(cWorldManager::NewGUID_Object(),who->m_pcAvatar->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden,pcModel->m_dwArmor_Level,pcModel->m_fProt_Slashing, pcModel->m_fProt_Piercing, pcModel->m_fProt_Bludgeon, pcModel->m_fProt_Fire, pcModel->m_fProt_Cold, pcModel->m_fProt_Acid, pcModel->m_fProt_Electric);
  84. who->AddPacket( WORLD_SERVER, aArmor->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  85. who->m_pcAvatar->AddInventory(aArmor);
  86. }
  87. void TreasureGen::CreateBook(cClient *who, DWORD ItemModelID, DWORD GUID)
  88. {
  89. if (GUID == NULL || GUID == 0)
  90. GUID = cWorldManager::NewGUID_Object();
  91. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  92. cBooks* aBook = new cBooks(GUID,who->m_pcAvatar->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  93. who->AddPacket( WORLD_SERVER, aBook->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  94. who->m_pcAvatar->AddInventory(aBook);
  95. }
  96. void TreasureGen::CreateClothes(cClient *who, DWORD ItemModelID)
  97. {
  98. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  99. cClothes* aShirt = new cClothes(cWorldManager::NewGUID_Object(),who->m_pcAvatar->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  100. who->AddPacket( WORLD_SERVER, aShirt->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  101. who->m_pcAvatar->AddInventory(aShirt);
  102. }
  103. void TreasureGen::CreateGem(cClient *who, DWORD ItemModelID, DWORD GUID)
  104. {
  105. if (GUID == NULL || GUID == 0)
  106. GUID = cWorldManager::NewGUID_Object();
  107. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  108. cGems* aGem = new cGems(GUID,who->m_pcAvatar->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  109. who->AddPacket( WORLD_SERVER, aGem->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  110. who->m_pcAvatar->AddInventory(aGem);
  111. }
  112. void TreasureGen::CreateFoci(cClient *who, DWORD ItemModelID)
  113. {
  114. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  115. cFoci* aFoci = new cFoci(cWorldManager::NewGUID_Object(),who->m_pcAvatar->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  116. who->AddPacket( WORLD_SERVER, aFoci->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  117. who->m_pcAvatar->AddInventory(aFoci);
  118. }
  119. void TreasureGen::CreateFood(cClient *who, DWORD ItemModelID, DWORD GUID)
  120. {
  121. if (GUID == NULL || GUID == 0)
  122. GUID = cWorldManager::NewGUID_Object();
  123. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  124. cFood* aMeal = new cFood(GUID,who->m_pcAvatar->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wStack, pcModel->m_wBurden, pcModel->m_dwVitalID, pcModel->m_vital_affect);
  125. who->AddPacket( WORLD_SERVER, aMeal->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  126. who->m_pcAvatar->AddInventory(aMeal);
  127. }
  128. void TreasureGen::CreateHealingKit(cClient *who, DWORD ItemModelID)
  129. {
  130. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  131. cHealingCon* aKit = new cHealingCon(cWorldManager::NewGUID_Object(),who->m_pcAvatar->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden, pcModel->m_wUses, pcModel->m_wUseLimit);
  132. who->AddPacket( WORLD_SERVER, aKit->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  133. who->m_pcAvatar->AddInventory(aKit);
  134. }
  135. void TreasureGen::CreateJewelry(cClient *who, DWORD ItemModelID)
  136. {
  137. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  138. cJewelry* aRing = new cJewelry(cWorldManager::NewGUID_Object(),who->m_pcAvatar->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  139. who->AddPacket( WORLD_SERVER, aRing->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  140. who->m_pcAvatar->AddInventory(aRing);
  141. }
  142. void TreasureGen::CreateLockpicks(cClient *who, DWORD ItemModelID)
  143. {
  144. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  145. cLockpicks* aPicks = new cLockpicks(cWorldManager::NewGUID_Object(),who->m_pcAvatar->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_wUses, pcModel->m_wUseLimit);
  146. who->AddPacket( WORLD_SERVER, aPicks->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  147. who->m_pcAvatar->AddInventory(aPicks);
  148. }
  149. void TreasureGen::CreateManastone(cClient *who, DWORD ItemModelID)
  150. {
  151. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  152. cManaStones* aManastone = new cManaStones(cWorldManager::NewGUID_Object(),who->m_pcAvatar->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  153. who->AddPacket( WORLD_SERVER, aManastone->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  154. who->m_pcAvatar->AddInventory(aManastone);
  155. }
  156. void TreasureGen::CreateMisc(cClient *who, DWORD ItemModelID)
  157. {
  158. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  159. cMisc* aMisc = new cMisc(cWorldManager::NewGUID_Object(),who->m_pcAvatar->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription);
  160. who->AddPacket( WORLD_SERVER, aMisc->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  161. who->m_pcAvatar->AddInventory(aMisc);
  162. }
  163. void TreasureGen::CreatePack(cClient *who, DWORD ItemModelID)
  164. {
  165. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  166. cPack* aPack = new cPack(cWorldManager::NewGUID_Object(),who->m_pcAvatar->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  167. who->AddPacket( WORLD_SERVER, aPack->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  168. who->m_pcAvatar->AddInventory(aPack);
  169. }
  170. void TreasureGen::CreatePlants(cClient *who, DWORD ItemModelID)
  171. {
  172. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  173. cPlants* aPlant = new cPlants(cWorldManager::NewGUID_Object(),who->m_pcAvatar->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  174. who->AddPacket( WORLD_SERVER, aPlant->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  175. who->m_pcAvatar->AddInventory(aPlant);
  176. }
  177. void TreasureGen::CreatePyreals(cClient *who, DWORD ItemModelID, DWORD Value, WORD Stack)
  178. {
  179. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  180. cPyreals* aPyreal = new cPyreals(cWorldManager::NewGUID_Object(),who->m_pcAvatar->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription, Value, Stack, pcModel->m_wStackLimit);
  181. who->AddPacket( WORLD_SERVER, aPyreal->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  182. who->m_pcAvatar->AddInventory(aPyreal);
  183. }
  184. void TreasureGen::CreateSalvage(cClient *who, DWORD ItemModelID)
  185. {
  186. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  187. cSalvage* aSalvage = new cSalvage(cWorldManager::NewGUID_Object(),who->m_pcAvatar->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  188. who->AddPacket( WORLD_SERVER, aSalvage->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  189. who->m_pcAvatar->AddInventory(aSalvage);
  190. }
  191. void TreasureGen::CreateScrolls(cClient *who, DWORD ItemModelID)
  192. {
  193. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  194. cScrolls* aScroll = new cScrolls(cWorldManager::NewGUID_Object(),who->m_pcAvatar->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription);
  195. who->AddPacket( WORLD_SERVER, aScroll->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  196. who->m_pcAvatar->AddInventory(aScroll);
  197. }
  198. void TreasureGen::CreateShield(cClient *who, DWORD ItemModelID)
  199. {
  200. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  201. cShield* aShield = new cShield(cWorldManager::NewGUID_Object(),who->m_pcAvatar->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden, pcModel->m_dwArmor_Level);
  202. who->AddPacket( WORLD_SERVER, aShield->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  203. who->m_pcAvatar->AddInventory(aShield);
  204. }
  205. void TreasureGen::CreateSpellComponents(cClient *who, DWORD ItemModelID, DWORD GUID)
  206. {
  207. if (GUID == NULL || GUID == 0)
  208. GUID = cWorldManager::NewGUID_Object();
  209. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  210. cSpellComps* aRegs = new cSpellComps(GUID,who->m_pcAvatar->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue,1, pcModel->m_wBurden);
  211. who->AddPacket( WORLD_SERVER, aRegs->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  212. who->m_pcAvatar->AddInventory(aRegs);
  213. }
  214. void TreasureGen::CreateTradeNotes(cClient *who, DWORD ItemModelID)
  215. {
  216. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  217. cTradeNotes* aNote = new cTradeNotes(cWorldManager::NewGUID_Object(),who->m_pcAvatar->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  218. who->AddPacket( WORLD_SERVER, aNote->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  219. who->m_pcAvatar->AddInventory(aNote);
  220. }
  221. void TreasureGen::CreateTradeSkillMats(cClient *who, DWORD ItemModelID)
  222. {
  223. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  224. cTradeSkillMats* aMats = new cTradeSkillMats(cWorldManager::NewGUID_Object(),who->m_pcAvatar->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  225. who->AddPacket( WORLD_SERVER, aMats->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  226. who->m_pcAvatar->AddInventory(aMats);
  227. }
  228. void TreasureGen::CreateWand(cClient *who, DWORD ItemModelID, DWORD GUID)
  229. {
  230. if (GUID == NULL || GUID == 0)
  231. GUID = cWorldManager::NewGUID_Object();
  232. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  233. cWands* aWand = new cWands(GUID,who->m_pcAvatar->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  234. who->AddPacket( WORLD_SERVER, aWand->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  235. who->m_pcAvatar->AddInventory(aWand);
  236. }
  237. void TreasureGen::CreateWeapon(cClient *who, DWORD ItemModelID, DWORD GUID, DWORD fEquipped)
  238. {
  239. if (GUID == NULL || GUID == 0)
  240. GUID = cWorldManager::NewGUID_Object();
  241. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  242. cWeapon* aWeapon = new cWeapon(cWorldManager::NewGUID_Object(),who->m_pcAvatar->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue,pcModel->m_wBurden,pcModel->m_bWieldType,pcModel->m_dwIconHighlight,pcModel->m_fWorkmanship,pcModel->m_dwMaterialType,pcModel->m_dwWeaponDamage,pcModel->m_dwWeaponSpeed,pcModel->m_dwWeaponSkill,pcModel->m_dwDamageType,pcModel->m_dWeaponVariance,pcModel->m_dWeaponModifier,pcModel->m_dWeaponPower,pcModel->m_dWeaponAttack);
  243. aWeapon->m_fEquipped = fEquipped;
  244. who->AddPacket( WORLD_SERVER, aWeapon->CreatePacketContainer(who->m_pcAvatar->GetGUID(),pcModel->m_dwModelID),3);
  245. who->m_pcAvatar->AddInventory(aWeapon);
  246. /*
  247. cMessage cmInsInv;
  248. cmInsInv << 0xF7B0L << who->m_pcAvatar->GetGUID( ) << who->m_pcAvatar->m_dwF7B0Sequence++ << 0x0022L << aWeapon->GetGUID() << who->m_pcAvatar->GetGUID( ) << 0L << 0L;
  249. who->AddPacket( WORLD_SERVER, cmInsInv, 4 );
  250. */
  251. }
  252. /* GENERATE ITEM AT LANDBLOCK LOCATION */
  253. void TreasureGen::CreateAmmo(cLocation Loc, DWORD ItemModelID)
  254. {
  255. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  256. cAmmo* aAmmo = new cAmmo(cWorldManager::NewGUID_Object(),Loc,ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription);
  257. cWorldManager::AddObject(aAmmo,true);
  258. }
  259. void TreasureGen::CreateArmor(cLocation Loc, DWORD ItemModelID)
  260. {
  261. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  262. cArmor* aArmor = new cArmor(cWorldManager::NewGUID_Object(),Loc,ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription);
  263. cWorldManager::AddObject(aArmor,true);
  264. }
  265. void TreasureGen::CreateBook(cLocation Loc, DWORD ItemModelID)
  266. {
  267. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  268. cBooks* aBook = new cBooks(cWorldManager::NewGUID_Object(),Loc,ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription);
  269. cWorldManager::AddObject(aBook,true);
  270. }
  271. void TreasureGen::CreateClothes(cLocation Loc, DWORD ItemModelID)
  272. {
  273. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  274. cClothes* aShirt = new cClothes(cWorldManager::NewGUID_Object(),Loc,ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription);
  275. cWorldManager::AddObject(aShirt,true);
  276. }
  277. void TreasureGen::CreateGem(cLocation Loc, DWORD ItemModelID)
  278. {
  279. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  280. cGems* aGem = new cGems(cWorldManager::NewGUID_Object(),Loc,ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription);
  281. cWorldManager::AddObject(aGem,true);
  282. }
  283. void TreasureGen::CreateFoci(cLocation Loc, DWORD ItemModelID)
  284. {
  285. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  286. cFoci* aFoci = new cFoci(cWorldManager::NewGUID_Object(),Loc,ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription);
  287. cWorldManager::AddObject(aFoci,true);
  288. }
  289. void TreasureGen::CreateFood(cLocation Loc, DWORD ItemModelID)
  290. {
  291. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  292. cFood* aMeal = new cFood(cWorldManager::NewGUID_Object(),Loc,ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription, pcModel->m_dwValue, pcModel->m_wBurden, pcModel->m_dwVitalID, pcModel->m_vital_affect);
  293. cWorldManager::AddObject(aMeal,true);
  294. }
  295. void TreasureGen::CreateHealingKit(cLocation Loc, DWORD ItemModelID)
  296. {
  297. }
  298. void TreasureGen::CreateJewelry(cLocation Loc, DWORD ItemModelID)
  299. {
  300. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  301. cJewelry* aRing = new cJewelry(cWorldManager::NewGUID_Object(),Loc,ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription);
  302. cWorldManager::AddObject(aRing,true);
  303. }
  304. void TreasureGen::CreateLockpicks(cLocation Loc, DWORD ItemModelID)
  305. {
  306. }
  307. void TreasureGen::CreateManastone(cLocation Loc, DWORD ItemModelID)
  308. {
  309. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  310. cManaStones* aManastone = new cManaStones(cWorldManager::NewGUID_Object(),Loc,ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription);
  311. cWorldManager::AddObject(aManastone,true);
  312. }
  313. void TreasureGen::CreateMisc(cLocation Loc, DWORD ItemModelID)
  314. {
  315. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  316. cMisc* aMisc = new cMisc(cWorldManager::NewGUID_Object(),Loc,ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription);
  317. cWorldManager::AddObject(aMisc,true);
  318. }
  319. void TreasureGen::CreatePack(cLocation Loc, DWORD ItemModelID)
  320. {
  321. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  322. cPack* aPack = new cPack(cWorldManager::NewGUID_Object(),Loc,ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription);
  323. cWorldManager::AddObject(aPack,true);
  324. }
  325. void TreasureGen::CreatePlants(cLocation Loc, DWORD ItemModelID)
  326. {
  327. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  328. cPlants* aPlant = new cPlants(cWorldManager::NewGUID_Object(),Loc,ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription);
  329. cWorldManager::AddObject(aPlant,true);
  330. }
  331. void TreasureGen::CreatePyreals(cLocation Loc, DWORD ItemModelID, DWORD Value, WORD Stack)
  332. {
  333. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  334. cPyreals* aPyreal = new cPyreals(cWorldManager::NewGUID_Object(),Loc,ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription, Value, Stack, pcModel->m_wStackLimit);
  335. cWorldManager::AddObject(aPyreal,true);
  336. }
  337. void TreasureGen::CreateSalvage(cLocation Loc, DWORD ItemModelID)
  338. {
  339. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  340. cSalvage* aSalvage = new cSalvage(cWorldManager::NewGUID_Object(),Loc,ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription);
  341. cWorldManager::AddObject(aSalvage,true);
  342. }
  343. void TreasureGen::CreateScrolls(cLocation Loc, DWORD ItemModelID)
  344. {
  345. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  346. cScrolls* aScroll = new cScrolls(cWorldManager::NewGUID_Object(),Loc,ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription);
  347. cWorldManager::AddObject(aScroll,true);
  348. }
  349. void TreasureGen::CreateShield(cLocation Loc, DWORD ItemModelID)
  350. {
  351. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  352. cShield* aShield = new cShield(cWorldManager::NewGUID_Object(),Loc,ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription, pcModel->m_dwValue, pcModel->m_wBurden, pcModel->m_dwArmor_Level);
  353. cWorldManager::AddObject(aShield,true);
  354. }
  355. void TreasureGen::CreateSpellComponents(cLocation Loc, DWORD ItemModelID)
  356. {
  357. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  358. cSpellComps* aRegs = new cSpellComps(cWorldManager::NewGUID_Object(),Loc,ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription);
  359. cWorldManager::AddObject(aRegs,true);
  360. }
  361. void TreasureGen::CreateTradeNotes(cLocation Loc, DWORD ItemModelID)
  362. {
  363. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  364. cTradeNotes* aNote = new cTradeNotes(cWorldManager::NewGUID_Object(),Loc,ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  365. cWorldManager::AddObject(aNote,true);
  366. }
  367. void TreasureGen::CreateTradeSkillMats(cLocation Loc, DWORD ItemModelID)
  368. {
  369. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  370. cTradeSkillMats* aMats = new cTradeSkillMats(cWorldManager::NewGUID_Object(),Loc,ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription);
  371. cWorldManager::AddObject(aMats,true);
  372. }
  373. void TreasureGen::CreateWand(cLocation Loc, DWORD ItemModelID)
  374. {
  375. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  376. cWands* aWand = new cWands(cWorldManager::NewGUID_Object(),Loc,ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription);
  377. cWorldManager::AddObject(aWand,true);
  378. }
  379. void TreasureGen::CreateWeapon(cLocation Loc, DWORD ItemModelID)
  380. {
  381. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  382. cWeapon* aWeapon = new cWeapon(cWorldManager::NewGUID_Object(),Loc,ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue,pcModel->m_wBurden,pcModel->m_bWieldType,pcModel->m_dwIconHighlight,pcModel->m_fWorkmanship,pcModel->m_dwMaterialType,pcModel->m_dwWeaponDamage,pcModel->m_dwWeaponSpeed,pcModel->m_dwWeaponSkill,pcModel->m_dwDamageType,pcModel->m_dWeaponVariance,pcModel->m_dWeaponModifier,pcModel->m_dWeaponPower,pcModel->m_dWeaponAttack);
  383. cWorldManager::AddObject(aWeapon,true);
  384. }
  385. /* GENERATE ITEM IN NPC INVENTORY */
  386. void TreasureGen::CreateAmmo(cNPC *pcObj, DWORD ItemModelID)
  387. {
  388. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  389. cAmmo* aAmmo = new cAmmo(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden, pcModel->m_wStack, pcModel->m_wStackLimit);
  390. pcObj->AddInventory(aAmmo);
  391. }
  392. void TreasureGen::CreateArmor(cNPC *pcObj, DWORD ItemModelID)
  393. {
  394. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  395. cArmor* aArmor = new cArmor(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden,pcModel->m_dwArmor_Level,pcModel->m_fProt_Slashing, pcModel->m_fProt_Piercing, pcModel->m_fProt_Bludgeon, pcModel->m_fProt_Fire, pcModel->m_fProt_Cold, pcModel->m_fProt_Acid, pcModel->m_fProt_Electric);
  396. pcObj->AddInventory(aArmor);
  397. }
  398. void TreasureGen::CreateBook(cNPC *pcObj, DWORD ItemModelID)
  399. {
  400. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  401. cBooks* aBook = new cBooks(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  402. pcObj->AddInventory(aBook);
  403. }
  404. void TreasureGen::CreateClothes(cNPC *pcObj, DWORD ItemModelID)
  405. {
  406. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  407. cClothes* aShirt = new cClothes(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  408. pcObj->AddInventory(aShirt);
  409. }
  410. void TreasureGen::CreateGem(cNPC *pcObj, DWORD ItemModelID)
  411. {
  412. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  413. cGems* aGem = new cGems(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  414. pcObj->AddInventory(aGem);
  415. }
  416. void TreasureGen::CreateFoci(cNPC *pcObj, DWORD ItemModelID)
  417. {
  418. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  419. cFoci* aFoci = new cFoci(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  420. pcObj->AddInventory(aFoci);
  421. }
  422. void TreasureGen::CreateFood(cNPC *pcObj, DWORD ItemModelID)
  423. {
  424. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  425. cFood* aMeal = new cFood(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wStack, pcModel->m_wBurden, pcModel->m_dwVitalID, pcModel->m_vital_affect);
  426. pcObj->AddInventory(aMeal);
  427. }
  428. void TreasureGen::CreateHealingKit(cNPC *pcObj, DWORD ItemModelID)
  429. {
  430. }
  431. void TreasureGen::CreateJewelry(cNPC *pcObj, DWORD ItemModelID)
  432. {
  433. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  434. cJewelry* aRing = new cJewelry(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  435. pcObj->AddInventory(aRing);
  436. }
  437. void TreasureGen::CreateLockpicks(cNPC *pcObj, DWORD ItemModelID)
  438. {
  439. }
  440. void TreasureGen::CreateManastone(cNPC *pcObj, DWORD ItemModelID)
  441. {
  442. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  443. cManaStones* aManastone = new cManaStones(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  444. pcObj->AddInventory(aManastone);
  445. }
  446. void TreasureGen::CreateMisc(cNPC *pcObj, DWORD ItemModelID)
  447. {
  448. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  449. cMisc* aMisc = new cMisc(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription);
  450. pcObj->AddInventory(aMisc);
  451. }
  452. void TreasureGen::CreatePack(cNPC *pcObj, DWORD ItemModelID)
  453. {
  454. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  455. cPack* aPack = new cPack(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  456. pcObj->AddInventory(aPack);
  457. }
  458. void TreasureGen::CreatePlants(cNPC *pcObj, DWORD ItemModelID)
  459. {
  460. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  461. cPlants* aPlant = new cPlants(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  462. pcObj->AddInventory(aPlant);
  463. }
  464. void TreasureGen::CreatePyreals(cNPC *pcObj, DWORD ItemModelID, DWORD Value, WORD Stack)
  465. {
  466. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  467. cPyreals* aPyreal = new cPyreals(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription, Value, Stack, pcModel->m_wStack);
  468. pcObj->AddInventory(aPyreal);
  469. }
  470. void TreasureGen::CreateSalvage(cNPC *pcObj, DWORD ItemModelID)
  471. {
  472. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  473. cSalvage* aSalvage = new cSalvage(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  474. pcObj->AddInventory(aSalvage);
  475. }
  476. void TreasureGen::CreateScrolls(cNPC *pcObj, DWORD ItemModelID)
  477. {
  478. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  479. cScrolls* aScroll = new cScrolls(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription);
  480. pcObj->AddInventory(aScroll);
  481. }
  482. void TreasureGen::CreateShield(cNPC *pcObj, DWORD ItemModelID)
  483. {
  484. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  485. cShield* aShield = new cShield(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden, pcModel->m_dwArmor_Level);
  486. pcObj->AddInventory(aShield);
  487. }
  488. void TreasureGen::CreateSpellComponents(cNPC *pcObj, DWORD ItemModelID)
  489. {
  490. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  491. cSpellComps* aRegs = new cSpellComps(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, 1, pcModel->m_wBurden);
  492. pcObj->AddInventory(aRegs);
  493. }
  494. void TreasureGen::CreateTradeNotes(cNPC *pcObj, DWORD ItemModelID)
  495. {
  496. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  497. cTradeNotes* aNote = new cTradeNotes(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  498. pcObj->AddInventory(aNote);
  499. }
  500. void TreasureGen::CreateTradeSkillMats(cNPC *pcObj, DWORD ItemModelID)
  501. {
  502. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  503. cTradeSkillMats* aMats = new cTradeSkillMats(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  504. pcObj->AddInventory(aMats);
  505. }
  506. void TreasureGen::CreateWand(cNPC *pcObj, DWORD ItemModelID)
  507. {
  508. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  509. cWands* aWand = new cWands(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  510. pcObj->AddInventory(aWand);
  511. }
  512. void TreasureGen::CreateWeapon(cNPC *pcObj, DWORD ItemModelID)
  513. {
  514. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  515. cWeapon* aWeapon = new cWeapon(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue,pcModel->m_wBurden,pcModel->m_bWieldType,pcModel->m_dwIconHighlight,pcModel->m_fWorkmanship,pcModel->m_dwMaterialType,pcModel->m_dwWeaponDamage,pcModel->m_dwWeaponSpeed,pcModel->m_dwWeaponSkill,pcModel->m_dwDamageType,pcModel->m_dWeaponVariance,pcModel->m_dWeaponModifier,pcModel->m_dWeaponPower,pcModel->m_dWeaponAttack);
  516. pcObj->AddInventory(aWeapon);
  517. }
  518. /* GENERATE ITEM IN A CORPSE INVENTORY */
  519. void TreasureGen::CreateAmmo(cCorpse *pcObj, DWORD ItemModelID)
  520. {
  521. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  522. cAmmo* aAmmo = new cAmmo(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden, pcModel->m_wStack, pcModel->m_wStackLimit);
  523. pcObj->AddInventory(aAmmo);
  524. }
  525. void TreasureGen::CreateArmor(cCorpse *pcObj, DWORD ItemModelID)
  526. {
  527. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  528. cArmor* aArmor = new cArmor(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden,pcModel->m_dwArmor_Level,pcModel->m_fProt_Slashing, pcModel->m_fProt_Piercing, pcModel->m_fProt_Bludgeon, pcModel->m_fProt_Fire, pcModel->m_fProt_Cold, pcModel->m_fProt_Acid, pcModel->m_fProt_Electric);
  529. pcObj->AddInventory(aArmor);
  530. }
  531. void TreasureGen::CreateBook(cCorpse *pcObj, DWORD ItemModelID)
  532. {
  533. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  534. cBooks* aBook = new cBooks(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  535. pcObj->AddInventory(aBook);
  536. }
  537. void TreasureGen::CreateClothes(cCorpse *pcObj, DWORD ItemModelID)
  538. {
  539. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  540. cClothes* aShirt = new cClothes(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  541. pcObj->AddInventory(aShirt);
  542. }
  543. void TreasureGen::CreateGem(cCorpse *pcObj, DWORD ItemModelID)
  544. {
  545. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  546. cGems* aGem = new cGems(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  547. pcObj->AddInventory(aGem);
  548. }
  549. void TreasureGen::CreateFoci(cCorpse *pcObj, DWORD ItemModelID)
  550. {
  551. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  552. cFoci* aFoci = new cFoci(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  553. pcObj->AddInventory(aFoci);
  554. }
  555. void TreasureGen::CreateFood(cCorpse *pcObj, DWORD ItemModelID)
  556. {
  557. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  558. cFood* aMeal = new cFood(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wStack, pcModel->m_wBurden, pcModel->m_dwVitalID, pcModel->m_vital_affect);
  559. pcObj->AddInventory(aMeal);
  560. }
  561. void TreasureGen::CreateHealingKit(cCorpse *pcObj, DWORD ItemModelID)
  562. {
  563. }
  564. void TreasureGen::CreateJewelry(cCorpse *pcObj, DWORD ItemModelID)
  565. {
  566. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  567. cJewelry* aRing = new cJewelry(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  568. pcObj->AddInventory(aRing);
  569. }
  570. void TreasureGen::CreateLockpicks(cCorpse *pcObj, DWORD ItemModelID)
  571. {
  572. }
  573. void TreasureGen::CreateManastone(cCorpse *pcObj, DWORD ItemModelID)
  574. {
  575. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  576. cManaStones* aManastones = new cManaStones(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  577. pcObj->AddInventory(aManastones);
  578. }
  579. void TreasureGen::CreateMisc(cCorpse *pcObj, DWORD ItemModelID)
  580. {
  581. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  582. cMisc* aMisc = new cMisc(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription);
  583. pcObj->AddInventory(aMisc);
  584. }
  585. void TreasureGen::CreatePack(cCorpse *pcObj, DWORD ItemModelID)
  586. {
  587. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  588. cPack* aPack = new cPack(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  589. pcObj->AddInventory(aPack);
  590. }
  591. void TreasureGen::CreatePlants(cCorpse *pcObj, DWORD ItemModelID)
  592. {
  593. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  594. cPlants* aPlant = new cPlants(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  595. pcObj->AddInventory(aPlant);
  596. }
  597. void TreasureGen::CreatePyreals(cCorpse *pcObj, DWORD ItemModelID, DWORD Value, WORD Stack)
  598. {
  599. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  600. cPyreals* aPyreal = new cPyreals(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription, Value, Stack, pcModel->m_wStackLimit);
  601. pcObj->AddInventory(aPyreal);
  602. }
  603. void TreasureGen::CreateSalvage(cCorpse *pcObj, DWORD ItemModelID)
  604. {
  605. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  606. cSalvage* aSalvage = new cSalvage(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  607. pcObj->AddInventory(aSalvage);
  608. }
  609. void TreasureGen::CreateScrolls(cCorpse *pcObj, DWORD ItemModelID)
  610. {
  611. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  612. cScrolls* aScroll = new cScrolls(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription);
  613. pcObj->AddInventory(aScroll);
  614. }
  615. void TreasureGen::CreateShield(cCorpse *pcObj, DWORD ItemModelID)
  616. {
  617. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  618. cShield* aShield = new cShield(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden, pcModel->m_dwArmor_Level);
  619. pcObj->AddInventory(aShield);
  620. }
  621. void TreasureGen::CreateSpellComponents(cCorpse *pcObj, DWORD ItemModelID)
  622. {
  623. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  624. cSpellComps* aRegs = new cSpellComps(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, 1 ,pcModel->m_wBurden);
  625. pcObj->AddInventory(aRegs);
  626. }
  627. void TreasureGen::CreateTradeNotes(cCorpse *pcObj, DWORD ItemModelID)
  628. {
  629. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  630. cTradeNotes* aNote = new cTradeNotes(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  631. pcObj->AddInventory(aNote);
  632. }
  633. void TreasureGen::CreateTradeSkillMats(cCorpse *pcObj, DWORD ItemModelID)
  634. {
  635. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  636. cTradeSkillMats* aMats = new cTradeSkillMats(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  637. pcObj->AddInventory(aMats);
  638. }
  639. void TreasureGen::CreateWand(cCorpse *pcObj, DWORD ItemModelID)
  640. {
  641. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  642. cWands* aWand = new cWands(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue, pcModel->m_wBurden);
  643. pcObj->AddInventory(aWand);
  644. }
  645. void TreasureGen::CreateWeapon(cCorpse *pcObj, DWORD ItemModelID)
  646. {
  647. cItemModels *pcModel = cItemModels::FindModel(ItemModelID);
  648. cWeapon* aWeapon = new cWeapon(cWorldManager::NewGUID_Object(),pcObj->GetGUID(),ItemModelID,1.0,TRUE,pcModel->m_wIcon,pcModel->m_strName,pcModel->m_strDescription,pcModel->m_dwValue,pcModel->m_wBurden,pcModel->m_bWieldType,pcModel->m_dwIconHighlight,pcModel->m_fWorkmanship,pcModel->m_dwMaterialType,pcModel->m_dwWeaponDamage,pcModel->m_dwWeaponSpeed,pcModel->m_dwWeaponSkill,pcModel->m_dwDamageType,pcModel->m_dWeaponVariance,pcModel->m_dWeaponModifier,pcModel->m_dWeaponPower,pcModel->m_dWeaponAttack);
  649. pcObj->AddInventory(aWeapon);
  650. }