Skip to content

Commit

Permalink
Merge branch 'main' into fix/missing-achievements
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas authored May 14, 2024
2 parents 0b92f81 + 1d025c2 commit 2f571e6
Show file tree
Hide file tree
Showing 88 changed files with 899 additions and 524 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,17 @@ endif()


# === IPO ===
option(OPTIONS_ENABLE_IPO "Check and Enable interprocedural optimization (IPO/LTO)" ON)
if(OPTIONS_ENABLE_IPO)
log_option_enabled("IPO/LTO")
if(MSVC)
log_option_enabled("IPO/LTO")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /GL")
set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO} /LTCG")
set(CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO} /LTCG")
set(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO} /LTCG")
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /LTCG")
else()
if(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" OR CMAKE_BUILD_TYPE STREQUAL "Release")
log_option_enabled("IPO/LTO")
include(CheckIPOSupported)
check_ipo_supported(RESULT result OUTPUT output)
if(result)
Expand Down
4 changes: 3 additions & 1 deletion cmake/modules/BaseConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ if (MSVC)
endforeach(type)

add_compile_options(/MP /FS /Zf /EHsc)
endif (MSVC)
else()
add_compile_options(-Wno-unused-parameter -Wno-sign-compare -Wno-switch -Wno-implicit-fallthrough -Wno-extra)
endif()

## Link compilation files to build/bin folder, else link to the main dir
function(set_output_directory target_name)
Expand Down
14 changes: 13 additions & 1 deletion config.lua.dist
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ cleanProtectionZones = false
-- Connection Config
-- NOTE: allowOldProtocol can allow login on 10x protocol. (11.00)
-- NOTE: maxPlayers set to 0 means no limit
-- NOTE: MaxPacketsPerSeconds if you change you will be subject to bugs by WPE, keep the default value of 25
-- NOTE: MaxPacketsPerSeconds if you change you will be subject to bugs by WPE, keep the default value of 25,
-- It's recommended to use a range like min 50 in this function, otherwise you will be disconnected after equipping two-handed distance weapons.
ip = "127.0.0.1"
allowOldProtocol = false
bindOnlyGlobalAddress = false
Expand Down Expand Up @@ -80,6 +81,17 @@ freeDepotLimit = 2000
premiumDepotLimit = 10000
depotBoxes = 20

-- Augments System (Get more info in: https://github.com/opentibiabr/canary/pull/2602)
-- NOTE: the following values are for all weapons and equipments that have type of "increase damage", "powerful impact" and "strong impact".
-- To customize the percentage of a particular item with these augment types, please add to the item "augments" section on items.xml as the example above.
-- NOTE: The values represent percentage.
-- NOTE: augmentIncreasedDamagePercent = value between 1 and 100 (damage percent to increase. ex: 5 = 5%, 50 = 50%)
-- NOTE: augmentPowerfulImpactPercent = value between 1 and 100 (damage percent to increase. ex: 10 = 10%, 100 = 100%)
-- NOTE: augmentStrongImpactPercent = value between 1 and 100 (damage percent to increase. ex: 7 = 7%, 70 = 70%)
augmentIncreasedDamagePercent = 5
augmentPowerfulImpactPercent = 7
augmentStrongImpactPercent = 10

-- Prey system
-- NOTE: preyRerollPricePerLevel: Price multiplier in gold coin for rerolling prey list.
-- NOTE: preySelectListPrice: Price to manually select creature on list and to lock prey slot.
Expand Down
105 changes: 105 additions & 0 deletions data/items/items.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75009,6 +75009,9 @@ Granted by TibiaGoals.com"/>
<attribute key="critical hit" value="3"/>
<attribute key="skillboost sword" value="3"/>
</attribute>
<attribute key="augments" value="1">
<attribute key="fierce berserk" value="strong impact" />
</attribute>
<attribute key="script" value="moveevent;weapon">
<attribute key="level" value="600"/>
<attribute key="unproperly" value="true"/>
Expand All @@ -75032,6 +75035,12 @@ Granted by TibiaGoals.com"/>
<attribute key="critical hit" value="3"/>
<attribute key="skillboost sword" value="3"/>
</attribute>
<attribute key="augments" value="1">
<attribute key="fierce berserk" value="powerful impact" />
<attribute key="intense wound cleansing" value="cooldown">
<attribute key="value" value="120000" />
</attribute>
</attribute>
<attribute key="script" value="moveevent;weapon">
<attribute key="level" value="600"/>
<attribute key="unproperly" value="true"/>
Expand All @@ -75055,6 +75064,9 @@ Granted by TibiaGoals.com"/>
<attribute key="critical hit" value="3"/>
<attribute key="skillboost club" value="3"/>
</attribute>
<attribute key="augments" value="1">
<attribute key="fierce berserk" value="strong impact" />
</attribute>
<attribute key="script" value="moveevent;weapon">
<attribute key="level" value="600"/>
<attribute key="unproperly" value="true"/>
Expand All @@ -75078,6 +75090,9 @@ Granted by TibiaGoals.com"/>
<attribute key="critical hit" value="3"/>
<attribute key="skillboost club" value="3"/>
</attribute>
<attribute key="augments" value="1">
<attribute key="fierce berserk" value="powerful impact" />
</attribute>
<attribute key="script" value="moveevent;weapon">
<attribute key="level" value="600"/>
<attribute key="unproperly" value="true"/>
Expand All @@ -75101,6 +75116,9 @@ Granted by TibiaGoals.com"/>
<attribute key="critical hit" value="3"/>
<attribute key="skillboost axe" value="3"/>
</attribute>
<attribute key="augments" value="1">
<attribute key="fierce berserk" value="strong impact" />
</attribute>
<attribute key="script" value="moveevent;weapon">
<attribute key="level" value="600"/>
<attribute key="unproperly" value="true"/>
Expand All @@ -75124,6 +75142,9 @@ Granted by TibiaGoals.com"/>
<attribute key="critical hit" value="3"/>
<attribute key="skillboost axe" value="3"/>
</attribute>
<attribute key="augments" value="1">
<attribute key="fierce berserk" value="powerful impact" />
</attribute>
<attribute key="script" value="moveevent;weapon">
<attribute key="level" value="600"/>
<attribute key="unproperly" value="true"/>
Expand All @@ -75149,6 +75170,9 @@ Granted by TibiaGoals.com"/>
<attribute key="critical hit" value="3"/>
<attribute key="skillboost sword" value="3"/>
</attribute>
<attribute key="augments" value="1">
<attribute key="fierce berserk" value="strong impact" />
</attribute>
<attribute key="script" value="moveevent;weapon">
<attribute key="level" value="600"/>
<attribute key="unproperly" value="true"/>
Expand All @@ -75173,6 +75197,9 @@ Granted by TibiaGoals.com"/>
<attribute key="critical hit" value="3"/>
<attribute key="skillboost sword" value="3"/>
</attribute>
<attribute key="augments" value="1">
<attribute key="fierce berserk" value="powerful impact" />
</attribute>
<attribute key="script" value="moveevent;weapon">
<attribute key="level" value="600"/>
<attribute key="unproperly" value="true"/>
Expand All @@ -75197,6 +75224,9 @@ Granted by TibiaGoals.com"/>
<attribute key="critical hit" value="3"/>
<attribute key="skillboost club" value="3"/>
</attribute>
<attribute key="augments" value="1">
<attribute key="fierce berserk" value="strong impact" />
</attribute>
<attribute key="script" value="moveevent;weapon">
<attribute key="level" value="600"/>
<attribute key="unproperly" value="true"/>
Expand All @@ -75221,6 +75251,9 @@ Granted by TibiaGoals.com"/>
<attribute key="critical hit" value="3"/>
<attribute key="skillboost club" value="3"/>
</attribute>
<attribute key="augments" value="1">
<attribute key="fierce berserk" value="powerful impact" />
</attribute>
<attribute key="script" value="moveevent;weapon">
<attribute key="level" value="600"/>
<attribute key="unproperly" value="true"/>
Expand All @@ -75245,6 +75278,9 @@ Granted by TibiaGoals.com"/>
<attribute key="critical hit" value="3"/>
<attribute key="skillboost axe" value="3"/>
</attribute>
<attribute key="augments" value="1">
<attribute key="fierce berserk" value="strong impact" />
</attribute>
<attribute key="script" value="moveevent;weapon">
<attribute key="level" value="600"/>
<attribute key="unproperly" value="true"/>
Expand All @@ -75269,6 +75305,9 @@ Granted by TibiaGoals.com"/>
<attribute key="critical hit" value="3"/>
<attribute key="skillboost axe" value="3"/>
</attribute>
<attribute key="augments" value="1">
<attribute key="fierce berserk" value="powerful impact" />
</attribute>
<attribute key="script" value="moveevent;weapon">
<attribute key="level" value="600"/>
<attribute key="unproperly" value="true"/>
Expand All @@ -75285,6 +75324,14 @@ Granted by TibiaGoals.com"/>
<attribute key="skillsword" value="4"/>
<attribute key="armor" value="12"/>
<attribute key="weight" value="3800"/>
<attribute key="augments" value="1">
<attribute key="avatar of steel" value="cooldown">
<attribute key="value" value="900000" />
</attribute>
<attribute key="fierce beserk" value="critical extra damage">
<attribute key="value" value="8" />
</attribute>
</attribute>
<attribute key="script" value="moveevent">
<attribute key="level" value="500"/>
<attribute key="slot" value="legs"/>
Expand All @@ -75311,6 +75358,9 @@ Granted by TibiaGoals.com"/>
<attribute key="critical hit" value="3"/>
<attribute key="skillboost distance" value="3"/>
</attribute>
<attribute key="augments" value="1">
<attribute key="divine caldera" value="strong impact" />
</attribute>
<attribute key="script" value="moveevent;weapon">
<attribute key="level" value="600"/>
<attribute key="unproperly" value="true"/>
Expand Down Expand Up @@ -75338,6 +75388,9 @@ Granted by TibiaGoals.com"/>
<attribute key="critical hit" value="3"/>
<attribute key="skillboost distance" value="3"/>
</attribute>
<attribute key="augments" value="1">
<attribute key="divine caldera" value="powerful impact" />
</attribute>
<attribute key="script" value="moveevent;weapon">
<attribute key="level" value="600"/>
<attribute key="unproperly" value="true"/>
Expand Down Expand Up @@ -75365,6 +75418,9 @@ Granted by TibiaGoals.com"/>
<attribute key="critical hit" value="3"/>
<attribute key="skillboost distance" value="3"/>
</attribute>
<attribute key="augments" value="1">
<attribute key="divine caldera" value="strong impact" />
</attribute>
<attribute key="script" value="moveevent;weapon">
<attribute key="level" value="600"/>
<attribute key="unproperly" value="true"/>
Expand Down Expand Up @@ -75392,6 +75448,9 @@ Granted by TibiaGoals.com"/>
<attribute key="critical hit" value="3"/>
<attribute key="skillboost distance" value="3"/>
</attribute>
<attribute key="augments" value="1">
<attribute key="divine caldera" value="powerful impact" />
</attribute>
<attribute key="script" value="moveevent;weapon">
<attribute key="level" value="600"/>
<attribute key="unproperly" value="true"/>
Expand All @@ -75407,6 +75466,14 @@ Granted by TibiaGoals.com"/>
<attribute key="holymagiclevelpoints" value="1"/>
<attribute key="armor" value="11"/>
<attribute key="weight" value="3200"/>
<attribute key="augments" value="1">
<attribute key="avatar of light" value="cooldown">
<attribute key="value" value="900000" />
</attribute>
<attribute key="divine caldera" value="critical extra damage">
<attribute key="value" value="8" />
</attribute>
</attribute>
<attribute key="script" value="moveevent">
<attribute key="level" value="500"/>
<attribute key="slot" value="legs"/>
Expand All @@ -75430,6 +75497,10 @@ Granted by TibiaGoals.com"/>
<attribute key="critical hit" value="3"/>
<attribute key="skillboost magic level" value="3"/>
</attribute>
<attribute key="augments" value="1">
<attribute key="hell's core" value="strong impact" />
<attribute key="energy wave" value="strong impact" />
</attribute>
<attribute key="script" value="moveevent;weapon">
<attribute key="level" value="600"/>
<attribute key="mana" value="21"/>
Expand Down Expand Up @@ -75459,6 +75530,10 @@ Granted by TibiaGoals.com"/>
<attribute key="critical hit" value="3"/>
<attribute key="skillboost magic level" value="3"/>
</attribute>
<attribute key="augments" value="1">
<attribute key="hell's core" value="powerful impact" />
<attribute key="energy wave" value="powerful impact" />
</attribute>
<attribute key="script" value="moveevent;weapon">
<attribute key="level" value="600"/>
<attribute key="mana" value="21"/>
Expand All @@ -75483,6 +75558,17 @@ Granted by TibiaGoals.com"/>
<attribute key="imbuementslot" value="1">
<attribute key="increase speed" value="10"/>
</attribute>
<attribute key="augments" value="1">
<attribute key="avatar of storm" value="cooldown">
<attribute key="value" value="900000" />
</attribute>
<attribute key="hell's core" value="critical extra damage">
<attribute key="value" value="8" />
</attribute>
<attribute key="energy wave" value="critical extra damage">
<attribute key="value" value="8" />
</attribute>
</attribute>
<attribute key="script" value="moveevent">
<attribute key="level" value="500"/>
<attribute key="slot" value="feet"/>
Expand All @@ -75506,6 +75592,10 @@ Granted by TibiaGoals.com"/>
<attribute key="critical hit" value="3"/>
<attribute key="skillboost magic level" value="3"/>
</attribute>
<attribute key="augments" value="1">
<attribute key="eternal winter" value="strong impact" />
<attribute key="terra wave" value="strong impact" />
</attribute>
<attribute key="script" value="moveevent;weapon">
<attribute key="level" value="600"/>
<attribute key="mana" value="20"/>
Expand Down Expand Up @@ -75535,6 +75625,10 @@ Granted by TibiaGoals.com"/>
<attribute key="critical hit" value="3"/>
<attribute key="skillboost magic level" value="3"/>
</attribute>
<attribute key="augments" value="1">
<attribute key="eternal winter" value="powerful impact" />
<attribute key="terra wave" value="powerful impact" />
</attribute>
<attribute key="script" value="moveevent;weapon">
<attribute key="level" value="600"/>
<attribute key="mana" value="20"/>
Expand All @@ -75559,6 +75653,17 @@ Granted by TibiaGoals.com"/>
<attribute key="imbuementslot" value="1">
<attribute key="increase speed" value="10"/>
</attribute>
<attribute key="augments" value="1">
<attribute key="avatar of nature" value="cooldown">
<attribute key="value" value="900000" />
</attribute>
<attribute key="eternal winter" value="critical extra damage">
<attribute key="value" value="8" />
</attribute>
<attribute key="terra wave" value="critical extra damage">
<attribute key="value" value="8" />
</attribute>
</attribute>
<attribute key="script" value="moveevent">
<attribute key="level" value="500"/>
<attribute key="slot" value="feet"/>
Expand Down
2 changes: 1 addition & 1 deletion src/canary_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ void CanaryServer::loadModules() {
// If "USE_ANY_DATAPACK_FOLDER" is set to true then you can choose any datapack folder for your server
const auto useAnyDatapack = g_configManager().getBoolean(USE_ANY_DATAPACK_FOLDER, __FUNCTION__);
auto datapackName = g_configManager().getString(DATA_DIRECTORY, __FUNCTION__);
if (!useAnyDatapack && (datapackName != "data-canary" && datapackName != "data-otservbr-global" || datapackName != "data-otservbr-global" && datapackName != "data-canary")) {
if (!useAnyDatapack && datapackName != "data-canary" && datapackName != "data-otservbr-global") {
throw FailedToInitializeCanary(fmt::format(
"The datapack folder name '{}' is wrong, please select valid "
"datapack name 'data-canary' or 'data-otservbr-global "
Expand Down
2 changes: 1 addition & 1 deletion src/canary_server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class CanaryServer {
FAILED
};

RSA &rsa;
Logger &logger;
RSA &rsa;
ServiceManager &serviceManager;

std::atomic<LoaderStatus> loaderStatus = LoaderStatus::LOADING;
Expand Down
5 changes: 4 additions & 1 deletion src/config/config_enums.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ enum ConfigKey_t : uint16_t {
ALLOW_BLOCK_SPAWN,
ALLOW_CHANGEOUTFIT,
ALLOW_RELOAD,
AUGMENT_INCREASED_DAMAGE_PERCENT,
AUGMENT_POWERFUL_IMPACT_PERCENT,
AUGMENT_STRONG_IMPACT_PERCENT,
AUTH_TYPE,
AUTOBANK,
AUTOLOOT,
Expand Down Expand Up @@ -324,5 +327,5 @@ enum ConfigKey_t : uint16_t {
WHEEL_POINTS_PER_LEVEL,
WHITE_SKULL_TIME,
WORLD_TYPE,
XP_DISPLAY_MODE,
XP_DISPLAY_MODE
};
4 changes: 3 additions & 1 deletion src/config/configmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include "config/configmanager.hpp"
#include "lib/di/container.hpp"
#include "declarations.hpp"
#include "game/game.hpp"
#include "server/network/webhook/webhook.hpp"

Expand Down Expand Up @@ -345,6 +344,9 @@ bool ConfigManager::load() {
loadIntConfig(L, WHEEL_ATELIER_ROTATE_REGULAR_COST, "wheelAtelierRotateRegularCost", 250000);
loadIntConfig(L, WHEEL_POINTS_PER_LEVEL, "wheelPointsPerLevel", 1);
loadIntConfig(L, WHITE_SKULL_TIME, "whiteSkullTime", 15 * 60 * 1000);
loadIntConfig(L, AUGMENT_INCREASED_DAMAGE_PERCENT, "augmentIncreasedDamagePercent", 5);
loadIntConfig(L, AUGMENT_POWERFUL_IMPACT_PERCENT, "augmentPowerfulImpactPercent", 10);
loadIntConfig(L, AUGMENT_STRONG_IMPACT_PERCENT, "augmentStrongImpactPercent", 7);

loadStringConfig(L, CORE_DIRECTORY, "coreDirectory", "data");
loadStringConfig(L, DATA_DIRECTORY, "dataPackDirectory", "data-otservbr-global");
Expand Down
Loading

0 comments on commit 2f571e6

Please sign in to comment.