Core/Quests: fixed sending a correct information to close the current quest menu after rewarding quests when the player is not enligible for the next rewarded quest
This commit is contained in:
1 parent
ab7a694ef9
commit
f746940f33
2 files changed
+9
-4
No files matched your search
@@ -16968,7 +16968,7 @@ void Player::SendQuestComplete(Quest const* quest) const
|
||||
}
|
||||
}
|
||||
|
||||
void Player::SendQuestReward(Quest const* quest, uint32 XP) const
|
||||
void Player::SendQuestReward(Quest const* quest, uint32 XP)
|
||||
{
|
||||
uint32 questId = quest->GetQuestId();
|
||||
sGameEventMgr->HandleQuestComplete(questId);
|
||||
@@ -16996,8 +16996,13 @@ void Player::SendQuestReward(Quest const* quest, uint32 XP) const
|
||||
data << uint32(questId);
|
||||
data << uint32(quest->GetRewardSkillId()); // 4.x bonus skill id
|
||||
|
||||
data.WriteBit(0); // FIXME: unknown bits, common values sent
|
||||
data.WriteBit(1);
|
||||
bool canTakeNextRewardQuest = false;
|
||||
if (uint32 nextQuestId = quest->GetNextQuestInChain())
|
||||
if (Quest const* quest = sObjectMgr->GetQuestTemplate(nextQuestId))
|
||||
canTakeNextRewardQuest = CanTakeQuest(quest, false);
|
||||
|
||||
data.WriteBit(0); // FIXME: unknown bit, common values sent
|
||||
data.WriteBit(canTakeNextRewardQuest); // Can take next reward quest
|
||||
data.FlushBits();
|
||||
|
||||
SendDirectMessage(&data);
|
||||
|
||||
@@ -1441,7 +1441,7 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
|
||||
bool CanShareQuest(uint32 questId) const;
|
||||
|
||||
void SendQuestComplete(Quest const* quest) const;
|
||||
void SendQuestReward(Quest const* quest, uint32 XP) const;
|
||||
void SendQuestReward(Quest const* quest, uint32 XP);
|
||||
void SendQuestFailed(uint32 questId, InventoryResult reason = EQUIP_ERR_OK) const;
|
||||
void SendQuestTimerFailed(uint32 questId) const;
|
||||
void SendCanTakeQuestResponse(QuestFailedReason msg) const;
|
||||
|
||||
Reference in new issue
Block a user