Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2024-09-17 23:15:28 +08:00
25 changed files with 373 additions and 96 deletions
@@ -982,8 +982,12 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder const& holder)
if (pCurrChar->HasAtLoginFlag(AT_LOGIN_CHECK_ACHIEVS))
{
pCurrChar->RemoveAtLoginFlag(AT_LOGIN_CHECK_ACHIEVS, true);
pCurrChar->CheckAllAchievementCriteria();
// If we process the check while players are loading they won't be notified of the changes.
pCurrChar->m_Events.AddEventAtOffset([pCurrChar]
{
pCurrChar->RemoveAtLoginFlag(AT_LOGIN_CHECK_ACHIEVS, true);
pCurrChar->CheckAllAchievementCriteria();
}, 1s);
}
bool firstLogin = pCurrChar->HasAtLoginFlag(AT_LOGIN_FIRST);