From 195c2e43cceed3081711844fc9c9e76ec368bdd2 Mon Sep 17 00:00:00 2001 From: Felipe Paluco Date: Wed, 8 Jan 2025 18:33:46 -0300 Subject: [PATCH] fix: conflicts with migrations --- config.lua.dist | 2 +- data-otservbr-global/migrations/49.lua | 5 +++++ src/lua/functions/core/game/game_functions.cpp | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 data-otservbr-global/migrations/49.lua diff --git a/config.lua.dist b/config.lua.dist index 0a5c2280584..9661a4cb7e0 100644 --- a/config.lua.dist +++ b/config.lua.dist @@ -86,7 +86,7 @@ maxItem = 5000 maxContainer = 500 maxContainerDepth = 200 --- Animus Mastery - SoulPit (Get more info in: TBD) +-- Animus Mastery - SoulPit (Get more info in: https://github.com/opentibiabr/canary/pull/3230) -- NOTE: animusMasteryMaxMonsterXpMultiplier is the maximum experience the multiplier can be. -- NOTE: animusMasteryMonsterXpMultiplier is the monster experience multiplier that has the animus mastery unlocked. -- NOTE: animusMasteryMonstersXpMultiplier is the multiplier for each 'animusMasteryMonstersToIncreaseXpMultiplier' monsters that diff --git a/data-otservbr-global/migrations/49.lua b/data-otservbr-global/migrations/49.lua new file mode 100644 index 00000000000..c1cfb28da5b --- /dev/null +++ b/data-otservbr-global/migrations/49.lua @@ -0,0 +1,5 @@ +function onUpdateDatabase() + logger.info("Updating database to version 48 (feat: animus mastery (soulpit))") + + db.query("ALTER TABLE `players` ADD `animus_mastery` mediumblob NOT NULL;") +end diff --git a/src/lua/functions/core/game/game_functions.cpp b/src/lua/functions/core/game/game_functions.cpp index 99d36df60ba..dc51ef15c41 100644 --- a/src/lua/functions/core/game/game_functions.cpp +++ b/src/lua/functions/core/game/game_functions.cpp @@ -574,7 +574,7 @@ int GameFunctions::luaGameCreateSoulPitMonster(lua_State* L) { const bool force = Lua::getBoolean(L, 5, false); if (g_game().placeCreature(monster, position, extended, force)) { monster->setSoulPitStack(stack); - monster->onSpawn(); + monster->onSpawn(position); Lua::pushUserdata(L, monster); Lua::setMetatable(L, -1, "Monster");