Commit 427d77f0 authored by nanahira's avatar nanahira

Merge branch 'master' of github.com:purerosefallen/ygopro

parents e60a7271 8049c367
......@@ -77,6 +77,9 @@ bool DuelClient::StartClient(unsigned int ip, unsigned short port, bool create_g
return true;
}
void DuelClient::ConnectTimeout(evutil_socket_t fd, short events, void* arg) {
if (auto_watch_mode) {
mainGame->device->closeDevice();
}
if(connect_state == 0x7)
return;
if(!is_closing) {
......@@ -2143,6 +2146,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard = *(mainGame->dField.deck[player].rbegin() + i);
if (code != 0)
pcard->SetCode(code);
if (auto_watch_mode && code > 0) {
mainGame->showcardcode = code;
mainGame->showcarddif = 0;
mainGame->showcardp = 0;
mainGame->showcard = 4;
}
}
if(mainGame->dInfo.isReplaySkiping)
return true;
......@@ -2181,6 +2190,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard = *(mainGame->dField.extra[player].rbegin() + i + mainGame->dField.extra_p_count[player]);
if (code != 0)
pcard->SetCode(code);
if (auto_watch_mode && code > 0) {
mainGame->showcardcode = code;
mainGame->showcarddif = 0;
mainGame->showcardp = 0;
mainGame->showcard = 4;
}
}
if(mainGame->dInfo.isReplaySkiping)
return true;
......@@ -2232,6 +2247,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard = mainGame->dField.GetCard(c, l, s);
if (code != 0)
pcard->SetCode(code);
if (auto_watch_mode && code > 0) {
mainGame->showcardcode = code;
mainGame->showcarddif = 0;
mainGame->showcardp = 0;
mainGame->showcard = 4;
}
mainGame->gMutex.lock();
myswprintf(textBuffer, L"*[%ls]", dataManager.GetName(code));
mainGame->AddLog(textBuffer, code);
......@@ -3454,14 +3475,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int count = BufferIO::ReadInt16(pbuf);
ClientCard* pc = mainGame->dField.GetCard(c, l, s);
if (auto_watch_mode && pc->code > 0) {
myswprintf(event_string, dataManager.GetSysString(1610), dataManager.GetName(pc->code));
mainGame->showcardcode = pc->code;
mainGame->showcarddif = 0;
mainGame->showcardp = 0;
mainGame->showcard = 5;
mainGame->WaitFrameSignal(30);
mainGame->showcard = 0;
mainGame->WaitFrameSignal(11);
mainGame->showcard = 2;
}
if (pc->counters.count(type))
pc->counters[type] += count;
......
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