mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-18 22:09:40 -04:00
fixed startup crash while loading instance_encounters
This commit is contained in:
@@ -1492,7 +1492,7 @@ void ObjectMgr::LoadCreatures()
|
||||
}
|
||||
|
||||
if (data.spawnMask & ~spawnMasks[data.mapid])
|
||||
sLog->outErrorDb("Table `creature` have creature (GUID: %u) that have wrong spawn mask %u including not supported difficulty modes for map (Id: %u).", guid, data.spawnMask, data.mapid);
|
||||
sLog->outErrorDb("Table `creature` have creature (GUID: %u) that have wrong spawn mask %u including not supported difficulty modes for map (Id: %u) spawnMasks[data.mapid]: %u.", guid, data.spawnMask, data.mapid, spawnMasks[data.mapid]);
|
||||
|
||||
bool ok = true;
|
||||
for (uint32 diff = 0; diff < MAX_DIFFICULTY - 1 && ok; ++diff)
|
||||
@@ -5156,7 +5156,7 @@ void ObjectMgr::LoadInstanceEncounters()
|
||||
|
||||
if (lastEncounterDungeon && !sLFGDungeonStore.LookupEntry(lastEncounterDungeon))
|
||||
{
|
||||
sLog->outErrorDb("Table `instance_encounters` has an encounter %u (%s) marked as final for invalid dungeon id %u, skipped!", entry, dungeonEncounter->encounterName[0], lastEncounterDungeon);
|
||||
sLog->outErrorDb("Table `instance_encounters` has an encounter %u (%s) marked as final for invalid dungeon id %u, skipped!", entry, dungeonEncounter->encounterName, lastEncounterDungeon);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -5165,7 +5165,7 @@ void ObjectMgr::LoadInstanceEncounters()
|
||||
{
|
||||
if (itr != dungeonLastBosses.end())
|
||||
{
|
||||
sLog->outErrorDb("Table `instance_encounters` specified encounter %u (%s) as last encounter but %u (%s) is already marked as one, skipped!", entry, dungeonEncounter->encounterName[0], itr->second->id, itr->second->encounterName[0]);
|
||||
sLog->outErrorDb("Table `instance_encounters` specified encounter %u (%s) as last encounter but %u (%s) is already marked as one, skipped!", entry, dungeonEncounter->encounterName, itr->second->id, itr->second->encounterName[0]);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -5179,7 +5179,7 @@ void ObjectMgr::LoadInstanceEncounters()
|
||||
CreatureTemplate const* creatureInfo = GetCreatureTemplate(creditEntry);
|
||||
if (!creatureInfo)
|
||||
{
|
||||
sLog->outErrorDb("Table `instance_encounters` has an invalid creature (entry %u) linked to the encounter %u (%s), skipped!", creditEntry, entry, dungeonEncounter->encounterName[0]);
|
||||
sLog->outErrorDb("Table `instance_encounters` has an invalid creature (entry %u) linked to the encounter %u (%s), skipped!", creditEntry, entry, dungeonEncounter->encounterName);
|
||||
continue;
|
||||
}
|
||||
const_cast<CreatureTemplate*>(creatureInfo)->flags_extra |= CREATURE_FLAG_EXTRA_DUNGEON_BOSS;
|
||||
@@ -5188,12 +5188,12 @@ void ObjectMgr::LoadInstanceEncounters()
|
||||
case ENCOUNTER_CREDIT_CAST_SPELL:
|
||||
if (!sSpellMgr->GetSpellInfo(creditEntry))
|
||||
{
|
||||
sLog->outErrorDb("Table `instance_encounters` has an invalid spell (entry %u) linked to the encounter %u (%s), skipped!", creditEntry, entry, dungeonEncounter->encounterName[0]);
|
||||
sLog->outErrorDb("Table `instance_encounters` has an invalid spell (entry %u) linked to the encounter %u (%s), skipped!", creditEntry, entry, dungeonEncounter->encounterName);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
sLog->outErrorDb("Table `instance_encounters` has an invalid credit type (%u) for encounter %u (%s), skipped!", creditType, entry, dungeonEncounter->encounterName[0]);
|
||||
sLog->outErrorDb("Table `instance_encounters` has an invalid credit type (%u) for encounter %u (%s), skipped!", creditType, entry, dungeonEncounter->encounterName);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -432,7 +432,7 @@ void InstanceScript::UpdateEncounterState(EncounterCreditType type, uint32 credi
|
||||
if ((*itr)->creditType == type && (*itr)->creditEntry == creditEntry)
|
||||
{
|
||||
completedEncounters |= 1 << (*itr)->dbcEntry->encounterIndex;
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "Instance %s (instanceId %u) completed encounter %s", instance->GetMapName(), instance->GetInstanceId(), (*itr)->dbcEntry->encounterName[0]);
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "Instance %s (instanceId %u) completed encounter %s", instance->GetMapName(), instance->GetInstanceId(), (*itr)->dbcEntry->encounterName);
|
||||
if (uint32 dungeonId = (*itr)->lastEncounterDungeon)
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
|
||||
Reference in New Issue
Block a user