Commit graph

114 commits

Author SHA1 Message Date
mimus-assa
8c06104604
fix: Prey Wildcard store offers should be 1x10 and 5x50 coins (#4045)
Bug Fixes:
- Adjusted the quantities included with the “Prey Wildcard” offers to reflect the correct amounts.
2026-08-06 13:15:34 -03:00
Eduardo Dantas
ab863b04d2
feat: update current client 15.25 compatibility (#4020)
Update current client protocol compatibility to 15.25 byte contract

This commit updates the current client runtime profile to match the Tibia 15.25 byte contract and keeps the changes behind explicit runtime protocol feature flags.

The goal is to make the current client able to log in and keep running without message boundary debug errors while preserving the existing multiprotocol structure. This is a compatibility update focused on sending and consuming the bytes expected by the current client. It does not implement the full gameplay systems behind the new official windows dialogs rewards shops progression or balance features.

The current profile now enables versioned payload flags for the confirmed 15.25 differences. These flags gate the new packet shapes so the modern client can receive the expected payloads while older profiles do not automatically inherit incompatible message layouts.

The update also adds minimal byte compatible shims for new current client module windows and side dialogs. Taskboard and Soul Seals now have official client packet shims that respond with structurally valid empty windows where the gameplay system is not fully implemented yet. This keeps the client protocol stable without pretending that the complete feature set exists server side.

Several current client payloads were aligned with the 15.25 format. This includes resource balances graphical effects vocation specific data skill wheel weapon proficiency game events quest related payloads store summary parsing and related request parsers.

Main changes included in this commit

• Updates the current client runtime profile to the 15.25 byte contract

• Adds runtime feature flags for confirmed current client payload differences

• Gates 15.25 specific packet layouts behind explicit ProtocolFeature flags

• Adds support for official skill wheel payload differences

• Adds support for official weapon proficiency payload differences

• Adds support for graphical effect source byte differences

• Adds support for official vocation specific player data

• Adds support for official Taskboard packet family handling

• Adds support for official Soul Seals packet family handling

• Adds minimal byte compatible Taskboard shims for the current client

• Adds minimal byte compatible Soul Seals shims for the current client

• Adds explicit parsers for several previously unhandled current client opcodes

• Aligns resource balance request parsing with the current client payload

• Aligns graphical effect payloads with the current client format

• Aligns vocation specific data payloads with the current client format

• Aligns skill wheel payloads including quest bonus and gem list layout

• Aligns weapon proficiency payloads including detail list support

• Aligns game event payloads and related request handling

• Expands GameStore parsing for offer descriptions and events

• Adds stricter packet parsing and trailing byte handling where needed

• Improves protocol aware login logging with richer asset signature details

• Adds a god level protocol probe command for live protocol and message testing

• Documents the 15.25 compatibility scope and versioned payload flags

Protocol profile changes

The current profile mask now includes the new protocol feature flags required by the 15.25 byte contract. These flags allow the server to describe exactly which current client payloads are active instead of tying every behavior only to a raw client version number.

This keeps the compatibility layer safer for multiprotocol support because older profiles can continue using their own packet shapes while the current profile enables the official 15.25 payload differences.

Module shim changes

Taskboard support was added as a minimal official client shim. The server consumes the expected current client packet shape and returns structurally valid empty Taskboard windows. This keeps the client UI protocol satisfied while leaving the full Taskboard gameplay implementation for future work.

Soul Seals support was also added as a minimal official client shim. The server reads the expected request data validates the packet shape and responds with a structurally valid empty placeholder response. This prevents message boundary issues for the current client without implementing the complete Soul Seals system yet.

Payload compatibility changes

The current client expects several packet layouts that differ from older protocol profiles. This commit updates the server to match those confirmed layouts for the active current profile.

The affected areas include skill wheel payloads weapon proficiency details vocation specific player data resource balance requests graphical effects game events store parsing quest related payloads and related packet parsers.

These changes are focused on byte compatibility. They make the packet boundaries and payload shapes stable so the current client can operate without protocol debug breaks.

Bug fixes and robustness improvements

This commit also includes several protocol adjacent fixes found during the compatibility work. Packet parsing was made stricter in selected paths. Quest tracker validation and logging were updated. Store parser state handling was improved by avoiding shared global mutation for the default entries per page value.

The update also fixes precision and argument handling issues in related current client payload paths including level percent casting and forge skill stat argument placement.

Protocol probe tooling

A god only protocol probe command was added for live protocol testing. This gives maintainers a way to test selected protocol and message flows in game while keeping the command restricted to god group access.

The probe tool includes built in probes and file driven local probes, making it useful for reproducing current client packet behavior without exposing the tool to normal players.

Documentation changes

The systems documentation was updated with the 15.25 compatibility scope and multiprotocol feature notes. The documentation explains that this PR is a byte compatibility update and not a full gameplay implementation for every new current client window or system.

It also documents the versioned payload flags so future protocol updates can continue using explicit feature gated packet differences instead of mixing incompatible layouts into shared paths.

Validation performed

• Tested current client login locally

• Tested key current client UI surfaces locally while fixing reported client debug cases

• Confirmed fixes for skill wheel payload boundaries

• Confirmed fixes for character stats payload boundaries

• Confirmed fixes for store summary payload boundaries

• Confirmed fixes for defense stats payload boundaries

• Confirmed fixes for game event payload boundaries

• Confirmed fixes for graphical effect payload boundaries

• Confirmed fixes for related current client request parsers

• Full compile and build validation was not run

Known scope limitation

This commit intentionally does not implement the full gameplay systems behind the new current client windows dialogs rewards shops progression systems or balance features.

The purpose is to stabilize the message shape first. Full gameplay behavior can be implemented later on top of the now compatible packet structure.

Overall this commit brings the current client protocol path in line with the Tibia 15.25 byte contract. It adds explicit feature gated compatibility for confirmed payload differences introduces minimal shims for new official client windows improves parser coverage and documents the compatibility boundary while preserving the existing multiprotocol architecture.
2026-07-06 20:42:40 -03:00
Eduardo Dantas
5ee38ce90a
feat: 15.13 npc module protocol and update NPC Lua scripts (#3982)
This commit standardizes NPC configuration across multiple Lua files by adding explicit profession and speechBubble properties to each affected NPC config.

The goal is to make each NPC role clear in the script itself and keep speech bubble behavior consistent between the server NPC configuration and the client presentation layer. NPCs now explicitly declare whether they are normal NPCs or trader NPCs, instead of relying on implicit or inconsistent defaults.

The profession value was added under npcConfig flags for all affected NPCs. Each NPC now uses either normal or trader depending on its expected role. This makes the NPC intent easier to read and helps avoid ambiguity when future scripts or client side behavior depend on the configured profession.

The speechBubble value was also added to each NPC config. Normal NPCs use SPEECHBUBBLE_NORMAL and trader NPCs use SPEECHBUBBLE_TRADE. This keeps the in game dialogue bubble aligned with the NPC role and improves consistency in how NPCs are displayed to players.

Main changes included in this commit

• Adds explicit profession configuration to affected NPC Lua files

• Uses normal for regular NPCs

• Uses trader for shop and trade related NPCs

• Adds explicit speechBubble configuration to affected NPC Lua files

• Uses SPEECHBUBBLE_NORMAL for normal NPC dialogue presentation

• Uses SPEECHBUBBLE_TRADE for trader NPC dialogue presentation

• Keeps NPC role information visible directly in each NPC config

• Reduces reliance on implicit default behavior

• Improves consistency between NPC server configuration and client side speech bubble rendering

• Aligns server NPC configs with the related client support added in tibia client PR 18

• Preserves existing NPC behavior while making the configuration more explicit

This is a configuration standardization change. It does not rework NPC logic or change the data access flow. The intended behavior remains the same, but the role and speech bubble metadata are now declared consistently so both server and client can interpret NPC presentation more reliably.
2026-07-01 10:12:58 -03:00
Eduardo Dantas
f59ab0cffc
feat: protocol 15.11 (weapon proficiency and new imbuement scroll) (#3845)
Add the WeaponProficiency component with persistent per-weapon
progression, perk selection, experience tracking, and combat bonus
handling.

Implement serialization and deserialization for proficiency data, perk
management, active augments, stat bonuses, critical damage modifiers,
bestiary/boss/powerful foe bonuses, skill/spell percentage bonuses, and
perfect shot handling.

Also add related client support, imbuement scroll/tool flows, new items,
mounts, outfits, achievements, NPC shop updates, scheduled-save
notifications, and loot table adjustments.

Thanks to @phacUFPE and @FelipePaluco for the development base.

Client PR: https://github.com/dudantas/tibia-client/pull/17
---------

Co-authored-by: Felipe <87909998+FelipePaluco@users.noreply.github.com>
Co-authored-by: Pedro Cruz <pedro.ha.cruz2022@gmail.com>
Co-authored-by: Eduardo Dantas<eduardo.dantas@hotmail.com.br>
2026-05-21 14:34:39 -03:00
Eduardo Dantas
a365056651
perf(refactor): implement player container batch updates (#3701)
Introduce centralized BatchUpdate handling for player-owned containers so bulk item mutations can suppress intermediate container refreshes and send one final update when the outermost batch finishes.

Batch affected containers across bulk add, remove, move, stack, stash retrieve, reward/managed loot collection, store inbox delivery, forge/wheel item consumption, paginated container insertion, NPC buy/sell, and loot pouch selling paths.

Also harden related transaction flows by validating purchase constraints before mutation, skipping invalid/protected sell items, and aborting custom currency failures before removing player items.

Add Lua batch helpers and automated coverage for batch lifecycle, deduplication, nested scopes, loot sale batching, and paginated container insertion.
2026-05-21 01:26:37 -03:00
RedSTwix
e4282251ad
fix: server-side quest tracker persistence (#3934)
New Features:
• Server-side quest tracker persistence with per-player options
(auto-track/auto-untrack) and safe initial-sync.

Improvements:
• Robust login/logout sync to prevent lost or empty tracker state.
• Automatic tracking/untracking pipeline with delayed, cancelable
removals.
• Tighter quest/mission progression checks and reduced tracked-quest
limits.

Stability:
• Safer protocol parsing with malformed-packet guards, expanded logging,
and message unread-byte support.
2026-05-06 22:56:15 -03:00
Eduardo Dantas
5e357d8a81
feat: add Way of the Monk quest and monk-related content (#3794)
feat: add Way of the Monk quest, monster updates, and core data improvements

This commit introduces the complete implementation of the Way of the Monk quest, along with multiple updates to monsters, bosses, items, and core gameplay data.

Quest:
• Added full quest definition for Way of the Monk, including mission flow, shrine tracking, and storage handling.
• Registered the new quest module in the quest catalog.
• Introduced new storage keys related to monk quest progression and items.
• Added a sample monk player migration (DB version 55) for testing purposes.
• Added Blue Valley to the towns list to support quest locations.

Monsters and Bosses:
• Added new monster Tame Terror Bird with complete stats, behaviors, and loot.
• Reworked Mitmah Vanguard boss with updated events, attributes, attacks, defenses, elemental modifiers, loot, and lifecycle hooks.
• Expanded loot tables for bosses such as The Brainstealer and The Monster, including monk-related items and potions.

Items and Loot:
• Updated frazzlemaw and guzzlemaw loot to drop traditional sai instead of sai.
• Added monk-related item IDs to destruction scripts and Dawnport cleanup logic.

Gameplay:
• Added Monk’s Apparition to the Soul War quest apparition list.
• Introduced a new combat formula for fist fighting skill.
• Removed legacy fist fighting attack speed configuration from server settings.

Workflow:
• Improved GitHub Actions workflow to ensure reusable checks run on the correct branch.
2026-02-12 23:03:25 -03:00
Luis Pablo
944a050ffd
feat: foxmouse mount action and change mount type (#3783) 2026-01-11 09:51:27 -03:00
Eduardo Dantas
61d0b6e9db
refactor: add gamestore catalog modules (#3738)
This refactors a comprehensive set of modules for the GameStore system,
including constants, helpers, and parsers. The changes establish a
robust foundation for handling store offers, user actions, and
transactions in a modular and maintainable way. The most important
changes are the addition of a detailed constants file, helper functions
for offer handling, and a parser module that manages all store-related
protocol events and purchase logic.

**GameStore System Foundation**

* Added a new `gamestore.constants.lua` file containing all core
constants for the GameStore, such as offer types, sub-actions, action
types, coin types, error codes, packet codes, default values,
descriptions, and item limits. This centralizes configuration and
improves maintainability.

**Helper Functions**

* Introduced `gamestore.helpers.lua` with utility functions for
converting offer types to display types and determining if an offer
requires configuration, improving code reuse and clarity in offer
handling.

**Store Event and Purchase Parsing**

* Added `gamestore.parsers.lua` which handles all GameStore protocol
events, including opening the store, searching offers, buying offers,
transferring coins, and transaction history. This module coordinates
with helpers and senders to process requests and responses, including
error handling and purchase validation.

These changes collectively lay out the structure for a feature-rich,
extensible GameStore system, making future enhancements and debugging
easier.

---------

Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-06 12:33:07 -03:00
André Morais
6f47dfa5dd
fix: buy all regular blessings (#3722)
Refined the logic for purchasing all blessings in the game store,
ensuring that players cannot exceed the maximum blessing count and that
purchases correctly handle partial blessing states. The changes focus on
improving the validation and processing of the "All Blessings" offer to
prevent over-purchasing and to handle edge cases where some blessings
are already at their maximum.

Blessing purchase logic improvements:

- Updated the validation in `Player.canBuyOffer` to check blessings 2
through 8 for maximum count before disabling the "All Blessings" offer,
ensuring players can only buy it if at least one blessing is not maxed.
- Refactored `GameStore.processAllBlessingsPurchase` to add only the
necessary amount of each blessing, respecting the maximum count per
blessing and handling cases where some blessings are already partially
acquired.
2025-10-20 14:58:08 -03:00
Victor
56bd20bb84
feature: gamestore 'new' flag in home offers (#3704)
Fix gamestore homepage offer state display inconsistency by implementing proper state validation logic in sendHomePage() function. This change aligns the homepage behavior with other gamestore functions that already implement correct offer state handling.

Co-authored-by: Madara <158350170+caiozord@users.noreply.github.com>
2025-09-19 14:56:22 -03:00
Luis Pablo
603c23ef07
feature: add missing water floor and fix water bucket id (#3698) 2025-09-13 13:53:49 -03:00
Luis Pablo
4e216a8286
fix: remove spirit of purity mount from store (#3673) 2025-08-31 15:14:17 -03:00
Luis Pablo
1586d8a6d7
enhancement: add buy bulk of carpets and fix magic carpet mount description (#3632) 2025-07-26 21:09:36 -03:00
Luis Pablo
0d74c5e51d
enhancement: add winged druid outfit to store (#3624) 2025-07-26 20:52:16 -03:00
LeoTK
0d253f8330
fix: gamestore exploit (#3515)
Fixed the exploit when holding enter and clicking the buy button multiple times, buying the same item multiple times even though it was charged for each purchase, this was used to stock up on many exp buffs.
2025-07-06 18:45:47 -03:00
Eduardo Dantas
acdba2cdad
feat: protocol 14.12 (#3524)
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
2025-06-08 16:12:15 -03:00
LeoTK
b0a6920027
fix: check value purchase exp boost (#3501)
Related to pr: https://github.com/opentibiabr/canary/pull/3496
2025-04-22 22:59:50 -03:00
LeoTK
f9322d2588
fix: gamestore exp price (#3496)
By making this modification it will work and visually the correct amount
of expboost will be charged.
2025-04-22 11:48:36 -03:00
pudimtibia
4023def380
fix: adjust character limit for player names (#3174) 2024-12-31 13:31:56 -03:00
murilo09
a72c5d05bf
refactor: move blessing bytes to cpp (#3064)
Moving bytes from modules to cpp.
2024-11-13 00:02:48 -03:00
HT Cesta
135866a617
fix: quests from version 11 revised (#2938) 2024-10-30 20:06:46 -03:00
Elson Costa
3aeb3e75d5
feat: cyclopedia improvements (#2629) 2024-07-05 17:44:53 -03:00
Eduardo Dantas
d3ddea0b03
fix: gamestore nil player (#2715)
Related to #2694
2024-06-27 13:58:25 -03:00
Luan Luciano
bfb3149e16
fix: correction in checking inbox:getMaxCapacity() (#2679) 2024-06-22 22:22:26 -03:00
Eduardo Dantas
4af5b2dc18
fix: store UI exhaustion and improve bosslever messages (#2694)
Fixed the store exhaustion to work correctly.

Fixed the boss lever messages to better inform the participants.
2024-06-15 00:14:03 -03:00
Luan Luciano
7c9b8d54fb
fix: xp boost time granted by reward daily (#2586) 2024-04-29 12:39:56 -03:00
Mirkaan
a820101006
fix: typo in gamestore function and remove cooldown for item usage while walking (#2485) 2024-04-26 09:34:58 -03:00
Elson Costa
3fcf585600
fix: improves on gamestore, fix on gitignore and items (#2415) 2024-04-23 09:07:35 -03:00
Luan Luciano
167bae5c75
fix: problem with casks items in the charge loop and adjustment without code (#2505) 2024-04-04 11:48:45 -03:00
Bruno Luís Lucarelo Lamonato
9fb38cabd8
fix: duplicated daily rewards bug (#2503) 2024-04-01 11:50:17 -03:00
Elson Costa
e9e99675c6
fix: global server save and expBoostCount improvements (#2449) 2024-03-18 14:45:11 -03:00
LeoTK
28463c125d
fix: adjustments when purchasing household items (#1940) 2024-02-29 12:34:38 -03:00
Nyel
bbb8e4a97e
fix: gamestore task hunting third slot (#2250)
Fix permanent hunting task slot.
Fixes #2237
2024-02-17 03:18:10 +00:00
Elson Costa
d11856992c
fix: gamestore buy stackable items (#2201)
# Description

- Fixed stackable items in store;
- Created script to remove empty parcels from the store inbox on login.

---------

Co-authored-by: Luan Luciano <luanluciano@outlook.com>
2024-02-14 20:21:13 +00:00
Eduardo Dantas
428acba84d
fix: store related errors (#2154)
Resolves #2153

---------

Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Elson Costa <elsongabriel@hotmail.com>
2024-02-05 14:00:08 +00:00
Eduardo Dantas
e44bd199aa
fix: check store inbox max capacity (#2109)
Resolves #2108
2024-01-17 05:01:56 +00:00
Luan Santos
2874951925
mv: moveable -> movable (#2067)
Just to achieve consistency in the codebase and use the same (more
modern) spelling of the word "movable".
2023-12-30 08:04:58 +00:00
Luan Santos
b3a85eee36
improve: migrate part of daily reward to KV (#2006)
Started moving daily reward to KV since it's easier to share that
between lua/cpp and it's the direction the project is going.

Co-authored-by: Elson Costa <elsongabriel@hotmail.com>
2023-12-29 06:38:38 +00:00
Elson Costa
960936836e
feat: skulled players lose store items config (#2046)
Created config to enable/disable players with red/black lose store items
and moved the validation from script `blessing.lua` to config.

Fixes #2014

---------

Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Luan Santos <github@luan.sh>
Co-authored-by: Luan Santos <git@luan.sh>
2023-12-28 22:43:02 +00:00
Luan Santos
fb4338c399
feat: item ownership (#2003)
This add the ability to set ownership on items. An owned item cannot be
picked up or used by anyone except the character that owns it.

If an owned item is inside a container (backpack, etc) that container is
now also treated as owned. "looking" at an owned item shows you the
owner.

New function:
- `item:setOwner(ownerPlayer or id)`
- `item:getOwnerId()`
- `item:getOwnerName()`
- `item:hasOwner()`
- `item:canBeMoved()`

I also sneaked in some other unrelated improvements that didn't fit any
individual PR in here, but the are pretty small.

---------

Co-authored-by: Eduardo Dantas <eduardo.dantas@hotmail.com.br>
2023-12-28 19:27:17 +00:00
Elson Costa
aeec2a283c
fix: daily reward (#2059)
Free players will win all rewards, and vip/premium players will win
bonus rewards correctly.

Fixes #2051

---------

Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-12-28 18:59:49 +00:00
Elson Costa
9e4c8224e7
fix: adventurer's blessing (#2043)
Players will get the adventurer's blessing until reach the
'adventurersBlessingLevel' level config from your server.
Players in Rookgaard (without vocation) ignore this validation, and be
like a player without blessing.

- Fixed and improved adventurer's blessing.
- Improvement of PR #1743
2023-12-28 18:52:09 +00:00
Luan Santos
cb60cda5fa
feat: namelocks (#2005)
Adds a `/namelock` command to help you ax those offensive names from
your server.
It works by providing the player with a "free" mandatory name change
upon login.

---------

Co-authored-by: Elson Costa <elsongabriel@hotmail.com>
2023-12-28 10:11:05 -08:00
Elson Costa
2f54ccf207
fix: max limit of character name (#2035)
It was increased to the max limit of character name. (can use exiva and other spells and remover to update in config.php of AAC).
2023-12-18 09:07:42 -03:00
Luan Santos
f0fcd2c39b
improve: datapack cleanup/refactor (#2008)
- Fixes #1840 
- Adds some missing achievements
- Adds some missing mounts
- Adds some missing outfits
2023-12-10 15:11:27 -08:00
Elson Costa
ec2b32ee8d
fix: adjusts from other pr (#1970)
- changed return 'false' to 'true' in talkaction (when return is true,
the command isn't showed in chat).
- adjusted '/listplayers' command.
- fixed ids from 'Darkfire Devourer' and 'Spirit of Purity' mounts.
2023-12-09 12:26:50 -08:00
Luan Luciano
e5bd83a669
improve: add context parameter to addString() (#1826)
Make the debug message: "[NetworkMessage::addString] - Value string is
empty" less vague by adding a context parameter to it.

-  addString(value, function)
2023-12-09 11:27:40 -08:00
Eduardo Dantas
c18bf44cc8
improve: migrate hireling skills and outfits to kv system (#1935)
Resolves #1926 

Addressed a conflict between hireling system and gamestore subaction IDs, which led to occasional loss of offers and inconvenienced players who had to repurchase the offers. To resolve this issue, we increased the IDs to larger numbers and conducted a minor system overhaul. This involved transitioning to the use of Key-Value (KV) storage, removing obsolete cache code, and enhancing system clarity and performance for a smoother player experience.

Co-authored-by: Luan Santos <git@luan.sh>
2023-12-02 15:21:30 -03:00
Eduardo Dantas
f4bb861a54
fix: invalid mount offer from store (#1933)
Fixes bug introduced from #1821 

A mount was added that does not yet exist in appearances, until we add a new dat, we will just ignore their existence.
Removed invalid mounts.
2023-11-28 14:33:17 -03:00