• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

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

Status
Not open for further replies.

stfurca

Member
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?



#EDIT
That was quick...
Code:
Map::PlayerList const& pList = me->GetMap()->GetPlayers();
 
Last edited:
Status
Not open for further replies.
Top