Commit dee4ccea authored by nanahira's avatar nanahira

adapt MSG_UPDATE_CARD in game msg

parent 4dd592d4
...@@ -338,6 +338,13 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) { ...@@ -338,6 +338,13 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
pbuf += 3; pbuf += 3;
break; break;
} }
case MSG_UPDATE_CARD: {
pbuf += 3;
const int clen = BufferIO::ReadInt32(pbuf);
pbuf += (clen - 4);
DuelClient::ClientAnalyze(offset, pbuf - offset);
break;
}
case MSG_RETRY: { case MSG_RETRY: {
if(mainGame->dInfo.isReplaySkiping) { if(mainGame->dInfo.isReplaySkiping) {
mainGame->dInfo.isReplaySkiping = false; mainGame->dInfo.isReplaySkiping = false;
......
...@@ -596,6 +596,16 @@ int SingleDuel::Analyze(unsigned char* msgbuffer, unsigned int len) { ...@@ -596,6 +596,16 @@ int SingleDuel::Analyze(unsigned char* msgbuffer, unsigned int len) {
} }
break; break;
} }
case MSG_UPDATE_CARD: {
auto controller = BufferIO::ReadUInt8(pbuf);
auto location = BufferIO::ReadUInt8(pbuf);
auto sequence = BufferIO::ReadUInt8(pbuf);
auto clen = BufferIO::ReadInt32(pbuf);
auto query_flag = BufferIO::ReadUInt32(pbuf);
pbuf += (clen - 8);
RefreshSingle(controller, location, sequence, query_flag);
break;
}
case MSG_RETRY: { case MSG_RETRY: {
WaitforResponse(last_response); WaitforResponse(last_response);
NetServer::SendBufferToPlayer(players[last_response], STOC_GAME_MSG, offset, pbuf - offset); NetServer::SendBufferToPlayer(players[last_response], STOC_GAME_MSG, offset, pbuf - offset);
......
...@@ -194,6 +194,13 @@ bool SingleMode::SinglePlayAnalyze(unsigned char* msg, unsigned int len) { ...@@ -194,6 +194,13 @@ bool SingleMode::SinglePlayAnalyze(unsigned char* msg, unsigned int len) {
pbuf += 3; pbuf += 3;
break; break;
} }
case MSG_UPDATE_CARD: {
pbuf += 3;
const int clen = BufferIO::ReadInt32(pbuf);
pbuf += (clen - 4);
DuelClient::ClientAnalyze(offset, pbuf - offset);
break;
}
case MSG_RETRY: { case MSG_RETRY: {
if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) { if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) {
mainGame->singleSignal.Reset(); mainGame->singleSignal.Reset();
......
...@@ -558,6 +558,16 @@ int TagDuel::Analyze(unsigned char* msgbuffer, unsigned int len) { ...@@ -558,6 +558,16 @@ int TagDuel::Analyze(unsigned char* msgbuffer, unsigned int len) {
} }
break; break;
} }
case MSG_UPDATE_CARD: {
auto controller = BufferIO::ReadUInt8(pbuf);
auto location = BufferIO::ReadUInt8(pbuf);
auto sequence = BufferIO::ReadUInt8(pbuf);
auto clen = BufferIO::ReadInt32(pbuf);
auto query_flag = BufferIO::ReadUInt32(pbuf);
pbuf += (clen - 8);
RefreshSingle(controller, location, sequence, query_flag);
break;
}
case MSG_RETRY: { case MSG_RETRY: {
WaitforResponse(last_response); WaitforResponse(last_response);
NetServer::SendBufferToPlayer(cur_player[last_response], STOC_GAME_MSG, offset, pbuf - offset); NetServer::SendBufferToPlayer(cur_player[last_response], STOC_GAME_MSG, offset, pbuf - offset);
......
Subproject commit 2a688aeb72bced1dffa60db1e3c802041f8c59e2 Subproject commit 5734eb11b8a6cd5f5256a414f78be365b44f6a68
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