Commit 7d257920 authored by edo9300's avatar edo9300

fixed card announce

parent 084de53c
...@@ -1487,7 +1487,7 @@ void ClientField::UpdateDeclarableCodeType(bool enter) { ...@@ -1487,7 +1487,7 @@ void ClientField::UpdateDeclarableCodeType(bool enter) {
mainGame->lstANCard->clear(); mainGame->lstANCard->clear();
ancard.clear(); ancard.clear();
for(auto cit = dataManager._strings.begin(); cit != dataManager._strings.end(); ++cit) { for(auto cit = dataManager._strings.begin(); cit != dataManager._strings.end(); ++cit) {
if(wcsstr(cit->second.name, pname) != 0) { if(DeckBuilder::CardNameCompare(cit->second.name, pname) != 0) {
auto cp = dataManager.GetCodePointer(cit->first); //verified by _strings auto cp = dataManager.GetCodePointer(cit->first); //verified by _strings
//datas.alias can be double card names or alias //datas.alias can be double card names or alias
if(is_declarable(cp->second, declarable_type)) { if(is_declarable(cp->second, declarable_type)) {
...@@ -1514,7 +1514,7 @@ void ClientField::UpdateDeclarableCodeOpcode(bool enter) { ...@@ -1514,7 +1514,7 @@ void ClientField::UpdateDeclarableCodeOpcode(bool enter) {
mainGame->lstANCard->clear(); mainGame->lstANCard->clear();
ancard.clear(); ancard.clear();
for(auto cit = dataManager._strings.begin(); cit != dataManager._strings.end(); ++cit) { for(auto cit = dataManager._strings.begin(); cit != dataManager._strings.end(); ++cit) {
if(wcsstr(cit->second.name, pname) != 0) { if(DeckBuilder::CardNameCompare(cit->second.name, pname)) {
auto cp = dataManager.GetCodePointer(cit->first); //verified by _strings auto cp = dataManager.GetCodePointer(cit->first); //verified by _strings
//datas.alias can be double card names or alias //datas.alias can be double card names or alias
if(is_declarable(cp->second, opcode)) { if(is_declarable(cp->second, opcode)) {
......
...@@ -1946,7 +1946,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1946,7 +1946,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->PlaySoundEffect("./sound/nextturn.wav"); mainGame->PlaySoundEffect("./sound/nextturn.wav");
int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
mainGame->dInfo.turn++; mainGame->dInfo.turn++;
if(!mainGame->dInfo.isTag && mainGame->dInfo.turn == 3 && !mainGame->dInfo.isReplay && mainGame->dInfo.player_type < 7) { if(!mainGame->dInfo.isTag && !mainGame->dInfo.isReplay && mainGame->dInfo.player_type < 7) {
mainGame->btnLeaveGame->setText(dataManager.GetSysString(1351)); mainGame->btnLeaveGame->setText(dataManager.GetSysString(1351));
mainGame->btnLeaveGame->setVisible(true); mainGame->btnLeaveGame->setVisible(true);
} }
......
...@@ -393,13 +393,13 @@ bool Game::Initialize() { ...@@ -393,13 +393,13 @@ bool Game::Initialize() {
cbANNumber->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); cbANNumber->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
btnANNumberOK = env->addButton(rect<s32>(80, 60, 150, 85), wANNumber, BUTTON_ANNUMBER_OK, dataManager.GetSysString(1211)); btnANNumberOK = env->addButton(rect<s32>(80, 60, 150, 85), wANNumber, BUTTON_ANNUMBER_OK, dataManager.GetSysString(1211));
//announce card //announce card
wANCard = env->addWindow(rect<s32>(560, 170, 770, 370), false, L""); wANCard = env->addWindow(rect<s32>(430, 170, 840, 370), false, L"");
wANCard->getCloseButton()->setVisible(false); wANCard->getCloseButton()->setVisible(false);
wANCard->setVisible(false); wANCard->setVisible(false);
ebANCard = env->addEditBox(L"", rect<s32>(20, 25, 190, 45), true, wANCard, EDITBOX_ANCARD); ebANCard = env->addEditBox(L"", rect<s32>(20, 25, 390, 45), true, wANCard, EDITBOX_ANCARD);
ebANCard->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); ebANCard->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
lstANCard = env->addListBox(rect<s32>(20, 50, 190, 160), wANCard, LISTBOX_ANCARD, true); lstANCard = env->addListBox(rect<s32>(20, 50, 390, 160), wANCard, LISTBOX_ANCARD, true);
btnANCardOK = env->addButton(rect<s32>(60, 165, 150, 190), wANCard, BUTTON_ANCARD_OK, dataManager.GetSysString(1211)); btnANCardOK = env->addButton(rect<s32>(60, 165, 350, 190), wANCard, BUTTON_ANCARD_OK, dataManager.GetSysString(1211));
//announce attribute //announce attribute
wANAttribute = env->addWindow(rect<s32>(500, 200, 830, 285), false, dataManager.GetSysString(562)); wANAttribute = env->addWindow(rect<s32>(500, 200, 830, 285), false, dataManager.GetSysString(562));
wANAttribute->getCloseButton()->setVisible(false); wANAttribute->getCloseButton()->setVisible(false);
...@@ -1377,7 +1377,7 @@ void Game::OnResize() ...@@ -1377,7 +1377,7 @@ void Game::OnResize()
wPosSelect->setRelativePosition(ResizeWin(340, 200, 935, 410)); wPosSelect->setRelativePosition(ResizeWin(340, 200, 935, 410));
wCardSelect->setRelativePosition(ResizeWin(320, 100, 1000, 400)); wCardSelect->setRelativePosition(ResizeWin(320, 100, 1000, 400));
wANNumber->setRelativePosition(ResizeWin(550, 200, 780, 295)); wANNumber->setRelativePosition(ResizeWin(550, 200, 780, 295));
wANCard->setRelativePosition(ResizeWin(560, 170, 970, 370)); wANCard->setRelativePosition(ResizeWin(430, 170, 840, 370));
wANAttribute->setRelativePosition(ResizeWin(500, 200, 830, 285)); wANAttribute->setRelativePosition(ResizeWin(500, 200, 830, 285));
wANRace->setRelativePosition(ResizeWin(480, 200, 850, 385)); wANRace->setRelativePosition(ResizeWin(480, 200, 850, 385));
wReplaySave->setRelativePosition(ResizeWin(510, 200, 820, 320)); wReplaySave->setRelativePosition(ResizeWin(510, 200, 820, 320));
......
...@@ -446,7 +446,8 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) { ...@@ -446,7 +446,8 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
last_replay.WriteInt32(511004001, false); last_replay.WriteInt32(511004001, false);
} }
if(host_info.concentration) { if(host_info.concentration) {
//needed mode new_card(pduel, 511004322, 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENSE);
last_replay.WriteInt32(511004322, false);
} }
if(host_info.boss) { if(host_info.boss) {
new_card(pduel, 95000000, 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENSE); new_card(pduel, 95000000, 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENSE);
......
...@@ -422,7 +422,8 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) { ...@@ -422,7 +422,8 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
last_replay.WriteInt32(511004001, false); last_replay.WriteInt32(511004001, false);
} }
if(host_info.concentration) { if(host_info.concentration) {
//needed mode new_card(pduel, 511004322, 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENSE);
last_replay.WriteInt32(511004322, false);
} }
if(host_info.boss) { if(host_info.boss) {
new_card(pduel, 95000000, 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENSE); new_card(pduel, 95000000, 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENSE);
......
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