Module: RuneRb::Network::RS317::MouseClickMessage

Defined in:
app/network/protocol/rs317/incoming/click.rb

Overview

Since:

  • 0.9.3

Defined Under Namespace

Classes: Click

Instance Method Summary collapse

Instance Method Details

#parse(_) ⇒ Object

Parses the MouseClickMessage

Since:

  • 0.9.3


16
17
18
19
20
# File 'app/network/protocol/rs317/incoming/click.rb', line 16

def parse(_)
  data = read_int
  coordinates = data & 0x3FFFF
  Click.new((data >> 20) * 50, (data >> 19 & 0x1) == 1, coordinates & 765, coordinates / 765).inspect
end