Core/LFG: implement weekly reward counter to limit the first dungeon rewards

* all default random rewards can be rewarded 7 times per week
* raid finder first reward can be rewarded once per week
* if completionsPerWeek = 0 the currency caps will limit the first rewards otherwise first rewards can be always rewarded
* random Cataclysm normal dungeons will now reward 140 Justice points instead of 150
* second reward for random Cataclysm normal dungeons will now reward gold only (need to verify this)
This commit is contained in:
Ovahlord
2018-04-18 15:09:49 +02:00
parent 3abbefeaf5
commit d9b12217c4
12 changed files with 195 additions and 74 deletions

View File

@@ -230,6 +230,10 @@ bool LoginQueryHolder::Initialize()
stmt->setUInt64(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_ALL_PETS, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_REWARDSTATUS_LFG);
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_LFG_REWARD_STATUS, stmt);
return res;
}