aboutsummaryrefslogtreecommitdiff
path: root/src/game/Group.cpp
diff options
context:
space:
mode:
authorTrazom62 <none@none>2010-03-19 22:28:00 +0100
committerTrazom62 <none@none>2010-03-19 22:28:00 +0100
commit7a8dff70ed6ff534681a8e839f7b2d6a35fa7692 (patch)
treec4f0bf8bf500dc260a459d3ef14717a0d91646c1 /src/game/Group.cpp
parentb6258cf1cffdf3ac5b64f0d92bc825c989703208 (diff)
Fix Object::IsInMap to check instanceId.
Fig group loot distance checks to also check map instanceId. Fixes issue #1172. --HG-- branch : trunk
Diffstat (limited to 'src/game/Group.cpp')
-rw-r--r--src/game/Group.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game/Group.cpp b/src/game/Group.cpp
index 23fbf1f1010..e25e098d06b 100644
--- a/src/game/Group.cpp
+++ b/src/game/Group.cpp
@@ -609,7 +609,7 @@ void Group::GroupLoot(Loot *loot, WorldObject* pLootedObject)
continue;
if (i->AllowedForPlayer(member))
{
- if (member->IsWithinDist(pLootedObject,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE),false))
+ if (member->IsWithinDistInMap(pLootedObject,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE),false))
{
r->playerVote[member->GetGUID()] = NOT_EMITED_YET;
r->totalPlayersRolling++;
@@ -674,7 +674,7 @@ void Group::NeedBeforeGreed(Loot *loot, WorldObject* pLootedObject)
if (playerToRoll->CanUseItem(item) && i->AllowedForPlayer(playerToRoll))
{
- if (playerToRoll->IsWithinDist(pLootedObject,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE),false))
+ if (playerToRoll->IsWithinDistInMap(pLootedObject,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE),false))
{
r->playerVote[playerToRoll->GetGUID()] = NOT_EMITED_YET;
r->totalPlayersRolling++;
@@ -724,7 +724,7 @@ void Group::MasterLoot(Loot* /*loot*/, WorldObject* pLootedObject)
if (!looter->IsInWorld())
continue;
- if (looter->IsWithinDist(pLootedObject,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE),false))
+ if (looter->IsWithinDistInMap(pLootedObject,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE),false))
{
data << looter->GetGUID();
++real_count;
@@ -736,7 +736,7 @@ void Group::MasterLoot(Loot* /*loot*/, WorldObject* pLootedObject)
for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
Player *looter = itr->getSource();
- if (looter->IsWithinDist(pLootedObject,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE),false))
+ if (looter->IsWithinDistInMap(pLootedObject,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE),false))
looter->GetSession()->SendPacket(&data);
}
}
@@ -1437,7 +1437,7 @@ void Group::UpdateLooterGuid(WorldObject* pLootedObject, bool ifneed)
{
// not update if only update if need and ok
Player* looter = ObjectAccessor::FindPlayer(guid_itr->guid);
- if (looter && looter->IsWithinDist(pLootedObject,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE),false))
+ if (looter && looter->IsWithinDistInMap(pLootedObject,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE),false))
return;
}
++guid_itr;
@@ -1448,7 +1448,7 @@ void Group::UpdateLooterGuid(WorldObject* pLootedObject, bool ifneed)
for (member_citerator itr = guid_itr; itr != m_memberSlots.end(); ++itr)
{
if (Player* pl = ObjectAccessor::FindPlayer(itr->guid))
- if (pl->IsWithinDist(pLootedObject,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE),false))
+ if (pl->IsWithinDistInMap(pLootedObject,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE),false))
{
pNewLooter = pl;
break;
@@ -1461,7 +1461,7 @@ void Group::UpdateLooterGuid(WorldObject* pLootedObject, bool ifneed)
for (member_citerator itr = m_memberSlots.begin(); itr != guid_itr; ++itr)
{
if (Player* pl = ObjectAccessor::FindPlayer(itr->guid))
- if (pl->IsWithinDist(pLootedObject,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE),false))
+ if (pl->IsWithinDistInMap(pLootedObject,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE),false))
{
pNewLooter = pl;
break;