diff options
author | joschiwald <joschiwald.trinity@gmail.com> | 2016-02-04 20:43:28 +0100 |
---|---|---|
committer | joschiwald <joschiwald.trinity@gmail.com> | 2016-02-04 20:43:28 +0100 |
commit | 8b6954e81b76f8d7c6700eaf1a8b942bebaa85a0 (patch) | |
tree | 346e361bf9b14aec3283684b287331ee7b3e55b4 /src/server/game/Handlers/MiscHandler.cpp | |
parent | fe2a0fda4464effeb2fb655da84a0460328b1aeb (diff) |
Core/Gossips: added some sanity checks to prevent duplicate interaction
Diffstat (limited to 'src/server/game/Handlers/MiscHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/MiscHandler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index 758d5af83f7..6cd8bfc014e 100644 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -105,7 +105,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData) GameObject* go = NULL; if (guid.IsCreatureOrVehicle()) { - unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE); + unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_GOSSIP); if (!unit) { TC_LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - %s not found or you can't interact with him.", guid.ToString().c_str()); @@ -114,10 +114,10 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData) } else if (guid.IsGameObject()) { - go = _player->GetMap()->GetGameObject(guid); + go = _player->GetGameObjectIfCanInteractWith(guid); if (!go) { - TC_LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - %s not found.", guid.ToString().c_str()); + TC_LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - %s not found or you can't interact with it.", guid.ToString().c_str()); return; } } |