mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
Core/Database: Include cleanup
This commit is contained in:
@@ -2471,8 +2471,11 @@ UnitScript::UnitScript(const char* name, bool addToScripts)
|
||||
}
|
||||
|
||||
WorldMapScript::WorldMapScript(const char* name, uint32 mapId)
|
||||
: ScriptObject(name), MapScript<Map>(mapId)
|
||||
: ScriptObject(name), MapScript<Map>(sMapStore.LookupEntry(mapId))
|
||||
{
|
||||
if (!GetEntry())
|
||||
TC_LOG_ERROR("scripts", "Invalid WorldMapScript for %u; no such map ID.", mapId);
|
||||
|
||||
if (GetEntry() && !GetEntry()->IsWorldMap())
|
||||
TC_LOG_ERROR("scripts", "WorldMapScript for map %u is invalid.", mapId);
|
||||
|
||||
@@ -2480,8 +2483,11 @@ WorldMapScript::WorldMapScript(const char* name, uint32 mapId)
|
||||
}
|
||||
|
||||
InstanceMapScript::InstanceMapScript(const char* name, uint32 mapId)
|
||||
: ScriptObject(name), MapScript<InstanceMap>(mapId)
|
||||
: ScriptObject(name), MapScript<InstanceMap>(sMapStore.LookupEntry(mapId))
|
||||
{
|
||||
if (!GetEntry())
|
||||
TC_LOG_ERROR("scripts", "Invalid InstanceMapScript for %u; no such map ID.", mapId);
|
||||
|
||||
if (GetEntry() && !GetEntry()->IsDungeon())
|
||||
TC_LOG_ERROR("scripts", "InstanceMapScript for map %u is invalid.", mapId);
|
||||
|
||||
@@ -2489,8 +2495,11 @@ InstanceMapScript::InstanceMapScript(const char* name, uint32 mapId)
|
||||
}
|
||||
|
||||
BattlegroundMapScript::BattlegroundMapScript(const char* name, uint32 mapId)
|
||||
: ScriptObject(name), MapScript<BattlegroundMap>(mapId)
|
||||
: ScriptObject(name), MapScript<BattlegroundMap>(sMapStore.LookupEntry(mapId))
|
||||
{
|
||||
if (!GetEntry())
|
||||
TC_LOG_ERROR("scripts", "Invalid BattlegroundMapScript for %u; no such map ID.", mapId);
|
||||
|
||||
if (GetEntry() && !GetEntry()->IsBattleground())
|
||||
TC_LOG_ERROR("scripts", "BattlegroundMapScript for map %u is invalid.", mapId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user