forked from atomat/10jqka-API
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstuffInteractData.py
34 lines (26 loc) · 939 Bytes
/
stuffInteractData.py
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
28
29
30
31
32
33
34
from OutputStream import OutputStream
class stuffInteractData:
title = ''
content = ''
confirm = ''
cancel = ''
id = 0
type = 0
def __init__(self, InputStream):
decode_Data = OutputStream(InputStream)
self.title = decode_Data.readUTF()
self.content = decode_Data.readUTF()
if self.content == '':
self.content == '操作频繁,请稍后再试'
length = decode_Data.readUnsignedShort()
if length > 0:
self.confirm = decode_Data.readUnicode2UTF8(length)
length = decode_Data.readUnsignedShort()
if length > 0:
self.cancel = decode_Data.readUnicode2UTF8(length)
if decode_Data.available() >= 6:
decode_Data.skipBytes(2)
self.type = decode_Data.readInt()
if decode_Data.available() >= 6:
decode_Data.skipBytes(2)
self.id = decode_Data.readInt()