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:
parent
fd029f81aa
commit
f792b0d708
11 changed files with 452 additions and 1054 deletions
|
|
@ -169,7 +169,15 @@ public:
|
|||
class CharacterActionIpLogger : public PlayerScript
|
||||
{
|
||||
public:
|
||||
CharacterActionIpLogger() : PlayerScript("CharacterActionIpLogger") { }
|
||||
CharacterActionIpLogger() :
|
||||
PlayerScript("CharacterActionIpLogger",
|
||||
{
|
||||
PLAYERHOOK_ON_CREATE,
|
||||
PLAYERHOOK_ON_LOGIN,
|
||||
PLAYERHOOK_ON_LOGOUT
|
||||
})
|
||||
{
|
||||
}
|
||||
|
||||
// CHARACTER_CREATE = 7
|
||||
void OnCreate(Player* player) override
|
||||
|
|
@ -256,7 +264,14 @@ public:
|
|||
class CharacterDeleteActionIpLogger : public PlayerScript
|
||||
{
|
||||
public:
|
||||
CharacterDeleteActionIpLogger() : PlayerScript("CharacterDeleteActionIpLogger") { }
|
||||
CharacterDeleteActionIpLogger() :
|
||||
PlayerScript("CharacterDeleteActionIpLogger",
|
||||
{
|
||||
PLAYERHOOK_ON_DELETE,
|
||||
PLAYERHOOK_ON_FAILED_DELETE
|
||||
})
|
||||
{
|
||||
}
|
||||
|
||||
// CHARACTER_DELETE = 10
|
||||
void OnDelete(ObjectGuid guid, uint32 accountId) override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue