View Full Version : [SOLVED] Custom boss with loot for everyone that took a part in killing it

02-21-2016, 10:38 AM
Hello guys!

I wrote some bosses in C++ using CreatureScripts but I have a problem now.

I need to it distibute the loot with all of the players in a range. The problem is here, that bosses/scriptedCreature does not have any access to the area (to get nearby players, or something).
The one method which returns a player is FindNearestCreature(), but I need to find everyone in a range, store it somewhere and distribute the loot onKill().

Problem is here that there is no party/group, because horde/ally is killing it together, that's why I need to distribute the loot in code, that everyone is happy.

Do you have any idea how to achieve this?

That was quick...

Map::PlayerList const& pList = me->GetMap()->GetPlayers();