Initial commit

This commit is contained in:
daoge_cmd
2026-03-01 12:16:08 +08:00
parent def8cb4153
commit b691c43c44
19437 changed files with 4363922 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
#pragma once
#include "Item.h"
class EnchantmentInstance;
class EnchantedBookItem : public Item
{
public:
static const wstring TAG_STORED_ENCHANTMENTS;
EnchantedBookItem(int id);
bool isFoil(shared_ptr<ItemInstance> itemInstance);
bool isEnchantable(shared_ptr<ItemInstance> itemInstance);
const Rarity *getRarity(shared_ptr<ItemInstance> itemInstance);
ListTag<CompoundTag> *getEnchantments(shared_ptr<ItemInstance> item);
void appendHoverText(shared_ptr<ItemInstance> itemInstance, shared_ptr<Player> player, vector<wstring> *lines, bool advanced, vector<wstring> &unformattedStrings);
void addEnchantment(shared_ptr<ItemInstance> item, EnchantmentInstance *enchantment);
shared_ptr<ItemInstance> createForEnchantment(EnchantmentInstance *enchant);
void createForEnchantment(Enchantment *enchant, vector<shared_ptr<ItemInstance> > *items);
shared_ptr<ItemInstance> createForRandomLoot(Random *random);
WeighedTreasure *createForRandomTreasure(Random *random);
WeighedTreasure *createForRandomTreasure(Random *random, int minCount, int maxCount, int weight);
};