Module: GG::PACKET_LOGIN60

Defined in:
lib/GRuby/GG_packets.rb

Overview

SEND PACKECTS #

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#description=(value) ⇒ Object (writeonly)

opis, nie musi wystąpić */


127
128
129
# File 'lib/GRuby/GG_packets.rb', line 127

def description=(value)
  @description = value
end

#external_ip=(value) ⇒ Object (writeonly)

zewnętrzny adres ip */


123
124
125
# File 'lib/GRuby/GG_packets.rb', line 123

def external_ip=(value)
  @external_ip = value
end

#external_port=(value) ⇒ Object (writeonly)

zewnętrzny port */


124
125
126
# File 'lib/GRuby/GG_packets.rb', line 124

def external_port=(value)
  @external_port = value
end

#hash=(value) ⇒ Object (writeonly)

hash hasła */


117
118
119
# File 'lib/GRuby/GG_packets.rb', line 117

def hash=(value)
  @hash = value
end

#image_size=(value) ⇒ Object (writeonly)

maksymalny rozmiar grafiki w KB */


125
126
127
# File 'lib/GRuby/GG_packets.rb', line 125

def image_size=(value)
  @image_size = value
end

#local_ip=(value) ⇒ Object (writeonly)

mój adres ip */


121
122
123
# File 'lib/GRuby/GG_packets.rb', line 121

def local_ip=(value)
  @local_ip = value
end

#local_port=(value) ⇒ Object (writeonly)

port, na którym słucham */


122
123
124
# File 'lib/GRuby/GG_packets.rb', line 122

def local_port=(value)
  @local_port = value
end

#status=(value) ⇒ Object (writeonly)

status na dzień dobry */


118
119
120
# File 'lib/GRuby/GG_packets.rb', line 118

def status=(value)
  @status = value
end

#time=(value) ⇒ Object (writeonly)

czas, nie musi wystąpić */


128
129
130
# File 'lib/GRuby/GG_packets.rb', line 128

def time=(value)
  @time = value
end

#uin=(value) ⇒ Object (writeonly)

mój numerek


116
117
118
# File 'lib/GRuby/GG_packets.rb', line 116

def uin=(value)
  @uin = value
end

#unknown1=(value) ⇒ Object (writeonly)

0x00 */


120
121
122
# File 'lib/GRuby/GG_packets.rb', line 120

def unknown1=(value)
  @unknown1 = value
end

#unknown2=(value) ⇒ Object (writeonly)

0xbe */


126
127
128
# File 'lib/GRuby/GG_packets.rb', line 126

def unknown2=(value)
  @unknown2 = value
end

#version=(value) ⇒ Object (writeonly)

moja wersja klienta */


119
120
121
# File 'lib/GRuby/GG_packets.rb', line 119

def version=(value)
  @version = value
end

Instance Method Details

#lengthObject


154
155
156
# File 'lib/GRuby/GG_packets.rb', line 154

def length
  4+4+4+4+1+4+2+4+2+1+1+(@description ? @description.length : 1)+4
end

#packedObject


158
159
160
# File 'lib/GRuby/GG_packets.rb', line 158

def packed
  pack 'II IIIIcIsIsccA*I'
end

#packetObject


134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# File 'lib/GRuby/GG_packets.rb', line 134

def packet
  [
    type,
    length,
    @uin           ? @uin              : 0,
    @hash          ? @hash             : 0,
    @status        ? @status           : 0,
    @version       ? @version          : 0x22,
    @unknown1      ? @unknown1         : 0,
    @local_ip      ? @local_ip         : 0,
    @local_port    ? @local_port       : 0,
    @external_ip   ? @external_ip      : 0,
    @external_port ? @external_port    : 0,
    @image_size    ? @image_size       : 0,
    @unknown2      ? @unknown2         : 0xBE,
    @description   ? "#{@description}" : "\0",
    @time          ? @time             : 0
  ]
end

#typeObject


130
131
132
# File 'lib/GRuby/GG_packets.rb', line 130

def type
  LOGIN60
end