mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user