aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/MapInstanced.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Maps/MapInstanced.cpp')
-rw-r--r--src/server/game/Maps/MapInstanced.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp
index ae023f153bb..2d7feeda28d 100644
--- a/src/server/game/Maps/MapInstanced.cpp
+++ b/src/server/game/Maps/MapInstanced.cpp
@@ -155,7 +155,7 @@ Map* MapInstanced::CreateInstanceForPlayer(uint32 mapId, Player* player, uint32
{
map = FindInstanceMap(loginInstanceId);
if (!map && pSave && pSave->GetInstanceId() == loginInstanceId)
- map = CreateInstance(loginInstanceId, pSave, pSave->GetDifficulty());
+ map = CreateInstance(loginInstanceId, pSave, pSave->GetDifficulty(), player->GetTeamId());
return map;
}
@@ -180,7 +180,7 @@ Map* MapInstanced::CreateInstanceForPlayer(uint32 mapId, Player* player, uint32
map = FindInstanceMap(newInstanceId);
// it is possible that the save exists but the map doesn't
if (!map)
- map = CreateInstance(newInstanceId, pSave, pSave->GetDifficulty());
+ map = CreateInstance(newInstanceId, pSave, pSave->GetDifficulty(), player->GetTeamId());
}
else
{
@@ -193,14 +193,14 @@ Map* MapInstanced::CreateInstanceForPlayer(uint32 mapId, Player* player, uint32
//ASSERT(!FindInstanceMap(NewInstanceId));
map = FindInstanceMap(newInstanceId);
if (!map)
- map = CreateInstance(newInstanceId, nullptr, diff);
+ map = CreateInstance(newInstanceId, nullptr, diff, player->GetTeamId());
}
}
return map;
}
-InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave* save, Difficulty difficulty)
+InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave* save, Difficulty difficulty, TeamId InstanceTeam)
{
// load/create a map
std::lock_guard<std::mutex> lock(_mapLock);
@@ -224,7 +224,7 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave* save,
TC_LOG_DEBUG("maps", "MapInstanced::CreateInstance: %s map instance %d for %d created with difficulty %s", save?"":"new ", InstanceId, GetId(), difficulty?"heroic":"normal");
- InstanceMap* map = new InstanceMap(GetId(), GetGridExpiry(), InstanceId, difficulty, this);
+ InstanceMap* map = new InstanceMap(GetId(), GetGridExpiry(), InstanceId, difficulty, this, InstanceTeam);
ASSERT(map->IsDungeon());
map->LoadRespawnTimes();