Aha! So the player that gets the last hit is the only person able to open the corpse?
That would be annoying for all your players!
The solution to your problem is in monster.cpp in this function.
Code:
Item* Monster::createCorpse(DeathList deathList)
Now there SHOULD be a line like this:
Code:
Creature* _owner = deathList[0].getKillerCreature();
if(deathList.size() > 1 && deathList[1].getDamage() > deathList[0].getDamage())
_owner = deathList[1].getKillerCreature();
and then a little farther into the function there is this:
Code:
corpse->setCorpseOwner(owner->getGUID());
So basically the _owner becomes the corpse owner, so we need to explain the first 3 lines of code so you can fix it.
Code:
Creature* _owner = deathList[0].getKillerCreature();
deathList[0] is the last hit, so by default, the last hit will be the corpseOwner as you can see above.
Code:
if(deathList.size() > 1 && deathList[1].getDamage() > deathList[0].getDamage())
_owner = deathList[1].getKillerCreature();
so above it says, If there is more than 1 person on the Deathlist (deathList.size() > 1) and the damage of the other other player is higher than the player who got the last hit (deathList[1].getDamage() > deathList[0].getDamage()) THEN the _owner will be deathList[1] (The player who got more damage than the last hit player)
So as long as your source code shows the above IT SHOULD work.
There can be ANOTHER way (which I assume is much more likely to be the problem) that you have broken this.
If you set your PZ timer, white skull timer, or field ownership timer to less than 5 seconds, then it ONLY counts damage done in the last 5 seconds.
I don't remember which one, but I HIGHLY suggest first trying this.
Set the below config values to AT LEAST 10 seconds. I am betting this will fix your problem.
Code:
pzLocked = 10 * 1000 -- 10 seconds
huntingDuration = 10 * 1000 -- 10 seconds
fieldOwnershipDuration = 10 * 1000 -- 10 seconds