DB/Schema: Rename _questrelation tables to _queststarter and _involvedrelation to _questender, for creature and gameobject
This commit is contained in:
1 parent
2f3388828b
commit
a71fcee27d
5 files changed
+77
-49
No files matched your search
@@ -7212,59 +7212,59 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string const&
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u quest relations from %s in %u ms", count, table.c_str(), GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadGameobjectQuestRelations()
|
||||
void ObjectMgr::LoadGameobjectQuestStarters()
|
||||
{
|
||||
LoadQuestRelationsHelper(_goQuestRelations, "gameobject_questrelation", true, true);
|
||||
LoadQuestRelationsHelper(_goQuestRelations, "gameobject_queststarter", true, true);
|
||||
|
||||
for (QuestRelations::iterator itr = _goQuestRelations.begin(); itr != _goQuestRelations.end(); ++itr)
|
||||
{
|
||||
GameObjectTemplate const* goInfo = GetGameObjectTemplate(itr->first);
|
||||
if (!goInfo)
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject_questrelation` have data for not existed gameobject entry (%u) and existed quest %u", itr->first, itr->second);
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject_queststarter` have data for not existed gameobject entry (%u) and existed quest %u", itr->first, itr->second);
|
||||
else if (goInfo->type != GAMEOBJECT_TYPE_QUESTGIVER)
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject_questrelation` have data gameobject entry (%u) for quest %u, but GO is not GAMEOBJECT_TYPE_QUESTGIVER", itr->first, itr->second);
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject_queststarter` have data gameobject entry (%u) for quest %u, but GO is not GAMEOBJECT_TYPE_QUESTGIVER", itr->first, itr->second);
|
||||
}
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadGameobjectInvolvedRelations()
|
||||
void ObjectMgr::LoadGameobjectQuestEnders()
|
||||
{
|
||||
LoadQuestRelationsHelper(_goQuestInvolvedRelations, "gameobject_involvedrelation", false, true);
|
||||
LoadQuestRelationsHelper(_goQuestInvolvedRelations, "gameobject_questender", false, true);
|
||||
|
||||
for (QuestRelations::iterator itr = _goQuestInvolvedRelations.begin(); itr != _goQuestInvolvedRelations.end(); ++itr)
|
||||
{
|
||||
GameObjectTemplate const* goInfo = GetGameObjectTemplate(itr->first);
|
||||
if (!goInfo)
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject_involvedrelation` have data for not existed gameobject entry (%u) and existed quest %u", itr->first, itr->second);
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject_questender` have data for not existed gameobject entry (%u) and existed quest %u", itr->first, itr->second);
|
||||
else if (goInfo->type != GAMEOBJECT_TYPE_QUESTGIVER)
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject_involvedrelation` have data gameobject entry (%u) for quest %u, but GO is not GAMEOBJECT_TYPE_QUESTGIVER", itr->first, itr->second);
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject_questender` have data gameobject entry (%u) for quest %u, but GO is not GAMEOBJECT_TYPE_QUESTGIVER", itr->first, itr->second);
|
||||
}
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadCreatureQuestRelations()
|
||||
void ObjectMgr::LoadCreatureQuestStarters()
|
||||
{
|
||||
LoadQuestRelationsHelper(_creatureQuestRelations, "creature_questrelation", true, false);
|
||||
LoadQuestRelationsHelper(_creatureQuestRelations, "creature_queststarter", true, false);
|
||||
|
||||
for (QuestRelations::iterator itr = _creatureQuestRelations.begin(); itr != _creatureQuestRelations.end(); ++itr)
|
||||
{
|
||||
CreatureTemplate const* cInfo = GetCreatureTemplate(itr->first);
|
||||
if (!cInfo)
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_questrelation` have data for not existed creature entry (%u) and existed quest %u", itr->first, itr->second);
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_queststarter` have data for not existed creature entry (%u) and existed quest %u", itr->first, itr->second);
|
||||
else if (!(cInfo->npcflag & UNIT_NPC_FLAG_QUESTGIVER))
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_questrelation` has creature entry (%u) for quest %u, but npcflag does not include UNIT_NPC_FLAG_QUESTGIVER", itr->first, itr->second);
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_queststarter` has creature entry (%u) for quest %u, but npcflag does not include UNIT_NPC_FLAG_QUESTGIVER", itr->first, itr->second);
|
||||
}
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadCreatureInvolvedRelations()
|
||||
void ObjectMgr::LoadCreatureQuestEnders()
|
||||
{
|
||||
LoadQuestRelationsHelper(_creatureQuestInvolvedRelations, "creature_involvedrelation", false, false);
|
||||
LoadQuestRelationsHelper(_creatureQuestInvolvedRelations, "creature_questender", false, false);
|
||||
|
||||
for (QuestRelations::iterator itr = _creatureQuestInvolvedRelations.begin(); itr != _creatureQuestInvolvedRelations.end(); ++itr)
|
||||
{
|
||||
CreatureTemplate const* cInfo = GetCreatureTemplate(itr->first);
|
||||
if (!cInfo)
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_involvedrelation` have data for not existed creature entry (%u) and existed quest %u", itr->first, itr->second);
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_questender` have data for not existed creature entry (%u) and existed quest %u", itr->first, itr->second);
|
||||
else if (!(cInfo->npcflag & UNIT_NPC_FLAG_QUESTGIVER))
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_involvedrelation` has creature entry (%u) for quest %u, but npcflag does not include UNIT_NPC_FLAG_QUESTGIVER", itr->first, itr->second);
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_questender` has creature entry (%u) for quest %u, but npcflag does not include UNIT_NPC_FLAG_QUESTGIVER", itr->first, itr->second);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user