View Single Post
  #3  
Old 02-14-2018, 08:12 PM
image
Demi-God
 
Join Date: Jan 2002
Posts: 1,290
Default

No it won't necessarily work out of the box. If a client kills another client and the person whom killed the other is grouped (killer is grouped) -- then yea it will work.

Code:
Client::Death
needs to be fixed cause the killerMob pointer can be a npc, like a pet. So you need the owner to be sure. At that point you need to allow the player to loot also which is not done if you are solo (only grouped).

similar to what they do here, but its done wrong cause this could be the pet and only works for groups:

https://github.com/EQEmu/Server/blob...tack.cpp#L1756

https://github.com/EQEmu/Server/blob...tack.cpp#L1771

Code:
				if (killerMob->CastToClient()->isgrouped) {
					Group* group = entity_list.GetGroupByClient(killerMob->CastToClient());
					if (group != 0)
					{
						for (int i = 0; i<6; i++)
						{
							if (group->members[i] != nullptr)
							{
								new_corpse->AllowPlayerLoot(group->members[i], i);
							}
						}
new_corpse->AllowPlayerLoot(killerMob, 0); is what you need out of it for solo players... but need to also allow the killerMob (or the appropriate owner being a client)


db variables (ServerType, PvPreward, PvPitem)

ServerType = 1 (must be enabled to enable the below variables)


PvPreward = 3 (ITEM DROP of db variable PvPitem)
PvPitem = item id (only in PVPreward 3)
*this creates an item, not taken from the corpse

PVPreward = 1
one item on corpse

PVPreward = -1
all items on corpse
__________________
www.eq2emu.com
EQ2Emu Developer
Former EQEMu Developer / GuildWars / Zek Seasons Servers
Member of the "I hate devn00b" club.
Reply With Quote