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:
@@ -257,7 +257,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Instance is full
|
//Instance is full
|
||||||
MapDifficulty const* mapDiff = ((InstanceMap*)player)->GetMapDifficulty();
|
MapDifficulty const* mapDiff = ((InstanceMap*)boundedMap)->GetMapDifficulty();
|
||||||
int8 maxPlayers = mapDiff ? mapDiff->maxPlayers : 0;
|
int8 maxPlayers = mapDiff ? mapDiff->maxPlayers : 0;
|
||||||
if (maxPlayers != -1) //-1: unlimited access
|
if (maxPlayers != -1) //-1: unlimited access
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user