fix(Core/Quest): Throw error if quest_template RewardItemId is not se… (#17924)
fix(Core/Quest): Throw error if quest_template RewardItemId is not set in order * closes https://github.com/azerothcore/azerothcore-wotlk/issues/17740
This commit is contained in:
@@ -4942,6 +4942,25 @@ void ObjectMgr::LoadQuests()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (uint8 j = 0; j < QUEST_REWARDS_COUNT; ++j)
|
||||||
|
{
|
||||||
|
if (!qinfo->RewardItemId[0] && qinfo->RewardItemId[j])
|
||||||
|
{
|
||||||
|
LOG_ERROR("sql.sql", "Quest {} has no `RewardItemId1` but has `RewardItem{}`. Reward item will not be loaded.",
|
||||||
|
qinfo->GetQuestId(), j + 1);
|
||||||
|
}
|
||||||
|
if (!qinfo->RewardItemId[1] && j > 1 && qinfo->RewardItemId[j])
|
||||||
|
{
|
||||||
|
LOG_ERROR("sql.sql", "Quest {} has no `RewardItemId2` but has `RewardItem{}`. Reward item will not be loaded.",
|
||||||
|
qinfo->GetQuestId(), j + 1);
|
||||||
|
}
|
||||||
|
if (!qinfo->RewardItemId[2] && j > 2 && qinfo->RewardItemId[j])
|
||||||
|
{
|
||||||
|
LOG_ERROR("sql.sql", "Quest {} has no `RewardItemId3` but has `RewardItem{}`. Reward item will not be loaded.",
|
||||||
|
qinfo->GetQuestId(), j + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (uint8 j = 0; j < QUEST_REWARDS_COUNT; ++j)
|
for (uint8 j = 0; j < QUEST_REWARDS_COUNT; ++j)
|
||||||
{
|
{
|
||||||
uint32 id = qinfo->RewardItemId[j];
|
uint32 id = qinfo->RewardItemId[j];
|
||||||
|
|||||||
Reference in New Issue
Block a user