mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-05 08:28:57 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user