feat: remove experience
This commit is contained in:
1 parent
bdfe5350cd
commit
41d166afed
83 files changed
+47
-1501
No files matched your search
@@ -153,7 +153,7 @@ void EnchantmentMenu::slotsChanged() // 4J used to take a shared_ptr<Container>
|
||||
bool EnchantmentMenu::clickMenuButton(shared_ptr<Player> player, int i)
|
||||
{
|
||||
shared_ptr<ItemInstance> item = enchantSlots->getItem(0);
|
||||
if (costs[i] > 0 && item != NULL && (player->experienceLevel >= costs[i] || player->abilities.instabuild) )
|
||||
if (costs[i] > 0 && item != NULL && (player->abilities.instabuild) )
|
||||
{
|
||||
if (!level->isClientSide)
|
||||
{
|
||||
@@ -162,7 +162,6 @@ bool EnchantmentMenu::clickMenuButton(shared_ptr<Player> player, int i)
|
||||
vector<EnchantmentInstance *> *newEnchantment = EnchantmentHelper::selectEnchantment(&random, item, costs[i]);
|
||||
if (newEnchantment != NULL)
|
||||
{
|
||||
player->withdrawExperienceLevels(costs[i]);
|
||||
if (isBook) item->id = Item::enchantedBook_Id;
|
||||
int randomIndex = isBook ? random.nextInt(newEnchantment->size()) : -1;
|
||||
//for (EnchantmentInstance e : newEnchantment)
|
||||
|
||||
Reference in new issue
Block a user