mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-18 14:10:18 -04:00
Core/Quests: Use a helper function for quest objective StorageIndex startup validation
(cherry picked from commit 5df1c6dea6)
This commit is contained in:
@@ -4686,24 +4686,8 @@ void ObjectMgr::LoadQuests()
|
||||
_questObjectives[obj.ID] = &obj;
|
||||
|
||||
// Check storage index for objectives which store data
|
||||
if (obj.StorageIndex < 0)
|
||||
{
|
||||
switch (obj.Type)
|
||||
{
|
||||
case QUEST_OBJECTIVE_MONSTER:
|
||||
case QUEST_OBJECTIVE_ITEM:
|
||||
case QUEST_OBJECTIVE_GAMEOBJECT:
|
||||
case QUEST_OBJECTIVE_TALKTO:
|
||||
case QUEST_OBJECTIVE_PLAYERKILLS:
|
||||
case QUEST_OBJECTIVE_AREATRIGGER:
|
||||
case QUEST_OBJECTIVE_WINPETBATTLEAGAINSTNPC:
|
||||
case QUEST_OBJECTIVE_OBTAIN_CURRENCY:
|
||||
TC_LOG_ERROR("sql.sql", "Quest {} objective {} has invalid StorageIndex = {} for objective type {}", qinfo->GetQuestId(), obj.ID, obj.StorageIndex, obj.Type);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (obj.IsStoringValue() && obj.StorageIndex < 0)
|
||||
TC_LOG_ERROR("sql.sql", "Quest {} objective {} has invalid StorageIndex = {} for objective type {}", qinfo->GetQuestId(), obj.ID, obj.StorageIndex, obj.Type);
|
||||
|
||||
switch (obj.Type)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user