feat(Core/Items): Delete old item id from recovery item (#18332)

This commit is contained in:
IntelligentQuantum
2024-09-22 10:02:16 +03:30
committed by GitHub
parent a452b25def
commit 985410f184
8 changed files with 67 additions and 1 deletions

View File

@@ -389,6 +389,7 @@ enum WorldIntConfigs
CONFIG_ICC_BUFF_ALLIANCE,
CONFIG_ITEMDELETE_QUALITY,
CONFIG_ITEMDELETE_ITEM_LEVEL,
CONFIG_ITEMDELETE_KEEP_DAYS,
CONFIG_BG_REWARD_WINNER_HONOR_FIRST,
CONFIG_BG_REWARD_WINNER_ARENA_FIRST,
CONFIG_BG_REWARD_WINNER_HONOR_LAST,

View File

@@ -1265,6 +1265,7 @@ void World::LoadConfigSettings(bool reload)
_bool_configs[CONFIG_ITEMDELETE_VENDOR] = sConfigMgr->GetOption<bool>("ItemDelete.Vendor", 0);
_int_configs[CONFIG_ITEMDELETE_QUALITY] = sConfigMgr->GetOption<int32>("ItemDelete.Quality", 3);
_int_configs[CONFIG_ITEMDELETE_ITEM_LEVEL] = sConfigMgr->GetOption<int32>("ItemDelete.ItemLevel", 80);
_int_configs[CONFIG_ITEMDELETE_KEEP_DAYS] = sConfigMgr->GetOption<int32>("ItemDelete.KeepDays", 0);
_int_configs[CONFIG_FFA_PVP_TIMER] = sConfigMgr->GetOption<int32>("FFAPvPTimer", 30);
@@ -2091,6 +2092,9 @@ void World::SetInitialWorldSettings()
// Delete all characters which have been deleted X days before
Player::DeleteOldCharacters();
// Delete all items which have been deleted X days before
Player::DeleteOldRecoveryItems();
// Delete all custom channels which haven't been used for PreserveCustomChannelDuration days.
Channel::CleanOldChannelsInDB();