Core/Quest: send correct packet when a quest cannot be rewarded for item-related errors.

(cherry picked from commit c067fe544d)
This commit is contained in:
SnapperRy
2016-10-16 22:33:10 +02:00
committed by joschiwald
parent 0794904f52
commit 6df51159c4

View File

@@ -14828,7 +14828,9 @@ bool Player::CanRewardQuest(Quest const* quest, uint32 reward, bool msg)
InventoryResult res = CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, quest->RewardChoiceItemId[i], quest->RewardChoiceItemCount[i]);
if (res != EQUIP_ERR_OK)
{
SendEquipError(res, nullptr, nullptr, quest->RewardChoiceItemId[i]);
if (msg)
SendQuestFailed(quest->GetQuestId(), res);
return false;
}
}
@@ -14844,7 +14846,9 @@ bool Player::CanRewardQuest(Quest const* quest, uint32 reward, bool msg)
InventoryResult res = CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, quest->RewardItemId[i], quest->RewardItemCount[i]);
if (res != EQUIP_ERR_OK)
{
SendEquipError(res, nullptr, nullptr, quest->RewardItemId[i]);
if (msg)
SendQuestFailed(quest->GetQuestId(), res);
return false;
}
}