mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-24 18:04:18 +00:00
29 lines
738 B
C++
29 lines
738 B
C++
#pragma once
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
#include "GameRuleDefinition.h"
|
|
#include "app/common/GameRules/ConsoleGameRulesConstants.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::string& attributeName,
|
|
const std::string& attributeValue);
|
|
|
|
bool enchantItem(std::shared_ptr<ItemInstance> item);
|
|
}; |