01-23-2014, 12:59 AM
(This post was last modified: 01-23-2014, 01:09 AM by daniel0916.)
Code:
cItem enchantitem = *this->m_Client->GetPlayer()->GetWindow()->GetSlot(*this->m_Client->GetPlayer() , 0);
//Enchant item with Sharpness 5
enchantitem.m_Enchantments.SetLevel(cEnchantments::enchSharpness, 5);
this->m_Client->GetPlayer()->GetWindow()->SetSlot(*this->m_Client->GetPlayer(), 0, enchantitem);
this->m_Client->GetPlayer()->SendMessage(this->m_Client->GetPlayer()->GetWindow()->GetSlot(*this->m_Client->GetPlayer(), 0)->m_Enchantments.ToString());
My current code. But the item isn't enchanted. Have you a idea why?
And it returns "16=5:"
(01-22-2014, 08:05 AM)xoft Wrote: You should drop a note in the GitHub issue tracker that you're working on this: https://github.com/mc-server/MCServer/issues/32
I will make this. (made. It's only a little message)