diff --git a/src/mod_junk_to_gold.cpp b/src/mod_junk_to_gold.cpp index ed8a8b1..8bd5fbe 100644 --- a/src/mod_junk_to_gold.cpp +++ b/src/mod_junk_to_gold.cpp @@ -13,7 +13,7 @@ public: { SendTransactionInformation(player, item, count); player->ModifyMoney(item->GetTemplate()->SellPrice * count); - player->DestroyItemCount(item, count, true); + player->DestroyItem(item->GetBagSlot(), item->GetSlot(), true); } } @@ -23,7 +23,7 @@ private: std::string name; if (count > 1) { - name = Acore::StringFormat("[%s] x %i", item->GetTemplate()->Name1, count); + name = Acore::StringFormat("[%s]x%i", item->GetTemplate()->Name1, count); } else { @@ -35,39 +35,41 @@ private: uint32 silver = (money % GOLD) / SILVER; uint32 copper = (money % GOLD) % SILVER; + std::string itemLink = Acore::StringFormat("|cff9d9d9d|Hitem:%i::::::::80:::::|h%s|h|r", item->GetTemplate()->ItemId, name); + std::string info; if (money < SILVER) { - info = Acore::StringFormat("%s was sold for %i copper.", name, copper); + info = Acore::StringFormat("%s sold for %i copper.", itemLink, copper); } else if (money < GOLD) { if (copper > 0) { - info = Acore::StringFormat("%s was sold for %i silver and %i copper.", name, silver, copper); + info = Acore::StringFormat("%s sold for %i silver and %i copper.", itemLink, silver, copper); } else { - info = Acore::StringFormat("%s was sold for %i silver.", name, silver); + info = Acore::StringFormat("%s sold for %i silver.", itemLink, silver); } } else { if (copper > 0 && silver > 0) { - info = Acore::StringFormat("%s was sold for %i gold, %i silver and %i copper.", name, gold, silver, copper); + info = Acore::StringFormat("%s sold for %i gold, %i silver and %i copper.", itemLink, gold, silver, copper); } else if (copper > 0) { - info = Acore::StringFormat("%s was sold for %i gold and %i copper.", name, gold, copper); + info = Acore::StringFormat("%s sold for %i gold and %i copper.", itemLink, gold, copper); } else if (silver > 0) { - info = Acore::StringFormat("%s was sold for %i gold and %i silver.", name, gold, silver); + info = Acore::StringFormat("%s sold for %i gold and %i silver.", itemLink, gold, silver); } else { - info = Acore::StringFormat("%s was sold for %i gold.", name, gold); + info = Acore::StringFormat("%s sold for %i gold.", itemLink, gold); } }