Commit 611ea1f6 authored by mercury233's avatar mercury233

Merge branch 'master' of https://github.com/Fluorohydride/ygopro

parents d9855825 604ac65a
add_definitions ( "-wd4996" "-D_CRT_SECURE_NO_WARNINGS" "-D_ITERATOR_DEBUG_LEVEL=0" ) add_definitions ( "-wd4996" "-D_CRT_SECURE_NO_WARNINGS" )
add_definitions ( "-D_UNICODE" "-DUNICODE" "/utf-8" ) add_definitions ( "-D_UNICODE" "-DUNICODE" "/utf-8" )
include (MSVCMultipleProcessCompile) include (MSVCMultipleProcessCompile)
......
...@@ -48,6 +48,12 @@ else () ...@@ -48,6 +48,12 @@ else ()
target_link_libraries (ygopro ${CMAKE_THREAD_LIBS_INIT} ${DL_LIBRARIES}) target_link_libraries (ygopro ${CMAKE_THREAD_LIBS_INIT} ${DL_LIBRARIES})
endif () endif ()
if (APPLE)
find_library(COCOA_LIBRARY Cocoa)
find_library(IOKIT_LIBRARY IOKit)
target_link_libraries(ygopro ${COCOA_LIBRARY} ${IOKIT_LIBRARY})
endif ()
if (USE_IRRKLANG) if (USE_IRRKLANG)
add_definitions ( "-DYGOPRO_USE_IRRKLANG" ) add_definitions ( "-DYGOPRO_USE_IRRKLANG" )
if (MSVC) if (MSVC)
......
...@@ -213,14 +213,17 @@ bool ClientCard::client_card_sort(ClientCard* c1, ClientCard* c2) { ...@@ -213,14 +213,17 @@ bool ClientCard::client_card_sort(ClientCard* c1, ClientCard* c2) {
else return c1->sequence < c2->sequence; else return c1->sequence < c2->sequence;
else { else {
if(c1->location & (LOCATION_DECK | LOCATION_GRAVE | LOCATION_REMOVED | LOCATION_EXTRA)) { if(c1->location & (LOCATION_DECK | LOCATION_GRAVE | LOCATION_REMOVED | LOCATION_EXTRA)) {
for(size_t i = 0; i < mainGame->dField.chains.size(); ++i) { auto it1 = std::find_if(mainGame->dField.chains.rbegin(), mainGame->dField.chains.rend(), [c1](const auto& ch) {
auto chit = mainGame->dField.chains[i]; return c1 == ch.chain_card || ch.target.find(c1) != ch.target.end();
if(c1 == chit.chain_card || chit.target.find(c1) != chit.target.end()) });
return true; auto it2 = std::find_if(mainGame->dField.chains.rbegin(), mainGame->dField.chains.rend(), [c2](const auto& ch) {
return c2 == ch.chain_card || ch.target.find(c2) != ch.target.end();
});
if(it1 != mainGame->dField.chains.rend() || it2 != mainGame->dField.chains.rend()) {
return it1 < it2;
} }
return c1->sequence > c2->sequence; return c1->sequence > c2->sequence;
} } else
else
return c1->sequence < c2->sequence; return c1->sequence < c2->sequence;
} }
} }
......
...@@ -18,6 +18,8 @@ ClientField::ClientField() { ...@@ -18,6 +18,8 @@ ClientField::ClientField() {
hovered_controler = 0; hovered_controler = 0;
hovered_location = 0; hovered_location = 0;
hovered_sequence = 0; hovered_sequence = 0;
selectable_field = 0;
selected_field = 0;
deck_act = false; deck_act = false;
grave_act = false; grave_act = false;
remove_act = false; remove_act = false;
...@@ -403,7 +405,7 @@ void ClientField::ShowSelectCard(bool buttonok, bool chain) { ...@@ -403,7 +405,7 @@ void ClientField::ShowSelectCard(bool buttonok, bool chain) {
mainGame->btnCardSelect[i]->setRelativePosition(rect<s32>(startpos + i * 125, 55, startpos + 120 + i * 125, 225)); mainGame->btnCardSelect[i]->setRelativePosition(rect<s32>(startpos + i * 125, 55, startpos + 120 + i * 125, 225));
mainGame->btnCardSelect[i]->setPressed(false); mainGame->btnCardSelect[i]->setPressed(false);
mainGame->btnCardSelect[i]->setVisible(true); mainGame->btnCardSelect[i]->setVisible(true);
if(mainGame->dInfo.curMsg != MSG_SORT_CHAIN && mainGame->dInfo.curMsg != MSG_SORT_CARD) { if(mainGame->dInfo.curMsg != MSG_SORT_CARD) {
// text // text
wchar_t formatBuffer[2048]; wchar_t formatBuffer[2048];
if(conti_selecting) if(conti_selecting)
......
...@@ -59,10 +59,10 @@ inline int myswprintf(wchar_t(&buf)[N], const wchar_t* fmt, TR... args) { ...@@ -59,10 +59,10 @@ inline int myswprintf(wchar_t(&buf)[N], const wchar_t* fmt, TR... args) {
#ifdef __APPLE__ #ifdef __APPLE__
#include <OpenGL/gl.h> #include <OpenGL/gl.h>
#include <OpenGL/glu.h> #include <OpenGL/glu.h>
#else #else //__APPLE__
#include <GL/gl.h> #include <GL/gl.h>
#include <GL/glu.h> #include <GL/glu.h>
#endif #endif //__APPLE__
#include "CGUITTFont.h" #include "CGUITTFont.h"
#include "CGUIImageButton.h" #include "CGUIImageButton.h"
#include <iostream> #include <iostream>
...@@ -72,6 +72,7 @@ inline int myswprintf(wchar_t(&buf)[N], const wchar_t* fmt, TR... args) { ...@@ -72,6 +72,7 @@ inline int myswprintf(wchar_t(&buf)[N], const wchar_t* fmt, TR... args) {
#include <time.h> #include <time.h>
#include <thread> #include <thread>
#include <mutex> #include <mutex>
#include <algorithm>
#include "bufferio.h" #include "bufferio.h"
#include "myfilesystem.h" #include "myfilesystem.h"
#include "mysignal.h" #include "mysignal.h"
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include "sound_manager.h" #include "sound_manager.h"
#include "game.h" #include "game.h"
#include "duelclient.h" #include "duelclient.h"
#include <algorithm>
namespace ygo { namespace ygo {
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include "data_manager.h" #include "data_manager.h"
#include "network.h" #include "network.h"
#include "game.h" #include "game.h"
#include <algorithm>
namespace ygo { namespace ygo {
...@@ -147,7 +146,9 @@ int DeckManager::LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec) { ...@@ -147,7 +146,9 @@ int DeckManager::LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec) {
} }
if(cd.type & TYPE_TOKEN) if(cd.type & TYPE_TOKEN)
continue; continue;
else if(cd.type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ | TYPE_LINK) && deck.extra.size() < 15) { else if(cd.type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ | TYPE_LINK)) {
if(deck.extra.size() >= 15)
continue;
deck.extra.push_back(dataManager.GetCodePointer(code)); //verified by GetData() deck.extra.push_back(dataManager.GetCodePointer(code)); //verified by GetData()
} else if(deck.main.size() < 60) { } else if(deck.main.size() < 60) {
deck.main.push_back(dataManager.GetCodePointer(code)); deck.main.push_back(dataManager.GetCodePointer(code));
......
...@@ -126,7 +126,7 @@ void Game::DrawBackGround() { ...@@ -126,7 +126,7 @@ void Game::DrawBackGround() {
driver->drawVertexPrimitiveList(matManager.vField, 4, matManager.iRectangle, 2); driver->drawVertexPrimitiveList(matManager.vField, 4, matManager.iRectangle, 2);
driver->setMaterial(matManager.mBackLine); driver->setMaterial(matManager.mBackLine);
//select field //select field
if(dInfo.curMsg == MSG_SELECT_PLACE || dInfo.curMsg == MSG_SELECT_DISFIELD) { if(dInfo.curMsg == MSG_SELECT_PLACE || dInfo.curMsg == MSG_SELECT_DISFIELD || dInfo.curMsg == MSG_HINT) {
float cv[4] = {0.0f, 0.0f, 1.0f, 1.0f}; float cv[4] = {0.0f, 0.0f, 1.0f, 1.0f};
unsigned int filter = 0x1; unsigned int filter = 0x1;
for (int i = 0; i < 7; ++i, filter <<= 1) { for (int i = 0; i < 7; ++i, filter <<= 1) {
...@@ -1015,10 +1015,16 @@ void Game::HideElement(irr::gui::IGUIElement * win, bool set_action) { ...@@ -1015,10 +1015,16 @@ void Game::HideElement(irr::gui::IGUIElement * win, bool set_action) {
for(int i = 0; i < 5; ++i) for(int i = 0; i < 5; ++i)
btnCardSelect[i]->setDrawImage(false); btnCardSelect[i]->setDrawImage(false);
dField.conti_selecting = false; dField.conti_selecting = false;
stCardListTip->setVisible(false);
for(auto& pcard : dField.selectable_cards)
dField.SetShowMark(pcard, false);
} }
if(win == wCardDisplay) { if(win == wCardDisplay) {
for(int i = 0; i < 5; ++i) for(int i = 0; i < 5; ++i)
btnCardDisplay[i]->setDrawImage(false); btnCardDisplay[i]->setDrawImage(false);
stCardListTip->setVisible(false);
for(auto& pcard : dField.display_cards)
dField.SetShowMark(pcard, false);
} }
fadingList.push_back(fu); fadingList.push_back(fu);
} }
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "game.h" #include "game.h"
#include "replay.h" #include "replay.h"
#include "replay_mode.h" #include "replay_mode.h"
#include <algorithm>
namespace ygo { namespace ygo {
...@@ -982,7 +981,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -982,7 +981,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
} }
case MSG_HINT: { case MSG_HINT: {
int type = BufferIO::ReadInt8(pbuf); int type = BufferIO::ReadInt8(pbuf);
/*int player = */BufferIO::ReadInt8(pbuf); int player = BufferIO::ReadInt8(pbuf);
int data = BufferIO::ReadInt32(pbuf); int data = BufferIO::ReadInt32(pbuf);
if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping)
return true; return true;
...@@ -1069,6 +1068,48 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1069,6 +1068,48 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->WaitFrameSignal(30); mainGame->WaitFrameSignal(30);
break; break;
} }
case HINT_ZONE: {
if(mainGame->LocalPlayer(player) == 1)
data = (data >> 16) | (data << 16);
for(unsigned filter = 0x1; filter != 0; filter <<= 1) {
std::wstring str;
if(unsigned s = filter & data) {
if(s & 0x60) {
str += dataManager.GetSysString(1081);
data &= ~0x600000;
} else if(s & 0xffff)
str += dataManager.GetSysString(102);
else if(s & 0xffff0000) {
str += dataManager.GetSysString(103);
s >>= 16;
}
if(s & 0x1f)
str += dataManager.GetSysString(1002);
else if(s & 0xff00) {
s >>= 8;
if(s & 0x1f)
str += dataManager.GetSysString(1003);
else if(s & 0x20)
str += dataManager.GetSysString(1008);
else if(s & 0xc0)
str += dataManager.GetSysString(1009);
}
int seq = 1;
for(int i = 0x1; i < 0x100; i <<= 1) {
if(s & i)
break;
++seq;
}
str += L"(" + std::to_wstring(seq) + L")";
myswprintf(textBuffer, dataManager.GetSysString(1510), str.c_str());
mainGame->AddLog(textBuffer);
}
}
mainGame->dField.selectable_field = data;
mainGame->WaitFrameSignal(40);
mainGame->dField.selectable_field = 0;
break;
}
} }
break; break;
} }
...@@ -1085,7 +1126,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1085,7 +1126,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
else if(mainGame->LocalPlayer(player) == 0) { else if(mainGame->LocalPlayer(player) == 0) {
mainGame->showcardcode = 1; mainGame->showcardcode = 1;
if(match_kill) if(match_kill)
myswprintf(vic_buf, dataManager.GetVictoryString(0x20), dataManager.GetName(match_kill)); myswprintf(vic_buf, dataManager.GetVictoryString(0xffff), dataManager.GetName(match_kill));
else if(type < 0x10) else if(type < 0x10)
myswprintf(vic_buf, L"[%ls] %ls", mainGame->dInfo.clientname, dataManager.GetVictoryString(type)); myswprintf(vic_buf, L"[%ls] %ls", mainGame->dInfo.clientname, dataManager.GetVictoryString(type));
else else
...@@ -1094,7 +1135,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1094,7 +1135,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
} else { } else {
mainGame->showcardcode = 2; mainGame->showcardcode = 2;
if(match_kill) if(match_kill)
myswprintf(vic_buf, dataManager.GetVictoryString(0x20), dataManager.GetName(match_kill)); myswprintf(vic_buf, dataManager.GetVictoryString(0xffff), dataManager.GetName(match_kill));
else if(type < 0x10) else if(type < 0x10)
myswprintf(vic_buf, L"[%ls] %ls", mainGame->dInfo.hostname, dataManager.GetVictoryString(type)); myswprintf(vic_buf, L"[%ls] %ls", mainGame->dInfo.hostname, dataManager.GetVictoryString(type));
else else
...@@ -1885,8 +1926,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1885,8 +1926,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
} }
return mainGame->dField.ShowSelectSum(mainGame->dField.select_panalmode); return mainGame->dField.ShowSelectSum(mainGame->dField.select_panalmode);
} }
case MSG_SORT_CARD: case MSG_SORT_CARD: {
case MSG_SORT_CHAIN: {
/*int player = */BufferIO::ReadInt8(pbuf); /*int player = */BufferIO::ReadInt8(pbuf);
int count = BufferIO::ReadInt8(pbuf); int count = BufferIO::ReadInt8(pbuf);
mainGame->dField.selectable_cards.clear(); mainGame->dField.selectable_cards.clear();
...@@ -1906,16 +1946,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1906,16 +1946,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->dField.selectable_cards.push_back(pcard); mainGame->dField.selectable_cards.push_back(pcard);
mainGame->dField.sort_list.push_back(0); mainGame->dField.sort_list.push_back(0);
} }
if (mainGame->chkAutoChain->isChecked() && mainGame->dInfo.curMsg == MSG_SORT_CHAIN) { mainGame->wCardSelect->setText(dataManager.GetSysString(205));
mainGame->dField.sort_list.clear();
SetResponseI(-1);
DuelClient::SendResponse();
return true;
}
if(mainGame->dInfo.curMsg == MSG_SORT_CHAIN)
mainGame->wCardSelect->setText(dataManager.GetSysString(206));
else
mainGame->wCardSelect->setText(dataManager.GetSysString(205));
mainGame->dField.select_min = 0; mainGame->dField.select_min = 0;
mainGame->dField.select_max = count; mainGame->dField.select_max = count;
mainGame->dField.ShowSelectCard(); mainGame->dField.ShowSelectCard();
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "single_mode.h" #include "single_mode.h"
#include "materials.h" #include "materials.h"
#include "../ocgcore/common.h" #include "../ocgcore/common.h"
#include <algorithm>
namespace ygo { namespace ygo {
...@@ -639,7 +638,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -639,7 +638,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case BUTTON_CARD_4: { case BUTTON_CARD_4: {
if(mainGame->dInfo.isReplay) if(mainGame->dInfo.isReplay)
break; break;
mainGame->stCardListTip->setVisible(false);
switch(mainGame->dInfo.curMsg) { switch(mainGame->dInfo.curMsg) {
case MSG_SELECT_IDLECMD: case MSG_SELECT_IDLECMD:
case MSG_SELECT_BATTLECMD: case MSG_SELECT_BATTLECMD:
...@@ -736,7 +734,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -736,7 +734,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if (selected_cards.size() > 0) { if (selected_cards.size() > 0) {
SetResponseSelectedCards(); SetResponseSelectedCards();
ShowCancelOrFinishButton(0); ShowCancelOrFinishButton(0);
mainGame->HideElement(mainGame->wCardSelect, true);} mainGame->HideElement(mainGame->wCardSelect, true);
}
break; break;
} }
case MSG_SELECT_SUM: { case MSG_SELECT_SUM: {
...@@ -745,7 +744,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -745,7 +744,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
ShowSelectSum(true); ShowSelectSum(true);
break; break;
} }
case MSG_SORT_CHAIN:
case MSG_SORT_CARD: { case MSG_SORT_CARD: {
int offset = mainGame->scrCardList->getPos() / 10; int offset = mainGame->scrCardList->getPos() / 10;
int sel_seq = id - BUTTON_CARD_0 + offset; int sel_seq = id - BUTTON_CARD_0 + offset;
...@@ -785,7 +783,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -785,7 +783,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break; break;
} }
case BUTTON_CARD_SEL_OK: { case BUTTON_CARD_SEL_OK: {
mainGame->stCardListTip->setVisible(false);
if(mainGame->dInfo.isReplay) { if(mainGame->dInfo.isReplay) {
mainGame->HideElement(mainGame->wCardSelect); mainGame->HideElement(mainGame->wCardSelect);
break; break;
...@@ -1032,13 +1029,13 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -1032,13 +1029,13 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break; break;
} }
case irr::gui::EGET_ELEMENT_LEFT: { case irr::gui::EGET_ELEMENT_LEFT: {
if(id >= BUTTON_CARD_0 && id <= BUTTON_CARD_4) { if(id >= BUTTON_CARD_0 && id <= BUTTON_CARD_4 && mainGame->stCardListTip->isVisible()) {
int pos = mainGame->scrCardList->getPos() / 10; int pos = mainGame->scrCardList->getPos() / 10;
ClientCard* mcard = selectable_cards[id - BUTTON_CARD_0 + pos]; ClientCard* mcard = selectable_cards[id - BUTTON_CARD_0 + pos];
SetShowMark(mcard, false); SetShowMark(mcard, false);
mainGame->stCardListTip->setVisible(false); mainGame->stCardListTip->setVisible(false);
} }
if(id >= BUTTON_DISPLAY_0 && id <= BUTTON_DISPLAY_4) { if(id >= BUTTON_DISPLAY_0 && id <= BUTTON_DISPLAY_4 && mainGame->stCardListTip->isVisible()) {
int pos = mainGame->scrDisplayList->getPos() / 10; int pos = mainGame->scrDisplayList->getPos() / 10;
ClientCard* mcard = display_cards[id - BUTTON_DISPLAY_0 + pos]; ClientCard* mcard = display_cards[id - BUTTON_DISPLAY_0 + pos];
SetShowMark(mcard, false); SetShowMark(mcard, false);
...@@ -2503,7 +2500,6 @@ void ClientField::CancelOrFinish() { ...@@ -2503,7 +2500,6 @@ void ClientField::CancelOrFinish() {
} }
break; break;
} }
case MSG_SORT_CHAIN:
case MSG_SORT_CARD: { case MSG_SORT_CARD: {
if(mainGame->wCardSelect->isVisible()) { if(mainGame->wCardSelect->isVisible()) {
DuelClient::SetResponseI(-1); DuelClient::SetResponseI(-1);
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "netserver.h" #include "netserver.h"
#include "single_mode.h" #include "single_mode.h"
const unsigned short PRO_VERSION = 0x134B; const unsigned short PRO_VERSION = 0x1350;
namespace ygo { namespace ygo {
......
#include "replay.h" #include "replay.h"
#include "../ocgcore/ocgapi.h" #include "../ocgcore/ocgapi.h"
#include "../ocgcore/common.h" #include "../ocgcore/common.h"
#include <algorithm>
#include "lzma/LzmaLib.h" #include "lzma/LzmaLib.h"
namespace ygo { namespace ygo {
......
...@@ -422,8 +422,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) { ...@@ -422,8 +422,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
pbuf += count * 11; pbuf += count * 11;
return ReadReplayResponse(); return ReadReplayResponse();
} }
case MSG_SORT_CARD: case MSG_SORT_CARD: {
case MSG_SORT_CHAIN: {
player = BufferIO::ReadInt8(pbuf); player = BufferIO::ReadInt8(pbuf);
count = BufferIO::ReadInt8(pbuf); count = BufferIO::ReadInt8(pbuf);
pbuf += count * 7; pbuf += count * 7;
......
...@@ -589,7 +589,8 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { ...@@ -589,7 +589,8 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
case 6: case 6:
case 7: case 7:
case 8: case 8:
case 9: { case 9:
case 11: {
NetServer::SendBufferToPlayer(players[1 - player], STOC_GAME_MSG, offset, pbuf - offset); NetServer::SendBufferToPlayer(players[1 - player], STOC_GAME_MSG, offset, pbuf - offset);
for(auto oit = observers.begin(); oit != observers.end(); ++oit) for(auto oit = observers.begin(); oit != observers.end(); ++oit)
NetServer::ReSendToPlayer(*oit); NetServer::ReSendToPlayer(*oit);
...@@ -778,8 +779,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { ...@@ -778,8 +779,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset); NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset);
return 1; return 1;
} }
case MSG_SORT_CARD: case MSG_SORT_CARD: {
case MSG_SORT_CHAIN: {
player = BufferIO::ReadInt8(pbuf); player = BufferIO::ReadInt8(pbuf);
count = BufferIO::ReadInt8(pbuf); count = BufferIO::ReadInt8(pbuf);
pbuf += count * 7; pbuf += count * 7;
......
...@@ -339,8 +339,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { ...@@ -339,8 +339,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
} }
break; break;
} }
case MSG_SORT_CARD: case MSG_SORT_CARD: {
case MSG_SORT_CHAIN: {
player = BufferIO::ReadInt8(pbuf); player = BufferIO::ReadInt8(pbuf);
count = BufferIO::ReadInt8(pbuf); count = BufferIO::ReadInt8(pbuf);
pbuf += count * 7; pbuf += count * 7;
......
...@@ -536,7 +536,8 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { ...@@ -536,7 +536,8 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
case 6: case 6:
case 7: case 7:
case 8: case 8:
case 9: { case 9:
case 11: {
for(int i = 0; i < 4; ++i) for(int i = 0; i < 4; ++i)
if(players[i] != cur_player[player]) if(players[i] != cur_player[player])
NetServer::SendBufferToPlayer(players[i], STOC_GAME_MSG, offset, pbuf - offset); NetServer::SendBufferToPlayer(players[i], STOC_GAME_MSG, offset, pbuf - offset);
...@@ -719,8 +720,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { ...@@ -719,8 +720,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, pbuf - offset); NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, offset, pbuf - offset);
return 1; return 1;
} }
case MSG_SORT_CARD: case MSG_SORT_CARD: {
case MSG_SORT_CHAIN: {
player = BufferIO::ReadInt8(pbuf); player = BufferIO::ReadInt8(pbuf);
count = BufferIO::ReadInt8(pbuf); count = BufferIO::ReadInt8(pbuf);
pbuf += count * 7; pbuf += count * 7;
......
This diff is collapsed.
Subproject commit f89863f7de22d631cbbbf40234fcf372804682f5 Subproject commit 86d502dbfb8fc058439b39945cb3384955a52aea
...@@ -46,9 +46,6 @@ solution "ygo" ...@@ -46,9 +46,6 @@ solution "ygo"
configuration { "Release", "vs*" } configuration { "Release", "vs*" }
flags { "StaticRuntime", "LinkTimeOptimization" } flags { "StaticRuntime", "LinkTimeOptimization" }
configuration { "Debug", "vs*" }
defines { "_ITERATOR_DEBUG_LEVEL=0" }
configuration "Release" configuration "Release"
flags { "OptimizeSpeed" } flags { "OptimizeSpeed" }
targetdir "bin/release" targetdir "bin/release"
......
Subproject commit b9595970d288c3cca00336b8ad49a362c9ce3a5f Subproject commit b820812a1ffb14eeb0022b2336c0c8c93d856d5c
...@@ -53,6 +53,8 @@ ...@@ -53,6 +53,8 @@
!system 98 是否要解放对方怪兽? !system 98 是否要解放对方怪兽?
!system 100 先攻 !system 100 先攻
!system 101 后攻 !system 101 后攻
!system 102 我方
!system 103 对方
!system 200 是否在[%ls]发动[%ls]的效果? !system 200 是否在[%ls]发动[%ls]的效果?
!system 201 此时没有可以发动的效果 !system 201 此时没有可以发动的效果
!system 202 是否要确认场上的情况? !system 202 是否要确认场上的情况?
...@@ -204,6 +206,7 @@ ...@@ -204,6 +206,7 @@
!system 1075 特殊召唤 !system 1075 特殊召唤
!system 1076 连接 !system 1076 连接
!system 1080 (N/A) !system 1080 (N/A)
!system 1081 额外怪兽区
#GUI #GUI
!system 1100 魔陷破坏 !system 1100 魔陷破坏
!system 1101 怪兽破坏 !system 1101 怪兽破坏
...@@ -505,7 +508,8 @@ ...@@ -505,7 +508,8 @@
!victory 0x1d 「方程式运动员胜利团队」效果胜利 !victory 0x1d 「方程式运动员胜利团队」效果胜利
!victory 0x1e 「飞行象」效果胜利 !victory 0x1e 「飞行象」效果胜利
!victory 0x1f 「守护神 艾克佐迪亚」效果胜利 !victory 0x1f 「守护神 艾克佐迪亚」效果胜利
!victory 0x20 由于「%ls」的效果获得比赛胜利 !victory 0x20 「真艾克佐迪亚」效果胜利
!victory 0xffff 由于「%ls」的效果获得比赛胜利
#counters #counters
!counter 0x1 魔力指示物 !counter 0x1 魔力指示物
!counter 0x1002 楔指示物 !counter 0x1002 楔指示物
...@@ -990,3 +994,6 @@ ...@@ -990,3 +994,6 @@
!setname 0x139 守护神官 守護神官 !setname 0x139 守护神官 守護神官
!setname 0x13a 拟声 オノマト !setname 0x13a 拟声 オノマト
!setname 0x13b 叛逆 リベリオン !setname 0x13b 叛逆 リベリオン
!setname 0x13c 代码破坏者 コードブレイカー
!setname 0x13d 星义 ネメシス
!setname 0x13e 巴巴罗斯 バルバロス
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