Merged
Conversation
This change will prevent players from losing skills or dropping items when dieing in pvp zone, currently theres nothing involving pvp zone besides the old pvp arena which hopefully will be updated to tibia drome so this fix its something to have in mind.
To speak with djiins, you need to complete a few quests. Namely: "The Djinn War - Efreet Faction" and "The Djinn War - Marid Faction". Even though they show up as "completed" when freequests runs, you are still unable to talk to them using their special word "Djanni'hah". They laugh, saying it's ALMOST correct, then stop talking to you. Changing the storageValue for the start quests to 0 fixes the issue.
Currently, the factor is not really random, this corrects this problem.
…ibiabr#3508) Revert the system check modified in PR opentibiabr#3471 that incorrectly identified whether the player followed the Efreet or Marid path, preventing proper NPC interaction. Ensure players aligned with Efreet cannot talk to Marid NPCs and vice-versa. Also, fix an issue where players, even after completing the quest, could only greet NPCs using "DJANNI'HAH". Add a quest completion check before the existing greeting checks, allowing greetings like "hi" or "hello" after finishing the quest.
…r#3509) Add dispatcher start validation and loading monitoring This fixes a loop in the server start (breaks on "Running with 16 threads." step) Dispatcher: • Added promise/future in init() to ensure dispatcher thread is fully started before proceeding. • Added 5s timeout when waiting for dispatcher initialization. CanaryServer • Replaced blocking wait() on LoaderStatus with an active wait loop. • Added soft warning logs every 2 minutes during startup. • Added a 10 minutes startup timeout with graceful shutdown on failure. • Minor cleanup in load order and improved robustness of server start sequence. Overall: server startup is now safer, with better feedback if the process is slow or stuck.
Remove teleport visual effect when using rope or shovel After PR opentibiabr#3066, using rope or shovel on any hole triggered a teleport effect, which doesn't happen on Global. This commit fixes that behavior by preventing the effect specifically for these items.
Fix item duplication in inbox and add maxInboxItems limit • Add maxInboxItems config to limit inbox size • Add Player::addItemBatchToPaginedContainer for safe, paginated insertion • Add Game::processItemInsertion to centralize insertion logic • Prevent item cloning when accepting or canceling market offers • Handle stackable and non-stackable item edge cases properly
This way the killer list will show who gave the final hit, who did the most damage and all other participants, whether monsters or players. PR Complement: opentibiabr/myaac#134
This is a fix where the NPCs were duplicating, they were not adding or removing them correctly, now there is also no need for the NPC to exist in the XML because the creation is done when the server starts everything within the script.
Fixed attempt to compare nil with number.
Fix memory leak in Ebb and Flow system causing server crashes • Fixed critical memory leak related to Ebb and Flow map transitions • Tracked and cleaned up event callbacks to prevent accumulation • Managed addEvent timers through a centralized pendingEvents table • Implemented clearPendingEvents() and unregisterEventCallbacks() • Ensured proper cleanup before each map change and on server save • Resolved lingering tile and scope references in anonymous functions • Maintains default 25 packet/s without lag or instability Fixes opentibiabr#3373
…entibiabr#3538) This commit fixes a critical issue where partially loaded offline players, loaded using `disableIrrelevantInfo()`, had incomplete data saved back to disk, causing loss of information such as Wheel of Destiny configuration and boosted boss prices. The solution ensures that player save operations respect the loading context and do not overwrite fields that were not previously loaded. This prevents valid gameplay data from being replaced with empty or default values during background saves. Fixes opentibiabr#3289.
This change fixes a bug where spells (especially AoE) would occasionally not apply any damage when the caster and the target were the only entities on screen. This occurred due to missing critical damage propagation when only one target was present in the area.
) This PR optimizes the ProtocolGame::writeToOutputBuffer method by avoiding the unnecessary creation of shared_from_this() (getThis()) when already within the dispatcher context. Previously, the method always called getThis() to capture self, even when already executing inside the dispatcher, which introduced significant overhead due to shared_ptr management. Now, the check g_dispatcher().context().isAsync() ensures that if we're already in the dispatcher context, the operation is performed immediately and directly, avoiding the cost of shared_from_this(). This change eliminates the need to create extra shared_ptr instances in common scenarios, reducing pressure on the reference counting system and improving overall performance, especially under high load.
Dependes from: opentibiabr/remeres-map-editor#70 (opentibiabr/remeres-map-editor@6d501a5) Enables the read of canary's map editor assets otbm version.
…br#3563) Ensure only relevant condition suppressions are decremented when de-equipping items. Prevents removing suppressions still active from other sources. Fix: opentibiabr#3267
feat: add client and server features for gameplay and UI improvements - Renamed Supply Stash to Stash and removed depot slot limit count - Added advanced filters for Stash item categories - Reworked Cyclopedia Combat Stats into Offense, Defense, and Misc Stats - Added detailed tooltips and integrated stats into Skills widget - Introduced Magical Archive interface for spells and runes with filters - Overhauled Quest Log and Tracker with pinning, search, sort, compact display, and notifications - Enhanced Exaltation Forge with boots tier bonus and Dust management - Redesigned Charms System with new Major and Minor charms and balance changes - Added new mounts and outfits for customization - Improved server and client behavior with advanced stash, spell archive, detailed stats, and enhanced tier systems - Verified features through manual and in-game testing
Docker expects the file to be on the bin folder, so we need to keep this option enable otherwise we will have to update the docker files to search for the binary in another place.
Yasir missing items based on https://tibia.fandom.com and few price fixes
Introduces apply.patch containing commands for applying patches using git, including options for handling whitespace and force updating.
Moved Benchmark implementation from header to new benchmark.cpp file, improving code organization. Added logging methods to Benchmark and updated CMake and Visual Studio project files to include the new source file.
…br#3667) Refactored the loop that searches for an empty slot in containers for non-stackable items to prevent unsigned underflow and infinity loops. The new implementation iterates from 0 to container capacity, ensuring safe and correct behavior when the container is full.
Sets up compilation for macOS with the clang compiler. Had to fix some issues with type casting for lua/database and hit a few warnings along the way so fixed those as well. # Changes - Added `macos-*` presets - Added macos github workflow - Fixes a few high-priority clang warnings
Stabilize unit tests on Windows MSVC and improve test isolation. Fix intermittent crashes caused by the Boost UTest JUnit reporter holding a string view to temporary test names. Use a static vector of strings for test names in position functions tests and static const cases in string functions tests. Refactor dependency injection using a single static injector and a fresh helper for clean, per-test fixtures. Update CMake to add build tests definition and standardize test invocation and reporting. Disable Unity and lto for test targets on MSVC to keep predictable debug stacks. Adjusted the memory account repository to deduplicate by ID before insert. Minor cleanups in test naming, case handling, and expectations; Tests now run deterministically on MSVC and Linux/MacOS without flakiness.
Makes running test with `ctest` a bit easier. Key changesL - drop `*-test` build/config presets to simplify setup - `*-debug` presets now always build in testing - added test presets for `*-debug` that can be used with `ctest` ## Running tests Tests can be run directly from the repository root using CMake test presets: ```bash # Configure and build tests for your platform cmake --preset linux-debug && cmake --build --preset linux-debug # Run all tests ctest --preset linux-debug # For other platforms use: # ctest --preset macos-debug # ctest --preset windows-debug ```
…ibiabr#3678) • Enable integration tests in CI for macOS, Ubuntu, and Windows with ctest steps for unit and integration • Update tests/build_and_run.sh to also run integration tests • Refactor account integration tests into a dedicated file with its own subdirectory and CMakeLists • Add test_database.hpp and .env-based DB initialization with OS environment precedence and required password • Define TESTS_ENV_DEFAULT in CMake and provide tests/test.env as a default config • Use DI in tests with InMemoryLogger installed via injector and access Database and Logger through DI • Improve time handling and assertions using getTimeNow and approx for premium and creation fields • Organize AccountRepositoryDB suite in a dedicated namespace with modular test registration functions • Adjust log checks to validate the latest error message and clear the log buffer before tests • Wrap each test in BEGIN and ROLLBACK and add explicit DatabaseException handling • Fix and consolidate cases for saving accounts and syncing premiumDaysPurchased from premiumRemainingDays • Normalize size and type assertions, use references in assert helpers, and apply clang-format
…ave (opentibiabr#3664) The Player has previously managed the storage system through a raw storageMap, with direct insertions, deletions, and range generation (genReservedStorageRange). This change caused unnecessary complete rewrites on save and spreads logic across Player, IOLoginData, and related components. Changes - Introduced a new PlayerStorage component to encapsulate all storage-related logic - Removed the legacy storageMap from Player, centralizing load/save and manipulation in the new component - Implemented incremental persistence: only modified or removed keys are saved to the database, avoiding complete rewrites - Added support for reserved key ranges (outfits, familiars) within PlayerStorage::getReservedRange - Updated IOLoginDataLoad and IOLoginDataSave to delegate load/save to PlayerStorage - Added missing benchmark.cpp implementation and updated build files accordingly - Removed storage name in favor of KV. This change refactor improves code organization, maintainability, and performance. By persisting only modified keys instead of the full storage set, save operations are faster and reduce unnecessary database load.
Corrected operator precedence in conditional statements in player.cpp and game.cpp to ensure proper logic evaluation. Removed unused variable in protocolgame.cpp and clarified unused parameter in cylinder.hpp.
…abr#3669) Adds a missing 'return 1;' after pushing nil to the Lua stack when an unknown immunity name is encountered in luaMonsterTypeCombatImmunities and luaMonsterTypeConditionImmunities. This prevents further code execution in error cases and ensures correct Lua behavior.
…#3651) Refactored the eviction logic in KVStore to defer persistence of evicted entries, improving thread safety and efficiency. Added processEvictions method and updated flush to persist both in-memory and pending evictions. The keys() method now skips deleted entries, and a new unit test verifies this behavior.
This pull request updates the logic for populating the list of players in the `PlayerBadge::getPlayersInfoByAccount` method. Now, only players for whom `setVocation` succeeds are added to the result list, which helps ensure data integrity.
Removed protocol version checks and open container logic from IOLoginDataLoad, moving container opening to ProtocolGame::sendAddCreature for all logins. Also removed the unused sendHotkeyPreset function and its call, simplifying login flow and improving code clarity. Fixed Lua event callback functions to return correct values on error. Fix: opentibiabr#3611
Ensure the database state is initialized to avoid RAID check exceptions.
Otherwise, errors like the following can occur:
[2025-31-08 09:34:43.520] [thread 140345198] [error] Lua Script Error Detected
---------------------------------------
Interface: Scripts Interface
Script ID: data/scripts/globalevents/raids.lua:callback
Error Description: data/libs/systems/raids.lua:87: attempt to perform arithmetic on local 'checksToday' (a nil value)
stack traceback:
[C]: in function '__add'
data/libs/systems/raids.lua:87: in function 'canStart'
data/libs/systems/raids.lua:51: in function 'tryStart'
data/scripts/globalevents/raids.lua:11: in function <data/scripts/globalevents/raids.lua:5>
---------------------------------------
This change sets up cmake-format to auto-fix PRs with the GHA workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge canary upstream newest updates.
Questlog adjustments.