mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Core/Players: Call OnQuestObjectiveChange after updating objective counters
Fix SMART_EVENT_QUEST_OBJ_COMPLETION trigger
(cherry picked from commit 7445d528d2)
# Conflicts:
# src/server/game/Entities/Player/Player.cpp
This commit is contained in:
@@ -16166,9 +16166,6 @@ void Player::SetQuestObjectiveData(QuestObjective const& objective, int32 data)
|
||||
if (oldData == data)
|
||||
return;
|
||||
|
||||
if (Quest const* quest = sObjectMgr->GetQuestTemplate(objective.QuestID))
|
||||
sScriptMgr->OnQuestObjectiveChange(this, quest, objective, oldData, data);
|
||||
|
||||
// Add to save
|
||||
m_QuestStatusSave[objective.QuestID] = QUEST_DEFAULT_SAVE_TYPE;
|
||||
|
||||
@@ -16179,6 +16176,9 @@ void Player::SetQuestObjectiveData(QuestObjective const& objective, int32 data)
|
||||
SetQuestSlotState(status.Slot, 256 << objective.StorageIndex);
|
||||
else
|
||||
RemoveQuestSlotState(status.Slot, 256 << objective.StorageIndex);
|
||||
|
||||
if (Quest const* quest = sObjectMgr->GetQuestTemplate(objective.QuestID))
|
||||
sScriptMgr->OnQuestObjectiveChange(this, quest, objective, oldData, data);
|
||||
}
|
||||
|
||||
bool Player::IsQuestObjectiveCompletable(uint16 slot, Quest const* quest, QuestObjective const& objective) const
|
||||
|
||||
Reference in New Issue
Block a user