mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-24 17:33:37 +00:00
25 lines
643 B
C++
25 lines
643 B
C++
#pragma once
|
|
|
|
#include "GameRuleDefinition.h"
|
|
|
|
class ItemInstance;
|
|
|
|
class AddEnchantmentRuleDefinition : public GameRuleDefinition {
|
|
private:
|
|
int m_enchantmentId;
|
|
int m_enchantmentLevel;
|
|
|
|
public:
|
|
AddEnchantmentRuleDefinition();
|
|
|
|
virtual ConsoleGameRules::EGameRuleType getActionType() {
|
|
return ConsoleGameRules::eGameRuleType_AddEnchantment;
|
|
}
|
|
|
|
virtual void writeAttributes(DataOutputStream*, unsigned int numAttrs);
|
|
|
|
virtual void addAttribute(const std::wstring& attributeName,
|
|
const std::wstring& attributeValue);
|
|
|
|
bool enchantItem(std::shared_ptr<ItemInstance> item);
|
|
}; |