mirror of
https://github.com/BluTac10/Xbox-Neo.git
synced 2026-05-23 19:34:54 +00:00
- Implement catch type random selection from decompiled java 1.7.2 code instead of using a WeighedRandomItemArray - Fix fishingTreasuresArray length being set to 5 instead of 6 - Remove testing values for nibbleTimer - Cast maxDamage of item to double before applying damage. - Add include for EnchantmentCategory in LureEnchantment.cpp and LuckOfTheSeaEnchantment.cpp. - sky obstruction is now checked before other checks.
26 lines
530 B
C++
26 lines
530 B
C++
#include "stdafx.h"
|
|
#include "LureEnchantment.h"
|
|
#include "EnchantmentCategory.h"
|
|
|
|
|
|
LureEnchantment::LureEnchantment(int id, int frequency) : Enchantment(id, frequency, EnchantmentCategory::fishing_rod)
|
|
{
|
|
setDescriptionId(IDS_ENCHANTMENT_LURE);
|
|
}
|
|
|
|
// Source: https://github.com/GRAnimated/MinecraftLCE
|
|
|
|
int LureEnchantment::getMinCost(int level)
|
|
{
|
|
return 9 * level + 6;
|
|
}
|
|
|
|
int LureEnchantment::getMaxCost(int level)
|
|
{
|
|
return Enchantment::getMinCost(level) + 50;;
|
|
}
|
|
|
|
int LureEnchantment::getMaxLevel()
|
|
{
|
|
return 3;
|
|
} |