Merge pull request #2478 from MagicfTail/Fix-Deadfall-Traps
HunterPlugin: Fix deadfall traps
This commit is contained in:
@@ -115,6 +115,14 @@ public class HunterPlugin extends Plugin
|
|||||||
* ------------------------------------------------------------------------------
|
* ------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
case ObjectID.DEADFALL: // Deadfall trap placed
|
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
|
case ObjectID.MONKEY_TRAP: // Maniacal monkey trap placed
|
||||||
// If player is right next to "object" trap assume that player placed the trap
|
// If player is right next to "object" trap assume that player placed the trap
|
||||||
if (localPlayer.getWorldLocation().distanceTo(trapLocation) <= 1)
|
if (localPlayer.getWorldLocation().distanceTo(trapLocation) <= 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user