Two packets involved the show player option packet (shows attack option) and the click player option (when the player clicks attack).
Easiest way to do is to just define an upper and lower boundary and exclude anything within certain coordinates.
When the player enters an excluded coordinate remove the player option and discontinue any existing combat task.