Commit 07a64929 authored by mercury233's avatar mercury233

fix align of struct

parent 300a4d40
...@@ -38,8 +38,8 @@ ...@@ -38,8 +38,8 @@
], ],
"CTOS_JoinGame": [ "CTOS_JoinGame": [
{"name": "version", "type": "unsigned short"}, {"name": "version", "type": "unsigned short"},
{"name": "align", "type": "unsigned short"},
{"name": "gameid", "type": "unsigned int"}, {"name": "gameid", "type": "unsigned int"},
{"name": "some_unknown_mysterious_fucking_thing", "type": "unsigned short"},
{"name": "pass", "type": "unsigned short", "length": 20, "encoding": "UTF-16LE"} {"name": "pass", "type": "unsigned short", "length": 20, "encoding": "UTF-16LE"}
], ],
"CTOS_Kick": [ "CTOS_Kick": [
...@@ -47,7 +47,10 @@ ...@@ -47,7 +47,10 @@
], ],
"STOC_ErrorMsg": [ "STOC_ErrorMsg": [
{"name": "msg", "type": "unsigned char"}, {"name": "msg", "type": "unsigned char"},
{"name": "code", "type": "word32Ube"} {"name": "align1", "type": "unsigned char"},
{"name": "align2", "type": "unsigned char"},
{"name": "align3", "type": "unsigned char"},
{"name": "code", "type": "unsigned int"}
], ],
"STOC_HandResult": [ "STOC_HandResult": [
{"name": "res1", "type": "unsigned char"}, {"name": "res1", "type": "unsigned char"},
......
...@@ -877,7 +877,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)-> ...@@ -877,7 +877,7 @@ ygopro.ctos_follow 'JOIN_GAME', false, (buffer, info, client, server)->
setTimeout (()-> setTimeout (()->
ygopro.stoc_send client, 'ERROR_MSG',{ ygopro.stoc_send client, 'ERROR_MSG',{
msg: 1 msg: 1
code: 2 code: 9
} }
client.destroy() client.destroy()
return), 500 return), 500
...@@ -1142,8 +1142,6 @@ ygopro.stoc_follow 'JOIN_GAME', false, (buffer, info, client, server)-> ...@@ -1142,8 +1142,6 @@ ygopro.stoc_follow 'JOIN_GAME', false, (buffer, info, client, server)->
} }
ygopro.ctos_send recorder, 'JOIN_GAME', { ygopro.ctos_send recorder, 'JOIN_GAME', {
version: settings.version, version: settings.version,
gameid: 2577,
some_unknown_mysterious_fucking_thing: 0
pass: "" pass: ""
} }
ygopro.ctos_send recorder, 'HS_TOOBSERVER' ygopro.ctos_send recorder, 'HS_TOOBSERVER'
...@@ -1165,8 +1163,6 @@ ygopro.stoc_follow 'JOIN_GAME', false, (buffer, info, client, server)-> ...@@ -1165,8 +1163,6 @@ ygopro.stoc_follow 'JOIN_GAME', false, (buffer, info, client, server)->
} }
ygopro.ctos_send watcher, 'JOIN_GAME', { ygopro.ctos_send watcher, 'JOIN_GAME', {
version: settings.version, version: settings.version,
gameid: 2577,
some_unknown_mysterious_fucking_thing: 0
pass: "" pass: ""
} }
ygopro.ctos_send watcher, 'HS_TOOBSERVER' ygopro.ctos_send watcher, 'HS_TOOBSERVER'
......
...@@ -1099,7 +1099,7 @@ ...@@ -1099,7 +1099,7 @@
setTimeout((function() { setTimeout((function() {
ygopro.stoc_send(client, 'ERROR_MSG', { ygopro.stoc_send(client, 'ERROR_MSG', {
msg: 1, msg: 1,
code: 2 code: 9
}); });
client.destroy(); client.destroy();
}), 500); }), 500);
...@@ -1381,8 +1381,6 @@ ...@@ -1381,8 +1381,6 @@
}); });
ygopro.ctos_send(recorder, 'JOIN_GAME', { ygopro.ctos_send(recorder, 'JOIN_GAME', {
version: settings.version, version: settings.version,
gameid: 2577,
some_unknown_mysterious_fucking_thing: 0,
pass: "" pass: ""
}); });
ygopro.ctos_send(recorder, 'HS_TOOBSERVER'); ygopro.ctos_send(recorder, 'HS_TOOBSERVER');
...@@ -1403,8 +1401,6 @@ ...@@ -1403,8 +1401,6 @@
}); });
ygopro.ctos_send(watcher, 'JOIN_GAME', { ygopro.ctos_send(watcher, 'JOIN_GAME', {
version: settings.version, version: settings.version,
gameid: 2577,
some_unknown_mysterious_fucking_thing: 0,
pass: "" pass: ""
}); });
ygopro.ctos_send(watcher, 'HS_TOOBSERVER'); ygopro.ctos_send(watcher, 'HS_TOOBSERVER');
......
...@@ -161,7 +161,7 @@ for name, declaration of structs_declaration ...@@ -161,7 +161,7 @@ for name, declaration of structs_declaration
@stoc_send_chat(client, msg, @constants.COLORS.RED) @stoc_send_chat(client, msg, @constants.COLORS.RED)
@stoc_send client, 'ERROR_MSG', { @stoc_send client, 'ERROR_MSG', {
msg: 1 msg: 1
code: 2 code: 9
} if client } if client
client.destroy() if client client.destroy() if client
return return
\ No newline at end of file
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
if (client) { if (client) {
this.stoc_send(client, 'ERROR_MSG', { this.stoc_send(client, 'ERROR_MSG', {
msg: 1, msg: 1,
code: 2 code: 9
}); });
} }
if (client) { if (client) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment