Various quest system fixes (seasonal quests, timed quests and more)
Port From (https://github.com/TrinityCore/TrinityCore/commit/16cf95654f35f6bb563e82608476d8f53837bd06)
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user