Partial implementation of instance system patch by scarymovie87, fix max players check in instance. Cause of error was a pointer of class Player was casted to class InstanceMap. Refs issue #1323

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-03-27 15:09:26 +01:00
parent be739e9900
commit 9ce6094dce
+1 -1
View File
@@ -257,7 +257,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player)
}
//Instance is full
MapDifficulty const* mapDiff = ((InstanceMap*)player)->GetMapDifficulty();
MapDifficulty const* mapDiff = ((InstanceMap*)boundedMap)->GetMapDifficulty();
int8 maxPlayers = mapDiff ? mapDiff->maxPlayers : 0;
if (maxPlayers != -1) //-1: unlimited access
{