diff --git a/.gitignore b/.gitignore index 2e0c2b7..401589a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,10 @@ - logs/players* compiler/vc17* +compiler/boost_filesystem-vc143-mt-x64-1_84.dll +compiler/libmariadb.dll +compiler/lua51.dll +compiler/mpir.dll +compiler/pugixml.dll +compiler/theforgottenserver.exe +compiler/theforgottenserver.pdb +compiler/zlib1.dll diff --git a/boost_filesystem-vc143-mt-x64-1_83.dll b/boost_filesystem-vc143-mt-x64-1_83.dll deleted file mode 100644 index a8962c5..0000000 Binary files a/boost_filesystem-vc143-mt-x64-1_83.dll and /dev/null differ diff --git a/boost_filesystem-vc143-mt-x64-1_84.dll b/boost_filesystem-vc143-mt-x64-1_84.dll index 49b7a8b..04ec8a0 100644 Binary files a/boost_filesystem-vc143-mt-x64-1_84.dll and b/boost_filesystem-vc143-mt-x64-1_84.dll differ diff --git a/compiler/src/bed.cpp b/compiler/src/bed.cpp index a2f55aa..2e9dd75 100644 --- a/compiler/src/bed.cpp +++ b/compiler/src/bed.cpp @@ -21,10 +21,12 @@ #include "bed.h" #include "game.h" +#include "configmanager.h" #include "iologindata.h" #include "scheduler.h" extern Game g_game; +extern ConfigManager g_config; BedItem::BedItem(uint16_t id) : Item(id) { @@ -223,7 +225,7 @@ void BedItem::regeneratePlayer(Player* player) const if (condition) { uint32_t regen; if (condition->getTicks() != -1) { - regen = std::min((condition->getTicks() / 1000), sleptTime) / 30; + regen = std::min((condition->getTicks() / 1000), sleptTime) / g_config.getNumber(ConfigManager::TICKS_REGEN_BED_GAIN); const int32_t newRegenTicks = condition->getTicks() - (regen * 30000); if (newRegenTicks <= 0) { player->removeCondition(condition); @@ -233,9 +235,9 @@ void BedItem::regeneratePlayer(Player* player) const } else { regen = sleptTime / 30; } - - player->changeHealth(regen, false); - player->changeMana(regen); + + player->changeHealth(regen * g_config.getNumber(ConfigManager::RATE_LIFE_BED), false); + player->changeMana(regen * g_config.getNumber(ConfigManager::RATE_MANA_BED)); } const int32_t soulRegen = sleptTime / (60 * 15); diff --git a/compiler/src/configmanager.cpp b/compiler/src/configmanager.cpp index 1d41b71..610162a 100644 --- a/compiler/src/configmanager.cpp +++ b/compiler/src/configmanager.cpp @@ -128,6 +128,9 @@ bool ConfigManager::load() integer[NEWBIE_LEVEL_THRESHOLD] = getGlobalNumber(L, "newbieLevelThreshold", 5); integer[MONEY_RATE] = getGlobalNumber(L, "moneyRate", 1); integer[HOUSE_PRICE] = getGlobalNumber(L, "multiHousePricebyRent", 1); + integer[RATE_LIFE_BED] = getGlobalNumber(L, "RateLifeBed", 1); + integer[RATE_MANA_BED] = getGlobalNumber(L, "RateManaBed", 1); + integer[TICKS_REGEN_BED_GAIN] = getGlobalNumber(L, "TicksRegenBedGain", 30); loaded = true; lua_close(L); diff --git a/compiler/src/configmanager.h b/compiler/src/configmanager.h index 8bd2f8a..a67ed0e 100644 --- a/compiler/src/configmanager.h +++ b/compiler/src/configmanager.h @@ -117,6 +117,9 @@ class ConfigManager NEWBIE_LEVEL_THRESHOLD, MONEY_RATE, HOUSE_PRICE, + RATE_LIFE_BED, + RATE_MANA_BED, + TICKS_REGEN_BED_GAIN, LAST_INTEGER_CONFIG /* this must be the last one */ }; diff --git a/config.lua b/config.lua index d4cd822..0fa7071 100644 --- a/config.lua +++ b/config.lua @@ -21,6 +21,11 @@ DropSpearFree = true DropSpearPremium = true MakeRuneBackpackFree = false MakeRuneBackpackPremium = true +-- Every 30 seconds gains 1 regeneration, Default 30 +TicksRegenBedGain = 5 +-- Multiplies regeneration each gain, Default 1 +RateLifeBed = 2 +RateManaBed = 2 -- Skull System banLength = 7 * 24 * 60 * 60 diff --git a/libcrypto-3-x64.dll b/libcrypto-3-x64.dll deleted file mode 100644 index 6cbcb52..0000000 Binary files a/libcrypto-3-x64.dll and /dev/null differ diff --git a/libmariadb.dll b/libmariadb.dll index 1bc290f..f16c68d 100644 Binary files a/libmariadb.dll and b/libmariadb.dll differ diff --git a/libmysql.dll b/libmysql.dll deleted file mode 100644 index d182a59..0000000 Binary files a/libmysql.dll and /dev/null differ diff --git a/libssl-3-x64.dll b/libssl-3-x64.dll deleted file mode 100644 index e49441f..0000000 Binary files a/libssl-3-x64.dll and /dev/null differ diff --git a/lua51.dll b/lua51.dll index 377590b..12deb21 100644 Binary files a/lua51.dll and b/lua51.dll differ diff --git a/mpir.dll b/mpir.dll index 6b43a64..2620325 100644 Binary files a/mpir.dll and b/mpir.dll differ diff --git a/pugixml.dll b/pugixml.dll index 4349c02..aed4114 100644 Binary files a/pugixml.dll and b/pugixml.dll differ diff --git a/theforgottenserver.exe b/theforgottenserver.exe index 949337b..6b0cb10 100644 Binary files a/theforgottenserver.exe and b/theforgottenserver.exe differ diff --git a/zlib1.dll b/zlib1.dll index a429c84..7f45808 100644 Binary files a/zlib1.dll and b/zlib1.dll differ diff --git a/zstd.dll b/zstd.dll deleted file mode 100644 index e08d070..0000000 Binary files a/zstd.dll and /dev/null differ