Check for player HP being 0 in player loot event

Check if player HP is 0 (e.g player being really dead) when sending
PlayerLootReceived event.

Fixes #4653
This commit is contained in:
Michael Goodwin
2018-09-02 12:43:57 -07:00
committed by Tomas Slusny
parent 549150a749
commit 0b2c7af6aa

View File

@@ -125,6 +125,12 @@ public class LootManager
public void onPlayerDespawned(PlayerDespawned playerDespawned)
{
final Player player = playerDespawned.getPlayer();
// Only care about dead Players
if (player.getHealthRatio() != 0)
{
return;
}
final LocalPoint location = LocalPoint.fromWorld(client, player.getWorldLocation());
if (location == null || killMap.get(location))
{