Various quest system fixes (seasonal quests, timed quests and more)

Port From (https://github.com/TrinityCore/TrinityCore/commit/16cf95654f35f6bb563e82608476d8f53837bd06)
This commit is contained in:
hondacrx
2020-05-18 23:15:58 -04:00
parent d5e2f1e646
commit 6e9d62c3ea
4 changed files with 80 additions and 33 deletions
+6 -3
View File
@@ -1996,7 +1996,7 @@ namespace Game.Entities
}
void _SaveSeasonalQuestStatus(SQLTransaction trans)
{
if (!m_SeasonalQuestChanged || m_seasonalquests.Empty())
if (!m_SeasonalQuestChanged)
return;
// we don't need transactions here.
@@ -2004,6 +2004,11 @@ namespace Game.Entities
stmt.AddValue(0, GetGUID().GetCounter());
trans.Append(stmt);
m_SeasonalQuestChanged = false;
if (m_seasonalquests.Empty())
return;
foreach (var iter in m_seasonalquests)
{
stmt = DB.Characters.GetPreparedStatement(CharStatements.INS_CHARACTER_QUESTSTATUS_SEASONAL);
@@ -2012,8 +2017,6 @@ namespace Game.Entities
stmt.AddValue(2, iter.Key);
trans.Append(stmt);
}
m_SeasonalQuestChanged = false;
}
void _SaveMonthlyQuestStatus(SQLTransaction trans)
{