mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-03 15:47:04 +01:00
Core/Quests: ported breadcrumb quest handlings and cleaned up quest template loading handlings
This commit is contained in:
@@ -2169,16 +2169,15 @@ void WorldSession::HandleCharFactionOrRaceChangeCallback(std::shared_ptr<Charact
|
||||
|
||||
// Disable all old-faction specific quests
|
||||
{
|
||||
ObjectMgr::QuestMap const& questTemplates = sObjectMgr->GetQuestTemplates();
|
||||
for (ObjectMgr::QuestMap::const_iterator iter = questTemplates.begin(); iter != questTemplates.end(); ++iter)
|
||||
ObjectMgr::QuestContainer const& questTemplates = sObjectMgr->GetQuestTemplates();
|
||||
for (auto const& questTemplatePair : questTemplates)
|
||||
{
|
||||
Quest const* quest = iter->second;
|
||||
uint32 newRaceMask = (newTeam == ALLIANCE) ? RACEMASK_ALLIANCE : RACEMASK_HORDE;
|
||||
if (!(quest->GetAllowableRaces() & newRaceMask))
|
||||
if (!(questTemplatePair.second.GetAllowableRaces() & newRaceMask))
|
||||
{
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_QUESTSTATUS_REWARDED_ACTIVE_BY_QUEST);
|
||||
stmt->setUInt32(0, lowGuid);
|
||||
stmt->setUInt32(1, quest->GetQuestId());
|
||||
stmt->setUInt32(1, questTemplatePair.first);
|
||||
trans->Append(stmt);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user