Commit 8c5b3c77 authored by mercury233's avatar mercury233

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

parents 1af22f8e 06153523
...@@ -252,7 +252,7 @@ const wchar_t* DataManager::FormatRace(int race) { ...@@ -252,7 +252,7 @@ const wchar_t* DataManager::FormatRace(int race) {
wchar_t* p = racBuffer; wchar_t* p = racBuffer;
unsigned filter = 1; unsigned filter = 1;
int i = 1020; int i = 1020;
for(; filter != 0x1000000; filter <<= 1, ++i) { for(; filter != 0x2000000; filter <<= 1, ++i) {
if(race & filter) { if(race & filter) {
BufferIO::CopyWStrRef(GetSysString(i), p, 16); BufferIO::CopyWStrRef(GetSysString(i), p, 16);
*p = L'|'; *p = L'|';
...@@ -269,7 +269,7 @@ const wchar_t* DataManager::FormatType(int type) { ...@@ -269,7 +269,7 @@ const wchar_t* DataManager::FormatType(int type) {
wchar_t* p = tpBuffer; wchar_t* p = tpBuffer;
unsigned filter = 1; unsigned filter = 1;
int i = 1050; int i = 1050;
for(; filter != 0x2000000; filter <<= 1, ++i) { for(; filter != 0x4000000; filter <<= 1, ++i) {
if(type & filter) { if(type & filter) {
BufferIO::CopyWStrRef(GetSysString(i), p, 16); BufferIO::CopyWStrRef(GetSysString(i), p, 16);
*p = L'|'; *p = L'|';
......
...@@ -319,6 +319,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -319,6 +319,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame->cbCardType2->addItem(dataManager.GetSysString(1063), TYPE_MONSTER + TYPE_SYNCHRO); mainGame->cbCardType2->addItem(dataManager.GetSysString(1063), TYPE_MONSTER + TYPE_SYNCHRO);
mainGame->cbCardType2->addItem(dataManager.GetSysString(1073), TYPE_MONSTER + TYPE_XYZ); mainGame->cbCardType2->addItem(dataManager.GetSysString(1073), TYPE_MONSTER + TYPE_XYZ);
mainGame->cbCardType2->addItem(dataManager.GetSysString(1074), TYPE_MONSTER + TYPE_PENDULUM); mainGame->cbCardType2->addItem(dataManager.GetSysString(1074), TYPE_MONSTER + TYPE_PENDULUM);
mainGame->cbCardType2->addItem(dataManager.GetSysString(1075), TYPE_MONSTER + TYPE_SPSUMMON);
myswprintf(normaltuner, L"%ls|%ls", dataManager.GetSysString(1054), dataManager.GetSysString(1062)); myswprintf(normaltuner, L"%ls|%ls", dataManager.GetSysString(1054), dataManager.GetSysString(1062));
mainGame->cbCardType2->addItem(normaltuner, TYPE_MONSTER + TYPE_NORMAL + TYPE_TUNER); mainGame->cbCardType2->addItem(normaltuner, TYPE_MONSTER + TYPE_NORMAL + TYPE_TUNER);
myswprintf(normalpen, L"%ls|%ls", dataManager.GetSysString(1054), dataManager.GetSysString(1074)); myswprintf(normalpen, L"%ls|%ls", dataManager.GetSysString(1054), dataManager.GetSysString(1074));
......
...@@ -2906,7 +2906,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2906,7 +2906,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
/*int player = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); /*int player = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
mainGame->dField.announce_count = BufferIO::ReadInt8(pbuf); mainGame->dField.announce_count = BufferIO::ReadInt8(pbuf);
int available = BufferIO::ReadInt32(pbuf); int available = BufferIO::ReadInt32(pbuf);
for(int i = 0, filter = 0x1; i < 24; ++i, filter <<= 1) { for(int i = 0, filter = 0x1; i < 25; ++i, filter <<= 1) {
mainGame->chkRace[i]->setChecked(false); mainGame->chkRace[i]->setChecked(false);
if(filter & available) if(filter & available)
mainGame->chkRace[i]->setVisible(true); mainGame->chkRace[i]->setVisible(true);
......
...@@ -869,7 +869,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -869,7 +869,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
} }
case CHECK_RACE: { case CHECK_RACE: {
int rac = 0, filter = 0x1, count = 0; int rac = 0, filter = 0x1, count = 0;
for(int i = 0; i < 24; ++i, filter <<= 1) { for(int i = 0; i < 25; ++i, filter <<= 1) {
if(mainGame->chkRace[i]->isChecked()) { if(mainGame->chkRace[i]->isChecked()) {
rac |= filter; rac |= filter;
count++; count++;
......
...@@ -419,11 +419,11 @@ bool Game::Initialize() { ...@@ -419,11 +419,11 @@ bool Game::Initialize() {
for(int filter = 0x1, i = 0; i < 7; filter <<= 1, ++i) for(int filter = 0x1, i = 0; i < 7; filter <<= 1, ++i)
chkAttribute[i] = env->addCheckBox(false, rect<s32>(10 + (i % 4) * 80, 25 + (i / 4) * 25, 90 + (i % 4) * 80, 50 + (i / 4) * 25), chkAttribute[i] = env->addCheckBox(false, rect<s32>(10 + (i % 4) * 80, 25 + (i / 4) * 25, 90 + (i % 4) * 80, 50 + (i / 4) * 25),
wANAttribute, CHECK_ATTRIBUTE, dataManager.FormatAttribute(filter)); wANAttribute, CHECK_ATTRIBUTE, dataManager.FormatAttribute(filter));
//announce attribute //announce race
wANRace = env->addWindow(rect<s32>(480, 200, 850, 385), false, dataManager.GetSysString(563)); wANRace = env->addWindow(rect<s32>(480, 200, 850, 410), false, dataManager.GetSysString(563));
wANRace->getCloseButton()->setVisible(false); wANRace->getCloseButton()->setVisible(false);
wANRace->setVisible(false); wANRace->setVisible(false);
for(int filter = 0x1, i = 0; i < 24; filter <<= 1, ++i) for(int filter = 0x1, i = 0; i < 25; filter <<= 1, ++i)
chkRace[i] = env->addCheckBox(false, rect<s32>(10 + (i % 4) * 90, 25 + (i / 4) * 25, 100 + (i % 4) * 90, 50 + (i / 4) * 25), chkRace[i] = env->addCheckBox(false, rect<s32>(10 + (i % 4) * 90, 25 + (i / 4) * 25, 100 + (i % 4) * 90, 50 + (i / 4) * 25),
wANRace, CHECK_RACE, dataManager.FormatRace(filter)); wANRace, CHECK_RACE, dataManager.FormatRace(filter));
//selection hint //selection hint
...@@ -512,7 +512,7 @@ bool Game::Initialize() { ...@@ -512,7 +512,7 @@ bool Game::Initialize() {
cbRace = env->addComboBox(rect<s32>(60, 40 + 75 / 6, 190, 60 + 75 / 6), wFilter, -1); cbRace = env->addComboBox(rect<s32>(60, 40 + 75 / 6, 190, 60 + 75 / 6), wFilter, -1);
cbRace->setMaxSelectionRows(10); cbRace->setMaxSelectionRows(10);
cbRace->addItem(dataManager.GetSysString(1310), 0); cbRace->addItem(dataManager.GetSysString(1310), 0);
for(int filter = 0x1; filter != 0x1000000; filter <<= 1) for(int filter = 0x1; filter != 0x2000000; filter <<= 1)
cbRace->addItem(dataManager.FormatRace(filter), filter); cbRace->addItem(dataManager.FormatRace(filter), filter);
env->addStaticText(dataManager.GetSysString(1322), rect<s32>(205, 22 + 50 / 6, 280, 42 + 50 / 6), false, false, wFilter); env->addStaticText(dataManager.GetSysString(1322), rect<s32>(205, 22 + 50 / 6, 280, 42 + 50 / 6), false, false, wFilter);
ebAttack = env->addEditBox(L"", rect<s32>(260, 20 + 50 / 6, 340, 40 + 50 / 6), true, wFilter); ebAttack = env->addEditBox(L"", rect<s32>(260, 20 + 50 / 6, 340, 40 + 50 / 6), true, wFilter);
......
...@@ -327,7 +327,7 @@ public: ...@@ -327,7 +327,7 @@ public:
irr::gui::IGUICheckBox* chkAttribute[7]; irr::gui::IGUICheckBox* chkAttribute[7];
//announce race //announce race
irr::gui::IGUIWindow* wANRace; irr::gui::IGUIWindow* wANRace;
irr::gui::IGUICheckBox* chkRace[24]; irr::gui::IGUICheckBox* chkRace[25];
//cmd menu //cmd menu
irr::gui::IGUIWindow* wCmdMenu; irr::gui::IGUIWindow* wCmdMenu;
irr::gui::IGUIButton* btnActivate; irr::gui::IGUIButton* btnActivate;
......
Subproject commit 010d7f7bd78766d297026198861b51c1130e246b Subproject commit 02147383613c9519f2ea3b349a2d9537f5404f93
Subproject commit be0d7e9297b59783fb6bfd66a1f3127468b4c974 Subproject commit 6d3b608b9bf7b6c3e95cc43fb7603afbec379b42
...@@ -157,6 +157,7 @@ ...@@ -157,6 +157,7 @@
!system 1041 幻神兽 !system 1041 幻神兽
!system 1042 创造神 !system 1042 创造神
!system 1043 幻龙 !system 1043 幻龙
!system 1044 电子世界
!system 1050 怪兽 !system 1050 怪兽
!system 1051 魔法 !system 1051 魔法
!system 1052 陷阱 !system 1052 陷阱
...@@ -182,6 +183,7 @@ ...@@ -182,6 +183,7 @@
!system 1072 卡通 !system 1072 卡通
!system 1073 超量 !system 1073 超量
!system 1074 灵摆 !system 1074 灵摆
!system 1075 特殊召唤
!system 1080 (N/A) !system 1080 (N/A)
#GUI #GUI
!system 1100 魔陷破坏 !system 1100 魔陷破坏
......
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