1
0
Fork 0
cuberite-2a/src/UI/EnchantingWindow.h

49 lines
882 B
C
Raw Normal View History

2014-12-13 14:06:55 +00:00
// EnchantingWindow.h
// Representing the UI window for the enchanting block
#pragma once
#include "Window.h"
class cSlotAreaEnchanting;
class cEnchantingWindow final :
2014-12-13 14:06:55 +00:00
public cWindow
{
2020-04-13 16:38:06 +00:00
using Super = cWindow;
2014-12-13 14:06:55 +00:00
public:
2020-04-13 16:38:06 +00:00
cEnchantingWindow(Vector3i a_BlockPos, const AString & a_Title);
2015-03-10 18:40:53 +00:00
/** Sends enchantment properties to the client.
If the property represents a level requirement, stores it for later GetProperty retrieval. */
virtual void SetProperty(size_t a_Property, short a_Value) override;
2015-03-10 18:40:53 +00:00
/** Return the level requirement of the given enchantment slot. */
short GetProperty(size_t a_Property);
2015-03-10 18:40:53 +00:00
virtual void DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a_Player, cSlotArea * a_ClickedArea, bool a_ShouldApply) override;
cSlotAreaEnchanting * m_SlotArea;
2014-12-13 14:06:55 +00:00
protected:
std::array<short, 3> m_PropertyValue;
Vector3i m_BlockPos;
2014-12-13 14:06:55 +00:00
};