aboutsummaryrefslogtreecommitdiff
path: root/src/game/NPCHandler.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/NPCHandler.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/NPCHandler.cpp')
-rw-r--r--src/game/NPCHandler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/NPCHandler.cpp b/src/game/NPCHandler.cpp
index c60d368659a..bb9823ee71f 100644
--- a/src/game/NPCHandler.cpp
+++ b/src/game/NPCHandler.cpp
@@ -422,7 +422,7 @@ void WorldSession::HandleBinderActivateOpcode( WorldPacket & recv_data )
uint64 npcGUID;
recv_data >> npcGUID;
- if(!GetPlayer()->isAlive())
+ if(!GetPlayer()->IsInWorld() || !GetPlayer()->isAlive())
return;
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID,UNIT_NPC_FLAG_INNKEEPER);
@@ -442,7 +442,7 @@ void WorldSession::HandleBinderActivateOpcode( WorldPacket & recv_data )
void WorldSession::SendBindPoint(Creature *npc)
{
// prevent set homebind to instances in any case
- if(sMapStore.LookupEntry(GetPlayer()->GetMapId())->Instanceable())
+ if(GetPlayer()->GetMap()->Instanceable())
return;
uint32 bindspell = 3286;