From 377e1d21926e6a0d6191a59df8669aad0ecd7dda Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Wed, 11 Mar 2026 01:06:36 +1100 Subject: [PATCH] Use standard wide string returns for item descriptions --- Minecraft.World/Items/Item.cpp | 4 ++-- Minecraft.World/Items/Item.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Minecraft.World/Items/Item.cpp b/Minecraft.World/Items/Item.cpp index 3eb9a063b..f77644996 100644 --- a/Minecraft.World/Items/Item.cpp +++ b/Minecraft.World/Items/Item.cpp @@ -747,13 +747,13 @@ Item *Item::setDescriptionId(unsigned int id) return this; } -LPCWSTR Item::getDescription() +const wchar_t *Item::getDescription() { return app.GetString(getDescriptionId()); //return I18n::get(getDescriptionId()); } -LPCWSTR Item::getDescription(std::shared_ptr instance) +const wchar_t *Item::getDescription(std::shared_ptr instance) { return app.GetString(getDescriptionId(instance)); //return I18n::get(getDescriptionId(instance)); diff --git a/Minecraft.World/Items/Item.h b/Minecraft.World/Items/Item.h index eb041fed0..4a20b7602 100644 --- a/Minecraft.World/Items/Item.h +++ b/Minecraft.World/Items/Item.h @@ -672,8 +672,8 @@ public: virtual bool isHandEquipped(); virtual bool isMirroredArt(); Item *setDescriptionId(unsigned int id); - LPCWSTR getDescription(); - LPCWSTR getDescription(std::shared_ptr instance); + const wchar_t *getDescription(); + const wchar_t *getDescription(std::shared_ptr instance); virtual unsigned int getDescriptionId(int iData = -1); virtual unsigned int getDescriptionId(std::shared_ptr instance); Item *setUseDescriptionId(unsigned int id);