Fixed invisibility enchantments
This commit is contained in:
parent
9dc4617e8d
commit
fce9ea65c3
@ -3115,7 +3115,9 @@ void cClientHandle::HandleEnchantItem(Byte & WindowID, Byte & Enchantment)
|
||||
|
||||
if (m_Player->DeltaExperience(-m_Player->XpForLevel(Window->GetPropertyValue(Enchantment))) >= 0 || m_Player->IsGameModeCreative())
|
||||
{
|
||||
m_Player->GetWindow()->SetSlot(*m_Player, 0, Item);
|
||||
Window->m_SlotArea->SetSlot(0, *m_Player, Item);
|
||||
Window->SendSlot(*m_Player, Window->m_SlotArea, 0);
|
||||
Window->BroadcastWholeWindow();
|
||||
|
||||
Window->SetProperty(0, 0, *m_Player);
|
||||
Window->SetProperty(1, 0, *m_Player);
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "Scoreboard.h"
|
||||
#include "Map.h"
|
||||
#include "Enchantments.h"
|
||||
#include "UI/SlotArea.h"
|
||||
|
||||
|
||||
|
||||
|
@ -600,6 +600,8 @@ cCraftingRecipe & cSlotAreaCrafting::GetRecipeForPlayer(cPlayer & a_Player)
|
||||
cSlotAreaEnchanting::cSlotAreaEnchanting(int a_NumSlots, cWindow & a_ParentWindow) :
|
||||
cSlotAreaTemporary(a_NumSlots, a_ParentWindow)
|
||||
{
|
||||
cEnchantingWindow * Window = (cEnchantingWindow *)&m_ParentWindow;
|
||||
Window->m_SlotArea = this;
|
||||
}
|
||||
|
||||
|
||||
|
@ -246,6 +246,8 @@ public:
|
||||
/** Set the Position Values to the Position of the Enchantment Table */
|
||||
void GetBlockPos(int & a_PosX, int & a_PosY, int & a_PosZ);
|
||||
|
||||
cSlotArea * m_SlotArea;
|
||||
|
||||
protected:
|
||||
int m_PropertyValue0, m_PropertyValue1, m_PropertyValue2;
|
||||
int m_BlockX, m_BlockY, m_BlockZ;
|
||||
|
Loading…
Reference in New Issue
Block a user