Player/Quest: Credit group for gameobject activation if they are in proximity.

This commit is contained in:
treeston committed 2016-01-21 00:00:33 +01:00
1 parent cebdf03349
commit cd625a12e2
1 file changed
+9 -1
@@ -1353,7 +1353,15 @@ void GameObject::Use(Unit* user)
break;
}
player->KillCreditGO(info->entry, GetGUID());
if (Group* group = player->GetGroup())
{
for (GroupReference const* itr = group->GetFirstMember(); itr != nullptr; itr = itr->next())
if (Player* member = itr->GetSource())
if (member->IsAtGroupRewardDistance(this))
member->KillCreditGO(info->entry, GetGUID());
}
else
player->KillCreditGO(info->entry, GetGUID());
}
if (uint32 trapEntry = info->goober.linkedTrapId)