mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Quests: Fixed QuestScript::OnQuestStatusChange incorrectly triggering with QUEST_STATUS_INCOMPLETE when removing items from quest objectives on rewarding quest
Closes #31181
This commit is contained in:
@@ -117,25 +117,20 @@ public:
|
||||
|
||||
if (oldStatus != QUEST_STATUS_NONE)
|
||||
{
|
||||
player->RemoveActiveQuest(quest->GetQuestId(), false);
|
||||
|
||||
// remove all quest entries for 'entry' from quest log
|
||||
for (uint8 slot = 0; slot < MAX_QUEST_LOG_SIZE; ++slot)
|
||||
if (oldStatus != QUEST_STATUS_REWARDED)
|
||||
{
|
||||
uint32 logQuest = player->GetQuestSlotQuestId(slot);
|
||||
if (logQuest == quest->GetQuestId())
|
||||
// we ignore unequippable quest items in this case, its' still be equipped
|
||||
player->TakeQuestSourceItem(quest->GetQuestId(), false);
|
||||
|
||||
if (quest->HasFlag(QUEST_FLAGS_FLAGS_PVP))
|
||||
{
|
||||
player->SetQuestSlot(slot, 0);
|
||||
|
||||
// we ignore unequippable quest items in this case, its' still be equipped
|
||||
player->TakeQuestSourceItem(logQuest, false);
|
||||
|
||||
if (quest->HasFlag(QUEST_FLAGS_FLAGS_PVP))
|
||||
{
|
||||
player->pvpInfo.IsHostile = player->pvpInfo.IsInHostileArea || player->HasPvPForcingQuest();
|
||||
player->UpdatePvPState();
|
||||
}
|
||||
player->pvpInfo.IsHostile = player->pvpInfo.IsInHostileArea || player->HasPvPForcingQuest();
|
||||
player->UpdatePvPState();
|
||||
}
|
||||
}
|
||||
player->RemoveActiveQuest(quest->GetQuestId(), false);
|
||||
player->RemoveRewardedQuest(quest->GetQuestId());
|
||||
player->DespawnPersonalSummonsForQuest(quest->GetQuestId());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user