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