Module: RuneRb::Network::RS377::MouseClickMessage

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

Overview

Sent when the client clicks a location on the game screen.

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


20
21
22
23
24
# File 'app/network/protocol/rs377/incoming/click.rb', line 20

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