Core/Players: Fix inactive reward quests on faction change (#29073)

* Fix query order
* Quest with AllowableRace 0 shouldn't be inactive on faction change
This commit is contained in:
Gildor
2023-06-13 14:24:09 +02:00
committed by GitHub
parent 0aa9b1cd5d
commit 2cd8b6a575
2 changed files with 2 additions and 2 deletions

View File

@@ -1996,7 +1996,7 @@ void WorldSession::HandleCharFactionOrRaceChangeCallback(std::shared_ptr<Charact
for (auto const& questTemplatePair : questTemplates)
{
uint32 newRaceMask = (newTeam == ALLIANCE) ? RACEMASK_ALLIANCE : RACEMASK_HORDE;
if (!(questTemplatePair.second.GetAllowableRaces() & newRaceMask))
if (questTemplatePair.second.GetAllowableRaces() && !(questTemplatePair.second.GetAllowableRaces() & newRaceMask))
{
stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_QUESTSTATUS_REWARDED_ACTIVE_BY_QUEST);
stmt->setUInt32(0, lowGuid);