Revert "Make same-tick same-tile loot event fire once"

This reverts commit 549150a749.
This commit is contained in:
Adam
2018-09-03 21:25:13 -04:00
parent 6570e23b67
commit d3080f059b

View File

@@ -31,7 +31,6 @@ import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.Subscribe; import com.google.common.eventbus.Subscribe;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.inject.Inject; import javax.inject.Inject;
@@ -67,7 +66,6 @@ public class LootManager
private final EventBus eventBus; private final EventBus eventBus;
private final Client client; private final Client client;
private final ListMultimap<Integer, ItemStack> itemSpawns = ArrayListMultimap.create(); private final ListMultimap<Integer, ItemStack> itemSpawns = ArrayListMultimap.create();
private final Map<LocalPoint, Boolean> killMap = new HashMap<>();
private WorldPoint playerLocationLastTick; private WorldPoint playerLocationLastTick;
private WorldPoint krakenPlayerLocation; private WorldPoint krakenPlayerLocation;
@@ -132,7 +130,7 @@ public class LootManager
} }
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)
{ {
return; return;
} }
@@ -147,7 +145,6 @@ public class LootManager
return; return;
} }
killMap.put(location, true);
eventBus.post(new PlayerLootReceived(player, items)); eventBus.post(new PlayerLootReceived(player, items));
} }
@@ -214,13 +211,12 @@ public class LootManager
{ {
playerLocationLastTick = client.getLocalPlayer().getWorldLocation(); playerLocationLastTick = client.getLocalPlayer().getWorldLocation();
itemSpawns.clear(); itemSpawns.clear();
killMap.clear();
} }
private void processNpcLoot(NPC npc) private void processNpcLoot(NPC npc)
{ {
final LocalPoint location = LocalPoint.fromWorld(client, getDropLocation(npc, npc.getWorldLocation())); final LocalPoint location = LocalPoint.fromWorld(client, getDropLocation(npc, npc.getWorldLocation()));
if (location == null || killMap.get(location)) if (location == null)
{ {
return; return;
} }
@@ -246,7 +242,6 @@ public class LootManager
return; return;
} }
killMap.put(location, true);
eventBus.post(new NpcLootReceived(npc, allItems)); eventBus.post(new NpcLootReceived(npc, allItems));
} }