Skip to content

feat: migrate core Lua functions to Sol2#3816

Draft
beats-dh wants to merge 4 commits into
mainfrom
fix/lua-sol2-bindings
Draft

feat: migrate core Lua functions to Sol2#3816
beats-dh wants to merge 4 commits into
mainfrom
fix/lua-sol2-bindings

Conversation

@beats-dh

@beats-dh beats-dh commented Jan 26, 2026

Copy link
Copy Markdown
Contributor

Description

This Pull Request implements the migration of the core Lua bindings (Game, Bank, and Config namespaces) to the Sol2 library. This feature modernizes the codebase by replacing the legacy manual Lua C API with Sol2's high-level, type-safe C++ bindings.

Features

  • Sol2 Integration: Added sol2 as a project dependency in vcpkg.json and updated CMake configuration (BaseConfig.cmake, CanaryLib.cmake) to link against it.
  • Game Namespace: Complete rewrite of GameFunctions (game_functions.cpp) to use Sol2, covering all game-related logic (items, monsters, players, etc.).
  • Bank Namespace: Complete rewrite of BankFunctions (bank_functions.cpp) to use Sol2 for bank and transfer operations.
  • Config Namespace: Complete rewrite of ConfigFunctions (config_functions.cpp) to use Sol2, including automatic enum exposure for configuration keys.

Benefits

  • Modernization: Removes verbose and error-prone manual Lua stack manipulation.
  • Type Safety: Utilizes Sol2's automatic type checking and conversion mechanisms.
  • Maintainability: Significantly cleaner and more readable binding code.

Compatibility

  • Backward Compatible: All bindings are designed to match the existing Lua API signatures exactly.
  • Legacy Support: Includes helper mechanisms to attach legacy metatables (e.g., Creature, Item, ItemClassification) to objects returned by Sol2, ensuring existing scripts continue to work without modification.
  • Lua Tables: Functions returning collections are converted to standard Lua tables to maintain compatibility with pairs() and unpack().

Summary by CodeRabbit

  • Refactor
    • Modernized internal Lua scripting implementation for bank, configuration, and game-related operations. Added new dependency to support improved scripting infrastructure.

@coderabbitai

coderabbitai Bot commented Jan 26, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 57d13379-eb44-4583-8c53-ae2cb6efcaf0

📥 Commits

Reviewing files that changed from the base of the PR and between 37625c1 and d9fec4f.

📒 Files selected for processing (1)
  • cmake/modules/BaseConfig.cmake

📝 Walkthrough

Walkthrough

The PR introduces sol2 as a dependency and systematically migrates Lua-C++ bindings from the raw Lua C API to sol2-based bindings across multiple game function modules, including updates to public interfaces and internal state management.

Changes

Cohort / File(s) Summary
Dependency Configuration
cmake/modules/BaseConfig.cmake, vcpkg.json
Added sol2 as a required CMake package and vcpkg dependency; updated vcpkg baseline hash.
Lua Environment
src/lua/scripts/lua_environment.hpp, src/lua/scripts/lua_environment.cpp
Integrated sol2 state management; added solState member and getSolState() accessor to track sol::state_view.
Bank Bindings
src/lua/functions/core/game/bank_functions.hpp, src/lua/functions/core/game/bank_functions.cpp
Converted 8 individual Lua C API binding functions to unified sol2-based table bindings; refactored getBank signature from lua_State*, int32_t to sol::object for flexible argument handling.
Config Bindings
src/lua/functions/core/game/config_functions.hpp, src/lua/functions/core/game/config_functions.cpp
Replaced 4 individual Lua binding functions with sol2-based configManager table bindings; migrated enum exposure to configKeys table with sol2 patterns.
Game Bindings
src/lua/functions/core/game/game_functions.hpp, src/lua/functions/core/game/game_functions.cpp
Systematically replaced 40+ individual Lua C API binding functions with consolidated sol2-based Game table; introduced helper wrappers for legacy metatable objects and modernized parameter parsing.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Suggested reviewers

  • dudantas
  • majestyotbr

Poem

🐰 With sol2 we hop so bright,
Bindings dance in modern light,
No more C API in sight—
Lua tables now unified right! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: migrating core Lua functions from the C API to Sol2, which is the primary objective across all modified files (GameFunctions, BankFunctions, ConfigFunctions).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/lua-sol2-bindings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Replaces manual Lua C API bindings for bank, config, and game functions with sol2-based bindings, simplifying code and improving maintainability. Updates CMake to require sol2 and links it in the build. Removes legacy Lua stack manipulation and introduces more idiomatic C++/sol2 code for exposing functions and objects to Lua scripts. Updates function signatures and object handling to use sol::object and sol::state_view, and modernizes the way enums and tables are exposed to Lua.
@beats-dh beats-dh force-pushed the fix/lua-sol2-bindings branch from f4cb397 to c61c6b4 Compare January 26, 2026 01:58
@beats-dh beats-dh changed the title Fix Lua userdata issues and ambiguous calls in GameFunctions (Sol2 migration) Refactor Lua bindings to use Sol2 Jan 26, 2026
@beats-dh beats-dh changed the title Refactor Lua bindings to use Sol2 feat: migrate core Lua functions to Sol2 Jan 26, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/lua/functions/core/game/bank_functions.cpp`:
- Around line 122-133: The current deposit flow calls
g_game().removeMoney(player, amount) && bank->credit(amount) (and similarly for
destination->credit) which can remove money then fail to credit; change this to
perform the steps explicitly: call g_game().removeMoney(player, amount) and if
that returns false return false immediately; otherwise attempt credit on the
Bank instance (or destination returned by getBank(destinationObj.value())); if
credit succeeds return true, but if credit fails call g_game().addMoney(player,
amount) to rollback the removal, log/report the failure (e.g., via
Lua::reportErrorFunc or process logger), and return false. Update both the
default Bank creation path (Bank(player) / bank->credit) and the custom
destination path (getBank(...) / destination->credit) accordingly.
🧹 Nitpick comments (6)
src/lua/scripts/lua_environment.hpp (1)

56-67: Avoid exposing mutable internal state through public accessors.

The getSolState() method currently returns a non-const reference to solState, which theoretically allows external callers to mutate the optional. Although the method is currently unused in the codebase, returning a const reference aligns with the encapsulation pattern—all state mutations are properly handled via internal emplace() and reset() calls in the initialization and cleanup paths.

♻️ Suggested change
-    std::optional<sol::state_view> &getSolState() {
-        return solState;
-    }
+    const std::optional<sol::state_view> &getSolState() const {
+        return solState;
+    }
src/lua/scripts/lua_environment.cpp (1)

87-89: Reset solState before calling lua_close.

The solState is a view over luaState. Calling lua_close(luaState) on line 87 invalidates the underlying Lua state, but solState.reset() is called on line 89 afterward. While this may not cause immediate issues since reset() just clears the optional, it's safer and clearer to reset the view before destroying what it references.

Suggested reorder
+	solState.reset();
 	lua_close(luaState);
 	luaState = nullptr;
-	solState.reset();
src/lua/functions/core/game/config_functions.cpp (1)

22-32: Consider validating enum keys before casting.

The bindings cast uint32_t directly to ConfigKey_t without validating that the value corresponds to a valid enum member. If Lua scripts pass invalid keys, this could lead to undefined behavior in g_configManager().

Example validation pattern
 configManager.set_function("getString", [](uint32_t key) {
+    auto enumKey = magic_enum::enum_cast<ConfigKey_t>(key);
+    if (!enumKey.has_value()) {
+        Lua::reportErrorFunc("Invalid config key");
+        return std::string{};
+    }
-    return g_configManager().getString(static_cast<ConfigKey_t>(key));
+    return g_configManager().getString(enumKey.value());
 });
src/lua/functions/core/game/bank_functions.cpp (1)

39-49: Polymorphic return type may confuse callers.

The balance function returns either a uint64_t (balance value) or false (on error). Lua scripts need to check the type of the return value. Consider documenting this behavior or using a more explicit error signaling pattern.

src/lua/functions/core/game/game_functions.cpp (2)

123-143: Consider validating position table fields.

Using get_or(0) for position coordinates means malformed position tables silently default to (0, 0, 0). This could lead to unexpected behavior. Consider validating required fields or using a consistent position parsing helper.


671-703: Consider reusing achievementToTable for consistency.

The getAchievementInfoById and getAchievementInfoByName functions duplicate the table construction logic that's already captured in the achievementToTable lambda defined on lines 705-714.

Suggested consolidation
 game.set_function("getAchievementInfoById", [](uint16_t id, sol::this_state s) -> sol::object {
     const Achievement achievement = g_game().getAchievementById(id);
     if (achievement.id == 0) {
         Lua::reportErrorFunc("Achievement id is wrong");
         return sol::object(sol::lua_nil);
     }
-    sol::state_view L = s;
-    sol::table t = L.create_table();
-    t["id"] = achievement.id;
-    t["name"] = achievement.name;
-    t["description"] = achievement.description;
-    t["points"] = achievement.points;
-    t["grade"] = achievement.grade;
-    t["secret"] = achievement.secret;
-    return t;
+    return achievementToTable(sol::state_view(s), achievement);
 });

Note: This requires moving achievementToTable definition before its usage or restructuring the bindings.

Comment on lines +122 to +133
if (!destinationObj) {
auto bank = std::make_shared<Bank>(player);
return g_game().removeMoney(player, amount) && bank->credit(amount);
}

const auto &destination = getBank(destinationObj.value());
if (!destination) {
Lua::reportErrorFunc("Destination is nullptr");
return false;
}
return g_game().removeMoney(player, amount) && destination->credit(amount);
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# Search for addMoney, giveMoney and related money manipulation functions
rg -n "addMoney|giveMoney" --type cpp -A 2

Repository: opentibiabr/canary

Length of output: 2263


🏁 Script executed:

# Get the full context of the deposit function (lines 109-133)
sed -n '109,133p' src/lua/functions/core/game/bank_functions.cpp

Repository: opentibiabr/canary

Length of output: 819


🏁 Script executed:

# Search for removeMoney function signature
rg -n "removeMoney" --type cpp -B 2 -A 5 | head -50

Repository: opentibiabr/canary

Length of output: 5519


🏁 Script executed:

# Search for credit function in Bank class
rg -n "credit" --type cpp -B 2 -A 5 | head -50

Repository: opentibiabr/canary

Length of output: 3135


Add rollback logic to prevent money loss on deposit failure.

The deposit logic uses g_game().removeMoney(player, amount) && bank->credit(amount). If removeMoney succeeds but credit fails, the player loses money without it being credited to the bank. Since both functions must succeed together, add explicit error handling with rollback using addMoney():

Suggested safer pattern
-		return g_game().removeMoney(player, amount) && bank->credit(amount);
+		if (!g_game().removeMoney(player, amount)) {
+			return false;
+		}
+		if (!bank->credit(amount)) {
+			// Rollback: return money to player
+			g_game().addMoney(player, amount);
+			return false;
+		}
+		return true;

Apply the same fix to line 132 for the custom destination case.

🤖 Prompt for AI Agents
In `@src/lua/functions/core/game/bank_functions.cpp` around lines 122 - 133, The
current deposit flow calls g_game().removeMoney(player, amount) &&
bank->credit(amount) (and similarly for destination->credit) which can remove
money then fail to credit; change this to perform the steps explicitly: call
g_game().removeMoney(player, amount) and if that returns false return false
immediately; otherwise attempt credit on the Bank instance (or destination
returned by getBank(destinationObj.value())); if credit succeeds return true,
but if credit fails call g_game().addMoney(player, amount) to rollback the
removal, log/report the failure (e.g., via Lua::reportErrorFunc or process
logger), and return false. Update both the default Bank creation path
(Bank(player) / bank->credit) and the custom destination path (getBank(...) /
destination->credit) accordingly.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Updated vcpkg baseline to 2026.01.16 (23dc124705fcac41cf35c33dd9541f5094a9c19f)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@vcpkg.json`:
- Line 20: The vcpkg manifest currently lists only "sol2" which is header-only
and requires an explicit Lua implementation; update vcpkg.json to include either
the "lua" or "luajit" port alongside "sol2" in the dependencies array (e.g., add
"lua" or "luajit" next to "sol2") and, if your chosen Lua/LuaJIT was built with
C++ linkage, ensure the appropriate compile definition (SOL_USING_CXX_LUA or
SOL_USING_CXX_LUA_JIT) is applied in your build configuration.

Comment thread vcpkg.json
"parallel-hashmap",
"protobuf",
"pugixml",
"sol2",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

Sol2 LuaJIT Lua compatibility requirements vcpkg port

💡 Result:

  • sol2 (Sol3) is header-only and does not ship Lua/LuaJIT; the vcpkg sol2 port has no dependency on lua or luajit (only build helpers), so your vcpkg port/manifest must add the Lua implementation you want (typically luajit or lua). [1]
  • LuaJIT compatibility (what sol2 expects):
    • sol2 supports Lua 5.1/5.2/5.3+ and LuaJIT (2.0.4+ and 2.1.x betas), using its own compatibility header to provide 5.2/5.3-style APIs when building against Lua 5.1 / LuaJIT. [2][3]
    • If you already provide your own Lua compatibility layer, you can disable sol2’s by defining SOL_NO_COMPAT=1 before including sol.hpp. [3]
  • vcpkg pieces you typically combine:
    • Install/use sol2 + luajit (LuaJIT is Lua-5.1 API/ABI oriented) or sol2 + lua (vanilla Lua). The vcpkg luajit port is available (with some platform limits), and lua is a separate port. [4][5]
  • Linkage note (only if you built Lua/LuaJIT as C++): sol2 has config defines like SOL_USING_CXX_LUA / SOL_USING_CXX_LUA_JIT to stop wrapping Lua headers in extern "C", but you should only use these if your Lua/LuaJIT was built with C++ linkage. [6]

Sources:
[1] vcpkg.link sol2 port metadata (dependencies) (vcpkg.link)
[2] sol2 “features” / supported Lua & LuaJIT versions (sol2.readthedocs.io)
[3] sol2 compatibility.hpp docs + SOL_NO_COMPAT (sol2.readthedocs.io)
[4] vcpkg luajit package page (vcpkg.io)
[5] vcpkg lua port page (vcpkg.link)
[6] sol2 config/safety docs (SOL_USING_CXX_LUA(_JIT)) (sol2.readthedocs.io)

Citations:


🌐 Web query:

Sol2 library Lua version requirements compile definitions

💡 Result:

  • Supported Lua versions (sol2/sol3): sol2 supports Lua 5.1+ (including Lua 5.2/5.3/5.4) and LuaJIT 2.0+ (MoonJIT included). [1]
  • Selecting a Lua version in sol2’s CMake build: when building Lua as part of sol2, set SOL2_LUA_VERSION (e.g., 5.1, 5.2, 5.3, 5.4, LuaJIT, or a specific version like 5.4.4). [2]
  • Common compile definitions (preprocessor macros) you may need:
    • SOL_ALL_SAFETIES_ON=1 to enable sol’s safer checking paths (otherwise safety features default to off). [4]
    • SOL_NO_COMPAT=1 to disable sol’s internal Lua 5.2/5.3-compat layer (useful if you already provide your own compat layer or hit redefinition conflicts). [5]
    • Lua integration-related macros mentioned by sol2: SOL_USING_CXX_LUA, SOL_USING_CXX_LUAJIT, SOL_USE_LUA_HPP. [3]
  • Lua version detection in code: sol2 adapts based on the detected Lua environment and exposes Lua-version-specific compile-time checks/macros (e.g., guidance mentions checking SOL_LUA_VERSION_I_ for version-specific code paths). [3]

Sources: [1] [2] [3] [4] [5]


Ensure lua or luajit is explicitly added to dependencies.

The vcpkg sol2 port is header-only with no direct dependency on lua or luajit—you must add your chosen Lua implementation as a separate dependency in vcpkg.json. Sol2 supports Lua 5.1+ and LuaJIT 2.0+, so either port will work. Compile definitions like SOL_USING_CXX_LUA or SOL_USING_CXX_LUA_JIT are only needed if your Lua/LuaJIT was built with C++ linkage.

🤖 Prompt for AI Agents
In `@vcpkg.json` at line 20, The vcpkg manifest currently lists only "sol2" which
is header-only and requires an explicit Lua implementation; update vcpkg.json to
include either the "lua" or "luajit" port alongside "sol2" in the dependencies
array (e.g., add "lua" or "luajit" next to "sol2") and, if your chosen
Lua/LuaJIT was built with C++ linkage, ensure the appropriate compile definition
(SOL_USING_CXX_LUA or SOL_USING_CXX_LUA_JIT) is applied in your build
configuration.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Updated vcpkg baseline to 2026.01.16 (66c0373dc7fca549e5803087b9487edfe3aca0a1)

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions Bot added the Stale No activity label Mar 16, 2026
@sonarqubecloud

sonarqubecloud Bot commented Apr 3, 2026

Copy link
Copy Markdown

@vllsystems

Copy link
Copy Markdown
Contributor

Ao usar !deposit all, ou valor, !balance.

[2026-03-04 14:47:07.141] [error] Lua Script Error Detected
---------------------------------------
Interface: Scripts Interface
Script ID: C:\canary\data/scripts\talkactions\player\bank.lua:callback
Function: BankFunctions::init::<lambda_8>::<lambda_invoker_cdecl>
Error Description: Player not found
Stack Trace:
Player not found
stack traceback:
        [C]: in function 'deposit'
        C:\canary\data/scripts\talkactions\player\bank.lua:35: in function <C:\canary\data/scripts\talkactions\player\bank.lua:23>
---------------------------------------

[2026-03-04 14:47:09.616] [error] Lua Script Error Detected
---------------------------------------
Interface: Scripts Interface
Script ID: C:\canary\data/scripts\talkactions\player\bank.lua:callback
Function: BankFunctions::init::<lambda_3>::<lambda_invoker_cdecl>
Error Description: Bank is nullptr
Stack Trace:
Bank is nullptr
stack traceback:
        [C]: in function 'balance'
        C:\canary\data/scripts\talkactions\player\bank.lua:13: in function <C:\canary\data/scripts\talkactions\player\bank.lua:12>
---------------------------------------

[2026-03-04 14:47:09.617] [error] Lua Script Error Detected
---------------------------------------
Interface: Scripts Interface
Script ID: C:\canary\data/scripts\talkactions\player\bank.lua:callback
Error Description: data/libs/functions/functions.lua:931: attempt to index local 'int' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/libs/functions/functions.lua:931: in function 'FormatNumber'
        C:\canary\data/scripts\talkactions\player\bank.lua:13: in function <C:\canary\data/scripts\talkactions\player\bank.lua:12>
---------------------------------------

@vllsystems

Copy link
Copy Markdown
Contributor

Ao usar !deposit all, ou valor, !balance.

[2026-03-04 14:47:07.141] [error] Lua Script Error Detected
---------------------------------------
Interface: Scripts Interface
Script ID: C:\canary\data/scripts\talkactions\player\bank.lua:callback
Function: BankFunctions::init::<lambda_8>::<lambda_invoker_cdecl>
Error Description: Player not found
Stack Trace:
Player not found
stack traceback:
        [C]: in function 'deposit'
        C:\canary\data/scripts\talkactions\player\bank.lua:35: in function <C:\canary\data/scripts\talkactions\player\bank.lua:23>
---------------------------------------

[2026-03-04 14:47:09.616] [error] Lua Script Error Detected
---------------------------------------
Interface: Scripts Interface
Script ID: C:\canary\data/scripts\talkactions\player\bank.lua:callback
Function: BankFunctions::init::<lambda_3>::<lambda_invoker_cdecl>
Error Description: Bank is nullptr
Stack Trace:
Bank is nullptr
stack traceback:
        [C]: in function 'balance'
        C:\canary\data/scripts\talkactions\player\bank.lua:13: in function <C:\canary\data/scripts\talkactions\player\bank.lua:12>
---------------------------------------

[2026-03-04 14:47:09.617] [error] Lua Script Error Detected
---------------------------------------
Interface: Scripts Interface
Script ID: C:\canary\data/scripts\talkactions\player\bank.lua:callback
Error Description: data/libs/functions/functions.lua:931: attempt to index local 'int' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/libs/functions/functions.lua:931: in function 'FormatNumber'
        C:\canary\data/scripts\talkactions\player\bank.lua:13: in function <C:\canary\data/scripts\talkactions\player\bank.lua:12>
---------------------------------------
[2026-03-04 15:00:22.760] [error] Lua Script Error Detected
---------------------------------------
Interface: Scripts Interface
Script ID: C:\canary\data-otservbr-global/npc\naji.lua:callback
Function: BankFunctions::init::<lambda_8>::<lambda_invoker_cdecl>
Error Description: Player not found
Stack Trace:
Player not found
stack traceback:
        [C]: in function 'depositMoney'
        data/npclib/npc_system/bank_system.lua:136: in function 'parseBank'
        C:\canary\data-otservbr-global/npc\naji.lua:68: in function 'callback'
        data/npclib/npc_system/npc_handler.lua:451: in function 'onSay'
        C:\canary\data-otservbr-global/npc\naji.lua:52: in function <C:\canary\data-otservbr-global/npc\naji.lua:51>
---------------------------------------

@vllsystems

Copy link
Copy Markdown
Contributor

Quando spamma talkaction de banco.

 	canary.exe!sol::stack::stack_detail::eval<0,sol::argument_handler<sol::types<bool,std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>>> &,sol::wrapper<bool (__cdecl*)(std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>),void>::caller,bool (__cdecl*&)(std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>),std::shared_ptr<Player> &,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>>(sol::types<> <args_0>, std::integer_sequence<unsigned __int64> <args_1>, lua_State * <args_2>, int <args_3>, sol::argument_handler<sol::types<bool,std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>>> & __formal, sol::stack::record & __formal, sol::wrapper<bool (__cdecl*)(std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>),void>::caller && __formal, bool(*)(std::shared_ptr<Player>, sol::basic_object<sol::basic_reference<0>>, sol::optional<sol::basic_object<sol::basic_reference<0>>>) & __formal, std::shared_ptr<Player> & __formal, sol::basic_object<sol::basic_reference<0>> && __formal, sol::optional<sol::basic_object<sol::basic_reference<0>>> && fx) Linha 148	C++
 	canary.exe!sol::stack::stack_detail::eval<0,sol::optional<sol::basic_object<sol::basic_reference<0>>>,2,sol::argument_handler<sol::types<bool,std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>>> &,sol::wrapper<bool (__cdecl*)(std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>),void>::caller,bool (__cdecl*&)(std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>),std::shared_ptr<Player> &,sol::basic_object<sol::basic_reference<0>>>(sol::types<sol::optional<sol::basic_object<sol::basic_reference<0>>>> L_, std::integer_sequence<unsigned __int64,2> tracking_, lua_State * <fxargs__0>, int <fxargs__1>, sol::argument_handler<sol::types<bool,std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>>> & <fxargs__2>, sol::stack::record & __formal, sol::wrapper<bool (__cdecl*)(std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>),void>::caller && __formal, bool(*)(std::shared_ptr<Player>, sol::basic_object<sol::basic_reference<0>>, sol::optional<sol::basic_object<sol::basic_reference<0>>>) & start_index_, std::shared_ptr<Player> & handler_, sol::basic_object<sol::basic_reference<0>> && fx_) Linha 174	C++
 	canary.exe!sol::stack::stack_detail::eval<0,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>,1,2,sol::argument_handler<sol::types<bool,std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>>> &,sol::wrapper<bool (__cdecl*)(std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>),void>::caller,bool (__cdecl*&)(std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>),std::shared_ptr<Player> &>(sol::types<sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>> L_, std::integer_sequence<unsigned __int64,1,2> tracking_, lua_State * <fxargs__0>, int <fxargs__1>, sol::argument_handler<sol::types<bool,std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>>> & __formal, sol::stack::record & __formal, sol::wrapper<bool (__cdecl*)(std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>),void>::caller && start_index_, bool(*)(std::shared_ptr<Player>, sol::basic_object<sol::basic_reference<0>>, sol::optional<sol::basic_object<sol::basic_reference<0>>>) & handler_, std::shared_ptr<Player> & fx_) Linha 174	C++
 	canary.exe!sol::stack::stack_detail::eval<0,std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>,0,1,2,sol::argument_handler<sol::types<bool,std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>>> &,sol::wrapper<bool (__cdecl*)(std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>),void>::caller,bool (__cdecl*&)(std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>)>(sol::types<std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>> L_, std::integer_sequence<unsigned __int64,0,1,2> tracking_, lua_State * <fxargs__0>, int __formal, sol::argument_handler<sol::types<bool,std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>>> & __formal, sol::stack::record & start_index_, sol::wrapper<bool (__cdecl*)(std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>),void>::caller && handler_, bool(*)(std::shared_ptr<Player>, sol::basic_object<sol::basic_reference<0>>, sol::optional<sol::basic_object<sol::basic_reference<0>>>) & fx_) Linha 184	C++
 	[Quadro Embutido] canary.exe!sol::stack::stack_detail::call(sol::types<bool>) Linha 204	C++
 	[Quadro Embutido] canary.exe!sol::stack::call(sol::types<bool>) Linha 233	C++
 	[Quadro Embutido] canary.exe!sol::stack::call_into_lua(sol::types<bool>) Linha 281	C++
 	[Quadro Embutido] canary.exe!sol::call_detail::agnostic_lua_call_wrapper<bool (__cdecl*)(std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>),1,0,0,0,1,void>::call(lua_State *) Linha 378	C++
 	[Quadro Embutido] canary.exe!sol::call_detail::lua_call_wrapper<void,bool (__cdecl*)(std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>),1,0,0,0,1,void>::call(lua_State *) Linha 602	C++
 	[Quadro Embutido] canary.exe!sol::call_detail::call_wrapped(lua_State *) Linha 911	C++
 	canary.exe!sol::function_detail::upvalue_free_function<bool (__cdecl*)(std::shared_ptr<Player>,sol::basic_object<sol::basic_reference<0>>,sol::optional<sol::basic_object<sol::basic_reference<0>>>)>::real_call(lua_State * L) Linha 46	C++
 	[Código Externo]	
 	canary.exe!lua_pcall(lua_State * L, int nargs, int nresults, int errfunc) Linha 1136	C
>	canary.exe!Lua::protectedCall(lua_State * L, int nargs, int nresults) Linha 105	C++
 	canary.exe!LuaScriptInterface::callFunction(int params) Linha 273	C++
 	canary.exe!TalkAction::executeSay(const std::shared_ptr<Player> & player, const std::string & words, const std::string & param, SpeakClasses type) Linha 162	C++
 	canary.exe!TalkActions::checkWord(const std::shared_ptr<Player> & player, SpeakClasses type, const std::string & words, std::basic_string_view<char,std::char_traits<char>> word, const std::shared_ptr<TalkAction> & talkActionPtr) Linha 90	C++
 	canary.exe!TalkActions::checkPlayerCanSayTalkAction(const std::shared_ptr<Player> & player, SpeakClasses type, const std::string & words) Linha 103	C++
 	canary.exe!Game::playerSaySpell(const std::shared_ptr<Player> & player, SpeakClasses type, const std::string & text) Linha 6534	C++
 	canary.exe!Game::playerSay(unsigned int playerId, unsigned short channelId, SpeakClasses type, const std::string & receiver, const std::string & text) Linha 6470	C++
 	canary.exe!ProtocolGame::parseSay(NetworkMessage & msg) Linha 2046	C++
 	canary.exe!ProtocolGame::parsePacketFromDispatcher(NetworkMessage & msg, unsigned char recvbyte) Linha 1282	C++
 	canary.exe!ProtocolGame::parsePacket(NetworkMessage & msg) Linha 1044	C++
 	[Código Externo]	
 	[Quadro Embutido] canary.exe!std::_Func_class<void>::operator()() Linha 930	C++
 	canary.exe!Task::execute() Linha 64	C++
 	[Quadro Embutido] canary.exe!Dispatcher::executeSerialEvents(const unsigned char) Linha 62	C++
 	canary.exe!Dispatcher::executeEvents(const TaskGroup startGroup) Linha 130	C++
 	[Código Externo]	
 	[Quadro Embutido] canary.exe!std::_Move_only_function_call<void __cdecl(void)>::operator()() Linha 1680	C++
 	canary.exe!BS::thread_pool<0>::worker(const std::stop_token & stop_token, const unsigned __int64 idx) Linha 2320	C++
 	[Código Externo]	
 	canary.exe!thread_start<unsigned int (__cdecl*)(void *),1>(void * const parameter) Linha 97	C++
 	[Código Externo]	

@github-actions github-actions Bot removed the Stale No activity label Apr 4, 2026
@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions Bot added the Stale No activity label May 4, 2026
@dudantas dudantas marked this pull request as draft May 7, 2026 17:58
@github-actions github-actions Bot removed the Stale No activity label May 8, 2026
@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions Bot added the Stale No activity label Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stale No activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants