Core/Object: Range check vol. 2
Port From (https://github.com/TrinityCore/TrinityCore/commit/a13a765610d964a3aa1bab1b41331c05e24a1f78)
This commit is contained in:
@@ -47,7 +47,7 @@ namespace Game
|
||||
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() != GameObjectTypes.FishingHole) && !go.IsWithinDistInMap(player, SharedConst.InteractionDistance)))
|
||||
if (!go || ((go.GetOwnerGUID() != player.GetGUID() && go.GetGoType() != GameObjectTypes.FishingHole) && !go.IsWithinDistInMap(player)))
|
||||
{
|
||||
player.SendLootRelease(lguid);
|
||||
continue;
|
||||
@@ -129,7 +129,7 @@ namespace Game
|
||||
GameObject go = player.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, SharedConst.InteractionDistance))))
|
||||
if (go && (go.GetOwnerGUID() == player.GetGUID() || go.IsWithinDistInMap(player)))
|
||||
loot = go.loot;
|
||||
|
||||
break;
|
||||
@@ -331,7 +331,7 @@ namespace Game
|
||||
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() != GameObjectTypes.FishingHole) && !go.IsWithinDistInMap(player, SharedConst.InteractionDistance)))
|
||||
if (!go || ((go.GetOwnerGUID() != player.GetGUID() && go.GetGoType() != GameObjectTypes.FishingHole) && !go.IsWithinDistInMap(player)))
|
||||
return;
|
||||
|
||||
loot = go.loot;
|
||||
|
||||
Reference in New Issue
Block a user