summaryrefslogtreecommitdiff
path: root/packets/map_server/entity_disappeared_packet.gd
blob: 1027fe8f8f6a4b3e376a88509454ca65b58bd246 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## rAthena References:
## - PACKET_ZC_NOTIFY_VANISH
## - clif_clearunit_area
class_name EntityDisappearedPacket
extends Packet


const HEADER := 0x0080
const BYTE_LENGTH := 7


## Byte Type: u32
## Byte Length: 4
var entity_id: int

## Byte Type: u8
## Byte Length: 1
var reason: int # TODO: create enum


static func from_bytes(bytes: PackedByteArray) -> EntityDisappearedPacket:
	var packet = EntityDisappearedPacket.new()
	
	packet.entity_id = bytes.decode_u32(2)
	packet.reason = bytes.decode_u8(6)
	
	return packet