mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[c12590] Do more checks if a Player can enter a map On Login
This commit is contained in:
parent
58ad20df80
commit
de4c1edf9b
2 changed files with 7 additions and 5 deletions
|
|
@ -722,13 +722,15 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder *holder)
|
|||
}
|
||||
}
|
||||
|
||||
if (!pCurrChar->GetMap()->Add(pCurrChar))
|
||||
uint32 miscRequirement = 0;
|
||||
AreaLockStatus lockStatus = pCurrChar->GetAreaTriggerLockStatus(sObjectMgr.GetMapEntranceTrigger(pCurrChar->GetMapId()), pCurrChar->GetDifficulty(pCurrChar->GetMap()->IsRaid()), miscRequirement);
|
||||
if (lockStatus != AREA_LOCKSTATUS_OK || !pCurrChar->GetMap()->Add(pCurrChar))
|
||||
{
|
||||
// normal delayed teleport protection not applied (and this correct) for this case (Player object just created)
|
||||
AreaTrigger const* at = sObjectMgr.GetGoBackTrigger(pCurrChar->GetMapId());
|
||||
if(at)
|
||||
pCurrChar->TeleportTo(at->target_mapId, at->target_X, at->target_Y, at->target_Z, pCurrChar->GetOrientation());
|
||||
else
|
||||
if (at)
|
||||
lockStatus = pCurrChar->GetAreaTriggerLockStatus(at, pCurrChar->GetDifficulty(pCurrChar->GetMap()->IsRaid()), miscRequirement);
|
||||
if (!at || lockStatus != AREA_LOCKSTATUS_OK || !pCurrChar->TeleportTo(at->target_mapId, at->target_X, at->target_Y, at->target_Z, pCurrChar->GetOrientation()))
|
||||
pCurrChar->TeleportToHomebind();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12589"
|
||||
#define REVISION_NR "12590"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue