Hey, i've been working on a group script for many different script like mass group teleportation or mass group loot. but i've ecounter a problem. any-time player is in group without being in the same range of the creature it will also apply to it.
How could i add a Range Check to this script ?
Thanks for replying !
void PlayerIsInGroup(Player* player)
Group * group = player->GetGroup();
Group::MemberSlotList const &members = group->GetMemberSlots();
for (Group::MemberSlotList::const_iterator itr = members.begin(); itr != members.end(); ++itr)
Group::MemberSlot const &slot = *itr;
Player* player = ObjectAccessor::FindPlayer((*itr).guid);
if (player && player->GetSession())