canary/docs/python-scripts
Eduardo Dantas ceace165cf
perf: remove unnecessary event callbacks (#3076)
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.
2024-11-08 01:44:09 -03:00
..
convert_monsters_callbacks.py perf: remove unnecessary event callbacks (#3076) 2024-11-08 01:44:09 -03:00
normalize_cpp_own_includes.py.py refactor: remove circular dependencies from header files (#3025) 2024-10-30 19:13:33 -03:00