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:
committed by
Tomas Slusny
parent
549150a749
commit
0b2c7af6aa
@@ -125,6 +125,12 @@ public class LootManager
|
|||||||
public void onPlayerDespawned(PlayerDespawned playerDespawned)
|
public void onPlayerDespawned(PlayerDespawned playerDespawned)
|
||||||
{
|
{
|
||||||
final Player player = playerDespawned.getPlayer();
|
final Player player = playerDespawned.getPlayer();
|
||||||
|
// Only care about dead Players
|
||||||
|
if (player.getHealthRatio() != 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final LocalPoint location = LocalPoint.fromWorld(client, player.getWorldLocation());
|
final LocalPoint location = LocalPoint.fromWorld(client, player.getWorldLocation());
|
||||||
if (location == null || killMap.get(location))
|
if (location == null || killMap.get(location))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user