mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 19:35:42 +00:00
feat(Core/Scripts): Optimize PlayerScripts by calling only overridden/implemented functions. (#18672)
* feat(Core/Scripts): Optimize PlayerScripts by calling only overridden/implemented functions. * Fix codestyle. * Fix typo * PLAYERHOOK_END is not a hook * Address code review feedback. Co-authored-by: Winfidonarleyan <dowlandtop@yandex.com> * Codestyle fixes * Fix typo Co-authored-by: PkllonG --------- Co-authored-by: Winfidonarleyan <dowlandtop@yandex.com>
This commit is contained in:
committed by
GitHub
parent
fd029f81aa
commit
f792b0d708
@@ -53,8 +53,10 @@ public:
|
||||
|
||||
[[nodiscard]] const std::string& GetName() const { return _name; }
|
||||
|
||||
[[nodiscard]] uint16 GetTotalAvailableHooks() { return _totalAvailableHooks; }
|
||||
|
||||
protected:
|
||||
ScriptObject(const char* name) : _name(std::string(name))
|
||||
ScriptObject(const char* name, uint16 totalAvailableHooks = 0) : _name(std::string(name)), _totalAvailableHooks(totalAvailableHooks)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -62,6 +64,7 @@ protected:
|
||||
|
||||
private:
|
||||
const std::string _name;
|
||||
const uint16 _totalAvailableHooks;
|
||||
};
|
||||
|
||||
template<class TObject>
|
||||
|
||||
Reference in New Issue
Block a user