Core/Quests: set LaunchQuest bit in QuestGiverQuestComplete packet only when UseQuestReward is not set
* this fixes a bug which caused quests which were part of a quest chain AND had QUEST_FLAGS_AUTO_ACCEPT to double-select a quest menu entry, causing unwanted UI bugs in the process
This commit is contained in:
@@ -17835,12 +17835,12 @@ void Player::SendQuestReward(Quest const* quest, Creature const* questGiver, uin
|
||||
if (questGiver->IsGossip())
|
||||
packet.LaunchGossip = quest->HasFlag(QUEST_FLAGS_LAUNCH_GOSSIP_COMPLETE);
|
||||
|
||||
if (questGiver->IsQuestGiver())
|
||||
packet.LaunchQuest = (GetQuestDialogStatus(questGiver) & ~QuestGiverStatusFutureMask) != QuestGiverStatus::None;
|
||||
|
||||
if (!quest->HasFlag(QUEST_FLAGS_AUTO_COMPLETE))
|
||||
if (Quest const* rewardQuest = GetNextQuest(questGiver, quest))
|
||||
packet.UseQuestReward = CanTakeQuest(rewardQuest, false);
|
||||
|
||||
if (questGiver->IsQuestGiver())
|
||||
packet.LaunchQuest = !packet.UseQuestReward && (GetQuestDialogStatus(questGiver) & ~QuestGiverStatusFutureMask) != QuestGiverStatus::None;
|
||||
}
|
||||
|
||||
packet.HideChatMessage = hideChatMessage;
|
||||
|
||||
Reference in New Issue
Block a user