Skip to content

fix: bestiary search#1536

Merged
luanluciano93 merged 1 commit intoopentibiabr:mainfrom
gabrielew:fix/bestiary-search
Jan 4, 2026
Merged

fix: bestiary search#1536
luanluciano93 merged 1 commit intoopentibiabr:mainfrom
gabrielew:fix/bestiary-search

Conversation

@gabrielew
Copy link
Copy Markdown
Contributor

Description

Fix bestiary search functionality to properly display search results. The search was failing due to incorrect Lua array indexing and wrong property name for creature data.

Behavior

Actual

When searching for creatures in the bestiary, the search results list was empty or not displaying correctly.

Expected

When searching for creatures:

  • If multiple results are found, display them in a paginated list
image
  • If only one result is found, navigate directly to the creature details

Fixes

# (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Search for a creature name that matches multiple creatures (e.g., "goblin") - displays list of results
  • Search for a creature name that matches only one creature - navigates directly to creature details

Test Configuration:

  • Server Version:
  • Client:
  • Operating System:

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I checked the PR checks reports
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Jan 3, 2026

grepwood pushed a commit to grepwood/otclient that referenced this pull request Jan 5, 2026
libergod added a commit to gabrielew/otclient that referenced this pull request Jan 5, 2026
commit 5c276fa
Author: André Morais <andreoam@gmail.com>
Date:   Mon Jan 5 12:15:09 2026 -0300

    fix: cyclopedia map (opentibiabr#1545)

commit 62f9bb5
Author: divinity76 <hans@loltek.net>
Date:   Mon Jan 5 16:13:36 2026 +0100

    fix: remove vBot upstream version check (opentibiabr#1547)

commit b967b44
Author: Renato Machado <mehahx@gmail.com>
Date:   Sun Jan 4 20:55:57 2026 -0300

    fix(drawpool): guard against nullptr coords when batching

commit 3db1163
Author: Renato Machado <mehahx@gmail.com>
Date:   Sun Jan 4 17:16:21 2026 -0300

    fix: auto-repaint for foreground and map when shader is enabled

commit a751caf
Author: Gabriel Alcântara Bernardes <gabrielalcantaratp@gmail.com>
Date:   Sun Jan 4 10:59:31 2026 -0300

    fix: bestiary search (opentibiabr#1536)

commit 7518e6b
Author: divinity76 <hans@loltek.net>
Date:   Sat Jan 3 14:55:39 2026 +0100

    fix(vbot):  item list scroll to bottom on new entry (opentibiabr#1530)

commit 5466028
Author: kokekanon <114332266+kokekanon@users.noreply.github.com>
Date:   Sat Jan 3 10:55:06 2026 -0300

    fix(vbot): typo in method name: 'hasCreature' to 'hasCreatures' (opentibiabr#1534)

commit a4bd7d4
Author: divinity76 <hans@loltek.net>
Date:   Sat Jan 3 04:26:14 2026 +0100

    fix(vbot): Expose Directions to bot sandbox (opentibiabr#1533)

    Allow doing
    ```lua
    g_game.walk(Directions.South)
    ```
    instead of
    ```lua
    g_game.walk(2)
    ```
    in cavebot waypoint Functions.

    Was in a situation where I needed the cavebot to walk exactly 1 sqm south, and the cavebot's built-in "Go To" command is not reliable for that, when you need precision walking.

commit 8f2959d
Author: Copilot <198982749+Copilot@users.noreply.github.com>
Date:   Fri Jan 2 22:04:04 2026 +0100

    fix: auto loot distance check (opentibiabr#1525)

commit 4067a07
Author: kokekanon <114332266+kokekanon@users.noreply.github.com>
Date:   Fri Jan 2 16:01:03 2026 -0300

    fix: violation rule Windows length opentibiabr#1519 (opentibiabr#1522)

commit e4a07ec
Author: kokekanon <114332266+kokekanon@users.noreply.github.com>
Date:   Thu Jan 1 17:02:18 2026 -0300

    rollback: UIItem onClick fix vbot issues opentibiabr#1520 (opentibiabr#1521)

commit 1e2da94
Author: Renato Machado <mehahx@gmail.com>
Date:   Tue Dec 30 19:08:27 2025 -0300

    improve: use GameDoublePlayerGoodsMoney flag instead of version check for u64 money support

commit b47799e
Author: Gabriel Alcântara Bernardes <gabrielalcantaratp@gmail.com>
Date:   Tue Dec 30 16:40:47 2025 -0300

    feat: stash stow items (opentibiabr#1480)

commit a6856e0
Author: Renato Machado <mehahx@gmail.com>
Date:   Tue Dec 30 15:43:39 2025 -0300

    Revert "fix: detection of Vorbis, VorbisFile and OGG in CMake for non-Windows targets (opentibiabr#1508)"

    This reverts commit 8b68c8b.

commit 8b68c8b
Author: grepwood <4225739+grepwood@users.noreply.github.com>
Date:   Tue Dec 30 18:30:42 2025 +0100

    fix: detection of Vorbis, VorbisFile and OGG in CMake for non-Windows targets (opentibiabr#1508)

commit 3fe17bf
Author: Renato Machado <mehahx@gmail.com>
Date:   Tue Dec 30 13:20:28 2025 -0300

    perf: parallelize draw pipeline (FOREGROUND starts collecting without waiting MAP preLoad) (opentibiabr#1510)

commit 0c17f86
Author: Renato Machado <mehahx@gmail.com>
Date:   Tue Dec 30 13:20:17 2025 -0300

    feat: add public config.ini support for client-exposed settings (opentibiabr#1513)

commit b263bc8
Author: kokekanon <114332266+kokekanon@users.noreply.github.com>
Date:   Tue Dec 30 13:18:32 2025 -0300

    fix: hook flag in protobuf opentibiabr#1482 (opentibiabr#1517)

commit a43c1ca
Author: kokekanon <114332266+kokekanon@users.noreply.github.com>
Date:   Tue Dec 30 13:18:17 2025 -0300

    fix: modules html opentibiabr#1505 opentibiabr#1506 (opentibiabr#1516)

commit ce858a2
Author: SkullzOTS <86809689+SkullzOTS@users.noreply.github.com>
Date:   Tue Dec 30 13:17:38 2025 -0300

    fix: android (opentibiabr#1515)

commit a7251bc
Author: André Morais <andreoam@gmail.com>
Date:   Tue Dec 30 01:30:37 2025 -0300

    fix: market value format (opentibiabr#1509)

commit 6e2c568
Author: javiertringol <javier.tringo@gmail.com>
Date:   Mon Dec 29 14:04:56 2025 -0300

    fix: opentibiabr#1501 Mouse Control Mode save (opentibiabr#1503)

commit 285a906
Author: Renato Machado <mehahx@gmail.com>
Date:   Mon Dec 29 13:01:49 2025 -0300

    perf: streamline DrawPool repaint flow and reduce hot-path overhead

    Refines the DrawPool repaint flow by simplifying canRepaint() and adjusting release() / repaint() to avoid unnecessary work. Reduces synchronization overhead by switching hot-path atomics to memory_order_relaxed (e.g. LightView, TextureAtlas), removes redundant logic in DrawPoolManager’s pre-draw flow, and makes draw-hash reset behavior more consistent.

    Results: +5.46% performance

commit 5bbc87d
Author: Renato Machado <mehahx@gmail.com>
Date:   Fri Dec 26 23:14:30 2025 -0300

    chore: cleanup attachedEffect

commit fe99915
Author: Renato Machado <mehahx@gmail.com>
Date:   Fri Dec 26 23:12:13 2025 -0300

    feat: add followOwner flag to the attachedEffect system so effects can follow the owner during bounce

commit ccdb09b
Author: Renato Machado <mehahx@gmail.com>
Date:   Fri Dec 26 18:47:54 2025 -0300

    fix: don’t force creature bounce on attached effects

    Attached effects should not automatically inherit the owner’s bounce. When needed, reuse the same bounce/elevation data used by the creature. For visuals that must always stay bound to the character (e.g., wings), use the paperdoll system.

commit aafef1c
Author: Renato Machado <mehahx@gmail.com>
Date:   Wed Dec 24 13:46:36 2025 -0300

    feat: paperdoll (Ho Ho Ho!!!) (opentibiabr#1500)

commit b3bee2b
Author: Avaji <103899149+AvajiOT@users.noreply.github.com>
Date:   Tue Dec 23 14:41:31 2025 -0500

    fix: Adding datdump cpp/h to vcxproj (opentibiabr#1499)

commit 318ed83
Author: divinity76 <hans@loltek.net>
Date:   Tue Dec 23 19:18:15 2025 +0100

    feat: add dat dump cli (opentibiabr#1492)

commit 4ff2d4b
Author: divinity76 <hans@loltek.net>
Date:   Tue Dec 23 18:09:41 2025 +0100

    fix: handle floor-change tiles in walk logic (opentibiabr#1494)

commit 3442323
Author: divinity76 <hans@loltek.net>
Date:   Tue Dec 23 18:04:21 2025 +0100

    fix: f(char*) f(std::string) + replace c_str() with data() (opentibiabr#1485)

commit 0005d3e
Author: divinity76 <hans@loltek.net>
Date:   Tue Dec 23 18:04:06 2025 +0100

    fix: optimize color tolower (opentibiabr#1490)

commit 81ccbd8
Author: divinity76 <hans@loltek.net>
Date:   Tue Dec 23 18:03:48 2025 +0100

    ci/cd: fix emscripten build (opentibiabr#1491)

commit 7b132aa
Author: Luan Luciano <luanluciano@outlook.com>
Date:   Sun Dec 21 12:06:28 2025 -0300

    feat: compatibility with 15.11 (only bytes)

    Co-authored-by: kokekanon <114332266+kokekanon@users.noreply.github.com>

commit 9d485b5
Author: divinity76 <hans@loltek.net>
Date:   Sat Dec 20 02:04:21 2025 +0100

    fix: cleanup unused sha1 (opentibiabr#1486)

commit dad1f4d
Author: Renato Machado <mehahx@gmail.com>
Date:   Thu Dec 18 21:41:54 2025 -0300

    fix(localplayer): avoid forced step to next tile when overlapping passable creatures (thx @nekiro)

commit 0646982
Author: divinity76 <hans@loltek.net>
Date:   Tue Dec 16 17:06:20 2025 +0100

    fix: capacity scaling for 7.6 protocol

    Co-authored-by: kokekanon <114332266+kokekanon@users.noreply.github.com>

commit eb656a7
Author: Renato Machado <mehahx@gmail.com>
Date:   Sun Dec 7 16:07:50 2025 -0300

    fix: avoid concurrent thing texture loading with atomic flag

commit dc2ff31
Author: Renato Machado <mehahx@gmail.com>
Date:   Sun Dec 7 16:03:15 2025 -0300

    fix: rare crash on close client

commit 1d26861
Author: Renato Machado <mehahx@gmail.com>
Date:   Sat Dec 6 14:24:44 2025 -0300

    fix(hash): resolve compilation issues on x86 platforms

commit 730835a
Author: Renato Machado <mehahx@gmail.com>
Date:   Fri Dec 5 23:33:10 2025 -0300

    fix(hud): make crosshair and attached widgets respect HUD scale (fix opentibiabr#1436)

commit 3aa478e
Author: Renato Machado <mehahx@gmail.com>
Date:   Fri Dec 5 23:13:07 2025 -0300

    fix(draw): wait for all draw pools to finish before processing next cycle (fix opentibiabr#1472)

commit 8a0d43b
Author: Renato Machado <mehahx@gmail.com>
Date:   Fri Dec 5 22:27:35 2025 -0300

    fix(drawpool): set repaint flag only after preparing draw objects

commit a47fdf2
Author: Renato Machado <mehahx@gmail.com>
Date:   Fri Dec 5 22:25:03 2025 -0300

    feat(drawpool): add hash support to addAction

commit cb29a60
Author: Renato Machado <mehahx@gmail.com>
Date:   Fri Dec 5 19:51:35 2025 -0300

    fix: ThingType loading sets default boolean to false

commit 66c2ad7
Author: kokekanon <114332266+kokekanon@users.noreply.github.com>
Date:   Tue Dec 2 11:04:00 2025 -0300

    fix: skill Miniwindows in Old protocol (opentibiabr#1477)

commit acc928e
Author: Renato Machado <mehahx@gmail.com>
Date:   Sun Nov 30 20:53:30 2025 -0300

    feat: add recursive loading for style files

commit 8fa1bce
Author: kokekanon <114332266+kokekanon@users.noreply.github.com>
Date:   Fri Nov 28 14:42:43 2025 -0300

    fix: protocol 12.91 (opentibiabr#1478)

commit fa77ad0
Author: Renato Machado <mehahx@gmail.com>
Date:   Mon Nov 24 21:21:08 2025 -0300

    improve: use `addEvent` instead of `scheduleEvent` to trigger the `onGameStart` event

commit fc57601
Author: Renato Machado <mehahx@gmail.com>
Date:   Mon Nov 24 20:03:01 2025 -0300

    feat: enable atlas in UI (opentibiabr#1471)

commit 806c9c7
Author: Renato Machado <mehahx@gmail.com>
Date:   Mon Nov 24 19:51:52 2025 -0300

    chore: cleanup leftover anti-bot logic

commit 7d57547
Author: kokekanon <114332266+kokekanon@users.noreply.github.com>
Date:   Sun Nov 23 21:56:52 2025 -0300

    fix: compilation Encryption Mode (opentibiabr#1474)

commit c0dd2a7
Author: kokekanon <114332266+kokekanon@users.noreply.github.com>
Date:   Sun Nov 23 21:56:46 2025 -0300

    fix: compilation in FRAMEWORK_EDITOR (opentibiabr#1473)

commit 7cd36e2
Author: kokekanon <114332266+kokekanon@users.noreply.github.com>
Date:   Sat Nov 22 10:23:43 2025 -0300

    fix: prevent ERROR: /game_battle/battle.lua:20: stack overflow (opentibiabr#1470)

commit 8ffba36
Author: kokekanon <114332266+kokekanon@users.noreply.github.com>
Date:   Fri Nov 21 20:55:38 2025 -0300

    fix: opentibiabr#1460 Failed to fetch sprite (opentibiabr#1468)

commit 34c52dc
Author: kokekanon <114332266+kokekanon@users.noreply.github.com>
Date:   Fri Nov 21 16:21:07 2025 -0300

    fix. NPC message text duplication in console (opentibiabr#1469)

commit a6ee810
Author: kokekanon <114332266+kokekanon@users.noreply.github.com>
Date:   Thu Nov 20 21:49:23 2025 -0300

    fix: prevent WARNING: Lua warning: member function call skipped becau… (opentibiabr#1467)

commit f726bb0
Author: SkullzOTS <86809689+SkullzOTS@users.noreply.github.com>
Date:   Thu Nov 20 16:55:02 2025 -0300

    feat: dragging item icon (opentibiabr#1466)

commit 67460c0
Author: Eduardo Dantas <eduardo.dantas@hotmail.com.br>
Date:   Thu Nov 20 02:08:02 2025 -0300

    refactor: string encoding to use utf8cpp and add tests (opentibiabr#1443)

    Update string encoding implementation to use utf8cpp

    This change updates the string encoding implementation to use the utf8cpp library for improved robustness and consistency across platforms. It refactors the encoding functions in src/framework/stdext/string.cpp, adds comprehensive unit tests, updates build configurations to include utf8cpp, and documents the new encoding policy and behavior.

    String encoding improvements

    Refactored all string encoding functions in src/framework/stdext/string.cpp to use the utf8cpp library, providing strict UTF-8 validation, robust conversions between UTF-8, Latin-1, and UTF-16, and consistent error handling.

    Added a new documentation file docs/string-encoding-policy.md detailing the updated encoding policy, error handling, dependencies, and testing strategy.

    Testing enhancements

    Added a new unit test suite in tests/stdext/string_encoding_test.cpp covering UTF-8 validation, conversions, roundtrip consistency, control character handling, and platform-specific UTF-16 conversions.

    Updated the test build configuration to include the new test directory and sources.

    Build system updates

    Updated src/CMakeLists.txt to require and link the utf8cpp library for all platforms, ensuring proper integration.

    Added utf8cpp as a dependency in vcpkg.json for package management.

commit bf6e3c5
Author: cynio <dominik.smolinski19@gmail.com>
Date:   Wed Nov 19 22:32:45 2025 +0100

    fix(game_console): WASD toggle for game_hotkeys (opentibiabr#1461)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants