diff --git a/.github/workflows/build-ubuntu-dummy.yml b/.github/workflows/build-ubuntu-dummy.yml
index 00c4efdef87..f4ebb00ff27 100644
--- a/.github/workflows/build-ubuntu-dummy.yml
+++ b/.github/workflows/build-ubuntu-dummy.yml
@@ -17,11 +17,9 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: [ubuntu-20.04, ubuntu-22.04]
+ os: [ubuntu-22.04]
buildtype: [linux-release, linux-debug]
include:
- - os: ubuntu-20.04
- triplet: x64-linux
- os: ubuntu-22.04
triplet: x64-linux
diff --git a/.github/workflows/build-ubuntu.yml b/.github/workflows/build-ubuntu.yml
index cdc54dc33f2..2b369e34875 100644
--- a/.github/workflows/build-ubuntu.yml
+++ b/.github/workflows/build-ubuntu.yml
@@ -36,11 +36,9 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: [ubuntu-20.04, ubuntu-22.04]
+ os: [ubuntu-22.04]
buildtype: [linux-release, linux-debug]
include:
- - os: ubuntu-20.04
- triplet: x64-linux
- os: ubuntu-22.04
triplet: x64-linux
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e4093f4de2d..52c35a471f7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -86,10 +86,9 @@ 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")
@@ -97,6 +96,7 @@ if(OPTIONS_ENABLE_IPO)
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)
diff --git a/cmake/modules/BaseConfig.cmake b/cmake/modules/BaseConfig.cmake
index 7e3f6404b3f..a1980d0f604 100644
--- a/cmake/modules/BaseConfig.cmake
+++ b/cmake/modules/BaseConfig.cmake
@@ -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)
diff --git a/config.lua.dist b/config.lua.dist
index b731fadbcd7..ed2561d4532 100644
--- a/config.lua.dist
+++ b/config.lua.dist
@@ -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
@@ -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.
diff --git a/data-otservbr-global/lib/quests/the_primal_ordeal.lua b/data-otservbr-global/lib/quests/the_primal_ordeal.lua
index de708ee4de2..24324e1147b 100644
--- a/data-otservbr-global/lib/quests/the_primal_ordeal.lua
+++ b/data-otservbr-global/lib/quests/the_primal_ordeal.lua
@@ -6,12 +6,10 @@ function RegisterPrimalPackBeast(template)
primalMonster.loot = {}
primalMonster.name = "Primal Pack Beast"
primalMonster.description = "a primal pack beast"
-
- primalMonster.health = primalMonster.health
- primalMonster.maxHealth = primalMonster.maxHealth
+ primalMonster.maxHealth = primalMonster.maxHealth * 0.7
+ primalMonster.health = primalMonster.maxHealth
primalMonster.raceId = nil
primalMonster.Bestiary = nil
primalMonster.corpse = 0
-
primal:register(primalMonster)
end
diff --git a/data-otservbr-global/monster/quests/primal_ordeal_quest/the_primal_menace.lua b/data-otservbr-global/monster/quests/primal_ordeal_quest/the_primal_menace.lua
index b0bc59364d6..7ad43b016c9 100644
--- a/data-otservbr-global/monster/quests/primal_ordeal_quest/the_primal_menace.lua
+++ b/data-otservbr-global/monster/quests/primal_ordeal_quest/the_primal_menace.lua
@@ -24,7 +24,6 @@ local thePrimalMenaceConfig = {
CountGrowthPerHazard = 1.05,
CountMax = 6,
- HpRateOnSpawn = 0.7,
MonsterPool = {
"Emerald Tortoise (Primal)",
"Gore Horn (Primal)",
@@ -291,8 +290,6 @@ local function spawnMonster(monsterId, spawnPosition)
MonsterId = primalMonster:getId(),
Created = os.time(),
}
- local monsterMaxHealth = primalMonster:getMaxHealth()
- primalMonster:setHealth(monsterMaxHealth * thePrimalMenaceConfig.MonsterConfig.HpRateOnSpawn)
local primalBeasts = monster:getStorageValue(thePrimalMenaceConfig.Storage.PrimalBeasts)
table.insert(primalBeasts, primalBeastEntry)
diff --git a/data-otservbr-global/npc/alaistar.lua b/data-otservbr-global/npc/alaistar.lua
index e893975b24b..68aaa75679a 100644
--- a/data-otservbr-global/npc/alaistar.lua
+++ b/data-otservbr-global/npc/alaistar.lua
@@ -36,13 +36,14 @@ local itemsTable = {
{ itemName = "strong health potion", clientId = 236, buy = 115 },
{ itemName = "strong mana potion", clientId = 237, buy = 93 },
{ itemName = "supreme health potion", clientId = 23375, buy = 625 },
- { itemName = "ultimate health potion", clientId = 7643, buy = 438 },
- { itemName = "ultimate mana potion", clientId = 23373, buy = 379 },
+ { itemName = "ultimate health potion", clientId = 7643, buy = 379 },
+ { itemName = "ultimate mana potion", clientId = 23373, buy = 438 },
{ itemName = "ultimate spirit potion", clientId = 23374, buy = 438 },
{ itemName = "vial", clientId = 2874, sell = 5 },
},
["creature products"] = {
{ itemName = "cowbell", clientId = 21204, sell = 210 },
+ { itemName = "execowtioner mask", clientId = 21201, sell = 240 },
{ itemName = "giant pacifier", clientId = 21199, sell = 170 },
{ itemName = "glob of glooth", clientId = 21182, sell = 125 },
{ itemName = "glooth injection tube", clientId = 21103, sell = 350 },
diff --git a/data-otservbr-global/npc/alexander.lua b/data-otservbr-global/npc/alexander.lua
index 78f51e486c8..fda2799bf4d 100644
--- a/data-otservbr-global/npc/alexander.lua
+++ b/data-otservbr-global/npc/alexander.lua
@@ -30,6 +30,28 @@ npcConfig.voices = {
}
local itemsTable = {
+ ["exercise weapons"] = {
+ { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 },
+ { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 },
+ { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 },
+ { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 },
+ { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 },
+ { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 },
+ },
+ ["creature products"] = {
+ { itemName = "crystal ball", clientId = 3076, buy = 530, sell = 190 },
+ { itemName = "life crystal", clientId = 3061, sell = 83 },
+ { itemName = "mind stone", clientId = 3062, sell = 170 },
+ },
+ ["shields"] = {
+ { itemName = "spellbook of enlightenment", clientId = 8072, sell = 4000 },
+ { itemName = "spellbook of warding", clientId = 8073, sell = 8000 },
+ { itemName = "spellbook of mind control", clientId = 8074, sell = 13000 },
+ { itemName = "spellbook of lost souls", clientId = 8075, sell = 19000 },
+ },
+ ["others"] = {
+ { itemName = "spellwand", clientId = 651, sell = 299 },
+ },
["runes"] = {
{ itemName = "animate dead rune", clientId = 3203, buy = 375 },
{ itemName = "blank rune", clientId = 3147, buy = 10 },
diff --git a/data-otservbr-global/npc/asima.lua b/data-otservbr-global/npc/asima.lua
index 645689c42d4..c3aca3fcd5e 100644
--- a/data-otservbr-global/npc/asima.lua
+++ b/data-otservbr-global/npc/asima.lua
@@ -24,6 +24,14 @@ npcConfig.flags = {
}
local itemsTable = {
+ ["exercise weapons"] = {
+ { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 },
+ { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 },
+ { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 },
+ { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 },
+ { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 },
+ { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 },
+ },
["potions"] = {
{ itemName = "empty potion flask", clientId = 283, sell = 5 },
{ itemName = "empty potion flask", clientId = 284, sell = 5 },
@@ -41,6 +49,12 @@ local itemsTable = {
{ itemName = "ultimate spirit potion", clientId = 23374, buy = 438 },
{ itemName = "vial", clientId = 2874, sell = 5 },
},
+ ["others"] = {
+ { itemName = "spellwand", clientId = 651, sell = 299 },
+ },
+ ["shields"] = {
+ { itemName = "spellbook", clientId = 3059, buy = 150 },
+ },
["runes"] = {
{ itemName = "avalanche rune", clientId = 3161, buy = 57 },
{ itemName = "blank rune", clientId = 3147, buy = 10 },
@@ -61,8 +75,27 @@ local itemsTable = {
{ itemName = "poison field rune", clientId = 3172, buy = 21 },
{ itemName = "poison wall rune", clientId = 3176, buy = 52 },
{ itemName = "sudden death rune", clientId = 3155, buy = 135 },
+ { itemName = "stalagmite rune", clientId = 3179, buy = 12 },
{ itemName = "ultimate healing rune", clientId = 3160, buy = 175 },
},
+ ["wands"] = {
+ { itemName = "hailstorm rod", clientId = 3067, buy = 15000 },
+ { itemName = "moonlight rod", clientId = 3070, buy = 1000 },
+ { itemName = "necrotic rod", clientId = 3069, buy = 5000 },
+ { itemName = "northwind rod", clientId = 8083, buy = 7500 },
+ { itemName = "snakebite rod", clientId = 3066, buy = 500 },
+ { itemName = "springsprout rod", clientId = 8084, buy = 18000 },
+ { itemName = "terra rod", clientId = 3065, buy = 10000 },
+ { itemName = "underworld rod", clientId = 8082, buy = 22000 },
+ { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 },
+ { itemName = "wand of decay", clientId = 3072, buy = 5000 },
+ { itemName = "wand of draconia", clientId = 8093, buy = 7500 },
+ { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 },
+ { itemName = "wand of inferno", clientId = 3071, buy = 15000 },
+ { itemName = "wand of starstorm", clientId = 8092, buy = 18000 },
+ { itemName = "wand of voodoo", clientId = 8094, buy = 22000 },
+ { itemName = "wand of vortex", clientId = 3074, buy = 500 },
+ },
}
npcConfig.shop = {}
diff --git a/data-otservbr-global/npc/briasol.lua b/data-otservbr-global/npc/briasol.lua
index 6905011fee9..38dcd074159 100644
--- a/data-otservbr-global/npc/briasol.lua
+++ b/data-otservbr-global/npc/briasol.lua
@@ -113,7 +113,7 @@ npcConfig.shop = {
{ itemName = "cyan crystal fragment", clientId = 16125, sell = 800 },
{ itemName = "dragon figurine", clientId = 30053, sell = 45000 },
{ itemName = "gemmed figurine", clientId = 24392, sell = 3500 },
- { itemName = "giant amethyst", clientId = 30061, sell = 60000 },
+ { itemName = "giant amethyst", clientId = 32622, sell = 60000 },
{ itemName = "giant emerald", clientId = 30060, sell = 90000 },
{ itemName = "giant ruby", clientId = 30059, sell = 70000 },
{ itemName = "giant sapphire", clientId = 30061, sell = 50000 },
diff --git a/data-otservbr-global/npc/chantalle.lua b/data-otservbr-global/npc/chantalle.lua
index 2615f6557da..3ed42984f5c 100644
--- a/data-otservbr-global/npc/chantalle.lua
+++ b/data-otservbr-global/npc/chantalle.lua
@@ -99,7 +99,7 @@ npcConfig.shop = {
{ itemName = "diamond", clientId = 32770, sell = 15000 },
{ itemName = "dragon figurine", clientId = 30053, sell = 45000 },
{ itemName = "gemmed figurine", clientId = 24392, sell = 3500 },
- { itemName = "giant amethyst", clientId = 30061, sell = 60000 },
+ { itemName = "giant amethyst", clientId = 32622, sell = 60000 },
{ itemName = "giant emerald", clientId = 30060, sell = 90000 },
{ itemName = "giant ruby", clientId = 30059, sell = 70000 },
{ itemName = "giant sapphire", clientId = 30061, sell = 50000 },
diff --git a/data-otservbr-global/npc/chuckles.lua b/data-otservbr-global/npc/chuckles.lua
index 51fb3f2add6..4eb06b6bb3d 100644
--- a/data-otservbr-global/npc/chuckles.lua
+++ b/data-otservbr-global/npc/chuckles.lua
@@ -59,6 +59,38 @@ local itemsTable = {
{ itemName = "sudden death rune", clientId = 3155, buy = 135 },
{ itemName = "ultimate healing rune", clientId = 3160, buy = 175 },
},
+ ["wands"] = {
+ { itemName = "hailstorm rod", clientId = 3067, buy = 15000 },
+ { itemName = "moonlight rod", clientId = 3070, buy = 1000 },
+ { itemName = "necrotic rod", clientId = 3069, buy = 5000 },
+ { itemName = "northwind rod", clientId = 8083, buy = 7500 },
+ { itemName = "snakebite rod", clientId = 3066, buy = 500 },
+ { itemName = "springsprout rod", clientId = 8084, buy = 18000 },
+ { itemName = "terra rod", clientId = 3065, buy = 10000 },
+ { itemName = "underworld rod", clientId = 8082, buy = 22000 },
+ { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 },
+ { itemName = "wand of decay", clientId = 3072, buy = 5000 },
+ { itemName = "wand of draconia", clientId = 8093, buy = 7500 },
+ { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 },
+ { itemName = "wand of inferno", clientId = 3071, buy = 15000 },
+ { itemName = "wand of starstorm", clientId = 8092, buy = 18000 },
+ { itemName = "wand of voodoo", clientId = 8094, buy = 22000 },
+ { itemName = "wand of vortex", clientId = 3074, buy = 500 },
+ },
+ ["exercise weapons"] = {
+ { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 },
+ { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 },
+ { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 },
+ { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 },
+ { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 },
+ { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 },
+ },
+ ["others"] = {
+ { itemName = "spellwand", clientId = 651, sell = 299 },
+ },
+ ["shields"] = {
+ { itemName = "spellbook", clientId = 3059, buy = 150 },
+ },
}
npcConfig.shop = {}
diff --git a/data-otservbr-global/npc/edmund.lua b/data-otservbr-global/npc/edmund.lua
index d8635297949..c61a95bcd72 100644
--- a/data-otservbr-global/npc/edmund.lua
+++ b/data-otservbr-global/npc/edmund.lua
@@ -68,7 +68,7 @@ npcConfig.shop = {
{ itemName = "cyan crystal fragment", clientId = 16125, sell = 800 },
{ itemName = "dragon figurine", clientId = 30053, sell = 45000 },
{ itemName = "gemmed figurine", clientId = 24392, sell = 3500 },
- { itemName = "giant amethyst", clientId = 30061, sell = 60000 },
+ { itemName = "giant amethyst", clientId = 32622, sell = 60000 },
{ itemName = "giant emerald", clientId = 30060, sell = 90000 },
{ itemName = "giant ruby", clientId = 30059, sell = 70000 },
{ itemName = "giant sapphire", clientId = 30061, sell = 50000 },
diff --git a/data-otservbr-global/npc/fenech.lua b/data-otservbr-global/npc/fenech.lua
index 7152c0ef9c5..f69dcafaa89 100644
--- a/data-otservbr-global/npc/fenech.lua
+++ b/data-otservbr-global/npc/fenech.lua
@@ -71,6 +71,20 @@ local itemsTable = {
{ itemName = "sudden death rune", clientId = 3155, buy = 135 },
{ itemName = "ultimate healing rune", clientId = 3160, buy = 175 },
},
+ ["exercise weapons"] = {
+ { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 },
+ { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 },
+ { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 },
+ { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 },
+ { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 },
+ { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 },
+ },
+ ["others"] = {
+ { itemName = "spellwand", clientId = 651, sell = 299 },
+ },
+ ["shields"] = {
+ { itemName = "spellbook", clientId = 3059, buy = 150 },
+ },
}
npcConfig.shop = {}
diff --git a/data-otservbr-global/npc/frans.lua b/data-otservbr-global/npc/frans.lua
index 8761a7d89d6..a1b695adf14 100644
--- a/data-otservbr-global/npc/frans.lua
+++ b/data-otservbr-global/npc/frans.lua
@@ -58,6 +58,20 @@ local itemsTable = {
{ itemName = "sudden death rune", clientId = 3155, buy = 135 },
{ itemName = "ultimate healing rune", clientId = 3160, buy = 175 },
},
+ ["exercise weapons"] = {
+ { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 },
+ { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 },
+ { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 },
+ { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 },
+ { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 },
+ { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 },
+ },
+ ["others"] = {
+ { itemName = "spellwand", clientId = 651, sell = 299 },
+ },
+ ["shields"] = {
+ { itemName = "spellbook", clientId = 3059, buy = 150 },
+ },
}
npcConfig.shop = {}
diff --git a/data-otservbr-global/npc/frederik.lua b/data-otservbr-global/npc/frederik.lua
index 9b33ccf9684..81ff1ec58b6 100644
--- a/data-otservbr-global/npc/frederik.lua
+++ b/data-otservbr-global/npc/frederik.lua
@@ -82,6 +82,20 @@ local itemsTable = {
{ itemName = "ultimate spirit potion", clientId = 23374, buy = 438 },
{ itemName = "vial", clientId = 2874, sell = 5 },
},
+ ["exercise weapons"] = {
+ { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 },
+ { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 },
+ { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 },
+ { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 },
+ { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 },
+ { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 },
+ },
+ ["others"] = {
+ { itemName = "spellwand", clientId = 651, sell = 299 },
+ },
+ ["shields"] = {
+ { itemName = "spellbook", clientId = 3059, buy = 150 },
+ },
}
npcConfig.shop = {}
diff --git a/data-otservbr-global/npc/gail.lua b/data-otservbr-global/npc/gail.lua
index 80a9b54b3e5..de2a52dc7f4 100644
--- a/data-otservbr-global/npc/gail.lua
+++ b/data-otservbr-global/npc/gail.lua
@@ -109,7 +109,7 @@ npcConfig.shop = {
{ itemName = "cyan crystal fragment", clientId = 16125, sell = 800 },
{ itemName = "dragon figurine", clientId = 30053, sell = 45000 },
{ itemName = "gemmed figurine", clientId = 24392, sell = 3500 },
- { itemName = "giant amethyst", clientId = 30061, sell = 60000 },
+ { itemName = "giant amethyst", clientId = 32622, sell = 60000 },
{ itemName = "giant emerald", clientId = 30060, sell = 90000 },
{ itemName = "giant ruby", clientId = 30059, sell = 70000 },
{ itemName = "giant sapphire", clientId = 30061, sell = 50000 },
diff --git a/data-otservbr-global/npc/gnomegica.lua b/data-otservbr-global/npc/gnomegica.lua
index 0805ca33ace..b860caf3962 100644
--- a/data-otservbr-global/npc/gnomegica.lua
+++ b/data-otservbr-global/npc/gnomegica.lua
@@ -78,6 +78,20 @@ local itemsTable = {
{ itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 },
{ itemName = "wand of vortex", clientId = 3074, buy = 500 },
},
+ ["exercise weapons"] = {
+ { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 },
+ { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 },
+ { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 },
+ { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 },
+ { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 },
+ { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 },
+ },
+ ["others"] = {
+ { itemName = "spellwand", clientId = 651, sell = 299 },
+ },
+ ["shields"] = {
+ { itemName = "spellbook", clientId = 3059, buy = 150 },
+ },
}
npcConfig.shop = {}
diff --git a/data-otservbr-global/npc/hanna.lua b/data-otservbr-global/npc/hanna.lua
index 7fca4c908aa..dfea1547135 100644
--- a/data-otservbr-global/npc/hanna.lua
+++ b/data-otservbr-global/npc/hanna.lua
@@ -145,7 +145,7 @@ npcConfig.shop = {
{ itemName = "cyan crystal fragment", clientId = 16125, sell = 800 },
{ itemName = "dragon figurine", clientId = 30053, sell = 45000 },
{ itemName = "gemmed figurine", clientId = 24392, sell = 3500 },
- { itemName = "giant amethyst", clientId = 30061, sell = 60000 },
+ { itemName = "giant amethyst", clientId = 32622, sell = 60000 },
{ itemName = "giant emerald", clientId = 30060, sell = 90000 },
{ itemName = "giant ruby", clientId = 30059, sell = 70000 },
{ itemName = "giant sapphire", clientId = 30061, sell = 50000 },
diff --git a/data-otservbr-global/npc/ishina.lua b/data-otservbr-global/npc/ishina.lua
index 1fd61200c15..358ee2619a3 100644
--- a/data-otservbr-global/npc/ishina.lua
+++ b/data-otservbr-global/npc/ishina.lua
@@ -139,7 +139,7 @@ npcConfig.shop = {
{ itemName = "cyan crystal fragment", clientId = 16125, sell = 800 },
{ itemName = "dragon figurine", clientId = 30053, sell = 45000 },
{ itemName = "gemmed figurine", clientId = 24392, sell = 3500 },
- { itemName = "giant amethyst", clientId = 30061, sell = 60000 },
+ { itemName = "giant amethyst", clientId = 32622, sell = 60000 },
{ itemName = "giant emerald", clientId = 30060, sell = 90000 },
{ itemName = "giant ruby", clientId = 30059, sell = 70000 },
{ itemName = "giant sapphire", clientId = 30061, sell = 50000 },
diff --git a/data-otservbr-global/npc/iwan.lua b/data-otservbr-global/npc/iwan.lua
index 2cc24843318..77689b12003 100644
--- a/data-otservbr-global/npc/iwan.lua
+++ b/data-otservbr-global/npc/iwan.lua
@@ -78,7 +78,7 @@ npcConfig.shop = {
{ itemName = "cyan crystal fragment", clientId = 16125, sell = 800 },
{ itemName = "dragon figurine", clientId = 30053, sell = 45000 },
{ itemName = "gemmed figurine", clientId = 24392, sell = 3500 },
- { itemName = "giant amethyst", clientId = 30061, sell = 60000 },
+ { itemName = "giant amethyst", clientId = 32622, sell = 60000 },
{ itemName = "giant emerald", clientId = 30060, sell = 90000 },
{ itemName = "giant ruby", clientId = 30059, sell = 70000 },
{ itemName = "giant sapphire", clientId = 30061, sell = 50000 },
diff --git a/data-otservbr-global/npc/jessica.lua b/data-otservbr-global/npc/jessica.lua
index 37ac18ed54a..43b1839b3ee 100644
--- a/data-otservbr-global/npc/jessica.lua
+++ b/data-otservbr-global/npc/jessica.lua
@@ -98,7 +98,7 @@ npcConfig.shop = {
{ itemName = "diamond", clientId = 32770, sell = 15000 },
{ itemName = "dragon figurine", clientId = 30053, sell = 45000 },
{ itemName = "gemmed figurine", clientId = 24392, sell = 3500 },
- { itemName = "giant amethyst", clientId = 30061, sell = 60000 },
+ { itemName = "giant amethyst", clientId = 32622, sell = 60000 },
{ itemName = "giant emerald", clientId = 30060, sell = 90000 },
{ itemName = "giant ruby", clientId = 30059, sell = 70000 },
{ itemName = "giant sapphire", clientId = 30061, sell = 50000 },
diff --git a/data-otservbr-global/npc/khanna.lua b/data-otservbr-global/npc/khanna.lua
index 02fcee7b6d5..76b5c1e70da 100644
--- a/data-otservbr-global/npc/khanna.lua
+++ b/data-otservbr-global/npc/khanna.lua
@@ -34,7 +34,7 @@ local itemsTable = {
["runes"] = {
{ itemName = "animate dead rune", clientId = 3203, buy = 375 },
{ itemName = "avalanche rune", clientId = 3161, buy = 57 },
- { itemName = "blank rune", clientId = 3147, buy = 10 },
+ { itemName = "blank rune", clientId = 3147, buy = 20 },
{ itemName = "chameleon rune", clientId = 3178, buy = 210 },
{ itemName = "convince creature rune", clientId = 3177, buy = 80 },
{ itemName = "cure poison rune", clientId = 3153, buy = 65 },
@@ -84,6 +84,46 @@ local itemsTable = {
{ itemName = "wand of voodoo", clientId = 8094, buy = 22000 },
{ itemName = "wand of vortex", clientId = 3074, buy = 500 },
},
+ ["exercise weapons"] = {
+ { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 },
+ { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 },
+ { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 },
+ { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 },
+ { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 },
+ { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 },
+ },
+ ["creature products"] = {
+ { itemName = "bashmu fang", clientId = 36820, sell = 600 },
+ { itemName = "bashmu feather", clientId = 36820, sell = 350 },
+ { itemName = "bashmu tongue", clientId = 36820, sell = 400 },
+ { itemName = "blue goanna scale", clientId = 31559, sell = 230 },
+ { itemName = "crystal ball", clientId = 3076, buy = 650 },
+ { itemName = "fafnar symbol", clientId = 31443, sell = 950 },
+ { itemName = "goanna claw", clientId = 31561, sell = 950 },
+ { itemName = "goanna meat", clientId = 31560, sell = 190 },
+ { itemName = "lamassu hoof", clientId = 31441, sell = 330 },
+ { itemName = "lamassu horn", clientId = 31442, sell = 240 },
+ { itemName = "life crystal", clientId = 3061, sell = 85 },
+ { itemName = "lizard heart", clientId = 31340, sell = 530 },
+ { itemName = "manticore ear", clientId = 31440, sell = 310 },
+ { itemName = "manticore tail", clientId = 31439, sell = 220 },
+ { itemName = "mind stone", clientId = 3062, sell = 170 },
+ { itemName = "old girtablilu carapace", clientId = 36972, sell = 570 },
+ { itemName = "red goanna scale", clientId = 31558, sell = 270 },
+ { itemName = "scorpion charm", clientId = 36822, sell = 620 },
+ { itemName = "sphinx feather", clientId = 31437, sell = 470 },
+ { itemName = "sphinx tiara", clientId = 31438, sell = 360 },
+ },
+ ["shields"] = {
+ { itemName = "spellbook", clientId = 3059, buy = 150 },
+ { itemName = "spellbook of enlightenment", clientId = 8072, sell = 4000 },
+ { itemName = "spellbook of lost souls", clientId = 8075, sell = 19000 },
+ { itemName = "spellbook of mind control", clientId = 8074, sell = 13000 },
+ { itemName = "spellbook of warding", clientId = 8073, sell = 8000 },
+ },
+ ["others"] = {
+ { itemName = "spellwand", clientId = 651, sell = 299 },
+ },
}
npcConfig.shop = {}
diff --git a/data-otservbr-global/npc/mordecai.lua b/data-otservbr-global/npc/mordecai.lua
index 60063a423ba..dc0e3c07a77 100644
--- a/data-otservbr-global/npc/mordecai.lua
+++ b/data-otservbr-global/npc/mordecai.lua
@@ -88,6 +88,17 @@ local itemsTable = {
{ itemName = "wand of voodoo", clientId = 8094, buy = 22000 },
{ itemName = "wand of vortex", clientId = 3074, buy = 500 },
},
+ ["exercise weapons"] = {
+ { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 },
+ { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 },
+ { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 },
+ { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 },
+ { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 },
+ { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 },
+ },
+ ["others"] = {
+ { itemName = "spellwand", clientId = 651, sell = 299 },
+ },
}
npcConfig.shop = {}
diff --git a/data-otservbr-global/npc/nelly.lua b/data-otservbr-global/npc/nelly.lua
index 8c3b123c47a..911464524c6 100644
--- a/data-otservbr-global/npc/nelly.lua
+++ b/data-otservbr-global/npc/nelly.lua
@@ -94,6 +94,20 @@ local itemsTable = {
{ itemName = "letter", clientId = 3505, buy = 8 },
{ itemName = "parcel", clientId = 3503, buy = 15 },
},
+ ["exercise weapons"] = {
+ { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 },
+ { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 },
+ { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 },
+ { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 },
+ { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 },
+ { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 },
+ },
+ ["others"] = {
+ { itemName = "spellwand", clientId = 651, sell = 299 },
+ },
+ ["shields"] = {
+ { itemName = "spellbook", clientId = 3059, buy = 150 },
+ },
}
npcConfig.shop = {}
diff --git a/data-otservbr-global/npc/nipuna.lua b/data-otservbr-global/npc/nipuna.lua
index aa9d74cec52..ef3211bce42 100644
--- a/data-otservbr-global/npc/nipuna.lua
+++ b/data-otservbr-global/npc/nipuna.lua
@@ -101,6 +101,17 @@ local itemsTable = {
{ itemName = "wand of voodoo", clientId = 8094, buy = 22000 },
{ itemName = "wand of vortex", clientId = 3074, buy = 500 },
},
+ ["exercise weapons"] = {
+ { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 },
+ { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 },
+ { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 },
+ { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 },
+ { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 },
+ { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 },
+ },
+ ["others"] = {
+ { itemName = "spellwand", clientId = 651, sell = 299 },
+ },
}
npcConfig.shop = {}
diff --git a/data-otservbr-global/npc/odemara.lua b/data-otservbr-global/npc/odemara.lua
index bcfe94bf8eb..3e1986714c7 100644
--- a/data-otservbr-global/npc/odemara.lua
+++ b/data-otservbr-global/npc/odemara.lua
@@ -70,7 +70,7 @@ npcConfig.shop = {
{ itemName = "diamond", clientId = 32770, sell = 15000 },
{ itemName = "dragon figurine", clientId = 30053, sell = 45000 },
{ itemName = "gemmed figurine", clientId = 24392, sell = 3500 },
- { itemName = "giant amethyst", clientId = 30061, sell = 60000 },
+ { itemName = "giant amethyst", clientId = 32622, sell = 60000 },
{ itemName = "giant emerald", clientId = 30060, sell = 90000 },
{ itemName = "giant ruby", clientId = 30059, sell = 70000 },
{ itemName = "giant sapphire", clientId = 30061, sell = 50000 },
diff --git a/data-otservbr-global/npc/oiriz.lua b/data-otservbr-global/npc/oiriz.lua
index 3a5d3a6b411..4b731c015a2 100644
--- a/data-otservbr-global/npc/oiriz.lua
+++ b/data-otservbr-global/npc/oiriz.lua
@@ -68,7 +68,7 @@ npcConfig.shop = {
{ itemName = "cyan crystal fragment", clientId = 16125, sell = 800 },
{ itemName = "dragon figurine", clientId = 30053, sell = 45000 },
{ itemName = "gemmed figurine", clientId = 24392, sell = 3500 },
- { itemName = "giant amethyst", clientId = 30061, sell = 60000 },
+ { itemName = "giant amethyst", clientId = 32622, sell = 60000 },
{ itemName = "giant emerald", clientId = 30060, sell = 90000 },
{ itemName = "giant ruby", clientId = 30059, sell = 70000 },
{ itemName = "giant sapphire", clientId = 30061, sell = 50000 },
diff --git a/data-otservbr-global/npc/rabaz.lua b/data-otservbr-global/npc/rabaz.lua
index 3e47da6a5ca..e532e7def66 100644
--- a/data-otservbr-global/npc/rabaz.lua
+++ b/data-otservbr-global/npc/rabaz.lua
@@ -82,6 +82,20 @@ local itemsTable = {
{ itemName = "wand of voodoo", clientId = 8094, buy = 22000 },
{ itemName = "wand of vortex", clientId = 3074, buy = 500 },
},
+ ["exercise weapons"] = {
+ { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 },
+ { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 },
+ { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 },
+ { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 },
+ { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 },
+ { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 },
+ },
+ ["others"] = {
+ { itemName = "spellwand", clientId = 651, sell = 299 },
+ },
+ ["shields"] = {
+ { itemName = "spellbook", clientId = 3059, buy = 150 },
+ },
}
npcConfig.shop = {}
diff --git a/data-otservbr-global/npc/rachel.lua b/data-otservbr-global/npc/rachel.lua
index 3206c99864a..057787692c9 100644
--- a/data-otservbr-global/npc/rachel.lua
+++ b/data-otservbr-global/npc/rachel.lua
@@ -71,6 +71,23 @@ local itemsTable = {
{ itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 },
{ itemName = "wand of vortex", clientId = 3074, buy = 500 },
},
+ ["exercise weapons"] = {
+ { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 },
+ { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 },
+ { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 },
+ { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 },
+ { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 },
+ { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 },
+ },
+ ["others"] = {
+ { itemName = "spellwand", clientId = 651, sell = 299 },
+ },
+ ["valuables"] = {
+ { itemName = "talon", clientId = 3034, sell = 320 },
+ },
+ ["shields"] = {
+ { itemName = "spellbook", clientId = 3059, buy = 150 },
+ },
}
npcConfig.shop = {}
diff --git a/data-otservbr-global/npc/romir.lua b/data-otservbr-global/npc/romir.lua
index 11ea038d266..09ab62ab1a4 100644
--- a/data-otservbr-global/npc/romir.lua
+++ b/data-otservbr-global/npc/romir.lua
@@ -82,6 +82,20 @@ local itemsTable = {
{ itemName = "wand of voodoo", clientId = 8094, buy = 22000 },
{ itemName = "wand of vortex", clientId = 3074, buy = 500 },
},
+ ["exercise weapons"] = {
+ { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 },
+ { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 },
+ { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 },
+ { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 },
+ { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 },
+ { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 },
+ },
+ ["others"] = {
+ { itemName = "spellwand", clientId = 651, sell = 299 },
+ },
+ ["shields"] = {
+ { itemName = "spellbook", clientId = 3059, buy = 150 },
+ },
}
npcConfig.shop = {}
diff --git a/data-otservbr-global/npc/shiriel.lua b/data-otservbr-global/npc/shiriel.lua
index 546bb26447b..fd982f345b9 100644
--- a/data-otservbr-global/npc/shiriel.lua
+++ b/data-otservbr-global/npc/shiriel.lua
@@ -70,6 +70,20 @@ local itemsTable = {
{ itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 },
{ itemName = "wand of vortex", clientId = 3074, buy = 500 },
},
+ ["exercise weapons"] = {
+ { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 },
+ { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 },
+ { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 },
+ { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 },
+ { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 },
+ { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 },
+ },
+ ["others"] = {
+ { itemName = "spellwand", clientId = 651, sell = 299 },
+ },
+ ["shields"] = {
+ { itemName = "spellbook", clientId = 3059, buy = 150 },
+ },
}
npcConfig.shop = {}
diff --git a/data-otservbr-global/npc/sigurd.lua b/data-otservbr-global/npc/sigurd.lua
index cca63a33e3e..e4d1b585307 100644
--- a/data-otservbr-global/npc/sigurd.lua
+++ b/data-otservbr-global/npc/sigurd.lua
@@ -72,6 +72,20 @@ local itemsTable = {
{ itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 },
{ itemName = "wand of vortex", clientId = 3074, buy = 500 },
},
+ ["exercise weapons"] = {
+ { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 },
+ { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 },
+ { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 },
+ { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 },
+ { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 },
+ { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 },
+ },
+ ["others"] = {
+ { itemName = "spellwand", clientId = 651, sell = 299 },
+ },
+ ["shields"] = {
+ { itemName = "spellbook", clientId = 3059, buy = 150 },
+ },
}
npcConfig.shop = {}
diff --git a/data-otservbr-global/npc/sundara.lua b/data-otservbr-global/npc/sundara.lua
index c1364240fa9..95ff206f2ad 100644
--- a/data-otservbr-global/npc/sundara.lua
+++ b/data-otservbr-global/npc/sundara.lua
@@ -101,6 +101,17 @@ local itemsTable = {
{ itemName = "wand of voodoo", clientId = 8094, buy = 22000 },
{ itemName = "wand of vortex", clientId = 3074, buy = 500 },
},
+ ["exercise weapons"] = {
+ { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 },
+ { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 },
+ { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 },
+ { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 },
+ { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 },
+ { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 },
+ },
+ ["others"] = {
+ { itemName = "spellwand", clientId = 651, sell = 299 },
+ },
}
npcConfig.shop = {}
diff --git a/data-otservbr-global/npc/tandros.lua b/data-otservbr-global/npc/tandros.lua
index e25ba65f2a3..ae647b26127 100644
--- a/data-otservbr-global/npc/tandros.lua
+++ b/data-otservbr-global/npc/tandros.lua
@@ -88,6 +88,20 @@ local itemsTable = {
{ itemName = "wand of voodoo", clientId = 8094, buy = 22000 },
{ itemName = "wand of vortex", clientId = 3074, buy = 500 },
},
+ ["exercise weapons"] = {
+ { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 },
+ { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 },
+ { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 },
+ { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 },
+ { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 },
+ { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 },
+ },
+ ["others"] = {
+ { itemName = "spellwand", clientId = 651, sell = 299 },
+ },
+ ["shields"] = {
+ { itemName = "spellbook", clientId = 3059, buy = 150 },
+ },
}
npcConfig.shop = {}
diff --git a/data-otservbr-global/npc/tesha.lua b/data-otservbr-global/npc/tesha.lua
index 95e31f97cb7..6a3c4b9fadb 100644
--- a/data-otservbr-global/npc/tesha.lua
+++ b/data-otservbr-global/npc/tesha.lua
@@ -98,7 +98,7 @@ npcConfig.shop = {
{ itemName = "diamond", clientId = 32770, sell = 15000 },
{ itemName = "dragon figurine", clientId = 30053, sell = 45000 },
{ itemName = "gemmed figurine", clientId = 24392, sell = 3500 },
- { itemName = "giant amethyst", clientId = 30061, sell = 60000 },
+ { itemName = "giant amethyst", clientId = 32622, sell = 60000 },
{ itemName = "giant emerald", clientId = 30060, sell = 90000 },
{ itemName = "giant ruby", clientId = 30059, sell = 70000 },
{ itemName = "giant sapphire", clientId = 30061, sell = 50000 },
diff --git a/data-otservbr-global/npc/tezila.lua b/data-otservbr-global/npc/tezila.lua
index dab92c807f5..fe667133ad7 100644
--- a/data-otservbr-global/npc/tezila.lua
+++ b/data-otservbr-global/npc/tezila.lua
@@ -67,7 +67,7 @@ npcConfig.shop = {
{ itemName = "cyan crystal fragment", clientId = 16125, sell = 800 },
{ itemName = "dragon figurine", clientId = 30053, sell = 45000 },
{ itemName = "gemmed figurine", clientId = 24392, sell = 3500 },
- { itemName = "giant amethyst", clientId = 30061, sell = 60000 },
+ { itemName = "giant amethyst", clientId = 32622, sell = 60000 },
{ itemName = "giant emerald", clientId = 30060, sell = 90000 },
{ itemName = "giant ruby", clientId = 30059, sell = 70000 },
{ itemName = "giant sapphire", clientId = 30061, sell = 50000 },
diff --git a/data-otservbr-global/npc/topsy.lua b/data-otservbr-global/npc/topsy.lua
index 395fd23cbeb..66ea6f27e6a 100644
--- a/data-otservbr-global/npc/topsy.lua
+++ b/data-otservbr-global/npc/topsy.lua
@@ -78,6 +78,20 @@ local itemsTable = {
{ itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 },
{ itemName = "wand of vortex", clientId = 3074, buy = 500 },
},
+ ["exercise weapons"] = {
+ { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 },
+ { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 },
+ { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 },
+ { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 },
+ { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 },
+ { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 },
+ },
+ ["others"] = {
+ { itemName = "spellwand", clientId = 651, sell = 299 },
+ },
+ ["shields"] = {
+ { itemName = "spellbook", clientId = 3059, buy = 150 },
+ },
}
npcConfig.shop = {}
diff --git a/data-otservbr-global/npc/valindara.lua b/data-otservbr-global/npc/valindara.lua
index 69655358dfe..cf9506fcdd5 100644
--- a/data-otservbr-global/npc/valindara.lua
+++ b/data-otservbr-global/npc/valindara.lua
@@ -111,7 +111,7 @@ npcConfig.shop = {
{ itemName = "fire wall rune", clientId = 3190, buy = 61 },
{ itemName = "fireball rune", clientId = 3189, buy = 30 },
{ itemName = "gemmed figurine", clientId = 24392, sell = 3500 },
- { itemName = "giant amethyst", clientId = 30061, sell = 60000 },
+ { itemName = "giant amethyst", clientId = 32622, sell = 60000 },
{ itemName = "giant emerald", clientId = 30060, sell = 90000 },
{ itemName = "giant ruby", clientId = 30059, sell = 70000 },
{ itemName = "giant sapphire", clientId = 30061, sell = 50000 },
diff --git a/data-otservbr-global/npc/xodet.lua b/data-otservbr-global/npc/xodet.lua
index 2d8832bd964..f687b491e89 100644
--- a/data-otservbr-global/npc/xodet.lua
+++ b/data-otservbr-global/npc/xodet.lua
@@ -72,6 +72,20 @@ local itemsTable = {
{ itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 },
{ itemName = "wand of vortex", clientId = 3074, buy = 500 },
},
+ ["exercise weapons"] = {
+ { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 },
+ { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 },
+ { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 },
+ { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 },
+ { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 },
+ { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 },
+ },
+ ["others"] = {
+ { itemName = "spellwand", clientId = 651, sell = 299 },
+ },
+ ["shields"] = {
+ { itemName = "spellbook", clientId = 3059, buy = 150 },
+ },
}
npcConfig.shop = {}
diff --git a/data-otservbr-global/npc/yasir.lua b/data-otservbr-global/npc/yasir.lua
index d576b611e53..9c5cf3dbf69 100644
--- a/data-otservbr-global/npc/yasir.lua
+++ b/data-otservbr-global/npc/yasir.lua
@@ -60,6 +60,7 @@ npcConfig.shop = {
{ itemName = "ape fur", clientId = 5883, sell = 120 },
{ itemName = "apron", clientId = 33933, sell = 1300 },
{ itemName = "badger fur", clientId = 903, sell = 15 },
+ { itemName = "bakragore's amalgamation", clientId = 43968, sell = 2000000 },
{ itemName = "bamboo stick", clientId = 11445, sell = 30 },
{ itemName = "banana sash", clientId = 11511, sell = 55 },
{ itemName = "basalt fetish", clientId = 17856, sell = 210 },
@@ -75,6 +76,7 @@ npcConfig.shop = {
{ itemName = "black hood", clientId = 9645, sell = 190 },
{ itemName = "black wool", clientId = 11448, sell = 300 },
{ itemName = "blazing bone", clientId = 16131, sell = 610 },
+ { itemName = "bloated maggot", clientId = 43856, sell = 5200 },
{ itemName = "blood preservation", clientId = 11449, sell = 320 },
{ itemName = "blood tincture in a vial", clientId = 18928, sell = 360 },
{ itemName = "bloody dwarven beard", clientId = 17827, sell = 110 },
@@ -173,7 +175,11 @@ npcConfig.shop = {
{ itemName = "dandelion seeds", clientId = 25695, sell = 200 },
{ itemName = "dangerous proto matter", clientId = 23515, sell = 300 },
{ itemName = "dark bell", clientId = 32596, sell = 310000 },
+ { itemName = "dark obsidian splinter", clientId = 43850, sell = 4400 },
{ itemName = "dark rosary", clientId = 10303, sell = 48 },
+ { itemName = "darklight core", clientId = 43853, sell = 4100 },
+ { itemName = "darklight figurine", clientId = 43961, sell = 3400000 },
+ { itemName = "darklight matter", clientId = 43851, sell = 5500 },
{ itemName = "dead weight", clientId = 20202, sell = 450 },
{ itemName = "deepling breaktime snack", clientId = 14011, sell = 90 },
{ itemName = "deepling claw", clientId = 14044, sell = 430 },
@@ -229,6 +235,7 @@ npcConfig.shop = {
{ itemName = "falcon crest", clientId = 28823, sell = 650 },
{ itemName = "fern", clientId = 3737, sell = 20 },
{ itemName = "fiery heart", clientId = 9636, sell = 375 },
+ { itemName = "fiery tear", clientId = 39040, sell = 1070000 },
{ itemName = "fig leaf", clientId = 25742, sell = 200 },
{ itemName = "figurine of cruelty", clientId = 34019, sell = 3100000 },
{ itemName = "figurine of greed", clientId = 34021, sell = 2900000 },
@@ -480,6 +487,8 @@ npcConfig.shop = {
{ itemName = "rorc feather", clientId = 18993, sell = 70 },
{ itemName = "rotten heart", clientId = 31589, sell = 74000 },
{ itemName = "rotten piece of cloth", clientId = 10291, sell = 30 },
+ { itemName = "rotten roots", clientId = 43849, sell = 3800 },
+ { itemName = "rotten vermin ichor", clientId = 43847, sell = 4500 },
{ itemName = "sabretooth", clientId = 10311, sell = 400 },
{ itemName = "sabretooth fur", clientId = 39378, sell = 2500 },
{ itemName = "safety pin", clientId = 11493, sell = 120 },
@@ -636,6 +645,7 @@ npcConfig.shop = {
{ itemName = "wolf paw", clientId = 5897, sell = 70 },
{ itemName = "wood", clientId = 5901, sell = 5 },
{ itemName = "wool", clientId = 10319, sell = 15 },
+ { itemName = "worm sponge", clientId = 43848, sell = 4200 },
{ itemName = "writhing brain", clientId = 32600, sell = 370000 },
{ itemName = "writhing heart", clientId = 32599, sell = 185000 },
{ itemName = "wyrm scale", clientId = 9665, sell = 400 },
diff --git a/data-otservbr-global/npc/yonan.lua b/data-otservbr-global/npc/yonan.lua
index 44dbb8dd83c..69bddee5cb3 100644
--- a/data-otservbr-global/npc/yonan.lua
+++ b/data-otservbr-global/npc/yonan.lua
@@ -39,7 +39,7 @@ npcConfig.shop = {
{ itemName = "cyan crystal fragment", clientId = 16125, sell = 800 },
{ itemName = "dragon figurine", clientId = 30053, sell = 45000 },
{ itemName = "gemmed figurine", clientId = 24392, sell = 3500 },
- { itemName = "giant amethyst", clientId = 30061, sell = 60000 },
+ { itemName = "giant amethyst", clientId = 32622, sell = 60000 },
{ itemName = "giant emerald", clientId = 30060, sell = 90000 },
{ itemName = "giant ruby", clientId = 30059, sell = 70000 },
{ itemName = "giant sapphire", clientId = 30061, sell = 50000 },
diff --git a/data-otservbr-global/scripts/spells/monster/doctor_marrow_explosion.lua b/data-otservbr-global/scripts/spells/monster/doctor_marrow_explosion.lua
index f616e8b8cee..491d9f2516d 100644
--- a/data-otservbr-global/scripts/spells/monster/doctor_marrow_explosion.lua
+++ b/data-otservbr-global/scripts/spells/monster/doctor_marrow_explosion.lua
@@ -21,7 +21,7 @@ end
local spell = Spell("instant")
function onTargetCreature(creature, target)
- if not targetPos then
+ if not target then
return true
end
local master = target:getMaster()
@@ -29,7 +29,7 @@ function onTargetCreature(creature, target)
return true
end
- local distance = math.floor(targetPos:getDistance(target:getPosition()))
+ local distance = math.floor(creature:getPosition():getDistance(target:getPosition()))
local actualDamage = damage / (2 ^ distance)
doTargetCombatHealth(0, target, COMBAT_EARTHDAMAGE, actualDamage, actualDamage, CONST_ME_NONE)
if crit then
@@ -63,21 +63,26 @@ function spell.onCastSpell(creature, var)
end, i * 100, targetPos)
end
- addEvent(function(cid)
+ addEvent(function(cid, pos)
local creature = Creature(cid)
- creature:getPosition():sendMagicEffect(CONST_ME_ORANGE_ENERGY_SPARK)
- targetPos:sendMagicEffect(CONST_ME_ORANGETELEPORT)
- end, 2000, creature:getId())
+ if creature then
+ creature:getPosition():sendMagicEffect(CONST_ME_ORANGE_ENERGY_SPARK)
+ pos:sendMagicEffect(CONST_ME_ORANGETELEPORT)
+ end
+ end, 2000, creature:getId(), targetPos)
addEvent(function(cid, pos)
- damage = -math.random(3500, 7000)
- if math.random(1, 100) <= 10 then
- crit = true
- damage = damage * 1.5
- else
- crit = false
+ local creature = Creature(cid)
+ if creature then
+ damage = -math.random(3500, 7000)
+ if math.random(1, 100) <= 10 then
+ crit = true
+ damage = damage * 1.5
+ else
+ crit = false
+ end
+ spellCombat:execute(creature, Variant(pos))
end
- spellCombat:execute(creature, Variant(pos))
end, totalDelay, creature:getId(), targetPos)
return true
end
diff --git a/data-otservbr-global/world/otservbr-monster.xml b/data-otservbr-global/world/otservbr-monster.xml
index 40eb0ee4534..8441ed918a1 100644
--- a/data-otservbr-global/world/otservbr-monster.xml
+++ b/data-otservbr-global/world/otservbr-monster.xml
@@ -4076,7 +4076,6 @@
-
@@ -4122,9 +4121,6 @@
-
-
-
@@ -6928,19 +6924,13 @@
-
-
-
-
-
-
@@ -6953,9 +6943,6 @@
-
-
-
@@ -6963,7 +6950,6 @@
-
@@ -6985,15 +6971,11 @@
-
-
-
-
@@ -7009,9 +6991,6 @@
-
-
-
@@ -63296,9 +63275,6 @@
-
-
-
@@ -63503,9 +63479,6 @@
-
-
-
diff --git a/data/items/items.xml b/data/items/items.xml
index 80bb6289305..b15a51a9091 100644
--- a/data/items/items.xml
+++ b/data/items/items.xml
@@ -64489,8 +64489,8 @@ hands of its owner. Granted by TibiaRoyal.com"/>
+
-
@@ -74896,11 +74896,14 @@ Granted by TibiaGoals.com"/>
-
-
+
+
+
+
-
@@ -75017,6 +75020,15 @@ Granted by TibiaGoals.com"/>
+ -
+
+
+
+
+
+
+
+
-
@@ -75032,6 +75044,9 @@ Granted by TibiaGoals.com"/>
+
+
+
@@ -75055,6 +75070,12 @@ Granted by TibiaGoals.com"/>
+
+
+
+
+
+
@@ -75078,6 +75099,9 @@ Granted by TibiaGoals.com"/>
+
+
+
@@ -75101,6 +75125,9 @@ Granted by TibiaGoals.com"/>
+
+
+
@@ -75124,6 +75151,9 @@ Granted by TibiaGoals.com"/>
+
+
+
@@ -75147,6 +75177,9 @@ Granted by TibiaGoals.com"/>
+
+
+
@@ -75172,6 +75205,9 @@ Granted by TibiaGoals.com"/>
+
+
+
@@ -75196,6 +75232,9 @@ Granted by TibiaGoals.com"/>
+
+
+
@@ -75220,6 +75259,9 @@ Granted by TibiaGoals.com"/>
+
+
+
@@ -75244,6 +75286,9 @@ Granted by TibiaGoals.com"/>
+
+
+
@@ -75268,6 +75313,9 @@ Granted by TibiaGoals.com"/>
+
+
+
@@ -75292,6 +75340,9 @@ Granted by TibiaGoals.com"/>
+
+
+
@@ -75308,6 +75359,14 @@ Granted by TibiaGoals.com"/>
+
+
+
+
+
+
+
+
@@ -75334,6 +75393,9 @@ Granted by TibiaGoals.com"/>
+
+
+
@@ -75361,6 +75423,9 @@ Granted by TibiaGoals.com"/>
+
+
+
@@ -75388,6 +75453,9 @@ Granted by TibiaGoals.com"/>
+
+
+
@@ -75415,6 +75483,9 @@ Granted by TibiaGoals.com"/>
+
+
+
@@ -75430,6 +75501,14 @@ Granted by TibiaGoals.com"/>
+
+
+
+
+
+
+
+
@@ -75453,6 +75532,10 @@ Granted by TibiaGoals.com"/>
+
+
+
+
@@ -75482,6 +75565,10 @@ Granted by TibiaGoals.com"/>
+
+
+
+
@@ -75506,6 +75593,17 @@ Granted by TibiaGoals.com"/>
+
+
+
+
+
+
+
+
+
+
+
@@ -75529,6 +75627,10 @@ Granted by TibiaGoals.com"/>
+
+
+
+
@@ -75558,6 +75660,10 @@ Granted by TibiaGoals.com"/>
+
+
+
+
@@ -75582,6 +75688,17 @@ Granted by TibiaGoals.com"/>
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/scripts/lib/register_achievements.lua b/data/scripts/lib/register_achievements.lua
index 18a2d6e41ef..23d4bbd93ca 100644
--- a/data/scripts/lib/register_achievements.lua
+++ b/data/scripts/lib/register_achievements.lua
@@ -58,7 +58,7 @@ ACHIEVEMENTS = {
[57] = { name = "Annihilator", grade = 2, points = 5, description = "You've daringly jumped into the infamous Annihilator and survived - taking home fame, glory and your reward." },
[58] = { name = "Master of the Nexus", grade = 2, points = 6, description = "You were able to fight your way through the countless hordes in the Demon Forge. Once more you proved that nothing is impossible." },
[59] = { name = "Talented Dancer", grade = 1, points = 1, description = "You're a lord or lady of the dance - and not afraid to use your skills to impress tribal gods. One step to the left, one jump to the right, twist and shout!" },
- [60] = { name = "Ministrel", grade = 1, points = 2, secret = true, description = "You can handle any music instrument you're given - and actually manage to produce a pleasant sound with it. You're a welcome guest and entertainer in most taverns." },
+ [60] = { name = "Allow Cookies?", grade = 1, points = 2, description = "With a perfectly harmless smile, you tricked all the funny guys into eating your exploding cookies. Next time you pull this prank, consider wearing a Boy Scout outfit to make it even better." },
[61] = { name = "Ruthless", grade = 2, points = 5, description = "You've touched all thrones of the Ruthless Seven and absorbed some of their evil spirit. It may have changed you forever." },
[62] = { name = "Champion of Chazorai", grade = 2, points = 4, description = "You won the merciless 2 vs. 2 team tournament on the Isle of Strife and wiped out wave after wave of fearsome opponents. Death or victory - you certainly chose the latter." },
[63] = { name = "Wayfarer", grade = 1, points = 3, secret = true, description = "Dragon dreams are golden." },
@@ -193,7 +193,7 @@ ACHIEVEMENTS = {
[192] = { name = "I Like it Fancy", grade = 1, points = 1, secret = true, description = "You definitely know how to bring out the best in your furniture and decoration pieces. Beautiful." },
[193] = { name = "Skin-Deep", grade = 2, points = 4, secret = true, description = "You always carry your obsidian knife with you and won't hesitate to use it. You've skinned countless little - and bigger - critters and yeah: they usually don't get any more beautiful on the inside. It's rather blood and gore and all that..." },
[194] = { name = "Ashes to Dust", grade = 2, points = 4, secret = true, description = "Staking vampires and demons has almost turned into your profession. You make sure to gather even the tiniest amount of evil dust particles. Beware of silicosis." },
- [195] = { name = "Silent Pet", grade = 1, points = 1, secret = true, description = "Awww. Your very own little goldfish friend - he's cute, he's shiny and he can't complain should you forget to feed him. He'll definitely brighten up your day!" },
+ -- [195] = Unknown/non-existent
[196] = { name = "Safely Stored Away", grade = 1, points = 2, secret = true, description = "Don't worry, no one will be able to take it from you. Probably." },
[197] = { name = "Something's in There", grade = 1, points = 1, secret = true, description = "By the gods! What was that?" },
[198] = { name = "Silent Pet", grade = 1, points = 1, secret = true, description = "Awww. Your very own little goldfish friend - he's cute, he's shiny and he can't complain should you forget to feed him. He'll definitely brighten up your day!" },
@@ -218,7 +218,7 @@ ACHIEVEMENTS = {
[217] = { name = "Doctor! Doctor!", grade = 1, points = 2, secret = true, description = "Did someone call a doctor? You delivered 100 medicine bags to Ottokar of the Venore poor house in times of dire need, well done!" },
[218] = { name = "Beak Doctor", grade = 2, points = 4, description = "You significantly helped the afflicted citizens of Venore in times of dire need. Somehow you still feel close to the victims of the fever outbreak. Your clothes make you one of them, one poor soul amongst the countless afflicted." },
[219] = { name = "Mystic Fabric Magic", grade = 2, points = 4, description = "You vanquished the mad mage, you subdued the raging mage - no spellweaving self-exposer can stand in your way. Yet you are quite absorbed in magical studies yourself. This very fabric reflects this personal approval of the magic arts." },
- [220] = { name = "Breaking the Ice", grade = 1, points = 1, description = "You almost made friends with Shardhead... before he died. Poor guy only seems to attract violence with his frosty attitude." },
+ -- [220] = Unknown/non-existent
[221] = { name = "Arachnoise", grade = 1, points = 1, description = "You've shattered each of Bloodweb's eight frozen legs. As they say: break a leg, and then some more." },
[222] = { name = "Rootless Behaviour", grade = 1, points = 1, description = "You've descended into the swampy depths of Deathbine's lair and made quick work of it." },
[223] = { name = "Twisted Mutation", grade = 1, points = 1, description = "You've slain Esmeralda, the most hideous and aggressive of the mutated rats. No one will know that you almost lost a finger in the process." },
@@ -248,7 +248,7 @@ ACHIEVEMENTS = {
[247] = { name = "Torn Treasures", grade = 1, points = 1, secret = true, description = "Wyda seems to be really, really bored. You also found out that she doesn't really need all those blood herbs that adventurers brought her. Still, she was nice enough to take one from you and gave you something quite cool in exchange." },
[248] = { name = "Loyal Subject", grade = 1, points = 1, secret = true, description = "You joined the Kingsday festivities and payed King Tibianus your respects. Now, off to party!" },
[249] = { name = "Desert Fisher", grade = 1, points = 1, description = "You managed to catch a fish in a surrounding that usually doesn't even carry water. Everything is subject to change, probably..." },
- [250] = { name = "Gem Cutter", grade = 1, points = 1, secret = true, description = 'You cut your first gem - and it bears your own name! Now that would be a nice gift! This does not make it a "true" Heart of the Sea, however...' },
+ -- [250] = Unknown/non-existent
[251] = { name = "Dog Sitter", grade = 1, points = 1, description = "You showed Noodles the way home. How long will it take this time until he's on the loose again? That dog must be really bored in the throne room by now." },
[252] = { name = "Ice Harvester", grade = 1, points = 1, description = "You witnessed the thawing of Svargrond and harvested rare seeds from some strange icy plants. They must be good for something." },
[253] = { name = "Preservationist", grade = 1, points = 1, secret = true, description = "You are a pretty smart thinker and managed to create everlasting flowers. They might become a big hit with all the people who aren't blessed with a green thumb or just forgetful." },
@@ -273,7 +273,7 @@ ACHIEVEMENTS = {
[272] = { name = "Headache", grade = 1, points = 2, description = "Even in the deepest structures of the hive, you began to strike against the mighty foe. Your actions probably already gave the hive a headache." },
[273] = { name = "Confusion", grade = 1, points = 3, description = "The destruction you have caused by now can be felt throughout the whole hive. The mayhem that follows your step caused significant confusion in the consciousness of the hive." },
[274] = { name = "Manic", grade = 2, points = 4, description = "You have destroyed a significant amount of the hive's vital nerve centers and caused massive destruction to the hive's awareness. You are probably causing the hive horrible nightmares." },
- [275] = { name = "Suppressor", grade = 2, points = 4, description = "A war is won by those who have the best supply of troops. The hive's troops have been dealt a significant blow by your actions. You interrupted the hive's replenishment of troops lastingly and severely." },
+ -- [275] = Unknown/non-existent
[276] = { name = "Navigational Error", grade = 2, points = 5, secret = true, description = "You confronted the Navigator." },
[277] = { name = "Si, Ariki!", grade = 1, points = 1, description = "You've found the oriental traveller Yasir and were able to trade with him - even if you didn't really understand his language." },
[278] = { name = "Guardian Downfall", grade = 2, points = 4, description = "You ended the life of over three hundred Deepling Guards. Not quite the guardian of the Deeplings, are you?" },
@@ -282,7 +282,7 @@ ACHIEVEMENTS = {
[281] = { name = "Gem Cutter", grade = 1, points = 1, secret = true, description = 'You cut your first gem - and it bears your own name! Now that would be a nice gift! This does not make it a "true" Heart of the Sea, however...' },
[282] = { name = "Spolium Profundis", grade = 2, points = 4, description = "You travelled the depths of this very world. You entered the blackness of the deep sea to conquer the realm of the Deeplings. May this suit remind you of the strange beauty below." },
[283] = { name = "Bane of the Hive", grade = 1, points = 2, description = "Countless fights and never tiring effort in the war against the hive grant you the experience to finish your outfit with the last remaining part. Your chitin outfit is a testament of your skills and dedication for the cause." },
- [284] = { name = "King of the Ring", grade = 1, points = 2, description = "Bretzecutioner's body just got slammed away. You are a true king of the ring!" },
+ -- [284] = Unknown/non-existent
[285] = { name = "Hive War Veteran", grade = 1, points = 1, description = "Your invaluable experience in fighting the hive allows you to add another piece of armor to your chitin outfit to prove your dedication for the cause." },
[286] = { name = "Hive Fighter", grade = 1, points = 1, description = "You have participated that much in the hive war, that you are able to create some makeshift armor from the remains of dead hive born that can be found in the major hive, to show of your skill." },
[287] = { name = "Howly Silence", grade = 1, points = 1, description = "You muted the everlasting howling of Hemming." },
@@ -294,7 +294,7 @@ ACHIEVEMENTS = {
[293] = { name = "King of the Ring", grade = 1, points = 2, description = "Bretzecutioner's body just got slammed away. You are a true king of the ring!" },
[294] = { name = "Back from the Dead", grade = 1, points = 2, description = "You overcame the undead Zanakeph and sent him back into the darkness that spawned him." },
[295] = { name = "Pwned All Fur", grade = 3, points = 8, secret = true, description = "You've faced and defeated each of the mighty bosses the Paw and Fur society sent you out to kill. All by yourself. What a hunt!" },
- [296] = { name = "Diplomatic Immunity", grade = 2, points = 4, secret = true, description = "You killed the ambassador of the abyss that often that they might consider sending another one. Perhaps that will one day stop further intrusions." },
+ -- [296] = Unknown/non-existent
[297] = { name = "Bibby's Bloodbath", grade = 1, points = 1, secret = true, description = "You lend a helping hand in defeating invading Orcs by destroying their warcamp along with their leader. Bibby's personal bloodbath..." },
[298] = { name = "Nestling", grade = 1, points = 1, description = "You cleansed the land from an eight legged nuisance by defeating Mamma Longlegs three times. She won't be back soon... or will she?" },
[299] = { name = "Becoming a Bigfoot", grade = 1, points = 1, description = "You did it! You convinced the reclusive gnomes to accept you as one of their Bigfoots. Now you are ready to help them. With big feet big missions seen to come." },
@@ -321,14 +321,14 @@ ACHIEVEMENTS = {
[320] = { name = "Funghitastic", grade = 1, points = 3, description = "Finally your dream to become a walking mushroom has come true ... No, wait a minute!" },
[321] = { name = "Crystal Clear", grade = 1, points = 3, description = "If the gnomes had told you that crystal armor is see-through you had probably changed your underwear in time." },
[322] = { name = "Gnomish Art Of War", grade = 1, points = 3, description = "You have unleashed your inner gnome and slain some of the most fearsome threats that gnomekind has ever faced. Now you can come and go to the warzones as it pleases you. The enemies of gnomekind will never be safe again." },
- [323] = { name = "Never Surrender", grade = 1, points = 3, description = "You did not show any signs of surrender to any sight of... you get the picture. Even a hundred of them did not pose a threat to you." },
+ -- [323] = Unknown/non-existent
[324] = { name = "True Dedication", grade = 2, points = 5, secret = true, description = "You conquered the demon challenge and prevailed... now show off your success in style!" },
[325] = { name = "Task Manager", grade = 1, points = 2, secret = true, description = "Helping a poor, stupid goblin to feed his starving children and wifes feels good ... if you'd only get rid of the strange feeling that you're missing something." },
[326] = { name = "Gravedigger", grade = 1, points = 3, description = "Assisting Omrabas' sick plan to resurrect made you dig your way through the blood-soaked halls of Drefia. Maybe better he failed!" },
[327] = { name = "Repenter", grade = 1, points = 1, secret = true, description = "You cleansed your soul in serving the Repenter enclave and purified thine self in completing all tasks in a single day of labour." },
[328] = { name = "Umbral Swordsman", grade = 2, points = 6, description = "You managed to transform, improve and sacrify your blade into a master state and have proven yourself worthy in a nightmarish world." },
- [329] = { name = "Umbral Berserker", grade = 2, points = 6, description = "You managed to transform, improve and sacrify your hammer into a master state and have proven yourself worthy in a nightmarish world." },
- [330] = { name = "Umbral Bladelord", grade = 2, points = 6, description = "You managed to transform, improve and sacrify your slayer into a master state and have proven yourself worthy in a nightmarish world." },
+ -- [329] = Unknown/non-existent
+ -- [330] = Unknown/non-existent
[331] = { name = "Cave Completionist", grade = 1, points = 2, description = "You have helped the gnomes of the spike in securing the caves and explored enough of the lightles depths to earn you a complete cave explorers outfit. Well done!" },
[332] = { name = "Umbral Bladelord", grade = 2, points = 6, description = "You managed to transform, improve and sacrify your slayer into a master state and have proven yourself worthy in a nightmarish world." },
[333] = { name = "Umbral Headsman", grade = 2, points = 6, description = "You managed to transform, improve and sacrify your axe into a master state and have proven yourself worthy in a nightmarish world." },
@@ -367,7 +367,7 @@ ACHIEVEMENTS = {
[366] = { name = "Publicity", grade = 1, points = 1, description = "You are a man of the public. Or of good publicity at least. Through your efforts in advertising the airtight cloth, Zeronex might yet be redeemed - and Rathleton might yet see its first working Gloud Ship." },
[367] = { name = "Snake Charmer", grade = 1, points = 1, description = "By restoring the Everhungry Altar, you charmed the Fire-Feathered Sea Serpent back into its fitful sleep, twenty miles beneath the sea." },
[368] = { name = "Hoard of the Dragon", grade = 1, points = 1, secret = true, description = "Your adventurous way through countless dragon lairs earned you a pretty treasure - and surely the enmity of many a dragon." },
- [369] = { name = "Icy Glare", grade = 1, points = 1, description = "Here's looking at you, kid. This ancient creature seems to size you up with its brilliant eyes and barely tolerates you riding it. Maybe it thinks you're the defrosted snack, after all?" },
+ -- [369] = Unknown/non-existent
[370] = { name = "Little Ball of Wool", grade = 1, points = 1, description = "You found a lost sheep and thus a steady source of black wool. But careful: don't get entangled." },
[371] = { name = "Luminous Kitty", grade = 1, points = 3, description = "You made some efforts to bring a little more light into the world. And what a nice present you got in return!" },
[372] = { name = "The Right Tone", grade = 1, points = 1, description = "By setting the right tone you convinced a crystal wolf to accompany you. Remember it is made of crystal, though, so be careful in a banshee's presence." },
@@ -404,10 +404,10 @@ ACHIEVEMENTS = {
[403] = { name = "Icy Glare", grade = 1, points = 1, description = "Here's looking at you, kid. This ancient creature seems to size you up with its brilliant eyes and barely tolerates you riding it. Maybe it thinks you're the defrosted snack, after all?" },
[404] = { name = "Cartography 101", grade = 1, points = 2, description = "You succeeded in finding and charting several previously unexplored landmarks and locations for the Adventurer's Guild, you probably never need to ask anyone for the way - do you?" },
[405] = { name = "Lost Palace Raider", grade = 1, points = 2, secret = true, description = "Lifting the secrets of a fabulous palace and defeating a beautiful demon princess was a thrilling experience indeed. This site's marvels nearly matched its terrors. Nearly." },
- [406] = { name = "The More the Merrier", grade = 0, points = 0, secret = true, description = "It's dangerous to go alone... Take ten friends." },
- [407] = { name = "Contender", grade = 1, points = 3, description = "You have fully unlocked 10 medium monsters in the cyclopedia." },
+ [406] = { name = "The More the Merrier", grade = 1, points = 0, secret = true, description = "It's dangerous to go alone... Take ten friends." },
+ -- [407] = Unknown/non-existent
[408] = { name = "Rift Warrior", grade = 1, points = 3, description = "You went through hell. Seven times. You defeated the demons. Countless times. You put an end to Ferumbras claims to ascendancy. Once and for all." },
- [409] = { name = "Duked It Out", grade = 1, points = 1, description = "You defeated the Duke of the Depths and destroyed his lava pump!" },
+ -- [409] = Unknown/non-existent
[410] = { name = "Hat Hunter", grade = 2, points = 5, description = "You sucessfully fought against all odds to protect your world from an ascending god! – You weren't there for the hat only after all?" },
[411] = { name = "Ogre Chef", grade = 1, points = 1, description = "You didn't manage to become an ogre chief. But at least you are, beyond doubt, a worthy ogre chef." },
[412] = { name = "The Call of the Wild", grade = 1, points = 2, description = "You opposed man-eating ogres and clumsy clomps. You grappled with hungry chieftains, desperate goblins and angry spirits. So you truly overcame the wild vastness of Krailos." },
@@ -421,13 +421,13 @@ ACHIEVEMENTS = {
[420] = { name = "Toothfairy Assistant", grade = 1, points = 1, description = "You assisted a very prominent fae and you fought tooth and nail to earn this title." },
[421] = { name = "Fairy Teasing", grade = 1, points = 1, secret = true, description = "Teasing fairies is fun. They leave behind such pretty clouds of glittering dust when chased. Just hope they don't get you back for it." },
[422] = { name = "Corruption Contained", grade = 2, points = 5, description = "You have managed to stall the worst incursion of corruption. Still this is just one battle won in an all out war for your world." },
- [423] = { name = "Daraman's Footsteps", grade = 1, points = 1, description = "You journeyed through Darashia and the sea of sand around it, while fighting the perils of the desert." },
- [424] = { name = "Dwarven Mines", grade = 1, points = 1, description = "Vast mines, an orc fortress and the magnificence of Kazordoon - you really know every corner of North-Eastern Mainland now." },
- [425] = { name = "Elven Woods", grade = 1, points = 1, description = "Tall trees, deep forests and and the beauty of Ab'Dendriel - you really know every corner of the elven lands now." },
- [426] = { name = "Glooth Punk", grade = 1, points = 1, description = "Glooth is the substance that powers a whole continent and all its weird inhabitants, workshops and factories. You travelled this strange smorgasbord of curiosities in its entirety - just in time for tea." },
- [427] = { name = "High and Dry", grade = 1, points = 2, description = "You asked Captain Charles to take a shortcut quite a few times. Now you are all too familiar with desert islands all over Tibia." },
- [428] = { name = "Jewel in the Swamp", grade = 1, points = 1, description = "Damp swamps, a dry desert and the opulence of Venore - you really know every corner of Eastern Mainland now." },
- [429] = { name = "King of the Jungle", grade = 1, points = 1, description = "You have searched Port Hope and the jungle that thoroughly, that you are up to adoption by a friendly ape family." },
+ -- [423] = Unknown/non-existent
+ -- [424] = Unknown/non-existent
+ -- [425] = Unknown/non-existent
+ -- [426] = Unknown/non-existent
+ -- [427] = Unknown/non-existent
+ -- [428] = Unknown/non-existent
+ -- [429] = Unknown/non-existent
[430] = { name = "Little Adventure", grade = 1, points = 1, description = "You have fully unlocked 10 easy monsters in the cyclopedia." },
[431] = { name = "Little Big Adventure", grade = 1, points = 2, secret = true, description = "You have fully unlocked 100 easy monsters in the cyclopedia." },
[432] = { name = "Contender", grade = 1, points = 3, description = "You have fully unlocked 10 medium monsters in the cyclopedia." },
@@ -470,7 +470,7 @@ ACHIEVEMENTS = {
[469] = { name = "Battle Mage", grade = 2, points = 6, description = "Wielding dangerous knowledge as well as the sword is your expertise. You have proven yourself versatile in all manner of situations." },
[470] = { name = "Widely Travelled", grade = 3, points = 7, description = "As a true globetrotter you can now show your colours proudly with this extraordinary outfit." },
[471] = { name = "Running the Rift", grade = 1, points = 3, description = "You don't just have a permission to ride a rift runner, you literally went through hell and earned it!" },
- [472] = { name = "Nothing but Hot Air", grade = 1, points = 2, description = "You have tamed the ghostly mists to do your bidding. For now ..." },
+ -- [472] = Unknown/non-existent
[473] = { name = "Exalted Battle Mage", grade = 1, points = 2, description = "Not only did you master the battlefield as a mage, you were also induced to the most inner secrets of the art of magical warfare and prevailed." },
[474] = { name = "Areas of Effect", grade = 1, points = 3, secret = true, description = "Wisely contributing your resources to areas, you pushed creatures to maximum effect, allowing improved respawn for everyone! Well done!" },
[475] = { name = "Tied the Knot", grade = 1, points = 1, secret = true, description = "You figured out the right order of spells in the buried cathedral, how enchanting!" },
@@ -483,7 +483,7 @@ ACHIEVEMENTS = {
[482] = { name = "Dream Catcher", grade = 1, points = 3, description = "You are the slayer of the ancient nightmare beast and prevented the nightmare to spread its madness." },
[483] = { name = "Champion of Summer", grade = 1, points = 2, secret = true, description = "You have vanquished numerous arena champions in the name of the Summer Court." },
[484] = { name = "Champion of Winter", grade = 1, points = 2, secret = true, description = "You have vanquished numerous arena champions in the name of the Winter Court." },
- [485] = { name = "Allow Cookies?", grade = 2, points = 6, description = "With a perfectly harmless smile, you tricked all the funny guys into eating your exploding cookies. Next time you pull this prank, consider wearing a Boy Scout outfit to make it even better." },
+ -- [485] = Unknown/non-existent
[486] = { name = "Bewitcher", grade = 2, points = 5, secret = true, description = "You literally put everything in that cauldron except lilac and gooseberries." },
[487] = { name = "Gryphon Rider", grade = 1, points = 3, description = "Unmasking spies, killing demons, discovering omens, solving puzzles and fighting ogres, manticores and feral sphinxes. - Nobody said it was easy to become a gryphon rider." },
[488] = { name = "Sculptor Apprentice", grade = 1, points = 2, secret = true, description = "Granted, you didn't carve those lifelike animal figurines yourself. But helping a medusa to find proper objects and even watching her using her petrifying gaze is almost as rewarding." },
@@ -496,6 +496,7 @@ ACHIEVEMENTS = {
[495] = { name = "Inquisition's Arm", grade = 1, points = 2, description = "Your special garb, solely awarded to a dedicated Hand of the Inquisition, is now complete." },
[496] = { name = "Traditionalist", grade = 2, points = 6, description = "You proudly wear the traditional Orcsoberfest garb, same as it ever was and as it always will be." },
[497] = { name = "Do a Barrel Roll!", grade = 1, points = 3, description = "Riding a traditional beer barrel from the Orcsoberfest is a once-in-a-lifetime experience. Beer sold separately." },
+ -- [498] = Unknown/non-existent
[499] = { name = "Orcsoberfest Welcome", grade = 1, points = 3, secret = true, description = 'The Orcsoberfest is not only known for its traditional food, beer and customs but also fun events and excitement! You took part in all of that and can now truly say: "I survived!"' },
[500] = { name = "Prospectre", grade = 1, points = 1, secret = true, description = "You made acquaintance with the Thaian. A strange contemporary with a dark history. No man but a derivate of greed and obsession." },
[501] = { name = "Nothing but Hot Air", grade = 1, points = 3, description = "You have tamed the ghostly mists to do your bidding. For now ..." },
@@ -506,19 +507,24 @@ ACHIEVEMENTS = {
[506] = { name = "Falconer", grade = 1, points = 2, description = "A true beastmaster learns the language of his animal companions. Now you as well can bolster your unique bond with nature and help preserve the balance of life as a proud falconer." },
[507] = { name = "Steppe Elegance", grade = 1, points = 3, description = "Champion of the wildlands, a swift strider among the creatures of the wild. The elegant nature of the gallop, this envoy of speed has mastered, indicates the precise understanding of its terrain and environment." },
[508] = { name = "Beyonder", grade = 1, points = 3, description = "Adventurous beyond death, you travelled the Netherworld. Although you had just the ghost of a chance you survived and even came back from the realm of the dead." },
+ -- [509] = Unknown/non-existent
[510] = { name = "Drama in Darama", grade = 1, points = 3, description = "If a pride of lions and a pack of hyaenas feud, it is not called a catfight but a ... whatsoever. For sure, it caused a lot of drama in the Darama Desert." },
[511] = { name = "Malefitz", grade = 1, points = 1, secret = true, description = "Made acquaintance with three brothers Fitz." },
[512] = { name = "Lionheart", grade = 1, points = 3, description = "You bested the maleficent duo Drume and Fugue and restored order to the besieged town of Bounac. You conquered the exotic stronghold of the Order of the Cobra and bested the undead knights of the Order of the Falcon. A true knight in heart and mind." },
+ [513] = { name = "Soul Mender", grade = 4, points = 10, description = "Brought back to the realm of the living this magnificent creature will carry you through death and everything that lays beyond." },
[514] = { name = "You Got Horse Power", grade = 3, points = 8, description = "Brought back to the realm of the living this magnificent creature will carry you through death and everything that lays beyond." },
[515] = { name = "Unleash the Beast", grade = 3, points = 8, description = "You defeated the manifestation of Goshnar's evil traits by fighting your way through beasts you didn't even want to imagine. It transformed you and now you can also look the part." },
[516] = { name = "Well Roared, Lion!", grade = 1, points = 1, description = "You helped Domizian and thus proved yourself worthy to enter the werelion sanctum underneath Lion's Rock. You faced the mighty werelions there and one of the rare white lions even chose to accompany you." },
+ -- [517] = Unknown/non-existent
[518] = { name = "Honorary Rascoohan", grade = 1, points = 2, description = "When in Rascacoon, do as the Rascoohans do!" },
[519] = { name = "Release the Kraken", grade = 1, points = 3, description = "Riding around on this squishy companion gives you the feeling of flying through the air... uhm... swimming through the seven seas!" },
+ -- [520] = Unknown/non-existent
[521] = { name = "Pied Piper", grade = 1, points = 3, secret = true, description = "You are not exactly the Pied Piper of Hamelin but at least you managed to fend off a decent amount of pirats and helped to keep them out of the cities." },
[522] = { name = "Woodcarver", grade = 1, points = 3, secret = true, description = "You defeated Megasylvan Yselda in the wake of the sleeping carnisylvan menace deep under Bounac." },
[523] = { name = "Bounacean Chivalry", grade = 1, points = 2, secret = true, description = "Yselda forever stands watch against the carnisylvan menace. Ever awake, waiting in the dark, her heart longs to be united with her king once again. Deep empathy let a hero to bring her Kesar's tulip as a token of his love. That hero was you." },
[524] = { name = "Knowledge Raider", grade = 1, points = 3, description = "Your thirst for knowledge is insatiable. In the task of helping your gnomish friends, flawless execution is just the icing on the cake." },
[525] = { name = "Citizen of Issavi", grade = 1, points = 2, description = "It was not the first time that you helped the Sapphire Blade or the Midnight Flame with a difficult task. You may now wear the Kilmareshian robes as well as the tagralt blade and the eye-embroidered veil of the seers as a sign of Issavi's gratitude." },
+ [526] = { name = "King's Council", grade = 1, points = 0, description = "Your continued efforts in keeping Bounac and the people of Kesar the Younger safe, earned you a permanent place at the royal court as an advisor to the king." },
[527] = { name = "Hot on the Trail", grade = 1, points = 3, description = "Since it is fireproof, this flaming creature feels right at home in raging infernos. But remember: just because it doesn't burn, you still do!" },
[528] = { name = "Shell We Take a Ride", grade = 1, points = 3, description = "Equipped with the shell of a tortoise and claws of a lobster this insect like companion will help you through every hardship." },
[529] = { name = "Phantastic!", grade = 1, points = 3, description = "This mighty pachyderm will march into battle as if just taking its Sunday stroll. The cost of friendship was only a few drome points!" },
@@ -526,7 +532,22 @@ ACHIEVEMENTS = {
[531] = { name = "First Achievement", grade = 1, points = 1, secret = true, description = "Congratulations to your very first achievement! ... Well, not really. But imagine, it is. Because at this point during your journey into Tibia's past, achievements have been introduced." },
[532] = { name = "Sharp Dressed", grade = 1, points = 2, description = "Just everyone will be crazy about you if you are wearing this formal dress. They will come running, promise!" },
[533] = { name = "Engine Driver", grade = 1, points = 3, description = "This glooth-driven locomotive will bring you to any party in the blink of an eye." },
+ [534] = { name = "Friendly Fire", grade = 1, points = 2, description = "You mastered the fire and tamed a supervulcano!" },
+ [535] = { name = "Wedding Planner", grade = 1, points = 3, description = "Alas! What could be more beautiful and satisfying than bringing two loving hearts together? So romantic!" },
+ [536] = { name = "Beaver Away", grade = 1, points = 1, description = "You really were as busy as a beaver in order to help the nagas. Enjoy some eager company!" },
+ [537] = { name = "Snake Pit", grade = 1, points = 1, description = "Mysterious nagas, a vibrant jungle and a sinking island - you really know every corner of Marapur now." },
+ [538] = { name = "Royalty of Hazard", grade = 1, points = 1, description = "For some it can't be hazardous enough." },
+ [539] = { name = "Measuring the World", grade = 1, points = 2, description = "Step by step you discovered many of the secrets hidden in the world, thus gaining the right to wear the Discoverer outfit and hat. Made-to-measure for a brave traveller of the Tibian wilds." },
[540] = { name = "Ripp-Ripp Hooray!", grade = 1, points = 3, description = "Don't get carried away by your success. Get carried away by your Ripptor." },
+ [541] = { name = "Warrior of the Iks", grade = 1, points = 2, description = "Combining unabating courage in combat and respect for the traditions and culture of the ancient Iks earned you the honours of true Aucar." },
+ [542] = { name = "Mutagenius", grade = 1, points = 2, description = "You accomplished the impossible and created 16 mutagens of corresponding colours." },
+ [543] = { name = "Strangest Thing", grade = 1, points = 3, description = "Only its rider can love this abomination of a mount." },
+ [544] = { name = "Fully Decayed", grade = 1, points = 2, description = "You defeated the embodiments of decay and live to tell the tale, wear the rotting attire of the unfaltering defender proudly." },
+ [545] = { name = "Like Fox and Mouse", grade = 1, points = 3, description = "Sly as a fox, quiet as a mouse - the perfect mount for a stealthy foray." },
+ [546] = { name = "The Spirit of Purity", grade = 1, points = 3, description = "Withstanding both filth and desolation of the rotten darkness that corrupted the very core of this world, you embodied the weapon of purity and light to defy all that was tainted. This spirit will continue guide you on all future paths." },
+ [547] = { name = "Museum Goer", grade = 1, points = 2, description = "You unveiled the secret plot of the Mitmah who stole away an entire civilisation for their own entertainment. Let the death of their outpost vanguard be an eternal lesson to them." },
+ [548] = { name = "Mystic Predator", grade = 1, points = 3, description = "Proving your true worth to a mystic creature like the jaguar, king of the hunt, granted you not only respect but also its heart." },
+ [549] = { name = "The Rule of Raccool", grade = 1, points = 2, description = "You almost feel as cool as a raccoon. Now, where's the trash?" },
}
--[[
diff --git a/src/canary_server.cpp b/src/canary_server.cpp
index bfabbf51ab8..17a36ff3d23 100644
--- a/src/canary_server.cpp
+++ b/src/canary_server.cpp
@@ -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 "
diff --git a/src/canary_server.hpp b/src/canary_server.hpp
index bb22232b8e4..57c931cd133 100644
--- a/src/canary_server.hpp
+++ b/src/canary_server.hpp
@@ -46,8 +46,8 @@ class CanaryServer {
FAILED
};
- RSA &rsa;
Logger &logger;
+ RSA &rsa;
ServiceManager &serviceManager;
std::atomic loaderStatus = LoaderStatus::LOADING;
diff --git a/src/config/config_enums.hpp b/src/config/config_enums.hpp
index 4abf29c04cb..30a4b172af1 100644
--- a/src/config/config_enums.hpp
+++ b/src/config/config_enums.hpp
@@ -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,
@@ -324,5 +327,5 @@ enum ConfigKey_t : uint16_t {
WHEEL_POINTS_PER_LEVEL,
WHITE_SKULL_TIME,
WORLD_TYPE,
- XP_DISPLAY_MODE,
+ XP_DISPLAY_MODE
};
diff --git a/src/config/configmanager.cpp b/src/config/configmanager.cpp
index 8d4ba7a77da..37634abf514 100644
--- a/src/config/configmanager.cpp
+++ b/src/config/configmanager.cpp
@@ -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"
@@ -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");
diff --git a/src/creatures/appearance/mounts/mounts.cpp b/src/creatures/appearance/mounts/mounts.cpp
index dff0f02a451..7051d04ddb8 100644
--- a/src/creatures/appearance/mounts/mounts.cpp
+++ b/src/creatures/appearance/mounts/mounts.cpp
@@ -35,7 +35,7 @@ bool Mounts::loadFromXml() {
continue;
}
- mounts.emplace_back(std::make_shared(
+ mounts.emplace(std::make_shared(
static_cast(pugi::cast(mountNode.attribute("id").value())),
lookType,
mountNode.attribute("name").as_string(),
@@ -44,12 +44,11 @@ bool Mounts::loadFromXml() {
mountNode.attribute("type").as_string()
));
}
- mounts.shrink_to_fit();
return true;
}
std::shared_ptr Mounts::getMountByID(uint8_t id) {
- auto it = std::find_if(mounts.begin(), mounts.end(), [id](const std::shared_ptr mount) {
+ auto it = std::find_if(mounts.begin(), mounts.end(), [id](const std::shared_ptr &mount) {
return mount->id == id; // Note the use of -> operator to access the members of the Mount object
});
@@ -58,7 +57,7 @@ std::shared_ptr Mounts::getMountByID(uint8_t id) {
std::shared_ptr Mounts::getMountByName(const std::string &name) {
auto mountName = name.c_str();
- auto it = std::find_if(mounts.begin(), mounts.end(), [mountName](const std::shared_ptr mount) {
+ auto it = std::find_if(mounts.begin(), mounts.end(), [mountName](const std::shared_ptr &mount) {
return strcasecmp(mountName, mount->name.c_str()) == 0;
});
@@ -66,7 +65,7 @@ std::shared_ptr Mounts::getMountByName(const std::string &name) {
}
std::shared_ptr Mounts::getMountByClientID(uint16_t clientId) {
- auto it = std::find_if(mounts.begin(), mounts.end(), [clientId](const std::shared_ptr mount) {
+ auto it = std::find_if(mounts.begin(), mounts.end(), [clientId](const std::shared_ptr &mount) {
return mount->clientId == clientId; // Note the use of -> operator to access the members of the Mount object
});
diff --git a/src/creatures/appearance/mounts/mounts.hpp b/src/creatures/appearance/mounts/mounts.hpp
index 05bd330a66b..ca4f969842a 100644
--- a/src/creatures/appearance/mounts/mounts.hpp
+++ b/src/creatures/appearance/mounts/mounts.hpp
@@ -11,8 +11,8 @@
struct Mount {
Mount(uint8_t initId, uint16_t initClientId, std::string initName, int32_t initSpeed, bool initPremium, std::string initType) :
- name(initName), speed(initSpeed), clientId(initClientId), id(initId), premium(initPremium),
- type(initType) { }
+ name(std::move(initName)), speed(initSpeed), clientId(initClientId), id(initId), premium(initPremium),
+ type(std::move(initType)) { }
std::string name;
int32_t speed;
@@ -30,10 +30,10 @@ class Mounts {
std::shared_ptr getMountByName(const std::string &name);
std::shared_ptr getMountByClientID(uint16_t clientId);
- [[nodiscard]] const std::vector> &getMounts() const {
+ [[nodiscard]] const phmap::parallel_flat_hash_set> &getMounts() const {
return mounts;
}
private:
- std::vector> mounts;
+ phmap::parallel_flat_hash_set> mounts;
};
diff --git a/src/creatures/appearance/outfit/outfit.cpp b/src/creatures/appearance/outfit/outfit.cpp
index 6f0490339de..9e96c60e756 100644
--- a/src/creatures/appearance/outfit/outfit.cpp
+++ b/src/creatures/appearance/outfit/outfit.cpp
@@ -14,6 +14,13 @@
#include "utils/tools.hpp"
#include "game/game.hpp"
+bool Outfits::reload() {
+ for (auto &outfitsVector : outfits) {
+ outfitsVector.clear();
+ }
+ return loadFromXml();
+}
+
bool Outfits::loadFromXml() {
pugi::xml_document doc;
auto folder = g_configManager().getString(CORE_DIRECTORY, __FUNCTION__) + "/XML/outfits.xml";
@@ -68,10 +75,12 @@ bool Outfits::loadFromXml() {
}
std::shared_ptr Outfits::getOutfitByLookType(PlayerSex_t sex, uint16_t lookType) const {
- for (const auto &outfit : outfits[sex]) {
- if (outfit->lookType == lookType) {
- return outfit;
- }
+ auto it = std::ranges::find_if(outfits[sex], [&lookType](const auto &outfit) {
+ return outfit->lookType == lookType;
+ });
+
+ if (it != outfits[sex].end()) {
+ return *it;
}
return nullptr;
}
@@ -83,17 +92,7 @@ std::shared_ptr Outfits::getOutfitByLookType(PlayerSex_t sex, uint16_t l
* @return const pointer to the outfit or nullptr if it could not be found.
*/
-std::shared_ptr Outfits::getOpositeSexOutfitByLookType(PlayerSex_t sex, uint16_t lookType) {
+std::shared_ptr Outfits::getOpositeSexOutfitByLookType(PlayerSex_t sex, uint16_t lookType) const {
PlayerSex_t searchSex = (sex == PLAYERSEX_MALE) ? PLAYERSEX_FEMALE : PLAYERSEX_MALE;
-
- for (uint16_t i = 0; i < outfits[sex].size(); i++) {
- if (outfits[sex].at(i)->lookType == lookType) {
- if (outfits[searchSex].size() > i) {
- return outfits[searchSex].at(i);
- } else { // looktype found but the oposite sex array doesn't have this index.
- return nullptr;
- }
- }
- }
- return nullptr;
+ return getOutfitByLookType(searchSex, lookType);
}
diff --git a/src/creatures/appearance/outfit/outfit.hpp b/src/creatures/appearance/outfit/outfit.hpp
index d8df003ad0f..d226ce16379 100644
--- a/src/creatures/appearance/outfit/outfit.hpp
+++ b/src/creatures/appearance/outfit/outfit.hpp
@@ -12,9 +12,17 @@
#include "declarations.hpp"
#include "lib/di/container.hpp"
+struct OutfitEntry {
+ constexpr OutfitEntry(uint16_t initLookType, uint8_t initAddons) :
+ lookType(initLookType), addons(initAddons) { }
+
+ uint16_t lookType;
+ uint8_t addons;
+};
+
struct Outfit {
Outfit(std::string initName, uint16_t initLookType, bool initPremium, bool initUnlocked, std::string initFrom) :
- name(initName), lookType(initLookType), premium(initPremium), unlocked(initUnlocked), from(initFrom) { }
+ name(std::move(initName)), lookType(initLookType), premium(initPremium), unlocked(initUnlocked), from(std::move(initFrom)) { }
std::string name;
uint16_t lookType;
@@ -38,9 +46,10 @@ class Outfits {
return inject();
}
- std::shared_ptr getOpositeSexOutfitByLookType(PlayerSex_t sex, uint16_t lookType);
+ std::shared_ptr getOpositeSexOutfitByLookType(PlayerSex_t sex, uint16_t lookType) const;
bool loadFromXml();
+ bool reload();
[[nodiscard]] std::shared_ptr getOutfitByLookType(PlayerSex_t sex, uint16_t lookType) const;
[[nodiscard]] const std::vector> &getOutfits(PlayerSex_t sex) const {
diff --git a/src/creatures/combat/combat.cpp b/src/creatures/combat/combat.cpp
index f453b0932f3..f43469adffd 100644
--- a/src/creatures/combat/combat.cpp
+++ b/src/creatures/combat/combat.cpp
@@ -100,7 +100,11 @@ CombatDamage Combat::getCombatDamage(std::shared_ptr creature, std::sh
}
}
}
+ if (attackerPlayer && wheelSpell && wheelSpell->isInstant()) {
+ wheelSpell->getCombatDataAugment(attackerPlayer, damage);
+ }
}
+
return damage;
}
@@ -285,7 +289,7 @@ bool Combat::isProtected(std::shared_ptr attacker, std::shared_ptrgetVocation()->canCombat() || !target->getVocation()->canCombat() && (attacker->getVocationId() == VOCATION_NONE || target->getVocationId() == VOCATION_NONE)) {
+ if ((!attacker->getVocation()->canCombat() || !target->getVocation()->canCombat()) && (attacker->getVocationId() == VOCATION_NONE || target->getVocationId() == VOCATION_NONE)) {
return true;
}
@@ -713,7 +717,7 @@ bool Combat::checkFearConditionAffected(std::shared_ptr player) {
auto affectedCount = (party->getMemberCount() + 5) / 5;
g_logger().debug("[{}] Player is member of a party, {} members can be feared", __FUNCTION__, affectedCount);
- for (const auto member : party->getMembers()) {
+ for (const auto &member : party->getMembers()) {
if (member->hasCondition(CONDITION_FEARED)) {
affectedCount -= 1;
}
@@ -765,7 +769,7 @@ void Combat::CombatConditionFunc(std::shared_ptr caster, std::shared_p
}
}
- if (caster == target || target && !target->isImmune(condition->getType())) {
+ if (caster == target || (target && !target->isImmune(condition->getType()))) {
auto conditionCopy = condition->clone();
if (caster) {
conditionCopy->setParam(CONDITION_PARAM_OWNER, caster->getID());
@@ -1036,10 +1040,10 @@ bool Combat::doCombatChain(std::shared_ptr caster, std::shared_ptrgetChainValues(caster, maxTargets, chainDistance, backtracking);
- auto targets = pickChainTargets(caster, params, chainDistance, maxTargets, backtracking, aggressive, target);
+ auto targets = pickChainTargets(caster, params, chainDistance, maxTargets, aggressive, backtracking, std::move(target));
g_logger().debug("[{}] Chain targets: {}", __FUNCTION__, targets.size());
- if (targets.empty() || targets.size() == 1 && targets.begin()->second.empty()) {
+ if (targets.empty() || (targets.size() == 1 && targets.begin()->second.empty())) {
return false;
}
@@ -1128,7 +1132,7 @@ void Combat::CombatFunc(std::shared_ptr caster, const Position &origin
uint32_t maxY = 0;
// calculate the max viewable range
- for (std::shared_ptr tile : tileList) {
+ for (const std::shared_ptr &tile : tileList) {
const Position &tilePos = tile->getPosition();
uint32_t diff = Position::getDistanceX(tilePos, pos);
@@ -1146,7 +1150,7 @@ void Combat::CombatFunc(std::shared_ptr caster, const Position &origin
const int32_t rangeY = maxY + MAP_MAX_VIEW_PORT_Y;
int affected = 0;
- for (std::shared_ptr tile : tileList) {
+ for (const std::shared_ptr &tile : tileList) {
if (canDoCombat(caster, tile, params.aggressive) != RETURNVALUE_NOERROR) {
continue;
}
@@ -1201,7 +1205,7 @@ void Combat::CombatFunc(std::shared_ptr caster, const Position &origin
uint8_t beamAffectedCurrent = 0;
tmpDamage.affected = affected;
- for (std::shared_ptr tile : tileList) {
+ for (const std::shared_ptr &tile : tileList) {
if (canDoCombat(caster, tile, params.aggressive) != RETURNVALUE_NOERROR) {
continue;
}
@@ -1247,7 +1251,7 @@ void Combat::CombatFunc(std::shared_ptr caster, const Position &origin
}
void Combat::doCombatHealth(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) {
- doCombatHealth(caster, target, caster ? caster->getPosition() : Position(), damage, params);
+ doCombatHealth(caster, std::move(target), caster ? caster->getPosition() : Position(), damage, params);
}
void Combat::doCombatHealth(std::shared_ptr caster, std::shared_ptr target, const Position &origin, CombatDamage &damage, const CombatParams ¶ms) {
@@ -1388,7 +1392,7 @@ void Combat::doCombatDispel(std::shared_ptr caster, std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {
+[[maybe_unused]] void Combat::doCombatDefault(std::shared_ptr caster, std::shared_ptr target, const CombatParams ¶ms) {
doCombatDefault(caster, target, caster ? caster->getPosition() : Position(), params);
}
@@ -2082,7 +2086,7 @@ void AreaCombat::setupExtArea(const std::list &list, uint32_t rows) {
void MagicField::onStepInField(const std::shared_ptr &creature) {
// remove magic walls/wild growth
- if (!isBlocking() && g_game().getWorldType() == WORLD_TYPE_NO_PVP && id == ITEM_MAGICWALL_SAFE || id == ITEM_WILDGROWTH_SAFE) {
+ if ((!isBlocking() && g_game().getWorldType() == WORLD_TYPE_NO_PVP && id == ITEM_MAGICWALL_SAFE) || id == ITEM_WILDGROWTH_SAFE) {
if (!creature->isInGhostMode()) {
g_game().internalRemoveItem(static_self_cast- (), 1);
}
@@ -2097,7 +2101,7 @@ void MagicField::onStepInField(const std::shared_ptr &creature) {
if (ownerId) {
bool harmfulField = true;
auto itemTile = getTile();
- if (g_game().getWorldType() == WORLD_TYPE_NO_PVP || itemTile && itemTile->hasFlag(TILESTATE_NOPVPZONE)) {
+ if (g_game().getWorldType() == WORLD_TYPE_NO_PVP || (itemTile && itemTile->hasFlag(TILESTATE_NOPVPZONE))) {
auto ownerPlayer = g_game().getPlayerByGUID(ownerId);
if (ownerPlayer) {
harmfulField = false;
diff --git a/src/creatures/combat/combat.hpp b/src/creatures/combat/combat.hpp
index 6a79455c7c4..93b02502f25 100644
--- a/src/creatures/combat/combat.hpp
+++ b/src/creatures/combat/combat.hpp
@@ -72,8 +72,8 @@ class ChainCallback final : public CallBack {
private:
void onChainCombat(std::shared_ptr creature, uint8_t &chainTargets, uint8_t &chainDistance, bool &backtracking);
- uint8_t m_chainTargets = 0;
uint8_t m_chainDistance = 0;
+ uint8_t m_chainTargets = 0;
bool m_backtracking = false;
bool m_fromLua = false;
};
@@ -125,7 +125,7 @@ class MatrixArea {
data_[row] = new bool[cols];
for (uint32_t col = 0; col < cols; ++col) {
- data_[row][col] = 0;
+ data_[row][col] = false;
}
}
}
@@ -324,7 +324,7 @@ class Combat {
}
void setPlayerCombatValues(formulaType_t formulaType, double mina, double minb, double maxa, double maxb);
void postCombatEffects(std::shared_ptr caster, const Position &origin, const Position &pos) const {
- postCombatEffects(caster, origin, pos, params);
+ postCombatEffects(std::move(caster), origin, pos, params);
}
void setOrigin(CombatOrigin origin) {
@@ -393,7 +393,7 @@ class Combat {
* @param damage The combat damage.
* @return The calculated level formula.
*/
- int32_t getLevelFormula(std::shared_ptr player, const std::shared_ptr wheelSpell, const CombatDamage &damage) const;
+ int32_t getLevelFormula(std::shared_ptr player, std::shared_ptr wheelSpell, const CombatDamage &damage) const;
CombatDamage getCombatDamage(std::shared_ptr creature, std::shared_ptr target) const;
// configureable
diff --git a/src/creatures/combat/condition.cpp b/src/creatures/combat/condition.cpp
index fb7a0c512fd..4517f9735ac 100644
--- a/src/creatures/combat/condition.cpp
+++ b/src/creatures/combat/condition.cpp
@@ -1500,7 +1500,7 @@ bool ConditionDamage::unserializeProp(ConditionAttr_t attr, PropStream &propStre
} else if (attr == CONDITIONATTR_OWNER) {
return propStream.skip(4);
} else if (attr == CONDITIONATTR_INTERVALDATA) {
- IntervalInfo damageInfo;
+ IntervalInfo damageInfo {};
if (!propStream.read(damageInfo)) {
return false;
}
@@ -1558,7 +1558,7 @@ bool ConditionDamage::addDamage(int32_t rounds, int32_t time, int32_t value) {
// rounds, time, damage
for (int32_t i = 0; i < rounds; ++i) {
- IntervalInfo damageInfo;
+ IntervalInfo damageInfo {};
damageInfo.interval = time;
damageInfo.timeLeft = time;
damageInfo.value = value;
@@ -1831,13 +1831,9 @@ void ConditionDamage::generateDamageList(int32_t amount, int32_t start, std::lis
* ConditionFeared
*/
bool ConditionFeared::isStuck(std::shared_ptr creature, Position pos) const {
- for (Direction dir : m_directionsVector) {
- if (canWalkTo(creature, pos, dir)) {
- return false;
- }
- }
-
- return true;
+ return std::ranges::all_of(m_directionsVector, [&](Direction dir) {
+ return !canWalkTo(creature, pos, dir);
+ });
}
bool ConditionFeared::getRandomDirection(std::shared_ptr creature, Position pos) {
@@ -2023,6 +2019,8 @@ bool ConditionFeared::getFleePath(std::shared_ptr creature, const Posi
futurePos.y -= wsize;
g_logger().debug("[{}] Trying to flee to NORTHWEST to {} [{}]", __FUNCTION__, futurePos.toString(), wsize);
break;
+ case DIRECTION_NONE:
+ break;
}
found = creature->getPathTo(futurePos, dirList, 0, 30);
diff --git a/src/creatures/combat/condition.hpp b/src/creatures/combat/condition.hpp
index 539a8711723..07b31b42d15 100644
--- a/src/creatures/combat/condition.hpp
+++ b/src/creatures/combat/condition.hpp
@@ -27,7 +27,7 @@ class Condition : public SharedObject {
virtual bool startCondition(std::shared_ptr creature);
virtual bool executeCondition(std::shared_ptr creature, int32_t interval);
virtual void endCondition(std::shared_ptr creature) = 0;
- virtual void addCondition(std::shared_ptr creature, const std::shared_ptr condition) = 0;
+ virtual void addCondition(std::shared_ptr creature, std::shared_ptr condition) = 0;
virtual uint32_t getIcons() const;
ConditionId_t getId() const {
return id;
@@ -65,14 +65,14 @@ class Condition : public SharedObject {
protected:
uint8_t drainBodyStage = 0;
- int64_t endTime;
- uint32_t subId;
- int32_t ticks;
- ConditionType_t conditionType;
- ConditionId_t id;
- bool isBuff;
+ int64_t endTime {};
+ uint32_t subId {};
+ int32_t ticks {};
+ ConditionType_t conditionType {};
+ ConditionId_t id {};
+ bool isBuff {};
- virtual bool updateCondition(const std::shared_ptr addCondition);
+ virtual bool updateCondition(std::shared_ptr addCondition);
private:
SoundEffect_t tickSound = SoundEffect_t::SILENCE;
@@ -90,7 +90,7 @@ class ConditionGeneric : public Condition {
bool startCondition(std::shared_ptr creature) override;
bool executeCondition(std::shared_ptr creature, int32_t interval) override;
void endCondition(std::shared_ptr creature) override;
- void addCondition(std::shared_ptr creature, const std::shared_ptr condition) override;
+ void addCondition(std::shared_ptr creature, std::shared_ptr condition) override;
uint32_t getIcons() const override;
std::shared_ptr clone() const override {
@@ -106,7 +106,7 @@ class ConditionAttributes final : public ConditionGeneric {
bool startCondition(std::shared_ptr creature) final;
bool executeCondition(std::shared_ptr creature, int32_t interval) final;
void endCondition(std::shared_ptr creature) final;
- void addCondition(std::shared_ptr creature, const std::shared_ptr condition) final;
+ void addCondition(std::shared_ptr creature, std::shared_ptr condition) final;
bool setParam(ConditionParam_t param, int32_t value) final;
@@ -172,7 +172,7 @@ class ConditionRegeneration final : public ConditionGeneric {
bool startCondition(std::shared_ptr creature) override;
void endCondition(std::shared_ptr creature) override;
- void addCondition(std::shared_ptr creature, const std::shared_ptr addCondition) override;
+ void addCondition(std::shared_ptr creature, std::shared_ptr addCondition) override;
bool executeCondition(std::shared_ptr creature, int32_t interval) override;
bool setParam(ConditionParam_t param, int32_t value) override;
@@ -205,7 +205,7 @@ class ConditionManaShield final : public Condition {
bool startCondition(std::shared_ptr creature) override;
void endCondition(std::shared_ptr creature) override;
- void addCondition(std::shared_ptr creature, const std::shared_ptr addCondition) override;
+ void addCondition(std::shared_ptr creature, std::shared_ptr addCondition) override;
uint32_t getIcons() const override;
bool setParam(ConditionParam_t param, int32_t value) override;
@@ -227,7 +227,7 @@ class ConditionSoul final : public ConditionGeneric {
ConditionSoul(ConditionId_t initId, ConditionType_t initType, int32_t iniTicks, bool initBuff = false, uint32_t initSubId = 0) :
ConditionGeneric(initId, initType, iniTicks, initBuff, initSubId) { }
- void addCondition(std::shared_ptr creature, const std::shared_ptr addCondition) override;
+ void addCondition(std::shared_ptr creature, std::shared_ptr addCondition) override;
bool executeCondition(std::shared_ptr creature, int32_t interval) override;
bool setParam(ConditionParam_t param, int32_t value) override;
@@ -270,7 +270,7 @@ class ConditionDamage final : public Condition {
bool startCondition(std::shared_ptr creature) override;
bool executeCondition(std::shared_ptr creature, int32_t interval) override;
void endCondition(std::shared_ptr creature) override;
- void addCondition(std::shared_ptr creature, const std::shared_ptr condition) override;
+ void addCondition(std::shared_ptr creature, std::shared_ptr condition) override;
uint32_t getIcons() const override;
std::shared_ptr clone() const override {
@@ -309,7 +309,7 @@ class ConditionDamage final : public Condition {
bool getNextDamage(int32_t &damage);
bool doDamage(std::shared_ptr creature, int32_t healthChange);
- bool updateCondition(const std::shared_ptr addCondition) override;
+ bool updateCondition(std::shared_ptr addCondition) override;
};
class ConditionFeared final : public Condition {
@@ -321,7 +321,7 @@ class ConditionFeared final : public Condition {
bool startCondition(std::shared_ptr creature) override;
bool executeCondition(std::shared_ptr creature, int32_t interval) override;
void endCondition(std::shared_ptr creature) override;
- void addCondition(std::shared_ptr creature, const std::shared_ptr condition) override;
+ void addCondition(std::shared_ptr creature, std::shared_ptr condition) override;
uint32_t getIcons() const override;
std::shared_ptr clone() const override {
@@ -360,7 +360,7 @@ class ConditionSpeed final : public Condition {
bool startCondition(std::shared_ptr creature) override;
bool executeCondition(std::shared_ptr creature, int32_t interval) override;
void endCondition(std::shared_ptr creature) override;
- void addCondition(std::shared_ptr creature, const std::shared_ptr condition) override;
+ void addCondition(std::shared_ptr creature, std::shared_ptr condition) override;
uint32_t getIcons() const override;
std::shared_ptr clone() const override {
@@ -395,7 +395,7 @@ class ConditionOutfit final : public Condition {
bool startCondition(std::shared_ptr creature) override;
bool executeCondition(std::shared_ptr creature, int32_t interval) override;
void endCondition(std::shared_ptr creature) override;
- void addCondition(std::shared_ptr creature, const std::shared_ptr condition) override;
+ void addCondition(std::shared_ptr creature, std::shared_ptr condition) override;
std::shared_ptr clone() const override {
return std::make_shared(*this);
@@ -421,7 +421,7 @@ class ConditionLight final : public Condition {
bool startCondition(std::shared_ptr creature) override;
bool executeCondition(std::shared_ptr creature, int32_t interval) override;
void endCondition(std::shared_ptr creature) override;
- void addCondition(std::shared_ptr creature, const std::shared_ptr addCondition) override;
+ void addCondition(std::shared_ptr creature, std::shared_ptr addCondition) override;
std::shared_ptr clone() const override {
return std::make_shared(*this);
@@ -445,7 +445,7 @@ class ConditionSpellCooldown final : public ConditionGeneric {
ConditionGeneric(initId, initType, initTicks, initBuff, initSubId) { }
bool startCondition(std::shared_ptr creature) override;
- void addCondition(std::shared_ptr creature, const std::shared_ptr condition) override;
+ void addCondition(std::shared_ptr creature, std::shared_ptr condition) override;
std::shared_ptr clone() const override {
return std::make_shared(*this);
@@ -458,7 +458,7 @@ class ConditionSpellGroupCooldown final : public ConditionGeneric {
ConditionGeneric(initId, initType, initTicks, initBuff, initSubId) { }
bool startCondition(std::shared_ptr creature) override;
- void addCondition(std::shared_ptr creature, const std::shared_ptr condition) override;
+ void addCondition(std::shared_ptr creature, std::shared_ptr condition) override;
std::shared_ptr clone() const override {
return std::make_shared(*this);
diff --git a/src/creatures/combat/spells.cpp b/src/creatures/combat/spells.cpp
index 60cc5e7d2a9..dd4305de14e 100644
--- a/src/creatures/combat/spells.cpp
+++ b/src/creatures/combat/spells.cpp
@@ -630,6 +630,43 @@ void Spell::setWheelOfDestinyBoost(WheelSpellBoost_t boost, WheelSpellGrade_t gr
}
}
+void Spell::getCombatDataAugment(std::shared_ptr player, CombatDamage &damage) {
+ if (!(damage.instantSpellName).empty()) {
+ const auto equippedAugmentItems = player->getEquippedAugmentItems();
+ for (const auto &item : equippedAugmentItems) {
+ const auto augments = item->getAugmentsBySpellName(damage.instantSpellName);
+ for (auto &augment : augments) {
+ if (augment->value == 0) {
+ continue;
+ }
+ if (augment->type == Augment_t::IncreasedDamage || augment->type == Augment_t::PowerfulImpact || augment->type == Augment_t::StrongImpact) {
+ const float augmentPercent = augment->value / 100.0;
+ damage.primary.value += static_cast(damage.primary.value * augmentPercent);
+ damage.secondary.value += static_cast(damage.secondary.value * augmentPercent);
+ } else if (augment->type != Augment_t::Cooldown) {
+ const int32_t augmentValue = augment->value * 100;
+ damage.lifeLeech += augment->type == Augment_t::LifeLeech ? augmentValue : 0;
+ damage.manaLeech += augment->type == Augment_t::ManaLeech ? augmentValue : 0;
+ damage.criticalDamage += augment->type == Augment_t::CriticalExtraDamage ? augmentValue : 0;
+ }
+ }
+ }
+ }
+};
+
+int32_t Spell::calculateAugmentSpellCooldownReduction(std::shared_ptr player) const {
+ int32_t spellCooldown = 0;
+ const auto equippedAugmentItems = player->getEquippedAugmentItemsByType(Augment_t::Cooldown);
+ for (const auto &item : equippedAugmentItems) {
+ const auto augments = item->getAugmentsBySpellNameAndType(getName(), Augment_t::Cooldown);
+ for (auto &augment : augments) {
+ spellCooldown += augment->value;
+ }
+ }
+
+ return spellCooldown;
+}
+
void Spell::applyCooldownConditions(std::shared_ptr player) const {
WheelSpellGrade_t spellGrade = player->wheel()->getSpellUpgrade(getName());
bool isUpgraded = getWheelOfDestinyUpgraded() && static_cast(spellGrade) > 0;
@@ -644,8 +681,10 @@ void Spell::applyCooldownConditions(std::shared_ptr player) const {
if (isUpgraded) {
spellCooldown -= getWheelOfDestinyBoost(WheelSpellBoost_t::COOLDOWN, spellGrade);
}
- g_logger().debug("[{}] spell name: {}, spellCooldown: {}, bonus: {}", __FUNCTION__, name, spellCooldown, player->wheel()->getSpellBonus(name, WheelSpellBoost_t::COOLDOWN));
+ int32_t augmentCooldownReduction = calculateAugmentSpellCooldownReduction(player);
+ g_logger().debug("[{}] spell name: {}, spellCooldown: {}, bonus: {}, augment {}", __FUNCTION__, name, spellCooldown, player->wheel()->getSpellBonus(name, WheelSpellBoost_t::COOLDOWN), augmentCooldownReduction);
spellCooldown -= player->wheel()->getSpellBonus(name, WheelSpellBoost_t::COOLDOWN);
+ spellCooldown -= augmentCooldownReduction;
if (spellCooldown > 0) {
std::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLCOOLDOWN, spellCooldown / rateCooldown, 0, false, m_spellId);
player->addCondition(condition);
@@ -727,7 +766,6 @@ uint32_t Spell::getManaCost(std::shared_ptr player) const {
if (manaPercent != 0) {
uint32_t maxMana = player->getMaxMana();
uint32_t manaCost = (maxMana * manaPercent) / 100;
- WheelSpellGrade_t spellGrade = player->wheel()->getSpellUpgrade(getName());
if (manaRedution > manaCost) {
return 0;
}
@@ -750,7 +788,7 @@ bool InstantSpell::playerCastInstant(std::shared_ptr player, std::string
var.type = VARIANT_NUMBER;
var.number = player->getID();
} else if (needTarget || casterTargetOrDirection) {
- std::shared_ptr target = nullptr;
+ std::shared_ptr target;
bool useDirection = false;
if (hasParam) {
@@ -1046,7 +1084,7 @@ bool RuneSpell::castSpell(std::shared_ptr creature, std::shared_ptr creature, const LuaVariant &var, bool isHotkey) {
bool result;
if (isLoadedCallback()) {
- result = executeCastSpell(creature, var, isHotkey);
+ result = executeCastSpell(std::move(creature), var, isHotkey);
} else {
result = false;
}
diff --git a/src/creatures/combat/spells.hpp b/src/creatures/combat/spells.hpp
index cd1a7aaa623..fc23bbf9030 100644
--- a/src/creatures/combat/spells.hpp
+++ b/src/creatures/combat/spells.hpp
@@ -63,8 +63,8 @@ class Spells final : public Scripts {
}
void clear();
- bool registerInstantLuaEvent(const std::shared_ptr instant);
- bool registerRuneLuaEvent(const std::shared_ptr rune);
+ bool registerInstantLuaEvent(std::shared_ptr instant);
+ bool registerRuneLuaEvent(std::shared_ptr rune);
private:
std::map> runes;
@@ -92,7 +92,7 @@ class BaseSpell {
class CombatSpell final : public Script, public BaseSpell, public std::enable_shared_from_this {
public:
// Constructor
- CombatSpell(const std::shared_ptr newCombat, bool newNeedTarget, bool newNeedDirection);
+ CombatSpell(std::shared_ptr newCombat, bool newNeedTarget, bool newNeedDirection);
// The copy constructor and the assignment operator have been deleted to prevent accidental copying.
CombatSpell(const CombatSpell &) = delete;
@@ -345,6 +345,9 @@ class Spell : public BaseSpell {
m_separator = newSeparator.data();
}
+ void getCombatDataAugment(std::shared_ptr player, CombatDamage &damage);
+ int32_t calculateAugmentSpellCooldownReduction(std::shared_ptr player) const;
+
protected:
void applyCooldownConditions(std::shared_ptr player) const;
bool playerSpellCheck(std::shared_ptr player) const;
diff --git a/src/creatures/creature.cpp b/src/creatures/creature.cpp
index fc5b3324f99..5f48b3ea01c 100644
--- a/src/creatures/creature.cpp
+++ b/src/creatures/creature.cpp
@@ -125,7 +125,7 @@ void Creature::onThink(uint32_t interval) {
auto onThink = [self = getCreature(), interval] {
// scripting event - onThink
const auto &thinkEvents = self->getCreatureEvents(CREATURE_EVENT_THINK);
- for (const auto creatureEventPtr : thinkEvents) {
+ for (const auto &creatureEventPtr : thinkEvents) {
creatureEventPtr->executeOnThink(self->static_self_cast(), interval);
}
};
@@ -299,7 +299,7 @@ void Creature::updateTileCache(std::shared_ptr upTile, const Position &pos
if (pos.z == myPos.z) {
int32_t dx = Position::getOffsetX(pos, myPos);
int32_t dy = Position::getOffsetY(pos, myPos);
- updateTileCache(upTile, dx, dy);
+ updateTileCache(std::move(upTile), dx, dy);
}
}
@@ -332,7 +332,7 @@ int32_t Creature::getWalkCache(const Position &pos) {
void Creature::onAddTileItem(std::shared_ptr tileItem, const Position &pos) {
if (isMapLoaded && pos.z == getPosition().z) {
- updateTileCache(tileItem, pos);
+ updateTileCache(std::move(tileItem), pos);
}
}
@@ -343,7 +343,7 @@ void Creature::onUpdateTileItem(std::shared_ptr updateTile, const Position
if (oldType.blockSolid || oldType.blockPathFind || newType.blockPathFind || newType.blockSolid) {
if (pos.z == getPosition().z) {
- updateTileCache(updateTile, pos);
+ updateTileCache(std::move(updateTile), pos);
}
}
}
@@ -355,7 +355,7 @@ void Creature::onRemoveTileItem(std::shared_ptr updateTile, const Position
if (iType.blockSolid || iType.blockPathFind || iType.isGroundTile()) {
if (pos.z == getPosition().z) {
- updateTileCache(updateTile, pos);
+ updateTileCache(std::move(updateTile), pos);
}
}
}
@@ -439,7 +439,7 @@ void Creature::checkSummonMove(const Position &newPos, bool teleportSummon) {
// Check if any of our summons is out of range (+/- 2 floors or 30 tiles away)
bool checkRemoveDist = Position::getDistanceZ(newPos, pos) > 2 || (std::max(Position::getDistanceX(newPos, pos), Position::getDistanceY(newPos, pos)) > 30);
- if (monster && monster->isFamiliar() && checkSummonDist || teleportSummon && !protectionZoneCheck && checkSummonDist) {
+ if ((monster && monster->isFamiliar() && checkSummonDist) || (teleportSummon && !protectionZoneCheck && checkSummonDist)) {
const auto &creatureMaster = summon->getMaster();
if (!creatureMaster) {
continue;
@@ -709,7 +709,7 @@ void Creature::onDeath() {
}
}
- bool killedByPlayer = mostDamageCreature && mostDamageCreature->getPlayer() || mostDamageCreatureMaster && mostDamageCreatureMaster->getPlayer();
+ bool killedByPlayer = (mostDamageCreature && mostDamageCreature->getPlayer()) || (mostDamageCreatureMaster && mostDamageCreatureMaster->getPlayer());
if (getPlayer()) {
g_metrics().addCounter(
"player_death",
@@ -761,7 +761,7 @@ bool Creature::dropCorpse(std::shared_ptr lastHitCreature, std::shared
if (getMaster()) {
// Scripting event onDeath
const CreatureEventList &deathEvents = getCreatureEvents(CREATURE_EVENT_DEATH);
- for (const auto deathEventPtr : deathEvents) {
+ for (const auto &deathEventPtr : deathEvents) {
deathEventPtr->executeOnDeath(static_self_cast(), nullptr, lastHitCreature, mostDamageCreature, lastHitUnjustified, mostDamageUnjustified);
}
}
@@ -824,7 +824,7 @@ bool Creature::dropCorpse(std::shared_ptr lastHitCreature, std::shared
auto isReachable = g_game().map.getPathMatching(player->getPosition(), dirList, FrozenPathingConditionCall(corpse->getPosition()), fpp);
- if (player->checkAutoLoot(monster->isRewardBoss()) && corpseContainer && mostDamageCreature->getPlayer() && isReachable) {
+ if (player->checkAutoLoot(monster->isRewardBoss()) && isReachable) {
g_dispatcher().addEvent([player, corpseContainer, corpsePosition = corpse->getPosition()] {
g_game().playerQuickLootCorpse(player, corpseContainer, corpsePosition);
},
@@ -834,7 +834,7 @@ bool Creature::dropCorpse(std::shared_ptr lastHitCreature, std::shared
}
// Scripting event onDeath
- for (const auto deathEventPtr : getCreatureEvents(CREATURE_EVENT_DEATH)) {
+ for (const auto &deathEventPtr : getCreatureEvents(CREATURE_EVENT_DEATH)) {
if (deathEventPtr) {
deathEventPtr->executeOnDeath(static_self_cast(), corpse, lastHitCreature, mostDamageCreature, lastHitUnjustified, mostDamageUnjustified);
}
@@ -1169,7 +1169,7 @@ double Creature::getDamageRatio(std::shared_ptr attacker) const {
}
uint64_t Creature::getGainedExperience(std::shared_ptr attacker) const {
- return std::floor(getDamageRatio(attacker) * getLostExperience());
+ return std::floor(getDamageRatio(std::move(attacker)) * getLostExperience());
}
void Creature::addDamagePoints(std::shared_ptr attacker, int32_t damagePoints) {
@@ -1181,7 +1181,7 @@ void Creature::addDamagePoints(std::shared_ptr attacker, int32_t damag
auto it = damageMap.find(attackerId);
if (it == damageMap.end()) {
- CountBlock_t cb;
+ CountBlock_t cb {};
cb.ticks = OTSYS_TIME();
cb.total = damagePoints;
damageMap[attackerId] = cb;
@@ -1247,7 +1247,7 @@ void Creature::onTickCondition(ConditionType_t type, bool &bRemove) {
}
void Creature::onCombatRemoveCondition(std::shared_ptr condition) {
- removeCondition(condition);
+ removeCondition(std::move(condition));
}
void Creature::onAttacked() {
@@ -1275,7 +1275,7 @@ bool Creature::deprecatedOnKilledCreature(std::shared_ptr target, bool
// scripting event - onKill
const CreatureEventList &killEvents = getCreatureEvents(CREATURE_EVENT_KILL);
- for (const auto killEventPtr : killEvents) {
+ for (const auto &killEventPtr : killEvents) {
killEventPtr->executeOnKill(static_self_cast(), target, lastHit);
}
return false;
@@ -1293,7 +1293,7 @@ void Creature::onGainExperience(uint64_t gainExp, std::shared_ptr targ
gainExp /= 2;
}
- master->onGainExperience(gainExp, target);
+ master->onGainExperience(gainExp, std::move(target));
if (!m->isFamiliar()) {
auto spectators = Spectators().find(position);
@@ -1574,7 +1574,7 @@ void Creature::setSpeed(int32_t varSpeedDelta) {
}
void Creature::setCreatureLight(LightInfo lightInfo) {
- internalLight = std::move(lightInfo);
+ internalLight = lightInfo;
}
void Creature::setNormalCreatureLight() {
@@ -1589,7 +1589,7 @@ bool Creature::registerCreatureEvent(const std::string &name) {
CreatureEventType_t type = event->getEventType();
if (hasEventRegistered(type)) {
- for (const auto creatureEventPtr : eventsList) {
+ for (const auto &creatureEventPtr : eventsList) {
if (creatureEventPtr == event) {
return false;
}
@@ -1642,7 +1642,7 @@ CreatureEventList Creature::getCreatureEvents(CreatureEventType_t type) {
return tmpEventList;
}
- for (const auto creatureEventPtr : eventsList) {
+ for (const auto &creatureEventPtr : eventsList) {
if (creatureEventPtr->getEventType() == type) {
tmpEventList.push_back(creatureEventPtr);
}
@@ -1727,7 +1727,7 @@ bool FrozenPathingConditionCall::operator()(const Position &startPos, const Posi
}
bool Creature::isInvisible() const {
- return std::find_if(conditions.begin(), conditions.end(), [](const std::shared_ptr condition) {
+ return std::find_if(conditions.begin(), conditions.end(), [](const std::shared_ptr &condition) {
return condition->getType() == CONDITION_INVISIBLE;
})
!= conditions.end();
diff --git a/src/creatures/creature.hpp b/src/creatures/creature.hpp
index 41e2c3affd2..6caefd2bbf3 100644
--- a/src/creatures/creature.hpp
+++ b/src/creatures/creature.hpp
@@ -404,13 +404,13 @@ class Creature : virtual public Thing, public SharedObject {
void executeConditions(uint32_t interval);
bool hasCondition(ConditionType_t type, uint32_t subId = 0) const;
- virtual bool isImmune(CombatType_t type) const {
+ virtual bool isImmune([[maybe_unused]] CombatType_t type) const {
return false;
}
- virtual bool isImmune(ConditionType_t type) const {
+ virtual bool isImmune([[maybe_unused]] ConditionType_t type) const {
return false;
}
- virtual bool isSuppress(ConditionType_t type, bool attackerPlayer) const {
+ virtual bool isSuppress([[maybe_unused]] ConditionType_t type, [[maybe_unused]] bool attackerPlayer) const {
return false;
};
@@ -428,7 +428,7 @@ class Creature : virtual public Thing, public SharedObject {
virtual void drainHealth(std::shared_ptr attacker, int32_t damage);
virtual void drainMana(std::shared_ptr attacker, int32_t manaLoss);
- virtual bool challengeCreature(std::shared_ptr, int targetChangeCooldown) {
+ virtual bool challengeCreature(std::shared_ptr, [[maybe_unused]] int targetChangeCooldown) {
return false;
}
@@ -452,10 +452,10 @@ class Creature : virtual public Thing, public SharedObject {
* @deprecated -- This is here to trigger the deprecated onKill events in lua
*/
bool deprecatedOnKilledCreature(std::shared_ptr target, bool lastHit);
- virtual bool onKilledPlayer(const std::shared_ptr &target, bool lastHit) {
+ virtual bool onKilledPlayer([[maybe_unused]] const std::shared_ptr &target, [[maybe_unused]] bool lastHit) {
return false;
};
- virtual bool onKilledMonster(const std::shared_ptr &target) {
+ virtual bool onKilledMonster([[maybe_unused]] const std::shared_ptr &target) {
return false;
};
virtual void onGainExperience(uint64_t gainExp, std::shared_ptr target);
diff --git a/src/creatures/creatures_definitions.hpp b/src/creatures/creatures_definitions.hpp
index b66293c594a..3ae9e4bf0cb 100644
--- a/src/creatures/creatures_definitions.hpp
+++ b/src/creatures/creatures_definitions.hpp
@@ -120,7 +120,7 @@ enum ConditionType_t : uint8_t {
// constexpr definiting suppressible conditions
constexpr bool IsConditionSuppressible(ConditionType_t condition) {
- constexpr ConditionType_t suppressibleConditions[] = {
+ constexpr std::array suppressibleConditions = {
CONDITION_POISON,
CONDITION_FIRE,
CONDITION_ENERGY,
@@ -131,13 +131,9 @@ constexpr bool IsConditionSuppressible(ConditionType_t condition) {
CONDITION_CURSED,
};
- for (const auto &suppressibleCondition : suppressibleConditions) {
- if (condition == suppressibleCondition) {
- return true;
- }
- }
-
- return false;
+ return std::ranges::any_of(suppressibleConditions, [condition](const auto &suppressibleCondition) {
+ return condition == suppressibleCondition;
+ });
}
enum ConditionParam_t {
@@ -1413,20 +1409,6 @@ struct VIPEntry {
bool notify;
};
-struct OutfitEntry {
- constexpr OutfitEntry(uint16_t initLookType, uint8_t initAddons) :
- lookType(initLookType), addons(initAddons) { }
-
- uint16_t lookType;
- uint8_t addons;
-};
-
-struct FamiliarEntry {
- constexpr explicit FamiliarEntry(uint16_t initLookType) :
- lookType(initLookType) { }
- uint16_t lookType;
-};
-
struct Skill {
uint64_t tries = 0;
uint16_t level = 10;
@@ -1537,19 +1519,6 @@ using ItemsTierCountList = std::map>;
| ...
*/
-struct Familiar {
- Familiar(std::string initName, uint16_t initLookType, bool initPremium, bool initUnlocked, std::string initType) :
- name(initName), lookType(initLookType),
- premium(initPremium), unlocked(initUnlocked),
- type(initType) { }
-
- std::string name;
- uint16_t lookType;
- bool premium;
- bool unlocked;
- std::string type;
-};
-
struct ProtocolFamiliars {
ProtocolFamiliars(const std::string &initName, uint16_t initLookType) :
name(initName), lookType(initLookType) { }
@@ -1652,18 +1621,11 @@ struct ShopBlock {
int32_t itemStorageValue;
std::vector childShop;
- ShopBlock() {
- itemId = 0;
- itemName = "";
- itemSubType = 0;
- itemBuyPrice = 0;
- itemSellPrice = 0;
- itemStorageKey = 0;
- itemStorageValue = 0;
- }
+ ShopBlock() :
+ itemId(0), itemName(""), itemSubType(0), itemBuyPrice(0), itemSellPrice(0), itemStorageKey(0), itemStorageValue(0) { }
- explicit ShopBlock(uint16_t newItemId, int32_t newSubType = 0, uint32_t newBuyPrice = 0, uint32_t newSellPrice = 0, int32_t newStorageKey = 0, int32_t newStorageValue = 0, std::string newName = "") :
- itemId(newItemId), itemSubType(newSubType), itemBuyPrice(newBuyPrice), itemSellPrice(newSellPrice), itemStorageKey(newStorageKey), itemStorageValue(newStorageValue), itemName(std::move(newName)) { }
+ explicit ShopBlock(uint16_t newItemId, std::string newName = "", int32_t newSubType = 0, uint32_t newBuyPrice = 0, uint32_t newSellPrice = 0, int32_t newStorageKey = 0, int32_t newStorageValue = 0) :
+ itemId(newItemId), itemName(std::move(newName)), itemSubType(newSubType), itemBuyPrice(newBuyPrice), itemSellPrice(newSellPrice), itemStorageKey(newStorageKey), itemStorageValue(newStorageValue) { }
bool operator==(const ShopBlock &other) const {
return itemId == other.itemId && itemName == other.itemName && itemSubType == other.itemSubType && itemBuyPrice == other.itemBuyPrice && itemSellPrice == other.itemSellPrice && itemStorageKey == other.itemStorageKey && itemStorageValue == other.itemStorageValue && childShop == other.childShop;
diff --git a/src/creatures/interactions/chat.hpp b/src/creatures/interactions/chat.hpp
index 022b3f540a1..3643086184c 100644
--- a/src/creatures/interactions/chat.hpp
+++ b/src/creatures/interactions/chat.hpp
@@ -71,7 +71,7 @@ class ChatChannel {
int32_t onLeaveEvent = -1;
int32_t onSpeakEvent = -1;
- uint16_t id;
+ uint16_t id {};
bool publicChannel = false;
friend class Chat;
@@ -79,8 +79,8 @@ class ChatChannel {
class PrivateChatChannel final : public ChatChannel {
public:
- PrivateChatChannel(uint16_t channelId, std::string channelName) :
- ChatChannel(channelId, channelName) { }
+ PrivateChatChannel(uint16_t channelId, [[maybe_unused]] std::string channelName) :
+ ChatChannel(channelId, std::move(channelName)) { }
uint32_t getOwner() const override {
return owner;
diff --git a/src/creatures/monsters/monster.cpp b/src/creatures/monsters/monster.cpp
index 2bf7edd75ac..61c7a6e7f41 100644
--- a/src/creatures/monsters/monster.cpp
+++ b/src/creatures/monsters/monster.cpp
@@ -478,7 +478,7 @@ void Monster::onCreatureFound(std::shared_ptr creature, bool pushFront
}
void Monster::onCreatureEnter(std::shared_ptr creature) {
- onCreatureFound(creature, true);
+ onCreatureFound(std::move(creature), true);
}
bool Monster::isFriend(const std::shared_ptr &creature) const {
@@ -794,7 +794,7 @@ void Monster::updateIdleStatus() {
isWalkingBack = true;
}
} else if (const auto &master = getMaster()) {
- if ((!isSummon() && totalPlayersOnScreen == 0 || isSummon() && master->getMonster() && master->getMonster()->totalPlayersOnScreen == 0) && getFaction() != FACTION_DEFAULT) {
+ if (((!isSummon() && totalPlayersOnScreen == 0) || (isSummon() && master->getMonster() && master->getMonster()->totalPlayersOnScreen == 0)) && getFaction() != FACTION_DEFAULT) {
idle = true;
}
}
@@ -931,7 +931,7 @@ void Monster::doAttacking(uint32_t interval) {
for (const spellBlock_t &spellBlock : mType->info.attackSpells) {
bool inRange = false;
- if (spellBlock.spell == nullptr || spellBlock.isMelee && isFleeing()) {
+ if (spellBlock.spell == nullptr || (spellBlock.isMelee && isFleeing())) {
continue;
}
diff --git a/src/creatures/monsters/monster.hpp b/src/creatures/monsters/monster.hpp
index 6ba6c583cd6..d4babaa4638 100644
--- a/src/creatures/monsters/monster.hpp
+++ b/src/creatures/monsters/monster.hpp
@@ -15,7 +15,6 @@
class Creature;
class Game;
-class Spawn;
class Monster final : public Creature {
public:
@@ -23,7 +22,7 @@ class Monster final : public Creature {
static int32_t despawnRange;
static int32_t despawnRadius;
- explicit Monster(const std::shared_ptr mType);
+ explicit Monster(std::shared_ptr mType);
// non-copyable
Monster(const Monster &) = delete;
@@ -164,7 +163,7 @@ class Monster final : public Creature {
}
std::vector getIcons() const override {
- const auto creatureIcons = Creature::getIcons();
+ auto creatureIcons = Creature::getIcons();
if (!creatureIcons.empty()) {
return creatureIcons;
}
@@ -328,7 +327,7 @@ class Monster final : public Creature {
return timeToChangeFiendish;
}
- const std::shared_ptr getMonsterType() const {
+ std::shared_ptr getMonsterType() const {
return mType;
}
diff --git a/src/creatures/monsters/monsters.cpp b/src/creatures/monsters/monsters.cpp
index a6d16abdfe0..88b6521e9dc 100644
--- a/src/creatures/monsters/monsters.cpp
+++ b/src/creatures/monsters/monsters.cpp
@@ -20,7 +20,7 @@ void MonsterType::loadLoot(const std::shared_ptr monsterType, LootB
if (lootBlock.childLoot.empty()) {
bool isContainer = Item::items[lootBlock.id].isContainer();
if (isContainer) {
- for (LootBlock child : lootBlock.childLoot) {
+ for (const LootBlock &child : lootBlock.childLoot) {
lootBlock.childLoot.push_back(child);
}
}
@@ -74,7 +74,7 @@ bool Monsters::deserializeSpell(const std::shared_ptr spell, spell
return true;
}
- std::shared_ptr combatSpell = nullptr;
+ std::shared_ptr combatSpell;
auto combatPtr = std::make_shared();
@@ -156,7 +156,7 @@ bool Monsters::deserializeSpell(const std::shared_ptr spell, spell
std::shared_ptr