mirror of
https://github.com/mangosfour/server.git
synced 2025-12-26 07:37:02 +00:00
[11015] Prevent crash at player far teleport landing to nonexisten battleground instance.
Teleport back in like case or to homebind in bad case.
This commit is contained in:
parent
3de0f99f59
commit
0c19c2c6a2
4 changed files with 39 additions and 9 deletions
|
|
@ -154,12 +154,14 @@ Map* MapManager::FindMap(uint32 mapid, uint32 instanceId) const
|
|||
bool MapManager::CanPlayerEnter(uint32 mapid, Player* player)
|
||||
{
|
||||
const MapEntry *entry = sMapStore.LookupEntry(mapid);
|
||||
if(!entry) return false;
|
||||
if(!entry)
|
||||
return false;
|
||||
|
||||
const char *mapName = entry->name[player->GetSession()->GetSessionDbcLocale()];
|
||||
|
||||
if(entry->map_type == MAP_INSTANCE || entry->map_type == MAP_RAID)
|
||||
if(entry->IsDungeon())
|
||||
{
|
||||
if (entry->map_type == MAP_RAID)
|
||||
if (entry->IsRaid())
|
||||
{
|
||||
// GMs can avoid raid limitations
|
||||
if(!player->isGameMaster() && !sWorld.getConfig(CONFIG_BOOL_INSTANCE_IGNORE_RAID))
|
||||
|
|
@ -228,10 +230,9 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player)
|
|||
player->SendTransferAborted(GetId(), TRANSFER_ABORT_ZONE_IN_COMBAT);
|
||||
return(false);
|
||||
}*/
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void MapManager::DeleteInstance(uint32 mapid, uint32 instanceId)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue