mirror of
https://github.com/azerothcore/mod-transmog
synced 2025-11-29 22:48:30 +08:00
add enabled hook lists for performance improvement (#200)
This commit is contained in:
@@ -1044,7 +1044,18 @@ private:
|
|||||||
player->UpdatePlayerSetting("mod-transmog", SETTING_RETROACTIVE_CHECK, 1);
|
player->UpdatePlayerSetting("mod-transmog", SETTING_RETROACTIVE_CHECK, 1);
|
||||||
}
|
}
|
||||||
public:
|
public:
|
||||||
PS_Transmogrification() : PlayerScript("Player_Transmogrify") { }
|
PS_Transmogrification() : PlayerScript("Player_Transmogrify", {
|
||||||
|
PLAYERHOOK_ON_EQUIP,
|
||||||
|
PLAYERHOOK_ON_LOOT_ITEM,
|
||||||
|
PLAYERHOOK_ON_CREATE_ITEM,
|
||||||
|
PLAYERHOOK_ON_AFTER_STORE_OR_EQUIP_NEW_ITEM,
|
||||||
|
PLAYERHOOK_ON_PLAYER_COMPLETE_QUEST,
|
||||||
|
PLAYERHOOK_ON_AFTER_SET_VISIBLE_ITEM_SLOT,
|
||||||
|
PLAYERHOOK_ON_AFTER_MOVE_ITEM_FROM_INVENTORY,
|
||||||
|
PLAYERHOOK_ON_LOGIN,
|
||||||
|
PLAYERHOOK_ON_LOGOUT,
|
||||||
|
PLAYERHOOK_ON_BEFORE_BUY_ITEM_FROM_VENDOR
|
||||||
|
}) { }
|
||||||
|
|
||||||
void OnPlayerEquip(Player* player, Item* it, uint8 /*bag*/, uint8 /*slot*/, bool /*update*/) override
|
void OnPlayerEquip(Player* player, Item* it, uint8 /*bag*/, uint8 /*slot*/, bool /*update*/) override
|
||||||
{
|
{
|
||||||
@@ -1215,7 +1226,10 @@ public:
|
|||||||
class WS_Transmogrification : public WorldScript
|
class WS_Transmogrification : public WorldScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WS_Transmogrification() : WorldScript("WS_Transmogrification") { }
|
WS_Transmogrification() : WorldScript("WS_Transmogrification", {
|
||||||
|
WORLDHOOK_ON_AFTER_CONFIG_LOAD,
|
||||||
|
WORLDHOOK_ON_STARTUP
|
||||||
|
}) { }
|
||||||
|
|
||||||
void OnAfterConfigLoad(bool reload) override
|
void OnAfterConfigLoad(bool reload) override
|
||||||
{
|
{
|
||||||
@@ -1258,7 +1272,10 @@ public:
|
|||||||
class global_transmog_script : public GlobalScript
|
class global_transmog_script : public GlobalScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
global_transmog_script() : GlobalScript("global_transmog_script") { }
|
global_transmog_script() : GlobalScript("global_transmog_script", {
|
||||||
|
GLOBALHOOK_ON_ITEM_DEL_FROM_DB,
|
||||||
|
GLOBALHOOK_ON_MIRRORIMAGE_DISPLAY_ITEM
|
||||||
|
}) { }
|
||||||
|
|
||||||
void OnItemDelFromDB(CharacterDatabaseTransaction trans, ObjectGuid::LowType itemGuid) override
|
void OnItemDelFromDB(CharacterDatabaseTransaction trans, ObjectGuid::LowType itemGuid) override
|
||||||
{
|
{
|
||||||
@@ -1284,7 +1301,10 @@ public:
|
|||||||
class unit_transmog_script : public UnitScript
|
class unit_transmog_script : public UnitScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
unit_transmog_script() : UnitScript("unit_transmog_script") { }
|
unit_transmog_script() : UnitScript("unit_transmog_script", true, {
|
||||||
|
UNITHOOK_SHOULD_TRACK_VALUES_UPDATE_POS_BY_INDEX,
|
||||||
|
UNITHOOK_ON_PATCH_VALUES_UPDATE
|
||||||
|
}) { }
|
||||||
|
|
||||||
bool ShouldTrackValuesUpdatePosByIndex(Unit const* unit, uint8 /*updateType*/, uint16 index) override
|
bool ShouldTrackValuesUpdatePosByIndex(Unit const* unit, uint8 /*updateType*/, uint16 index) override
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user