Commit 9edf6ab7 authored by mercury233's avatar mercury233 Committed by nanahira

update MSG_ANNOUNCE_CARD_FILTER (#2199)

parent a17bfa79
...@@ -3435,7 +3435,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -3435,7 +3435,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
} }
case MSG_ANNOUNCE_CARD_FILTER: { case MSG_ANNOUNCE_CARD_FILTER: {
/*int player = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); /*int player = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
int count = BufferIO::ReadInt8(pbuf); int count = BufferIO::ReadUInt8(pbuf);
mainGame->dField.declarable_type = 0; mainGame->dField.declarable_type = 0;
mainGame->dField.opcode.clear(); mainGame->dField.opcode.clear();
for (int i = 0; i < count; ++i) for (int i = 0; i < count; ++i)
......
...@@ -775,7 +775,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) { ...@@ -775,7 +775,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
case MSG_ANNOUNCE_NUMBER: case MSG_ANNOUNCE_NUMBER:
case MSG_ANNOUNCE_CARD_FILTER: { case MSG_ANNOUNCE_CARD_FILTER: {
player = BufferIO::ReadInt8(pbuf); player = BufferIO::ReadInt8(pbuf);
count = BufferIO::ReadInt8(pbuf); count = BufferIO::ReadUInt8(pbuf);
pbuf += 4 * count; pbuf += 4 * count;
return ReadReplayResponse(); return ReadReplayResponse();
} }
......
...@@ -1347,7 +1347,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { ...@@ -1347,7 +1347,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
case MSG_ANNOUNCE_NUMBER: case MSG_ANNOUNCE_NUMBER:
case MSG_ANNOUNCE_CARD_FILTER: { case MSG_ANNOUNCE_CARD_FILTER: {
player = BufferIO::ReadInt8(pbuf); player = BufferIO::ReadInt8(pbuf);
count = BufferIO::ReadInt8(pbuf); count = BufferIO::ReadUInt8(pbuf);
pbuf += 4 * count; pbuf += 4 * count;
WaitforResponse(player); WaitforResponse(player);
NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset); NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset);
......
...@@ -693,7 +693,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { ...@@ -693,7 +693,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
case MSG_ANNOUNCE_NUMBER: case MSG_ANNOUNCE_NUMBER:
case MSG_ANNOUNCE_CARD_FILTER: { case MSG_ANNOUNCE_CARD_FILTER: {
player = BufferIO::ReadInt8(pbuf); player = BufferIO::ReadInt8(pbuf);
count = BufferIO::ReadInt8(pbuf); count = BufferIO::ReadUInt8(pbuf);
pbuf += 4 * count; pbuf += 4 * count;
if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) { if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) {
mainGame->singleSignal.Reset(); mainGame->singleSignal.Reset();
......
...@@ -1396,7 +1396,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { ...@@ -1396,7 +1396,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
case MSG_ANNOUNCE_NUMBER: case MSG_ANNOUNCE_NUMBER:
case MSG_ANNOUNCE_CARD_FILTER: { case MSG_ANNOUNCE_CARD_FILTER: {
player = BufferIO::ReadInt8(pbuf); player = BufferIO::ReadInt8(pbuf);
count = BufferIO::ReadInt8(pbuf); count = BufferIO::ReadUInt8(pbuf);
pbuf += 4 * count; pbuf += 4 * count;
WaitforResponse(player); WaitforResponse(player);
NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, pbuf - offset); NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, pbuf - offset);
......
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