mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
Clarify areatrigger related tables loading errors.
This commit is contained in:
parent
61255a1a8f
commit
68190a9a0c
1 changed files with 37 additions and 36 deletions
|
|
@ -4972,7 +4972,7 @@ void ObjectMgr::LoadQuestAreaTriggers()
|
|||
|
||||
uint32 count = 0;
|
||||
|
||||
if( !result )
|
||||
if (!result)
|
||||
{
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
|
|
@ -4995,21 +4995,20 @@ void ObjectMgr::LoadQuestAreaTriggers()
|
|||
uint32 quest_ID = fields[1].GetUInt32();
|
||||
|
||||
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(trigger_ID);
|
||||
if(!atEntry)
|
||||
if (!atEntry)
|
||||
{
|
||||
sLog.outErrorDb("Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.",trigger_ID);
|
||||
sLog.outErrorDb("Table `areatrigger_involvedrelation` has area trigger (ID: %u) not listed in `AreaTrigger.dbc`.", trigger_ID);
|
||||
continue;
|
||||
}
|
||||
|
||||
Quest const* quest = GetQuestTemplate(quest_ID);
|
||||
|
||||
if(!quest)
|
||||
if (!quest)
|
||||
{
|
||||
sLog.outErrorDb("Table `areatrigger_involvedrelation` has record (id: %u) for not existing quest %u",trigger_ID,quest_ID);
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!quest->HasFlag(QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT))
|
||||
if (!quest->HasFlag(QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT))
|
||||
{
|
||||
sLog.outErrorDb("Table `areatrigger_involvedrelation` has record (id: %u) for not quest %u, but quest not have flag QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT. Trigger or quest flags must be fixed, quest modified to require objective.",trigger_ID,quest_ID);
|
||||
|
||||
|
|
@ -5037,7 +5036,7 @@ void ObjectMgr::LoadTavernAreaTriggers()
|
|||
|
||||
uint32 count = 0;
|
||||
|
||||
if( !result )
|
||||
if (!result)
|
||||
{
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
|
|
@ -5059,9 +5058,9 @@ void ObjectMgr::LoadTavernAreaTriggers()
|
|||
uint32 Trigger_ID = fields[0].GetUInt32();
|
||||
|
||||
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(Trigger_ID);
|
||||
if(!atEntry)
|
||||
if (!atEntry)
|
||||
{
|
||||
sLog.outErrorDb("Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.",Trigger_ID);
|
||||
sLog.outErrorDb("Table `areatrigger_tavern` has area trigger (ID:%u) not listed in `AreaTrigger.dbc`.", Trigger_ID);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -5081,7 +5080,7 @@ void ObjectMgr::LoadAreaTriggerScripts()
|
|||
|
||||
uint32 count = 0;
|
||||
|
||||
if( !result )
|
||||
if (!result)
|
||||
{
|
||||
barGoLink bar( 1 );
|
||||
bar.step();
|
||||
|
|
@ -5104,11 +5103,12 @@ void ObjectMgr::LoadAreaTriggerScripts()
|
|||
const char *scriptName = fields[1].GetString();
|
||||
|
||||
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(Trigger_ID);
|
||||
if(!atEntry)
|
||||
if (!atEntry)
|
||||
{
|
||||
sLog.outErrorDb("Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.",Trigger_ID);
|
||||
sLog.outErrorDb("Table `areatrigger_scripts` has area trigger (ID:%u) not listed in `AreaTrigger.dbc`.", Trigger_ID);
|
||||
continue;
|
||||
}
|
||||
|
||||
mAreaTriggerScripts[Trigger_ID] = GetScriptId(scriptName);
|
||||
} while( result->NextRow() );
|
||||
|
||||
|
|
@ -5483,7 +5483,7 @@ void ObjectMgr::LoadAreaTriggerTeleports()
|
|||
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13
|
||||
QueryResult *result = WorldDatabase.Query("SELECT id, required_level, required_item, required_item2, heroic_key, heroic_key2, required_quest_done, required_quest_done_heroic, required_failed_text, target_map, target_position_x, target_position_y, target_position_z, target_orientation FROM areatrigger_teleport");
|
||||
if( !result )
|
||||
if (!result)
|
||||
{
|
||||
|
||||
barGoLink bar( 1 );
|
||||
|
|
@ -5524,81 +5524,82 @@ void ObjectMgr::LoadAreaTriggerTeleports()
|
|||
at.target_Orientation = fields[13].GetFloat();
|
||||
|
||||
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(Trigger_ID);
|
||||
if(!atEntry)
|
||||
if (!atEntry)
|
||||
{
|
||||
sLog.outErrorDb("Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.",Trigger_ID);
|
||||
sLog.outErrorDb("Table `areatrigger_teleport` has area trigger (ID:%u) not listed in `AreaTrigger.dbc`.", Trigger_ID);
|
||||
continue;
|
||||
}
|
||||
|
||||
if(at.requiredItem)
|
||||
if (at.requiredItem)
|
||||
{
|
||||
ItemPrototype const *pProto = GetItemPrototype(at.requiredItem);
|
||||
if(!pProto)
|
||||
if (!pProto)
|
||||
{
|
||||
sLog.outError("Key item %u does not exist for trigger %u, removing key requirement.", at.requiredItem, Trigger_ID);
|
||||
sLog.outError("Table `areatrigger_teleport` has not existed key item %u for trigger %u, removing key requirement.", at.requiredItem, Trigger_ID);
|
||||
at.requiredItem = 0;
|
||||
}
|
||||
}
|
||||
if(at.requiredItem2)
|
||||
|
||||
if (at.requiredItem2)
|
||||
{
|
||||
ItemPrototype const *pProto = GetItemPrototype(at.requiredItem2);
|
||||
if(!pProto)
|
||||
{
|
||||
sLog.outError("Second item %u not exist for trigger %u, remove key requirement.", at.requiredItem2, Trigger_ID);
|
||||
sLog.outError("Table `areatrigger_teleport` has not existed second key item %u for trigger %u, remove key requirement.", at.requiredItem2, Trigger_ID);
|
||||
at.requiredItem2 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if(at.heroicKey)
|
||||
if (at.heroicKey)
|
||||
{
|
||||
ItemPrototype const *pProto = GetItemPrototype(at.heroicKey);
|
||||
if(!pProto)
|
||||
if (!pProto)
|
||||
{
|
||||
sLog.outError("Heroic key item %u not exist for trigger %u, remove key requirement.", at.heroicKey, Trigger_ID);
|
||||
sLog.outError("Table `areatrigger_teleport` has not existed heroic key item %u for trigger %u, remove key requirement.", at.heroicKey, Trigger_ID);
|
||||
at.heroicKey = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if(at.heroicKey2)
|
||||
if (at.heroicKey2)
|
||||
{
|
||||
ItemPrototype const *pProto = GetItemPrototype(at.heroicKey2);
|
||||
if(!pProto)
|
||||
if (!pProto)
|
||||
{
|
||||
sLog.outError("Heroic second key item %u not exist for trigger %u, remove key requirement.", at.heroicKey2, Trigger_ID);
|
||||
sLog.outError("Table `areatrigger_teleport` has not existed heroic second key item %u for trigger %u, remove key requirement.", at.heroicKey2, Trigger_ID);
|
||||
at.heroicKey2 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if(at.requiredQuest)
|
||||
if (at.requiredQuest)
|
||||
{
|
||||
QuestMap::iterator qReqItr = mQuestTemplates.find(at.requiredQuest);
|
||||
if(qReqItr == mQuestTemplates.end())
|
||||
if (qReqItr == mQuestTemplates.end())
|
||||
{
|
||||
sLog.outErrorDb("Required Quest %u not exist for trigger %u, remove quest done requirement.",at.requiredQuest,Trigger_ID);
|
||||
sLog.outErrorDb("Table `areatrigger_teleport` has not existed required quest %u for trigger %u, remove quest done requirement.",at.requiredQuest,Trigger_ID);
|
||||
at.requiredQuest = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if(at.requiredQuestHeroic)
|
||||
if (at.requiredQuestHeroic)
|
||||
{
|
||||
QuestMap::iterator qReqItr = mQuestTemplates.find(at.requiredQuestHeroic);
|
||||
if(qReqItr == mQuestTemplates.end())
|
||||
if (qReqItr == mQuestTemplates.end())
|
||||
{
|
||||
sLog.outErrorDb("Required Quest %u not exist for trigger %u, remove quest done requirement.",at.requiredQuestHeroic,Trigger_ID);
|
||||
sLog.outErrorDb("Table `areatrigger_teleport` has not existed required heroic quest %u for trigger %u, remove quest done requirement.",at.requiredQuestHeroic,Trigger_ID);
|
||||
at.requiredQuestHeroic = 0;
|
||||
}
|
||||
}
|
||||
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(at.target_mapId);
|
||||
if(!mapEntry)
|
||||
if (!mapEntry)
|
||||
{
|
||||
sLog.outErrorDb("Area trigger (ID:%u) target map (ID: %u) does not exist in `Map.dbc`.",Trigger_ID,at.target_mapId);
|
||||
sLog.outErrorDb("Table `areatrigger_teleport` has not existed target map (ID: %u) for Area trigger (ID:%u).", at.target_mapId, Trigger_ID);
|
||||
continue;
|
||||
}
|
||||
|
||||
if(at.target_X==0 && at.target_Y==0 && at.target_Z==0)
|
||||
if (at.target_X==0 && at.target_Y==0 && at.target_Z==0)
|
||||
{
|
||||
sLog.outErrorDb("Area trigger (ID:%u) target coordinates not provided.",Trigger_ID);
|
||||
sLog.outErrorDb("Table `areatrigger_teleport` has area trigger (ID:%u) without target coordinates.",Trigger_ID);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue