From 55231bb8d3e1a4e2752ac3d444c4287eb0ca4e8b Mon Sep 17 00:00:00 2001 From: void_17 <61356189+void2012@users.noreply.github.com> Date: Fri, 6 Mar 2026 02:11:18 +0700 Subject: Remove AUTO_VAR macro and _toString function (#592) --- Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp') diff --git a/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp b/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp index eabc1401..555ed8b4 100644 --- a/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp +++ b/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp @@ -14,10 +14,10 @@ void AddEnchantmentRuleDefinition::writeAttributes(DataOutputStream *dos, UINT n GameRuleDefinition::writeAttributes(dos, numAttributes + 2); ConsoleGameRules::write(dos, ConsoleGameRules::eGameRuleAttr_enchantmentId); - dos->writeUTF( _toString( m_enchantmentId ) ); + dos->writeUTF( std::to_wstring( m_enchantmentId ) ); ConsoleGameRules::write(dos, ConsoleGameRules::eGameRuleAttr_enchantmentLevel); - dos->writeUTF( _toString( m_enchantmentLevel ) ); + dos->writeUTF( std::to_wstring( m_enchantmentLevel ) ); } void AddEnchantmentRuleDefinition::addAttribute(const wstring &attributeName, const wstring &attributeValue) @@ -50,7 +50,7 @@ bool AddEnchantmentRuleDefinition::enchantItem(shared_ptr item) { // 4J-JEV: Ripped code from enchantmenthelpers // Maybe we want to add an addEnchantment method to EnchantmentHelpers - if (item->id == Item::enchantedBook_Id) + if (item->id == Item::enchantedBook_Id) { Item::enchantedBook->addEnchantment( item, new EnchantmentInstance(m_enchantmentId, m_enchantmentLevel) ); } -- cgit v1.2.3