Commit 0fe74ba1 authored by mercury233's avatar mercury233

update

parent a6695c44
...@@ -933,9 +933,10 @@ void Game::RefreshBot() { ...@@ -933,9 +933,10 @@ void Game::RefreshBot() {
sscanf(linebuf, "%240[^\n]", strbuf); sscanf(linebuf, "%240[^\n]", strbuf);
BufferIO::DecodeUTF8(strbuf, newinfo.desc); BufferIO::DecodeUTF8(strbuf, newinfo.desc);
fgets(linebuf, 256, fp); fgets(linebuf, 256, fp);
sscanf(linebuf, "%d", &newinfo.flag); newinfo.support_master_rule_3 = !!strstr(linebuf, "SUPPORT_MASTER_RULE_3");
if((chkBotOldRule->isChecked() && (newinfo.flag & 0x1)) newinfo.support_new_master_rule = !!strstr(linebuf, "SUPPORT_NEW_MASTER_RULE");
|| (!chkBotOldRule->isChecked() && (newinfo.flag & 0x2))) if((chkBotOldRule->isChecked() && newinfo.support_master_rule_3)
|| (!chkBotOldRule->isChecked() && newinfo.support_new_master_rule))
botInfo.push_back(newinfo); botInfo.push_back(newinfo);
continue; continue;
} }
...@@ -948,7 +949,7 @@ void Game::RefreshBot() { ...@@ -948,7 +949,7 @@ void Game::RefreshBot() {
lstBotList->addItem(botInfo[i].name); lstBotList->addItem(botInfo[i].name);
} }
if(botInfo.size() == 0) if(botInfo.size() == 0)
stBotInfo->setText(dataManager.GetSysString(1385)); SetStaticText(stBotInfo, 200, guiFont, dataManager.GetSysString(1385));
} }
void Game::LoadConfig() { void Game::LoadConfig() {
FILE* fp = fopen("system.conf", "r"); FILE* fp = fopen("system.conf", "r");
......
...@@ -69,10 +69,11 @@ struct DuelInfo { ...@@ -69,10 +69,11 @@ struct DuelInfo {
}; };
struct BotInfo { struct BotInfo {
wchar_t name[32]; wchar_t name[256];
wchar_t command[256]; wchar_t command[256];
wchar_t desc[256]; wchar_t desc[256];
int flag; bool support_master_rule_3;
bool support_new_master_rule;
}; };
struct FadingUnit { struct FadingUnit {
......
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