diff options
author | Jozef DĂșc <D0d0@users.noreply.github.com> | 2019-05-02 21:53:12 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-12-03 00:21:19 +0100 |
commit | a13a765610d964a3aa1bab1b41331c05e24a1f78 (patch) | |
tree | 77231f33cb344ac27efe004c2c4e796088c03217 /src/server/game/Handlers/LootHandler.cpp | |
parent | 03e03f3fc6ba7ff416bc79f8044e04e1969b98a4 (diff) |
Core/Object: Range check vol. 2 (#23226)
* Core/Object: Fix all missing parts for #23062
* Update GameObject.cpp
(cherry picked from commit 78070163dc6b9bb34ab2d006e9cc218548e861b7)
Diffstat (limited to 'src/server/game/Handlers/LootHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/LootHandler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp index 93f0b1947e0..f2c5ad4f15c 100644 --- a/src/server/game/Handlers/LootHandler.cpp +++ b/src/server/game/Handlers/LootHandler.cpp @@ -78,7 +78,7 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPackets::Loot::LootItem& p GameObject* go = player->GetMap()->GetGameObject(lguid); // not check distance for GO in case owned GO (fishing bobber case, for example) or Fishing hole GO - if (!go || ((go->GetOwnerGUID() != _player->GetGUID() && go->GetGoType() != GAMEOBJECT_TYPE_FISHINGHOLE) && !go->IsWithinDistInMap(_player, INTERACTION_DISTANCE))) + if (!go || ((go->GetOwnerGUID() != _player->GetGUID() && go->GetGoType() != GAMEOBJECT_TYPE_FISHINGHOLE) && !go->IsWithinDistInMap(_player))) { player->SendLootRelease(lguid); continue; @@ -158,7 +158,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPackets::Loot::LootMoney& /*packet GameObject* go = GetPlayer()->GetMap()->GetGameObject(guid); // do not check distance for GO if player is the owner of it (ex. fishing bobber) - if (go && ((go->GetOwnerGUID() == player->GetGUID() || go->IsWithinDistInMap(player, INTERACTION_DISTANCE)))) + if (go && ((go->GetOwnerGUID() == player->GetGUID() || go->IsWithinDistInMap(player)))) loot = &go->loot; break; @@ -328,7 +328,7 @@ void WorldSession::DoLootRelease(ObjectGuid lguid) GameObject* go = GetPlayer()->GetMap()->GetGameObject(lguid); // not check distance for GO in case owned GO (fishing bobber case, for example) or Fishing hole GO - if (!go || ((go->GetOwnerGUID() != _player->GetGUID() && go->GetGoType() != GAMEOBJECT_TYPE_FISHINGHOLE) && !go->IsWithinDistInMap(_player, INTERACTION_DISTANCE))) + if (!go || ((go->GetOwnerGUID() != _player->GetGUID() && go->GetGoType() != GAMEOBJECT_TYPE_FISHINGHOLE) && !go->IsWithinDistInMap(_player))) return; loot = &go->loot; |