Commit 5555adcb authored by nanahira's avatar nanahira

last merge before .7

parents d2377a30 e6c91cd7
...@@ -18,7 +18,7 @@ ClientCard::ClientCard() { ...@@ -18,7 +18,7 @@ ClientCard::ClientCard() {
is_showtarget = false; is_showtarget = false;
is_showchaintarget = false; is_showchaintarget = false;
is_highlighting = false; is_highlighting = false;
is_disabled = false; status = 0;
is_reversed = false; is_reversed = false;
cmdFlag = 0; cmdFlag = 0;
code = 0; code = 0;
...@@ -164,10 +164,8 @@ void ClientCard::UpdateInfo(char* buf) { ...@@ -164,10 +164,8 @@ void ClientCard::UpdateInfo(char* buf) {
} }
if(flag & QUERY_OWNER) if(flag & QUERY_OWNER)
owner = BufferIO::ReadInt32(buf); owner = BufferIO::ReadInt32(buf);
if(flag & QUERY_IS_DISABLED) if(flag & QUERY_STATUS)
is_disabled = BufferIO::ReadInt32(buf); status = BufferIO::ReadInt32(buf);
if(flag & QUERY_IS_PUBLIC)
is_public = BufferIO::ReadInt32(buf);
if(flag & QUERY_LSCALE) { if(flag & QUERY_LSCALE) {
lscale = BufferIO::ReadInt32(buf); lscale = BufferIO::ReadInt32(buf);
myswprintf(lscstring, L"%d", lscale); myswprintf(lscstring, L"%d", lscale);
......
...@@ -89,8 +89,7 @@ public: ...@@ -89,8 +89,7 @@ public:
u8 location; u8 location;
u8 sequence; u8 sequence;
u8 position; u8 position;
u8 is_disabled; u32 status;
u8 is_public;
u8 cHint; u8 cHint;
u32 chValue; u32 chValue;
u32 opParam; u32 opParam;
......
...@@ -130,7 +130,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -130,7 +130,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
switch(id) { switch(id) {
case BUTTON_CLEAR_DECK: { case BUTTON_CLEAR_DECK: {
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, (wchar_t*)dataManager.GetSysString(1339)); mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, dataManager.GetSysString(1339));
mainGame->PopupElement(mainGame->wQuery); mainGame->PopupElement(mainGame->wQuery);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
prev_operation = id; prev_operation = id;
...@@ -226,7 +226,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -226,7 +226,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
wchar_t textBuffer[256]; wchar_t textBuffer[256];
myswprintf(textBuffer, L"%ls\n%ls", mainGame->cbDBDecks->getItem(sel), dataManager.GetSysString(1337)); myswprintf(textBuffer, L"%ls\n%ls", mainGame->cbDBDecks->getItem(sel), dataManager.GetSysString(1337));
mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, (wchar_t*)textBuffer); mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, textBuffer);
mainGame->PopupElement(mainGame->wQuery); mainGame->PopupElement(mainGame->wQuery);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
prev_operation = id; prev_operation = id;
...@@ -236,7 +236,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -236,7 +236,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
case BUTTON_LEAVE_GAME: { case BUTTON_LEAVE_GAME: {
if(is_modified && !mainGame->chkIgnoreDeckChanges->isChecked()) { if(is_modified && !mainGame->chkIgnoreDeckChanges->isChecked()) {
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, (wchar_t*)dataManager.GetSysString(1356)); mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, dataManager.GetSysString(1356));
mainGame->PopupElement(mainGame->wQuery); mainGame->PopupElement(mainGame->wQuery);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
prev_operation = id; prev_operation = id;
...@@ -403,7 +403,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -403,7 +403,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
case COMBOBOX_DBDECKS: { case COMBOBOX_DBDECKS: {
if(is_modified && !mainGame->chkIgnoreDeckChanges->isChecked()) { if(is_modified && !mainGame->chkIgnoreDeckChanges->isChecked()) {
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, (wchar_t*)dataManager.GetSysString(1356)); mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, dataManager.GetSysString(1356));
mainGame->PopupElement(mainGame->wQuery); mainGame->PopupElement(mainGame->wQuery);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
prev_operation = id; prev_operation = id;
......
...@@ -405,7 +405,8 @@ void Game::DrawCard(ClientCard* pcard) { ...@@ -405,7 +405,8 @@ void Game::DrawCard(ClientCard* pcard) {
matManager.mTexture.setTexture(0, imageManager.tChainTarget); matManager.mTexture.setTexture(0, imageManager.tChainTarget);
driver->setMaterial(matManager.mTexture); driver->setMaterial(matManager.mTexture);
driver->drawVertexPrimitiveList(matManager.vSymbol, 4, matManager.iRectangle, 2); driver->drawVertexPrimitiveList(matManager.vSymbol, 4, matManager.iRectangle, 2);
} else if(pcard->is_disabled && (pcard->location & LOCATION_ONFIELD) && (pcard->position & POS_FACEUP)) { } else if((pcard->status & (STATUS_DISABLED | STATUS_FORBIDDEN))
&& (pcard->location & LOCATION_ONFIELD) && (pcard->position & POS_FACEUP)) {
matManager.mTexture.setTexture(0, imageManager.tNegated); matManager.mTexture.setTexture(0, imageManager.tNegated);
driver->setMaterial(matManager.mTexture); driver->setMaterial(matManager.mTexture);
driver->drawVertexPrimitiveList(matManager.vNegate, 4, matManager.iRectangle, 2); driver->drawVertexPrimitiveList(matManager.vNegate, 4, matManager.iRectangle, 2);
......
...@@ -491,7 +491,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { ...@@ -491,7 +491,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame->stHostPrepDuelist[2]->setText(L""); mainGame->stHostPrepDuelist[2]->setText(L"");
mainGame->stHostPrepDuelist[3]->setText(L""); mainGame->stHostPrepDuelist[3]->setText(L"");
mainGame->stHostPrepOB->setText(L""); mainGame->stHostPrepOB->setText(L"");
mainGame->SetStaticText(mainGame->stHostPrepRule, 180, mainGame->guiFont, (wchar_t*)str.c_str()); mainGame->SetStaticText(mainGame->stHostPrepRule, 180, mainGame->guiFont, str.c_str());
mainGame->RefreshDeck(mainGame->cbDeckSelect); mainGame->RefreshDeck(mainGame->cbDeckSelect);
mainGame->cbDeckSelect->setEnabled(true); mainGame->cbDeckSelect->setEnabled(true);
if(mainGame->wCreateHost->isVisible()) if(mainGame->wCreateHost->isVisible())
...@@ -1385,6 +1385,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1385,6 +1385,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
wchar_t ynbuf[256]; wchar_t ynbuf[256];
myswprintf(ynbuf, dataManager.GetSysString(200), dataManager.FormatLocation(l, s), dataManager.GetName(code)); myswprintf(ynbuf, dataManager.GetSysString(200), dataManager.FormatLocation(l, s), dataManager.GetName(code));
myswprintf(textBuffer, L"%ls\n%ls", event_string, ynbuf); myswprintf(textBuffer, L"%ls\n%ls", event_string, ynbuf);
} else if(desc == 221) {
wchar_t ynbuf[256];
myswprintf(ynbuf, dataManager.GetSysString(221), dataManager.FormatLocation(l, s), dataManager.GetName(code));
myswprintf(textBuffer, L"%ls\n%ls\n%ls", event_string, ynbuf, dataManager.GetSysString(223));
} else if(desc < 2048) { } else if(desc < 2048) {
myswprintf(textBuffer, dataManager.GetSysString(desc), dataManager.GetName(code)); myswprintf(textBuffer, dataManager.GetSysString(desc), dataManager.GetName(code));
} else { } else {
...@@ -1401,7 +1405,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1401,7 +1405,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int desc = BufferIO::ReadInt32(pbuf); int desc = BufferIO::ReadInt32(pbuf);
mainGame->dField.highlighting_card = 0; mainGame->dField.highlighting_card = 0;
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, (wchar_t*)dataManager.GetDesc(desc)); mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, dataManager.GetDesc(desc));
mainGame->PopupElement(mainGame->wQuery); mainGame->PopupElement(mainGame->wQuery);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
return false; return false;
...@@ -1651,9 +1655,11 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1651,9 +1655,11 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
if(!forced) { if(!forced) {
if(count == 0) if(count == 0)
myswprintf(textBuffer, L"%ls\n%ls", dataManager.GetSysString(201), dataManager.GetSysString(202)); myswprintf(textBuffer, L"%ls\n%ls", dataManager.GetSysString(201), dataManager.GetSysString(202));
else if(select_trigger)
myswprintf(textBuffer, L"%ls\n%ls\n%ls", event_string, dataManager.GetSysString(222), dataManager.GetSysString(223));
else else
myswprintf(textBuffer, L"%ls\n%ls", event_string, dataManager.GetSysString(203)); myswprintf(textBuffer, L"%ls\n%ls", event_string, dataManager.GetSysString(203));
mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, (wchar_t*)textBuffer); mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, textBuffer);
mainGame->PopupElement(mainGame->wQuery); mainGame->PopupElement(mainGame->wQuery);
} }
} }
......
...@@ -290,7 +290,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -290,7 +290,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame->btnOptionn->setVisible(true); mainGame->btnOptionn->setVisible(true);
if(selected_option == 0) if(selected_option == 0)
mainGame->btnOptionp->setVisible(false); mainGame->btnOptionp->setVisible(false);
mainGame->SetStaticText(mainGame->stOptions, 310, mainGame->guiFont, (wchar_t*)dataManager.GetDesc(select_options[selected_option])); mainGame->SetStaticText(mainGame->stOptions, 310, mainGame->guiFont, dataManager.GetDesc(select_options[selected_option]));
break; break;
} }
case BUTTON_OPTION_NEXT: { case BUTTON_OPTION_NEXT: {
...@@ -299,7 +299,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -299,7 +299,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame->btnOptionp->setVisible(true); mainGame->btnOptionp->setVisible(true);
if(selected_option == select_options.size() - 1) if(selected_option == select_options.size() - 1)
mainGame->btnOptionn->setVisible(false); mainGame->btnOptionn->setVisible(false);
mainGame->SetStaticText(mainGame->stOptions, 310, mainGame->guiFont, (wchar_t*)dataManager.GetDesc(select_options[selected_option])); mainGame->SetStaticText(mainGame->stOptions, 310, mainGame->guiFont, dataManager.GetDesc(select_options[selected_option]));
break; break;
} }
case BUTTON_OPTION_0: { case BUTTON_OPTION_0: {
...@@ -2348,6 +2348,8 @@ void ClientField::ShowCardInfoInList(ClientCard* pcard, irr::gui::IGUIElement* e ...@@ -2348,6 +2348,8 @@ void ClientField::ShowCardInfoInList(ClientCard* pcard, irr::gui::IGUIElement* e
if(pcard->code) { if(pcard->code) {
str.append(dataManager.GetName(pcard->code)); str.append(dataManager.GetName(pcard->code));
} }
if(pcard->status & STATUS_PROC_COMPLETE)
str.append(L"\n").append(dataManager.GetSysString(224));
for(size_t i = 0; i < chains.size(); ++i) { for(size_t i = 0; i < chains.size(); ++i) {
wchar_t formatBuffer[2048]; wchar_t formatBuffer[2048];
auto chit = chains[i]; auto chit = chains[i];
......
...@@ -248,7 +248,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { ...@@ -248,7 +248,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
wchar_t textBuffer[256]; wchar_t textBuffer[256];
myswprintf(textBuffer, L"%ls\n%ls", mainGame->lstReplayList->getListItem(sel), dataManager.GetSysString(1363)); myswprintf(textBuffer, L"%ls\n%ls", mainGame->lstReplayList->getListItem(sel), dataManager.GetSysString(1363));
mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, (wchar_t*)textBuffer); mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->guiFont, textBuffer);
mainGame->PopupElement(mainGame->wQuery); mainGame->PopupElement(mainGame->wQuery);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
prev_operation = id; prev_operation = id;
......
...@@ -1494,18 +1494,17 @@ void SingleDuel::RefreshHand(int player, int flag, int use_cache) { ...@@ -1494,18 +1494,17 @@ void SingleDuel::RefreshHand(int player, int flag, int use_cache) {
BufferIO::WriteInt8(qbuf, MSG_UPDATE_DATA); BufferIO::WriteInt8(qbuf, MSG_UPDATE_DATA);
BufferIO::WriteInt8(qbuf, player); BufferIO::WriteInt8(qbuf, player);
BufferIO::WriteInt8(qbuf, LOCATION_HAND); BufferIO::WriteInt8(qbuf, LOCATION_HAND);
int len = query_field_card(pduel, player, LOCATION_HAND, flag | QUERY_IS_PUBLIC, (unsigned char*)qbuf, use_cache); int len = query_field_card(pduel, player, LOCATION_HAND, flag | QUERY_POSITION, (unsigned char*)qbuf, use_cache);
NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, query_buffer, len + 3); NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, query_buffer, len + 3);
int qlen = 0; int qlen = 0;
while(qlen < len) { while(qlen < len) {
int slen = BufferIO::ReadInt32(qbuf); int slen = BufferIO::ReadInt32(qbuf);
int qflag = *(int*)qbuf; int qflag = *(int*)qbuf;
int pos = slen - 8; int offset = 8;
if(qflag & QUERY_LSCALE) if(!(qflag & QUERY_CODE))
pos -= 4; offset -= 4;
if(qflag & QUERY_RSCALE) unsigned position = ((*(int*)(qbuf + offset)) >> 24) & 0xff;
pos -= 4; if(!(position & POS_FACEUP))
if(!qbuf[pos])
memset(qbuf, 0, slen - 4); memset(qbuf, 0, slen - 4);
qbuf += slen - 4; qbuf += slen - 4;
qlen += slen; qlen += slen;
......
...@@ -1613,18 +1613,17 @@ void TagDuel::RefreshHand(int player, int flag, int use_cache) { ...@@ -1613,18 +1613,17 @@ void TagDuel::RefreshHand(int player, int flag, int use_cache) {
BufferIO::WriteInt8(qbuf, MSG_UPDATE_DATA); BufferIO::WriteInt8(qbuf, MSG_UPDATE_DATA);
BufferIO::WriteInt8(qbuf, player); BufferIO::WriteInt8(qbuf, player);
BufferIO::WriteInt8(qbuf, LOCATION_HAND); BufferIO::WriteInt8(qbuf, LOCATION_HAND);
int len = query_field_card(pduel, player, LOCATION_HAND, flag | QUERY_IS_PUBLIC, (unsigned char*)qbuf, use_cache); int len = query_field_card(pduel, player, LOCATION_HAND, flag | QUERY_POSITION, (unsigned char*)qbuf, use_cache);
NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, query_buffer, len + 3); NetServer::SendBufferToPlayer(cur_player[player], STOC_GAME_MSG, query_buffer, len + 3);
int qlen = 0; int qlen = 0;
while(qlen < len) { while(qlen < len) {
int slen = BufferIO::ReadInt32(qbuf); int slen = BufferIO::ReadInt32(qbuf);
int qflag = *(int*)qbuf; int qflag = *(int*)qbuf;
int pos = slen - 8; int offset = 8;
if(qflag & QUERY_LSCALE) if(!(qflag & QUERY_CODE))
pos -= 4; offset -= 4;
if(qflag & QUERY_RSCALE) unsigned position = ((*(int*)(qbuf + offset)) >> 24) & 0xff;
pos -= 4; if(!(position & POS_FACEUP))
if(!qbuf[pos])
memset(qbuf, 0, slen - 4); memset(qbuf, 0, slen - 4);
qbuf += slen - 4; qbuf += slen - 4;
qlen += slen; qlen += slen;
......
...@@ -70,6 +70,13 @@ ...@@ -70,6 +70,13 @@
!system 215 已选择数字: !system 215 已选择数字:
!system 216 在连锁%d发动 !system 216 在连锁%d发动
!system 217 被连锁%d的[%ls]选择为对象 !system 217 被连锁%d的[%ls]选择为对象
!system 218 是否使用[%ls]的效果代替支付基本分?
!system 219 是否使用[%ls]的效果代替取除超量素材?
!system 220 是否使用[%ls]的效果代替取除指示物?
!system 221 是否在[%ls]发动[%ls]的诱发效果?
!system 222 是否要发动诱发效果?
!system 223 稍后将询问其他可以发动的效果。
!system 224 已用正规方法特殊召唤
!system 500 请选择要解放的卡 !system 500 请选择要解放的卡
!system 501 请选择要丢弃的手卡 !system 501 请选择要丢弃的手卡
!system 502 请选择要破坏的卡 !system 502 请选择要破坏的卡
......
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