HunterPlugin: Fix deadfall trap

The player is sometimes 2 squares away when setting up the trap
fasd


Revert "HunterPlugin: Fix deadfall trap"

This reverts commit a54852e03817306e5e619fee13d4557ef523da4a.
This commit is contained in:
Magic fTail
2018-05-08 17:27:00 +02:00
parent 11094edb3a
commit 3250628108

View File

@@ -115,6 +115,14 @@ public class HunterPlugin extends Plugin
* ------------------------------------------------------------------------------
*/
case ObjectID.DEADFALL: // Deadfall trap placed
if (localPlayer.getWorldLocation().distanceTo(trapLocation) <= 2)
{
log.debug("Trap placed by \"{}\" on {}", localPlayer.getName(), trapLocation);
traps.put(trapLocation, new HunterTrap(gameObject));
lastActionTime = Instant.now();
}
break;
case ObjectID.MONKEY_TRAP: // Maniacal monkey trap placed
// If player is right next to "object" trap assume that player placed the trap
if (localPlayer.getWorldLocation().distanceTo(trapLocation) <= 1)