1. #include "ScriptPCH.h"
  2. // Set USE_TOKEN to 1 if you want to have it use tokens in place of gold
  3. #define USE_TOKEN 0
  4. #define TOKEN_ID 29434
  5. struct BloodMoneyInfo
  6. {
  7. uint64 guid;
  8. uint32 amount;
  9. bool accepted;
  10. };
  11. typedef std::list<BloodMoneyInfo> BloodMoneyList;
  12. typedef std::map<uint64, BloodMoneyList> BloodMoney;
  13. static BloodMoney m_bloodMoney;
  14. bool HasBloodMoneyChallenger(uint64 playerGUID)
  15. {
  16. return m_bloodMoney.find(playerGUID) != m_bloodMoney.end();
  17. }
  18. bool HasBloodMoneyChallenger(uint64 targetGUID, uint64 playerGUID)
  19. {
  20. if (!HasBloodMoneyChallenger(targetGUID))
  21. return false;
  22. BloodMoneyList bml = m_bloodMoney[targetGUID];
  23. for (BloodMoneyList::const_iterator itr = bml.begin(); itr != bml.end(); ++itr)
  24. if (itr->guid == playerGUID)
  25. return true;
  26. return false;
  27. }
  28. void AddBloodMoneyEntry(uint64 targetGUID, uint64 playerGUID, uint32 amount)
  29. {
  30. BloodMoneyInfo bmi;
  31. bmi.guid = playerGUID;
  32. bmi.amount = amount;
  33. bmi.accepted = false;
  34. m_bloodMoney[targetGUID].push_back(bmi);
  35. }
  36. void RemoveBloodMoneyEntry(uint64 targetGUID, uint64 playerGUID)
  37. {
  38. if (!HasBloodMoneyChallenger(targetGUID, playerGUID))
  39. return;
  40. BloodMoneyList &list = m_bloodMoney[targetGUID];
  41. BloodMoneyList::iterator itr;
  42. for (itr = list.begin(); itr != list.begin(); ++itr)
  43. if (itr->guid == playerGUID)
  44. break;
  45. list.erase(itr);
  46. }
  47. void SetChallengeAccepted(uint64 targetGUID, uint64 playerGUID)
  48. {
  49. if (!HasBloodMoneyChallenger(targetGUID, playerGUID))
  50. return;
  51. BloodMoneyList &list = m_bloodMoney[targetGUID];
  52. BloodMoneyList::iterator itr;
  53. for (itr = list.begin(); itr != list.end(); ++itr)
  54. {
  55. if (itr->guid == playerGUID)
  56. {
  57. itr->accepted = true;
  58. break;
  59. }
  60. }
  61. }
  62. class npc_blood_money : public CreatureScript
  63. {
  64. public :
  65. npc_blood_money() : CreatureScript("npc_blood_money") {}
  66. bool OnGossipHello(Player * player, Creature * creature)
  67. {
  68. player->PlayerTalkClass->ClearMenus();
  69. player->ADD_GOSSIP_ITEM(GOSSIP_ICON_BATTLE, "Challenge a Player", 11, 1000);
  70. if (HasBloodMoneyChallenger(player->GetGUID()))
  71. {
  72. BloodMoneyList list = m_bloodMoney[player->GetGUID()];
  73. for (BloodMoneyList::const_iterator itr = list.begin(); itr != list.end(); ++itr)
  74. {
  75. char msg[50];
  76. if (Player* plr = Player::GetPlayer(*player, itr->guid))
  77. {
  78. if (USE_TOKEN)
  79. {
  80. sprintf(msg, "Accept %s's Challenge of %d tokens", plr->GetName().c_str(), itr->amount);
  81. player->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, msg, GOSSIP_SENDER_MAIN, itr->guid);
  82. sprintf(msg, "Decline %s's Challenge of %d tokens", plr->GetName().c_str(), itr->amount);
  83. player->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, msg, GOSSIP_SENDER_INFO, itr->guid);
  84. }
  85. else
  86. {
  87. sprintf(msg, "Accept %s's Challenge of %dg", plr->GetName().c_str(), itr->amount/10000);
  88. player->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, msg, GOSSIP_SENDER_MAIN, itr->guid);
  89. sprintf(msg, "Decline %s's Challenge of %dg", plr->GetName().c_str(), itr->amount/10000);
  90. player->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_1, msg, GOSSIP_SENDER_INFO, itr->guid);
  91. }
  92. }
  93. }
  94. }
  95. player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Nevermind", GOSSIP_SENDER_MAIN, 1);
  96. player->SEND_GOSSIP_MENU(80025, creature->GetGUID());
  97. return true;
  98. }
  99. bool OnGossipSelect(Player * player, Creature * creature, uint32 uiSender, uint32 uiAction)
  100. {
  101. player->PlayerTalkClass->ClearMenus();
  102. if (uiAction == 1)
  103. {
  104. player->CLOSE_GOSSIP_MENU();
  105. return true;
  106. }
  107. switch(uiSender)
  108. {
  109. case GOSSIP_SENDER_MAIN:
  110. if (Player* target = Player::GetPlayer(*player, uiAction))
  111. {
  112. SetChallengeAccepted(player->GetGUID(), target->GetGUID());
  113. char msg[60];
  114. sprintf(msg, "%s has accepted your challenge!", player->GetName().c_str());
  115. creature->MonsterWhisper(msg, target->GetGUID(), true);
  116. player->CLOSE_GOSSIP_MENU();
  117. }
  118. break;
  119. case GOSSIP_SENDER_INFO:
  120. if (Player* target = Player::GetPlayer(*player, uiAction))
  121. {
  122. char msg[60];
  123. sprintf(msg, "%s has declined your challenge!", player->GetName().c_str());
  124. creature->MonsterWhisper(msg, target->GetGUID(), true);
  125. RemoveBloodMoneyEntry(player->GetGUID(), uiAction);
  126. OnGossipHello(player, creature);
  127. }
  128. break;
  129. case 11:
  130. if (USE_TOKEN)
  131. {
  132. player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 5 tokens", GOSSIP_SENDER_MAIN, 5, "Type in the player's name", 0, true);
  133. player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 10 tokens", GOSSIP_SENDER_MAIN, 10, "Type in the player's name", 0, true);
  134. player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 15 tokens", GOSSIP_SENDER_MAIN, 15, "Type in the player's name", 0, true);
  135. player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 25 tokens", GOSSIP_SENDER_MAIN, 25, "Type in the player's name", 0, true);
  136. player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 50 tokens", GOSSIP_SENDER_MAIN, 50, "Type in the player's name", 0, true);
  137. player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 100 tokens", GOSSIP_SENDER_MAIN, 100, "Type in the player's name", 0, true);
  138. player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 150 tokens", GOSSIP_SENDER_MAIN, 150, "Type in the player's name", 0, true);
  139. player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 200 tokens", GOSSIP_SENDER_MAIN, 200, "Type in the player's name", 0, true);
  140. player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 250 tokens", GOSSIP_SENDER_MAIN, 250, "Type in the player's name", 0, true);
  141. player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 500 tokens", GOSSIP_SENDER_MAIN, 500, "Type in the player's name", 0, true);
  142. }
  143. else
  144. {
  145. player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 5g", GOSSIP_SENDER_MAIN, 5, "Type in the player's name", 0, true);
  146. player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 10g", GOSSIP_SENDER_MAIN, 10, "Type in the player's name", 0, true);
  147. player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 15g", GOSSIP_SENDER_MAIN, 15, "Type in the player's name", 0, true);
  148. player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 25g", GOSSIP_SENDER_MAIN, 25, "Type in the player's name", 0, true);
  149. player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 50g", GOSSIP_SENDER_MAIN, 50, "Type in the player's name", 0, true);
  150. player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 100g", GOSSIP_SENDER_MAIN, 100, "Type in the player's name", 0, true);
  151. player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 150g", GOSSIP_SENDER_MAIN, 150, "Type in the player's name", 0, true);
  152. player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 200g", GOSSIP_SENDER_MAIN, 200, "Type in the player's name", 0, true);
  153. player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 250g", GOSSIP_SENDER_MAIN, 250, "Type in the player's name", 0, true);
  154. player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Bet 500g", GOSSIP_SENDER_MAIN, 500, "Type in the player's name", 0, true);
  155. }
  156. player->SEND_GOSSIP_MENU(80025, creature->GetGUID());
  157. break;
  158. }
  159. return true;
  160. }
  161. bool OnGossipSelectCode(Player* player, Creature* creature, uint32 sender, uint32 action, const char* code)
  162. {
  163. if (player->GetName().c_str() == code)
  164. {
  165. ChatHandler(player->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFNow why would you want to challenge yourself?");
  166. return false;
  167. }
  168. if (uint64 targetGUID = sObjectMgr->GetPlayerGUIDByName(code))
  169. {
  170. if (Player* target = Player::GetPlayer(*player, targetGUID))
  171. {
  172. if (target->GetGUID() == player->GetGUID())
  173. {
  174. ChatHandler(player->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFNow why would you want to challenge yourself?");
  175. return false;
  176. }
  177. if (target->GetZoneId() == player->GetZoneId())
  178. {
  179. if (USE_TOKEN)
  180. {
  181. if (target->GetItemCount(TOKEN_ID) < action)
  182. {
  183. ChatHandler(player->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFThat player does not have enough tokens to make the bet!");
  184. player->CLOSE_GOSSIP_MENU();
  185. return false;
  186. }
  187. if (player->GetItemCount(TOKEN_ID) < action)
  188. {
  189. ChatHandler(player->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYou do not have enough tokens to make the bet!");
  190. player->CLOSE_GOSSIP_MENU();
  191. return false;
  192. }
  193. bool found = false;
  194. if (HasBloodMoneyChallenger(player->GetGUID()))
  195. {
  196. BloodMoneyList list = m_bloodMoney[player->GetGUID()];
  197. for (BloodMoneyList::const_iterator itr = list.begin(); itr != list.end(); ++itr)
  198. if (itr->guid == target->GetGUID())
  199. found = true;
  200. }
  201. if (!found)
  202. {
  203. if (!HasBloodMoneyChallenger(target->GetGUID(), player->GetGUID()))
  204. {
  205. AddBloodMoneyEntry(target->GetGUID(), player->GetGUID(), action);
  206. char msg[60];
  207. sprintf(msg, "%s has requested a Blood Money duel with you!", player->GetName().c_str());
  208. creature->MonsterWhisper(msg, target->GetGUID(), true);
  209. }
  210. else
  211. ChatHandler(target->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYou cannot request a duel with the same person!");
  212. }
  213. else
  214. ChatHandler(player->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYou cannot request a duel with somebody that has challenged you!");
  215. player->CLOSE_GOSSIP_MENU();
  216. return true;
  217. }
  218. else
  219. {
  220. uint32 money = action*10000;
  221. if (target->GetMoney() < money)
  222. {
  223. ChatHandler(player->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFThat player does not have enough money to make the bet!");
  224. player->CLOSE_GOSSIP_MENU();
  225. return false;
  226. }
  227. if (player->GetMoney() < money)
  228. {
  229. ChatHandler(player->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYou do not have enough money to make the bet!");
  230. player->CLOSE_GOSSIP_MENU();
  231. return false;
  232. }
  233. bool found = false;
  234. if (HasBloodMoneyChallenger(player->GetGUID()))
  235. {
  236. BloodMoneyList list = m_bloodMoney[player->GetGUID()];
  237. for (BloodMoneyList::const_iterator itr = list.begin(); itr != list.end(); ++itr)
  238. if (itr->guid == target->GetGUID())
  239. found = true;
  240. }
  241. if (!found)
  242. {
  243. if (!HasBloodMoneyChallenger(target->GetGUID(), player->GetGUID()))
  244. {
  245. AddBloodMoneyEntry(target->GetGUID(), player->GetGUID(), money);
  246. char msg[60];
  247. sprintf(msg, "%s has requested a Blood Money duel with you!", player->GetName().c_str());
  248. creature->MonsterWhisper(msg, target->GetGUID(), true);
  249. }
  250. else
  251. ChatHandler(target->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYou cannot request a duel with the same person!");
  252. }
  253. else
  254. ChatHandler(player->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYou cannot request a duel with somebody that has challenged you!");
  255. player->CLOSE_GOSSIP_MENU();
  256. return true;
  257. }
  258. }
  259. else
  260. {
  261. ChatHandler(player->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFThat player is not in your zone!");
  262. player->CLOSE_GOSSIP_MENU();
  263. return false;
  264. }
  265. }
  266. else
  267. {
  268. ChatHandler(player->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFThat player was not found!");
  269. player->CLOSE_GOSSIP_MENU();
  270. return false;
  271. }
  272. }
  273. else
  274. {
  275. ChatHandler(player->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFThat player was not found!");
  276. player->CLOSE_GOSSIP_MENU();
  277. return false;
  278. }
  279. player->CLOSE_GOSSIP_MENU();
  280. return true;
  281. }
  282. };
  283. class BloodMoneyReward : public PlayerScript
  284. {
  285. public:
  286. BloodMoneyReward() : PlayerScript("BloodMoneyReward") {}
  287. void OnDuelEnd(Player* winner, Player* loser, DuelCompleteType type)
  288. {
  289. if (HasBloodMoneyChallenger(winner->GetGUID()) || HasBloodMoneyChallenger(loser->GetGUID()))
  290. {
  291. BloodMoneyList list1 = m_bloodMoney[winner->GetGUID()];
  292. BloodMoneyList list2 = m_bloodMoney[loser->GetGUID()];
  293. BloodMoneyList::const_iterator itr;
  294. for (itr = list1.begin(); itr != list1.end(); ++itr)
  295. {
  296. if (itr->guid == loser->GetGUID() && itr->accepted)
  297. {
  298. if (USE_TOKEN)
  299. {
  300. if (winner->GetItemCount(TOKEN_ID) < itr->amount)
  301. {
  302. winner->AddAura(15007, winner); // Apply Rez sickness for possible cheating
  303. ChatHandler(winner->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYou have gained Resurrection Sickness for possibly trying to abuse the system.");
  304. ChatHandler(loser->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYour opponent tried to cheat you. Don't worry you did not lose any tokens because of this.");
  305. RemoveBloodMoneyEntry(winner->GetGUID(), itr->guid);
  306. return;
  307. }
  308. if (loser->GetItemCount(TOKEN_ID) >= itr->amount)
  309. {
  310. winner->AddItem(TOKEN_ID, itr->amount);
  311. ChatHandler(winner->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFCongratulations on winning %d tokens!", itr->amount);
  312. Item* item = loser->GetItemByEntry(TOKEN_ID);
  313. loser->DestroyItemCount(TOKEN_ID, itr->amount, true);
  314. RemoveBloodMoneyEntry(winner->GetGUID(), itr->guid);
  315. }
  316. else
  317. {
  318. loser->AddAura(15007, loser); // Apply Rez sickness for possible cheating
  319. ChatHandler(winner->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYour opponent tried to cheat you. He did not have enough tokens to pay off the bet.");
  320. ChatHandler(loser->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYou have gained Resurrection Sickness for possibly trying to abuse the system.");
  321. RemoveBloodMoneyEntry(winner->GetGUID(), itr->guid);
  322. }
  323. return;
  324. }
  325. else
  326. {
  327. if (winner->GetMoney() < itr->amount)
  328. {
  329. winner->AddAura(15007, winner); // Apply Rez sickness for possible cheating
  330. ChatHandler(winner->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYou have gained Resurrection Sickness for possibly trying to abuse the system.");
  331. ChatHandler(loser->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYour opponent tried to cheat you. Don't worry you did not lose any money because of this.");
  332. RemoveBloodMoneyEntry(winner->GetGUID(), itr->guid);
  333. return;
  334. }
  335. if (loser->GetMoney() >= itr->amount)
  336. {
  337. winner->ModifyMoney(itr->amount);
  338. ChatHandler(winner->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFCongratulations on winning %dg!", itr->amount/10000);
  339. loser->ModifyMoney(-(int32)(itr->amount));
  340. RemoveBloodMoneyEntry(winner->GetGUID(), itr->guid);
  341. }
  342. else
  343. {
  344. loser->AddAura(15007, loser); // Apply Rez sickness for possible cheating
  345. ChatHandler(winner->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYour opponent tried to cheat you. He did not have enough money to pay off the bet.");
  346. ChatHandler(loser->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYou have gained Resurrection Sickness for possibly trying to abuse the system.");
  347. RemoveBloodMoneyEntry(winner->GetGUID(), itr->guid);
  348. }
  349. return;
  350. }
  351. }
  352. }
  353. for (itr = list2.begin(); itr != list2.end(); ++itr)
  354. {
  355. if (itr->guid == winner->GetGUID() && itr->accepted)
  356. {
  357. if (USE_TOKEN)
  358. {
  359. if (winner->GetItemCount(TOKEN_ID) < itr->amount)
  360. {
  361. winner->AddAura(15007, winner); // Apply Rez sickness for possible cheating
  362. ChatHandler(winner->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYou have gained Resurrection Sickness for possibly trying to abuse the system.");
  363. ChatHandler(loser->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYour opponent tried to cheat you. Don't worry you did not lose any tokens because of this.");
  364. RemoveBloodMoneyEntry(loser->GetGUID(), itr->guid);
  365. return;
  366. }
  367. if (loser->GetItemCount(TOKEN_ID) >= itr->amount)
  368. {
  369. winner->AddItem(TOKEN_ID, itr->amount);
  370. ChatHandler(winner->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFCongratulations on winning %d tokens!", itr->amount);
  371. Item* item = loser->GetItemByEntry(TOKEN_ID);
  372. loser->DestroyItemCount(TOKEN_ID, itr->amount, true);
  373. RemoveBloodMoneyEntry(loser->GetGUID(), itr->guid);
  374. }
  375. else
  376. {
  377. loser->AddAura(15007, loser); // Apply Rez sickness for possible cheating
  378. ChatHandler(winner->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYour opponent tried to cheat you. He did not have enough tokens to pay off the bet.");
  379. ChatHandler(loser->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYou have gained Resurrection Sickness for possibly trying to abuse the system.");
  380. RemoveBloodMoneyEntry(loser->GetGUID(), itr->guid);
  381. }
  382. return;
  383. }
  384. else
  385. {
  386. if (winner->GetMoney() < itr->amount)
  387. {
  388. winner->AddAura(15007, winner); // Apply Rez sickness for possible cheating
  389. ChatHandler(winner->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYou have gained Resurrection Sickness for possibly trying to abuse the system.");
  390. ChatHandler(loser->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYour opponent tried to cheat you. Don't worry you did not lose any money because of this.");
  391. RemoveBloodMoneyEntry(loser->GetGUID(), itr->guid);
  392. return;
  393. }
  394. if (loser->GetMoney() >= itr->amount)
  395. {
  396. winner->ModifyMoney(itr->amount);
  397. ChatHandler(winner->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFCongratulations on winning %dg!", itr->amount/10000);
  398. loser->ModifyMoney(-(int32)(itr->amount));
  399. RemoveBloodMoneyEntry(loser->GetGUID(), itr->guid);
  400. }
  401. else
  402. {
  403. loser->AddAura(15007, loser); // Apply Rez sickness for possible cheating
  404. ChatHandler(winner->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYour opponent tried to cheat you. He did not have enough money to pay off the bet.");
  405. ChatHandler(loser->GetSession()).PSendSysMessage("|cff800C0C[Blood Money] |cffFFFFFFYou have gained Resurrection Sickness for possibly trying to abuse the system.");
  406. RemoveBloodMoneyEntry(loser->GetGUID(), itr->guid);
  407. }
  408. return;
  409. }
  410. }
  411. }
  412. }
  413. }
  414. };
  415. void AddSC_npc_blood_money()
  416. {
  417. new BloodMoneyReward();
  418. new npc_blood_money();
  419. }