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

53 lines
1.1 KiB
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;
2020-04-13 16:38:06 +00:00
class cEnchantingWindow:
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. */
2015-03-10 18:40:53 +00:00
virtual void SetProperty(short a_Property, short a_Value, cPlayer & a_Player) override;
/** Sends enchantment properties to the client.
If the property represents a level requirement, stores it for later GetProperty retrieval. */
2015-03-10 18:40:53 +00:00
virtual void SetProperty(short a_Property, short a_Value) override;
/** Return the level requirement of the given enchantment slot. */
short GetProperty(short 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
};