aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/ItemInstance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Minecraft.World/ItemInstance.cpp')
-rw-r--r--Minecraft.World/ItemInstance.cpp23
1 files changed, 8 insertions, 15 deletions
diff --git a/Minecraft.World/ItemInstance.cpp b/Minecraft.World/ItemInstance.cpp
index b4f9b2ad..e4af60c6 100644
--- a/Minecraft.World/ItemInstance.cpp
+++ b/Minecraft.World/ItemInstance.cpp
@@ -562,34 +562,27 @@ vector<HtmlString> *ItemInstance::getHoverText(shared_ptr<Player> player, bool a
title.italics = true;
}
- // 4J: This is for showing aux values, not useful in console version
- /*
if (advanced)
{
wstring suffix = L"";
- if (title.length() > 0)
+ if (title.text.length() > 0)
{
- title += L" (";
+ title.text += L" (";
suffix = L")";
}
+ wchar_t buf[64];
if (isStackedByData())
- {
- title += String.format("#%04d/%d%s", id, auxValue, suffix);
- }
+ swprintf_s(buf, 64, L"#%04d/%d%s", id, auxValue, suffix.c_str());
else
- {
- title += String.format("#%04d%s", id, suffix);
- }
+ swprintf_s(buf, 64, L"#%04d%s", id, suffix.c_str());
+ title.text += buf;
}
else if (!hasCustomHoverName() && id == Item::map_Id)
- */
-
- /*if (!hasCustomHoverName() && id == Item::map_Id)
{
title.text += L" #" + std::to_wstring(auxValue);
- }*/
+ }
lines->push_back(title);
@@ -673,7 +666,7 @@ vector<HtmlString> *ItemInstance::getHoverText(shared_ptr<Player> player, bool a
{
if (isDamaged())
{
- wstring damageStr = L"Durability: LOCALISE " + std::to_wstring((getMaxDamage()) - getDamageValue()) + L" / " + std::to_wstring(getMaxDamage());
+ wstring damageStr = L"Durability: " + std::to_wstring((getMaxDamage()) - getDamageValue()) + L" / " + std::to_wstring(getMaxDamage());
lines->push_back(HtmlString(damageStr));
}
}