aboutsummaryrefslogtreecommitdiff
path: root/src/game/LFGHandler.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-07-01 18:36:03 -0500
committermegamage <none@none>2009-07-01 18:36:03 -0500
commit4a8a89e1db1f103020ffecbb570e1c570c2e0d21 (patch)
treed5e62fa664a0f36d668f738abc50ac9406d50e5a /src/game/LFGHandler.cpp
parent111dac5f94eac3fe26da2107842dea4e1aacd660 (diff)
[8103] More wide use IsInWorld checks and delayed at teleport operations. Author: Ambal
* IsInWorld used to prevent return unexpected not in world objects. * Delayed operations need to process its in world state. --HG-- branch : trunk
Diffstat (limited to 'src/game/LFGHandler.cpp')
-rw-r--r--src/game/LFGHandler.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game/LFGHandler.cpp b/src/game/LFGHandler.cpp
index 51735c01e02..09653ccb0bc 100644
--- a/src/game/LFGHandler.cpp
+++ b/src/game/LFGHandler.cpp
@@ -42,6 +42,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;
@@ -98,6 +102,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;
@@ -311,6 +318,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;