From fcafd5a2e0f87fcc79e0a723241604aeca50d017 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Wed, 15 Jan 2014 22:38:03 +0000 Subject: Implemented custom names and lore + Added custom names and lore + Added saving and loading + Added writing and parsing of NBT --- src/UI/SlotArea.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/UI') diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp index a721e6b7e..df3687fda 100644 --- a/src/UI/SlotArea.cpp +++ b/src/UI/SlotArea.cpp @@ -89,6 +89,9 @@ void cSlotArea::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickA Slot.m_ItemCount -= DraggingItem.m_ItemCount; DraggingItem.m_ItemType = Slot.m_ItemType; DraggingItem.m_ItemDamage = Slot.m_ItemDamage; + DraggingItem.m_Enchantments = Slot.m_Enchantments; + DraggingItem.m_CustomName = Slot.m_CustomName; + DraggingItem.m_Lore = Slot.m_Lore; if (Slot.m_ItemCount <= 0) { @@ -105,6 +108,10 @@ void cSlotArea::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickA Slot.m_ItemCount++; Slot.m_ItemDamage = DraggingItem.m_ItemDamage; DraggingItem.m_ItemCount--; + + Slot.m_Enchantments = DraggingItem.m_Enchantments; + Slot.m_CustomName = DraggingItem.m_CustomName; + Slot.m_Lore = DraggingItem.m_Lore; } if (DraggingItem.m_ItemCount <= 0) { -- cgit v1.2.3