From 8947147c25e2640519897bfdc8807e97ee291d70 Mon Sep 17 00:00:00 2001 From: KingCol13 <48412633+KingCol13@users.noreply.github.com> Date: Fri, 2 Oct 2020 00:33:32 +0300 Subject: Enchanting table shows detail on hover. Enchanting is deterministic. (#4937) * Use lapis for enchanting, subtract correct number of levels, ClientHandle now selects from pregenerated list. Co-authored-by: Tiger Wang --- src/Item.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Item.h') diff --git a/src/Item.h b/src/Item.h index d3f853170..600c8b2f1 100644 --- a/src/Item.h +++ b/src/Item.h @@ -141,8 +141,9 @@ public: int GetEnchantability(); // tolua_export /** Randomly enchants the item using the specified number of XP levels. - Returns true if the item was enchanted, false if not (not enchantable / too many enchantments already). */ - bool EnchantByXPLevels(int a_NumXPLevels); // tolua_export + Returns true if the item was enchanted, false if not (not enchantable / too many enchantments already). + Randomness is derived from the provided PRNG. */ + bool EnchantByXPLevels(int a_NumXPLevels, MTRand & a_Random); // Exported in ManualBindings.cpp /** Adds this specific enchantment to this item, returning the cost. FromBook specifies whether the enchantment should be treated as coming -- cgit v1.2.3