mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
add enabled hook lists for performance improvement (#1004)
This commit is contained in:
parent
a28e2bbb4b
commit
326637c93b
@ -75,7 +75,16 @@ public:
|
|||||||
class PlayerbotsPlayerScript : public PlayerScript
|
class PlayerbotsPlayerScript : public PlayerScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PlayerbotsPlayerScript() : PlayerScript("PlayerbotsPlayerScript") {}
|
PlayerbotsPlayerScript() : PlayerScript("PlayerbotsPlayerScript", {
|
||||||
|
PLAYERHOOK_ON_LOGIN,
|
||||||
|
PLAYERHOOK_ON_AFTER_UPDATE,
|
||||||
|
PLAYERHOOK_CAN_PLAYER_USE_PRIVATE_CHAT,
|
||||||
|
PLAYERHOOK_CAN_PLAYER_USE_GROUP_CHAT,
|
||||||
|
PLAYERHOOK_CAN_PLAYER_USE_CHAT,
|
||||||
|
PLAYERHOOK_CAN_PLAYER_USE_CHANNEL_CHAT,
|
||||||
|
PLAYERHOOK_ON_BEFORE_CRITERIA_PROGRESS,
|
||||||
|
PLAYERHOOK_ON_BEFORE_ACHI_COMPLETE
|
||||||
|
}) {}
|
||||||
|
|
||||||
void OnPlayerLogin(Player* player) override
|
void OnPlayerLogin(Player* player) override
|
||||||
{
|
{
|
||||||
@ -225,7 +234,9 @@ public:
|
|||||||
class PlayerbotsServerScript : public ServerScript
|
class PlayerbotsServerScript : public ServerScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PlayerbotsServerScript() : ServerScript("PlayerbotsServerScript") {}
|
PlayerbotsServerScript() : ServerScript("PlayerbotsServerScript", {
|
||||||
|
SERVERHOOK_CAN_PACKET_RECEIVE
|
||||||
|
}) {}
|
||||||
|
|
||||||
void OnPacketReceived(WorldSession* session, WorldPacket const& packet) override
|
void OnPacketReceived(WorldSession* session, WorldPacket const& packet) override
|
||||||
{
|
{
|
||||||
@ -238,7 +249,9 @@ public:
|
|||||||
class PlayerbotsWorldScript : public WorldScript
|
class PlayerbotsWorldScript : public WorldScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PlayerbotsWorldScript() : WorldScript("PlayerbotsWorldScript") {}
|
PlayerbotsWorldScript() : WorldScript("PlayerbotsWorldScript", {
|
||||||
|
WORLDHOOK_ON_BEFORE_WORLD_INITIALIZED
|
||||||
|
}) {}
|
||||||
|
|
||||||
void OnBeforeWorldInitialized() override
|
void OnBeforeWorldInitialized() override
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user