mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-05-21 22:55:04 +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
589 B
C++
26 lines
589 B
C++
#include "stdafx.h"
|
|
#include "LuckOfTheSeaEnchantment.h"
|
|
#include "EnchantmentCategory.h"
|
|
|
|
|
|
LuckOfTheSeaEnchantment::LuckOfTheSeaEnchantment(int id, int frequency) : Enchantment(id, frequency, EnchantmentCategory::fishing_rod)
|
|
{
|
|
setDescriptionId(IDS_ENCHANTMENT_LUCK_OF_THE_SEA);
|
|
}
|
|
|
|
// Source: https://github.com/GRAnimated/MinecraftLCE
|
|
|
|
int LuckOfTheSeaEnchantment::getMinCost(int level)
|
|
{
|
|
return 9 * level + 6;
|
|
}
|
|
|
|
int LuckOfTheSeaEnchantment::getMaxCost(int level)
|
|
{
|
|
return Enchantment::getMinCost(level) + 50;;
|
|
}
|
|
|
|
int LuckOfTheSeaEnchantment::getMaxLevel()
|
|
{
|
|
return 3;
|
|
} |