mirror of
https://github.com/mangosfour/server.git
synced 2025-12-22 04:37:01 +00:00
[8103] More wide use IsInWorld checks and delayed at teleport operations.
* IsInWorld used to prevent return unexpected not in world objects. * Delayed operations need to process its in world state. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
9f41772828
commit
9f938a9ed4
17 changed files with 220 additions and 40 deletions
|
|
@ -40,6 +40,10 @@ static void AttemptJoin(Player* _player)
|
|||
if(!plr || plr==_player || plr->GetTeam() != _player->GetTeam())
|
||||
continue;
|
||||
|
||||
//skip players not in world
|
||||
if(!plr->IsInWorld())
|
||||
continue;
|
||||
|
||||
// skip not auto add, not group leader cases
|
||||
if(!plr->GetSession()->LookingForGroup_auto_add || plr->GetGroup() && plr->GetGroup()->GetLeaderGUID()!=plr->GetGUID())
|
||||
continue;
|
||||
|
|
@ -96,6 +100,9 @@ static void AttemptAddMore(Player* _player)
|
|||
if(!plr || plr==_player || plr->GetTeam() != _player->GetTeam())
|
||||
continue;
|
||||
|
||||
if(!plr->IsInWorld())
|
||||
continue;
|
||||
|
||||
// skip not auto join or in group
|
||||
if(!plr->GetSession()->LookingForGroup_auto_join || plr->GetGroup() )
|
||||
continue;
|
||||
|
|
@ -309,6 +316,9 @@ void WorldSession::SendLfgResult(uint32 type, uint32 entry, uint8 lfg_type)
|
|||
if(!plr || plr->GetTeam() != _player->GetTeam())
|
||||
continue;
|
||||
|
||||
if(!plr->IsInWorld())
|
||||
continue;
|
||||
|
||||
if(!plr->m_lookingForGroup.HaveInSlot(entry, type))
|
||||
continue;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue