summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/iteminfo.cpp5
-rw-r--r--src/resources/iteminfo.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp
index 9e3e4acfa..bd4a0f704 100644
--- a/src/resources/iteminfo.cpp
+++ b/src/resources/iteminfo.cpp
@@ -446,3 +446,8 @@ std::string ItemInfo::getIconColor(const ItemColor idx) const
return std::string();
return it->second.color;
}
+
+const std::string ItemInfo::getLink() const
+{
+ return strprintf("[@@%d|%s@@]", mId, mName.c_str());
+}
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h
index 1233daf73..6ab059d7c 100644
--- a/src/resources/iteminfo.h
+++ b/src/resources/iteminfo.h
@@ -75,6 +75,8 @@ class ItemInfo final
const std::string getName(const ItemColor color)
const A_WARN_UNUSED;
+ const std::string getLink() const A_WARN_UNUSED;
+
void setDisplay(const SpriteDisplay &display)
{ mDisplay = display; }