mirror of
https://github.com/opentibiabr/canary
synced 2026-08-16 06:26:09 -04:00
Removed Lua callbacks from `MonsterType` of various monsters. These callbacks were empty, which meant the functions were still being "called" by the monsters without performing any action, creating a significant performance bottleneck. Removed the `onHear` event callback, which had a significant impact on the server and was not used anywhere. It executed the `onHear` callback for each spectator, causing an unnecessary overload without any real benefit, especially as we have other methods to check for these events. Additionally, the `monsterOnSpawn` event callback was removed and replaced with `MonsterType::onSpawn`, which is much more efficient since it only needs to be declared in the script for each monster that actually uses it. Finally, the way `setRewardBoss` was handled was improved. Previously, it was executed in an `onSpawn` event callback, but now it is done directly during the parsing of each monster script, marking them as reward bosses at the time of script loading, improving efficiency. |
||
|---|---|---|
| .. | ||
| convert_monsters_callbacks.py | ||
| normalize_cpp_own_includes.py.py | ||