mirror of
https://github.com/noisiver/mod-junk-to-gold
synced 2025-11-29 16:18:15 +08:00
Merge pull request #1 from kjack9/item-links
Add item links and small refinements
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user