1
0

Some Fixes

This commit is contained in:
daniel0916 2014-04-13 13:33:47 +02:00
parent 2689a63e9c
commit 1429d2f1b1
2 changed files with 9 additions and 2 deletions

View File

@ -3107,7 +3107,14 @@ void cClientHandle::HandleEnchantItem(Byte & WindowID, Byte & Enchantment)
Item.m_Enchantments.AddFromString(Enchantment3.ToString());
enchantments.erase(std::remove(enchantments.begin(), enchantments.end(), Enchantment3), enchantments.end());
m_Player->GetWindow()->SetSlot(*m_Player, 0, Item);
if (m_Player->DeltaExperience(Window->GetPropertyValue(Enchantment)) >= 0 || m_Player->IsGameModeCreative())
{
m_Player->GetWindow()->SetSlot(*m_Player, 0, Item);
Window->SetProperty(0, 0, *m_Player);
Window->SetProperty(1, 0, *m_Player);
Window->SetProperty(2, 0, *m_Player);
}
}

View File

@ -647,7 +647,7 @@ void cSlotAreaEnchanting::ClickedResult(cPlayer & a_Player)
m_ParentWindow.SetProperty(1, 0, a_Player);
m_ParentWindow.SetProperty(2, 0, a_Player);
}
else if (a_Player.GetDraggingItem().IsEnchantable)
else if (cItem::IsEnchantable(a_Player.GetDraggingItem().m_ItemType))
{
int PosX = 0;
int PosY = 0;