add AIForm
This commit is contained in:
@@ -18,3 +18,4 @@ __recovery/
|
|||||||
*.md
|
*.md
|
||||||
*.doc
|
*.doc
|
||||||
*.txt
|
*.txt
|
||||||
|
*.bak
|
||||||
+3
-3
@@ -376,7 +376,7 @@ int __fastcall TWLDiffChip::HandleResult(int res, double wl)
|
|||||||
bool bLevel = false;
|
bool bLevel = false;
|
||||||
TLevelRow* pRow = (TLevelRow*)pPolicy->aRows[iRank];
|
TLevelRow* pRow = (TLevelRow*)pPolicy->aRows[iRank];
|
||||||
if(bGlobal && !g_aGames.bFloat && !((TLevelPolicy*)pPolicy)->bInstant){//非立即升降
|
if(bGlobal && !g_aGames.bFloat && !((TLevelPolicy*)pPolicy)->bInstant){//非立即升降
|
||||||
if(nWLDiff >= pRow->nCondWin || nWLDiff <= pRow->nCondLos){ //达到升降条件
|
if(nWLDiff >= pRow->nCondWin || nWLDiff < pRow->nCondLos){ //达到升降条件
|
||||||
g_aGames.AllBetOff();
|
g_aGames.AllBetOff();
|
||||||
bWait = g_aGames.nBetted[2]>0; //等待结算
|
bWait = g_aGames.nBetted[2]>0; //等待结算
|
||||||
DebugPrint("wait count: %d", g_aGames.nBetted[2]);
|
DebugPrint("wait count: %d", g_aGames.nBetted[2]);
|
||||||
@@ -388,11 +388,11 @@ int __fastcall TWLDiffChip::HandleResult(int res, double wl)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!bWait){
|
if(!bWait){
|
||||||
if(nWLDiff >= pRow->nCondWin){ //赢走向
|
if(nWLDiff >= pRow->nCondWin){ //赢走向,闭区间
|
||||||
iRank = pRow->iWin - 1;
|
iRank = pRow->iWin - 1;
|
||||||
bLevel = true;
|
bLevel = true;
|
||||||
}
|
}
|
||||||
else if(nWLDiff <= pRow->nCondLos){ //输走向
|
else if(nWLDiff < pRow->nCondLos){ //输走向,开区间
|
||||||
iRank = pRow->iLos - 1;
|
iRank = pRow->iLos - 1;
|
||||||
bLevel = true;
|
bLevel = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1240,7 +1240,7 @@ void __fastcall TPolicyEditForm::InitChipGrid(int kind)
|
|||||||
m_sg->Cells[1][0] = "注码";
|
m_sg->Cells[1][0] = "注码";
|
||||||
m_sg->Cells[2][0] = "大于等于";
|
m_sg->Cells[2][0] = "大于等于";
|
||||||
m_sg->Cells[3][0] = "走向";
|
m_sg->Cells[3][0] = "走向";
|
||||||
m_sg->Cells[4][0] = "小于等于";
|
m_sg->Cells[4][0] = "小于";
|
||||||
m_sg->Cells[5][0] = "走向";
|
m_sg->Cells[5][0] = "走向";
|
||||||
m_sg->ColWidths[0] = DPIX(60);
|
m_sg->ColWidths[0] = DPIX(60);
|
||||||
m_sg->ColWidths[1] = DPIX(66);
|
m_sg->ColWidths[1] = DPIX(66);
|
||||||
|
|||||||
+108
-7
@@ -1,5 +1,6 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <System.SysUtils.hpp>
|
||||||
#include "PolicyUnit.h"
|
#include "PolicyUnit.h"
|
||||||
#include "GlobalUnit.h"
|
#include "GlobalUnit.h"
|
||||||
|
|
||||||
@@ -51,10 +52,56 @@ char *sysChip[SYSCPNUM] = {//kk|pppp pause|dead
|
|||||||
,"06-随机注码\n08"
|
,"06-随机注码\n08"
|
||||||
,"07-阶梯-4级\n02000\n1,500,1,500,2;2,500,1,500,3;3,1000,1,500,4;4,1500,1,500,0"
|
,"07-阶梯-4级\n02000\n1,500,1,500,2;2,500,1,500,3;3,1000,1,500,4;4,1500,1,500,0"
|
||||||
,"08-组合阶梯-3级\n03200\n1,20,500,1,500,2;2,20,500,1,500,3;3,20,1000,1,500,0"
|
,"08-组合阶梯-3级\n03200\n1,20,500,1,500,2;2,20,500,1,500,3;3,20,1000,1,500,0"
|
||||||
,"09-赢输次差-单3\n04020\n1,10,2,-10,3;0,20,0,11,1;2,-11,1,-30,0"
|
,"09-赢输次差-单3\n04020\n1,10,2,-10,3;0,20,0,10,1;2,-10,1,-30,0"
|
||||||
,"10-赢输次差-总4\n04021\n1,20,2,-20,3;0,40,0,20,1;2,-20,1,-40,4;4,-40,3,-60,0"
|
,"10-赢输次差-总4\n04021\n1,20,2,-20,3;0,40,0,20,1;2,-20,1,-40,4;4,-40,3,-60,0"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//内置打法策略描述,索引与sysBet[]一一对应
|
||||||
|
static const wchar_t* sysBetDesc[SYSBPNUM] = {
|
||||||
|
L"无论出庄、出闲还是和局,都下注庄"
|
||||||
|
,L"无论出庄、出闲还是和局,都下注闲"
|
||||||
|
,L"出庄打庄、出闲打闲,和局不下"
|
||||||
|
,L"出庄打闲、出闲打庄,和局不下"
|
||||||
|
,L"出庄打庄、出闲打闲;和局不变"
|
||||||
|
,L"两闲跟一庄时打闲"
|
||||||
|
,L"两庄跟一闲时打庄"
|
||||||
|
,L"大路打连:出庄打庄,出闲打闲,和局不下"
|
||||||
|
,L"大路打反:出庄打闲,出闲打庄,和局不下"
|
||||||
|
,L"大路逢断打反:连庄被闲打断时打庄,连闲被庄打断时打闲"
|
||||||
|
,L"大路连二打反:连出两闲后打庄,连出两庄后打闲"
|
||||||
|
,L"大路连三打反:连出三闲后打庄,连出三庄后打闲"
|
||||||
|
,L"大路逢断打连:连庄被闲打断后改打闲,连闲被庄打断后改打庄"
|
||||||
|
,L"大路跳二打连:一庄一闲单跳之后,跟最后一手的方向下注"
|
||||||
|
,L"大路跳三打连:庄闲交替三手之后,跟最后一手的方向下注"
|
||||||
|
,L"大路组合形态:长龙与连二接转等八种形态出现后,各自跟势下注"
|
||||||
|
,L"大眼路全程打庄(红)"
|
||||||
|
,L"大眼路全程打闲(蓝)"
|
||||||
|
,L"大眼路逢连打连:连出两个及以上时,跟连的方向下注"
|
||||||
|
,L"大眼路逢连打断:连出两个及以上时,反向下注"
|
||||||
|
,L"小路全程打庄(红)"
|
||||||
|
,L"小路全程打闲(蓝)"
|
||||||
|
,L"小路二夹一打断:两庄夹一闲后打闲,两闲夹一庄后打庄"
|
||||||
|
,L"小强路全程打庄(红)"
|
||||||
|
,L"小强路全程打闲(蓝)"
|
||||||
|
,L"小强路背靠背打断:两红两蓝直至六红六蓝的成对形态出现后,反向下注"
|
||||||
|
,L"小强路特殊打法;可设置「庄问路全红」或「闲问路全红」情况下不打/打庄/打闲"
|
||||||
|
,L"珠盘路打法;用台桌当前庄/闲数算差值,「庄比闲多」条件满足时按「庄多下注」、「闲比庄多」条件满足时按「闲多下注」,其他情况不下注"
|
||||||
|
};
|
||||||
|
|
||||||
|
//内置注码策略描述,索引与sysChip[]一一对应
|
||||||
|
static const wchar_t* sysChipDesc[SYSCPNUM] = {
|
||||||
|
L"注码一直为1"
|
||||||
|
,L"输则进一级加注、赢则退一级减注;最高一级再输即爆缆停止"
|
||||||
|
,L"输则注码翻倍,赢则立即回到第1行;末行再输爆缆,新局重启"
|
||||||
|
,L"4层×每层7手、每手1注;输进一级、赢回第1层;二层以上赢利回基、输额累加进下层;爆缆暂停1分钟后新局重启"
|
||||||
|
,L"每层赢2手即回第1行、输则进一级;注码逐级2/2/3/3/4/4/5/5/8/8/10/10/20;末行输爆缆,暂停1分钟后新局重启"
|
||||||
|
,L"每手在「随机最小值」到「随机最大值」(闭区间)内取随机整数作为注码;可被组合阶梯每层选用"
|
||||||
|
,L"4级阶梯按盈亏金额升降:注码1/2/3/4,各级赢到500/500/1000/1500回第1级、亏500进下一级,末级输爆缆停止"
|
||||||
|
,L"3级组合阶梯:依次选用方案1/2/3并各按20倍执行;赢够500(第3级1000)回第1级、亏够500进下一级,末级输爆缆停止"
|
||||||
|
,L"次差在[-10,10)时注码1、[10,20)时注码0、[-30,-10)时注码2;次差≥20或<-30爆缆;单桌计算,爆缆后新局重启"
|
||||||
|
,L"次差在[-20,20)时注码1、[20,40)时注码0、[-40,-20)时注码2、[-60,-40)时注码4;次差≥40或<-60爆缆;总体计算,爆缆后新局重启"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
int u_iUserBetId = 100,
|
int u_iUserBetId = 100,
|
||||||
u_iUserChipId = 100;
|
u_iUserChipId = 100;
|
||||||
@@ -76,6 +123,7 @@ void TBasePolicy::Reset()
|
|||||||
{
|
{
|
||||||
Clear();
|
Clear();
|
||||||
name = "";
|
name = "";
|
||||||
|
desc = "";
|
||||||
type = 0;
|
type = 0;
|
||||||
id = 0;
|
id = 0;
|
||||||
}
|
}
|
||||||
@@ -478,9 +526,9 @@ vector<int> u_aUserCPLen;
|
|||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//文件定义
|
//文件定义
|
||||||
#define USER_BPF_VERSION 0x03
|
#define USER_BPF_VERSION 0x04 //0x03起记录desc
|
||||||
#define USER_BPF_FILE "betpolicy.dat"
|
#define USER_BPF_FILE "betpolicy.dat"
|
||||||
#define USER_CPF_VERSION 0x07
|
#define USER_CPF_VERSION 0x08 //0x07起记录desc
|
||||||
#define USER_CPF_FILE "chipolicy.dat"
|
#define USER_CPF_FILE "chipolicy.dat"
|
||||||
|
|
||||||
//BetPolicy文件头
|
//BetPolicy文件头
|
||||||
@@ -587,9 +635,15 @@ int __fastcall SaveBetPolicy(TBetPolicy* pPolicy, FILE* fp)
|
|||||||
int posStart = ftell(fp);
|
int posStart = ftell(fp);
|
||||||
|
|
||||||
char buff[1024];
|
char buff[1024];
|
||||||
sprintf( buff, "%s", ((AnsiString)pPolicy->name).c_str() );
|
//UTF8String显式锁死UTF-8,与系统ACP开关解耦(UTF-8开关机写出字节一致)
|
||||||
|
sprintf( buff, "%s", ((UTF8String)pPolicy->name).c_str() );
|
||||||
int len = strlen(buff)+1;
|
int len = strlen(buff)+1;
|
||||||
fwrite( &len, sizeof(int), 1, fp );
|
fwrite( &len, sizeof(int), 1, fp );
|
||||||
|
fwrite( buff, sizeof(char), len, fp );
|
||||||
|
|
||||||
|
sprintf( buff, "%s", ((UTF8String)pPolicy->desc).c_str() );
|
||||||
|
len = strlen(buff)+1;
|
||||||
|
fwrite( &len, sizeof(int), 1, fp );
|
||||||
fwrite( buff, sizeof(char), len, fp );
|
fwrite( buff, sizeof(char), len, fp );
|
||||||
|
|
||||||
fwrite( &pPolicy->type, sizeof(int), 1, fp );
|
fwrite( &pPolicy->type, sizeof(int), 1, fp );
|
||||||
@@ -626,11 +680,17 @@ int __fastcall SaveChipPolicy(TChipPolicy* pPolicy, FILE* fp)
|
|||||||
int posStart = ftell(fp);
|
int posStart = ftell(fp);
|
||||||
|
|
||||||
char buff[1024];
|
char buff[1024];
|
||||||
sprintf( buff, "%s", ((AnsiString)pPolicy->name).c_str() );
|
//UTF8String显式锁死UTF-8,与系统ACP开关解耦(UTF-8开关机写出字节一致)
|
||||||
|
sprintf( buff, "%s", ((UTF8String)pPolicy->name).c_str() );
|
||||||
int len = strlen(buff)+1;
|
int len = strlen(buff)+1;
|
||||||
fwrite( &len, sizeof(int), 1, fp );
|
fwrite( &len, sizeof(int), 1, fp );
|
||||||
fwrite( buff, sizeof(char), len, fp );
|
fwrite( buff, sizeof(char), len, fp );
|
||||||
|
|
||||||
|
sprintf( buff, "%s", ((UTF8String)pPolicy->desc).c_str() );
|
||||||
|
len = strlen(buff)+1;
|
||||||
|
fwrite( &len, sizeof(int), 1, fp );
|
||||||
|
fwrite( buff, sizeof(char), len, fp );
|
||||||
|
|
||||||
fwrite( &pPolicy->type, sizeof(int), 1, fp );
|
fwrite( &pPolicy->type, sizeof(int), 1, fp );
|
||||||
fwrite( &pPolicy->id, sizeof(int), 1, fp );
|
fwrite( &pPolicy->id, sizeof(int), 1, fp );
|
||||||
fwrite( &pPolicy->kind, sizeof(int), 1, fp );
|
fwrite( &pPolicy->kind, sizeof(int), 1, fp );
|
||||||
@@ -850,6 +910,32 @@ int __fastcall DeletePolicy(int type, int index)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
int __fastcall CalcNewPolicyNum(int type)
|
||||||
|
{
|
||||||
|
vector<TBasePolicy*>& aPolicies = type==TYPE_P_BET ? g_aBetPolicies : g_aChipPolicies;
|
||||||
|
String sType = type==TYPE_P_BET ? "打法" : "注码";
|
||||||
|
String sPre = "新建" + sType;
|
||||||
|
int lPre = sPre.Length();
|
||||||
|
int nMax = 0;
|
||||||
|
for(int i=0; i<aPolicies.size(); i++){
|
||||||
|
String name = aPolicies[i]->name;
|
||||||
|
if(name.Pos(sPre)==1){
|
||||||
|
String suf = name.SubString(lPre+1, name.Length()-lPre);
|
||||||
|
int num = 0;
|
||||||
|
if(TryStrToInt(suf, num) && num>nMax)
|
||||||
|
nMax = num;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nMax;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
String __fastcall AutoNewPolicyName(int type)
|
||||||
|
{
|
||||||
|
String sType = type==TYPE_P_BET ? "打法" : "注码";
|
||||||
|
return "新建" + sType + IntToStr(CalcNewPolicyNum(type)+1);
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
void __fastcall LoadSystemBetPolicies()
|
void __fastcall LoadSystemBetPolicies()
|
||||||
{
|
{
|
||||||
char tmp[1024];
|
char tmp[1024];
|
||||||
@@ -893,6 +979,7 @@ void __fastcall LoadSystemBetPolicies()
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
pPolicy->type = 0;
|
pPolicy->type = 0;
|
||||||
|
pPolicy->desc = sysBetDesc[i];
|
||||||
g_aBetPolicies.push_back(pPolicy);
|
g_aBetPolicies.push_back(pPolicy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -925,7 +1012,12 @@ void __fastcall LoadUserBetPolicies()
|
|||||||
fread(&num, sizeof(int), 1, fp);
|
fread(&num, sizeof(int), 1, fp);
|
||||||
fread(buf, sizeof(char), num, fp);
|
fread(buf, sizeof(char), num, fp);
|
||||||
|
|
||||||
pPolicy->name = head[3]<=3 ? GBKToUTF8(buf) : String(buf);
|
pPolicy->name = head[3]<=3 ? GBKToUTF8(buf) : String((UTF8String)buf); //旧版本GBK;新版本UTF-8(bytes为0x04起统一)
|
||||||
|
if(head[3]>=4){ //新版本才记录desc,紧跟name之后,恒为UTF-8
|
||||||
|
fread(&num, sizeof(int), 1, fp);
|
||||||
|
fread(buf, sizeof(char), num, fp);
|
||||||
|
pPolicy->desc = String((UTF8String)buf);
|
||||||
|
}
|
||||||
pPolicy->actived = true;
|
pPolicy->actived = true;
|
||||||
|
|
||||||
fread(&pPolicy->type, sizeof(int), 1, fp);
|
fread(&pPolicy->type, sizeof(int), 1, fp);
|
||||||
@@ -1060,6 +1152,7 @@ void __fastcall LoadSystemChipPolicies()
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
pPolicy->type = 0;
|
pPolicy->type = 0;
|
||||||
|
pPolicy->desc = sysChipDesc[i];
|
||||||
g_aChipPolicies.push_back(pPolicy);
|
g_aChipPolicies.push_back(pPolicy);
|
||||||
|
|
||||||
// if(pPolicy->kind==KIND_CHIP_COM){ //根据id查找iPolicy
|
// if(pPolicy->kind==KIND_CHIP_COM){ //根据id查找iPolicy
|
||||||
@@ -1106,6 +1199,13 @@ void __fastcall LoadUserChipPolicies()
|
|||||||
fread(&num, sizeof(int), 1, fp);
|
fread(&num, sizeof(int), 1, fp);
|
||||||
fread(name, sizeof(char), num, fp);
|
fread(name, sizeof(char), num, fp);
|
||||||
|
|
||||||
|
//新版本才记录desc,紧跟name之后;char[1024]清零保证旧版本时为空串
|
||||||
|
char desc[1024] = {0};
|
||||||
|
if(head[3]>=8){
|
||||||
|
fread(&num, sizeof(int), 1, fp);
|
||||||
|
fread(desc, sizeof(char), num, fp);
|
||||||
|
}
|
||||||
|
|
||||||
fread(&type, sizeof(int), 1, fp);
|
fread(&type, sizeof(int), 1, fp);
|
||||||
|
|
||||||
if(head[3]>=5){
|
if(head[3]>=5){
|
||||||
@@ -1178,7 +1278,8 @@ void __fastcall LoadUserChipPolicies()
|
|||||||
|
|
||||||
pPolicy->type = type;
|
pPolicy->type = type;
|
||||||
pPolicy->kind = kind;
|
pPolicy->kind = kind;
|
||||||
pPolicy->name = head[3]<=7 ? GBKToUTF8(name) : String(name);
|
pPolicy->name = head[3]<=7 ? GBKToUTF8(name) : String((UTF8String)name); //旧版本GBK;新版本UTF-8(0x08起统一)
|
||||||
|
pPolicy->desc = String((UTF8String)desc); //desc只在head[3]>=8,恒为UTF-8
|
||||||
pPolicy->id = id;
|
pPolicy->id = id;
|
||||||
pPolicy->actived = true;
|
pPolicy->actived = true;
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public:
|
|||||||
class TBasePolicy {
|
class TBasePolicy {
|
||||||
public:
|
public:
|
||||||
String name;
|
String name;
|
||||||
|
String desc; //一句话描述(内置策略装载时填,用户策略保持空)
|
||||||
int type; //存储类型 0=内置免费 1=内置付费 2=用户自定义 3=用户定制
|
int type; //存储类型 0=内置免费 1=内置付费 2=用户自定义 3=用户定制
|
||||||
int id; //唯一ID
|
int id; //唯一ID
|
||||||
int kind; //自定义类型 CHIP:0=普通 1=手数层级 2=组合层级 4=随机 ... BET:0=普通 2=庄闲问路 3=庄闲差...
|
int kind; //自定义类型 CHIP:0=普通 1=手数层级 2=组合层级 4=随机 ... BET:0=普通 2=庄闲问路 3=庄闲差...
|
||||||
@@ -183,6 +184,8 @@ int __fastcall MinChipOfPolicy(int index);
|
|||||||
vector<int> __fastcall PolicyInCombo(int iPolicy);
|
vector<int> __fastcall PolicyInCombo(int iPolicy);
|
||||||
int __fastcall FindPolicy(int type, int id);
|
int __fastcall FindPolicy(int type, int id);
|
||||||
void __fastcall CheckComboRow(TComboRow* row);
|
void __fastcall CheckComboRow(TComboRow* row);
|
||||||
|
int __fastcall CalcNewPolicyNum(int type);
|
||||||
|
String __fastcall AutoNewPolicyName(int type);
|
||||||
|
|
||||||
extern vector<TBasePolicy*> g_aBetPolicies;
|
extern vector<TBasePolicy*> g_aBetPolicies;
|
||||||
extern vector<TBasePolicy*> g_aChipPolicies;
|
extern vector<TBasePolicy*> g_aChipPolicies;
|
||||||
|
|||||||
+124
-3
@@ -235,6 +235,16 @@
|
|||||||
<DependentOn>ActCodeFormUnit.h</DependentOn>
|
<DependentOn>ActCodeFormUnit.h</DependentOn>
|
||||||
<BuildOrder>37</BuildOrder>
|
<BuildOrder>37</BuildOrder>
|
||||||
</CppCompile>
|
</CppCompile>
|
||||||
|
<CppCompile Include="AIFormUnit.cpp">
|
||||||
|
<Form>AIForm</Form>
|
||||||
|
<FormType>dfm</FormType>
|
||||||
|
<DependentOn>AIFormUnit.h</DependentOn>
|
||||||
|
<BuildOrder>38</BuildOrder>
|
||||||
|
</CppCompile>
|
||||||
|
<CppCompile Include="AI_Hook.cpp">
|
||||||
|
<DependentOn>AI_Hook.h</DependentOn>
|
||||||
|
<BuildOrder>39</BuildOrder>
|
||||||
|
</CppCompile>
|
||||||
<CppCompile Include="BacABThread.cpp">
|
<CppCompile Include="BacABThread.cpp">
|
||||||
<DependentOn>BacABThread.h</DependentOn>
|
<DependentOn>BacABThread.h</DependentOn>
|
||||||
<BuildOrder>14</BuildOrder>
|
<BuildOrder>14</BuildOrder>
|
||||||
@@ -376,6 +386,56 @@
|
|||||||
<DependentOn>SettingFormUnit.h</DependentOn>
|
<DependentOn>SettingFormUnit.h</DependentOn>
|
||||||
<BuildOrder>26</BuildOrder>
|
<BuildOrder>26</BuildOrder>
|
||||||
</CppCompile>
|
</CppCompile>
|
||||||
|
<RcItem Include="skills-md\policy-skills\betWithChip.md">
|
||||||
|
<ContainerId>ResourceItem</ContainerId>
|
||||||
|
<ResourceType>RCDATA</ResourceType>
|
||||||
|
<ResourceId>betWithChip</ResourceId>
|
||||||
|
</RcItem>
|
||||||
|
<RcItem Include="skills-md\policy-skills\comboLadderChip.md">
|
||||||
|
<ContainerId>ResourceItem</ContainerId>
|
||||||
|
<ResourceType>RCDATA</ResourceType>
|
||||||
|
<ResourceId>comboLadderChip</ResourceId>
|
||||||
|
</RcItem>
|
||||||
|
<RcItem Include="skills-md\policy-skills\ladderChip.md">
|
||||||
|
<ContainerId>ResourceItem</ContainerId>
|
||||||
|
<ResourceType>RCDATA</ResourceType>
|
||||||
|
<ResourceId>ladderChip</ResourceId>
|
||||||
|
</RcItem>
|
||||||
|
<RcItem Include="skills-md\policy-skills\normalBet.md">
|
||||||
|
<ContainerId>ResourceItem</ContainerId>
|
||||||
|
<ResourceType>RCDATA</ResourceType>
|
||||||
|
<ResourceId>normalBet</ResourceId>
|
||||||
|
</RcItem>
|
||||||
|
<RcItem Include="skills-md\policy-skills\normalChip.md">
|
||||||
|
<ContainerId>ResourceItem</ContainerId>
|
||||||
|
<ResourceType>RCDATA</ResourceType>
|
||||||
|
<ResourceId>normalChip</ResourceId>
|
||||||
|
</RcItem>
|
||||||
|
<RcItem Include="skills-md\policy-skills\specialBet.md">
|
||||||
|
<ContainerId>ResourceItem</ContainerId>
|
||||||
|
<ResourceType>RCDATA</ResourceType>
|
||||||
|
<ResourceId>specialBet</ResourceId>
|
||||||
|
</RcItem>
|
||||||
|
<RcItem Include="skills-md\policy-skills\specialChip.md">
|
||||||
|
<ContainerId>ResourceItem</ContainerId>
|
||||||
|
<ResourceType>RCDATA</ResourceType>
|
||||||
|
<ResourceId>specialChip</ResourceId>
|
||||||
|
</RcItem>
|
||||||
|
<RcItem Include="skills-md\policy-skills\tierChip.md">
|
||||||
|
<ContainerId>ResourceItem</ContainerId>
|
||||||
|
<ResourceType>RCDATA</ResourceType>
|
||||||
|
<ResourceId>tierChip</ResourceId>
|
||||||
|
</RcItem>
|
||||||
|
<RcItem Include="skills-md\policy-skills\winLoseDiffChip.md">
|
||||||
|
<ContainerId>ResourceItem</ContainerId>
|
||||||
|
<ResourceType>RCDATA</ResourceType>
|
||||||
|
<ResourceId>winLoseDiffChip</ResourceId>
|
||||||
|
</RcItem>
|
||||||
|
<RcItem Include="skills-md\policySkillsHeader.md">
|
||||||
|
<ContainerId>ResourceItem</ContainerId>
|
||||||
|
<ResourceType>RCDATA</ResourceType>
|
||||||
|
<ResourceId>skills</ResourceId>
|
||||||
|
</RcItem>
|
||||||
<CppCompile Include="TableIPFormUnit.cpp">
|
<CppCompile Include="TableIPFormUnit.cpp">
|
||||||
<Form>TableIPForm</Form>
|
<Form>TableIPForm</Form>
|
||||||
<FormType>dfm</FormType>
|
<FormType>dfm</FormType>
|
||||||
@@ -403,19 +463,20 @@
|
|||||||
<FormResources Include="PolicySave.dfm"/>
|
<FormResources Include="PolicySave.dfm"/>
|
||||||
<FormResources Include="InfoFrameUnit.dfm"/>
|
<FormResources Include="InfoFrameUnit.dfm"/>
|
||||||
<FormResources Include="LoginUnit.dfm"/>
|
<FormResources Include="LoginUnit.dfm"/>
|
||||||
|
<FormResources Include="SettingFormUnit.dfm"/>
|
||||||
<FormResources Include="TableIPFormUnit.dfm"/>
|
<FormResources Include="TableIPFormUnit.dfm"/>
|
||||||
<FormResources Include="TableSet.dfm"/>
|
<FormResources Include="TableSet.dfm"/>
|
||||||
<FormResources Include="TableUnit.dfm"/>
|
<FormResources Include="TableUnit.dfm"/>
|
||||||
<FormResources Include="SettingFormUnit.dfm"/>
|
|
||||||
<FormResources Include="RBmasterMain.dfm"/>
|
<FormResources Include="RBmasterMain.dfm"/>
|
||||||
<FormResources Include="ResetFormUnit.dfm"/>
|
<FormResources Include="ResetFormUnit.dfm"/>
|
||||||
<FormResources Include="ActCodeFormUnit.dfm"/>
|
<FormResources Include="ActCodeFormUnit.dfm"/>
|
||||||
<FormResources Include="Bet02FrameUnit.dfm"/>
|
<FormResources Include="AIFormUnit.dfm"/>
|
||||||
|
<FormResources Include="Chip02FrameUnit.dfm"/>
|
||||||
<FormResources Include="ChipsFormUnit.dfm"/>
|
<FormResources Include="ChipsFormUnit.dfm"/>
|
||||||
|
<FormResources Include="Bet02FrameUnit.dfm"/>
|
||||||
<FormResources Include="Bet03FrameUnit.dfm"/>
|
<FormResources Include="Bet03FrameUnit.dfm"/>
|
||||||
<FormResources Include="BetLogFormUnit.dfm"/>
|
<FormResources Include="BetLogFormUnit.dfm"/>
|
||||||
<FormResources Include="ChartFormUnit.dfm"/>
|
<FormResources Include="ChartFormUnit.dfm"/>
|
||||||
<FormResources Include="Chip02FrameUnit.dfm"/>
|
|
||||||
<BuildConfiguration Include="Base">
|
<BuildConfiguration Include="Base">
|
||||||
<Key>Base</Key>
|
<Key>Base</Key>
|
||||||
</BuildConfiguration>
|
</BuildConfiguration>
|
||||||
@@ -664,6 +725,66 @@
|
|||||||
<Overwrite>true</Overwrite>
|
<Overwrite>true</Overwrite>
|
||||||
</Platform>
|
</Platform>
|
||||||
</DeployFile>
|
</DeployFile>
|
||||||
|
<DeployFile LocalName="skills-md\policy-skills\betWithChip.md" Configuration="Debug" Class="ProjectFile">
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<RemoteDir>.\</RemoteDir>
|
||||||
|
<Overwrite>true</Overwrite>
|
||||||
|
</Platform>
|
||||||
|
</DeployFile>
|
||||||
|
<DeployFile LocalName="skills-md\policy-skills\comboLadderChip.md" Configuration="Debug" Class="ProjectFile">
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<RemoteDir>.\</RemoteDir>
|
||||||
|
<Overwrite>true</Overwrite>
|
||||||
|
</Platform>
|
||||||
|
</DeployFile>
|
||||||
|
<DeployFile LocalName="skills-md\policy-skills\ladderChip.md" Configuration="Debug" Class="ProjectFile">
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<RemoteDir>.\</RemoteDir>
|
||||||
|
<Overwrite>true</Overwrite>
|
||||||
|
</Platform>
|
||||||
|
</DeployFile>
|
||||||
|
<DeployFile LocalName="skills-md\policy-skills\normalBet.md" Configuration="Debug" Class="ProjectFile">
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<RemoteDir>.\</RemoteDir>
|
||||||
|
<Overwrite>true</Overwrite>
|
||||||
|
</Platform>
|
||||||
|
</DeployFile>
|
||||||
|
<DeployFile LocalName="skills-md\policy-skills\normalChip.md" Configuration="Debug" Class="ProjectFile">
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<RemoteDir>.\</RemoteDir>
|
||||||
|
<Overwrite>true</Overwrite>
|
||||||
|
</Platform>
|
||||||
|
</DeployFile>
|
||||||
|
<DeployFile LocalName="skills-md\policy-skills\specialBet.md" Configuration="Debug" Class="ProjectFile">
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<RemoteDir>.\</RemoteDir>
|
||||||
|
<Overwrite>true</Overwrite>
|
||||||
|
</Platform>
|
||||||
|
</DeployFile>
|
||||||
|
<DeployFile LocalName="skills-md\policy-skills\specialChip.md" Configuration="Debug" Class="ProjectFile">
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<RemoteDir>.\</RemoteDir>
|
||||||
|
<Overwrite>true</Overwrite>
|
||||||
|
</Platform>
|
||||||
|
</DeployFile>
|
||||||
|
<DeployFile LocalName="skills-md\policy-skills\tierChip.md" Configuration="Debug" Class="ProjectFile">
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<RemoteDir>.\</RemoteDir>
|
||||||
|
<Overwrite>true</Overwrite>
|
||||||
|
</Platform>
|
||||||
|
</DeployFile>
|
||||||
|
<DeployFile LocalName="skills-md\policy-skills\winLoseDiffChip.md" Configuration="Debug" Class="ProjectFile">
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<RemoteDir>.\</RemoteDir>
|
||||||
|
<Overwrite>true</Overwrite>
|
||||||
|
</Platform>
|
||||||
|
</DeployFile>
|
||||||
|
<DeployFile LocalName="skills-md\policySkillsHeader.md" Configuration="Debug" Class="ProjectFile">
|
||||||
|
<Platform Name="Win32">
|
||||||
|
<RemoteDir>.\</RemoteDir>
|
||||||
|
<Overwrite>true</Overwrite>
|
||||||
|
</Platform>
|
||||||
|
</DeployFile>
|
||||||
<DeployClass Name="AdditionalDebugSymbols">
|
<DeployClass Name="AdditionalDebugSymbols">
|
||||||
<Platform Name="iOSSimulator">
|
<Platform Name="iOSSimulator">
|
||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
|
|||||||
+3
-3
@@ -113,8 +113,8 @@ bool InitCef()
|
|||||||
GlobalCEFApp->LogProcessInfo = false; //true; //
|
GlobalCEFApp->LogProcessInfo = false; //true; //
|
||||||
GlobalCEFApp->SingleProcess = false; //true; //
|
GlobalCEFApp->SingleProcess = false; //true; //
|
||||||
GlobalCEFApp->MultiThreadedMessageLoop = true;
|
GlobalCEFApp->MultiThreadedMessageLoop = true;
|
||||||
GlobalCEFApp->WindowlessRenderingEnabled = true;
|
// GlobalCEFApp->WindowlessRenderingEnabled = true;
|
||||||
GlobalCEFApp->DisableImageLoading = true;
|
// GlobalCEFApp->DisableImageLoading = true;
|
||||||
|
|
||||||
GlobalCEFApp->OnWebKitInitialized = _di_TOnWebKitInitializedEvent(new TWebKitInitializeEvent());
|
GlobalCEFApp->OnWebKitInitialized = _di_TOnWebKitInitializedEvent(new TWebKitInitializeEvent());
|
||||||
|
|
||||||
@@ -224,7 +224,7 @@ USEFORM("RBmasterMain.cpp", MainForm);
|
|||||||
bool Startup()
|
bool Startup()
|
||||||
{
|
{
|
||||||
String strAppPath = ExtractFileDir(ParamStr(0)) + "\\";
|
String strAppPath = ExtractFileDir(ParamStr(0)) + "\\";
|
||||||
strcpy( g_AppPath, ((AnsiString)strAppPath).c_str() );
|
strcpy( g_AppPath, ((UTF8String)strAppPath).c_str() );
|
||||||
|
|
||||||
for(int i=1; i<=ParamCount(); i++){
|
for(int i=1; i<=ParamCount(); i++){
|
||||||
String sParam = LowerCase(ParamStr(i));
|
String sParam = LowerCase(ParamStr(i));
|
||||||
|
|||||||
+58
-17
@@ -24,6 +24,7 @@
|
|||||||
#include "ResetFormUnit.h"
|
#include "ResetFormUnit.h"
|
||||||
#include "ChipsFormUnit.h"
|
#include "ChipsFormUnit.h"
|
||||||
#include "ActCodeFormUnit.h"
|
#include "ActCodeFormUnit.h"
|
||||||
|
#include "AIFormUnit.h"
|
||||||
|
|
||||||
#define USER_VAR_FILE "rbmvrf"
|
#define USER_VAR_FILE "rbmvrf"
|
||||||
#define USER_VAR_VERSION 0x02
|
#define USER_VAR_VERSION 0x02
|
||||||
@@ -321,6 +322,20 @@ void __fastcall TMainForm::FormCloseQuery(TObject *Sender, bool &CanClose)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(AIForm){
|
||||||
|
int mrRet = MessageBox(Handle, L"AI 助手尚未关闭,是否确定退出程序?", L"退出",
|
||||||
|
MB_ICONQUESTION | MB_OKCANCEL);
|
||||||
|
|
||||||
|
if( mrRet==mrCancel ){
|
||||||
|
CanClose = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
AIForm->Perform( WM_CLOSE, 0, 0 );
|
||||||
|
|
||||||
|
Sleep(300);
|
||||||
|
}
|
||||||
|
|
||||||
Logout();
|
Logout();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1859,9 +1874,13 @@ bool __fastcall TMainForm::StopWebLoad()
|
|||||||
|
|
||||||
m_bWebLogon = false;
|
m_bWebLogon = false;
|
||||||
|
|
||||||
if(!m_sActCode.Length())
|
// if(!m_sActCode.Length())
|
||||||
g_uid = 0;
|
g_uid = 0;
|
||||||
|
|
||||||
|
u_sApiKey = "";
|
||||||
|
if(AIForm)
|
||||||
|
AIForm->OnLogout();
|
||||||
|
|
||||||
if( g_iPlatform==PF_PA ){
|
if( g_iPlatform==PF_PA ){
|
||||||
m_loginValues[0] = m_loginValues[1] = m_loginValues[2]
|
m_loginValues[0] = m_loginValues[1] = m_loginValues[2]
|
||||||
= m_loginValues[3] = m_loginValues[4] = m_loginValues[5] = "";
|
= m_loginValues[3] = m_loginValues[4] = m_loginValues[5] = "";
|
||||||
@@ -2314,6 +2333,7 @@ void __fastcall TMainForm::UMHttpReturn(TMessage &msg)
|
|||||||
extm = 0,
|
extm = 0,
|
||||||
repeat = bVerify ? op : (op - UR_LOGIN),
|
repeat = bVerify ? op : (op - UR_LOGIN),
|
||||||
errRes = 0;
|
errRes = 0;
|
||||||
|
String apiKey;
|
||||||
|
|
||||||
if( errCode==0 ){
|
if( errCode==0 ){
|
||||||
int len = urThread->m_sizeOut;
|
int len = urThread->m_sizeOut;
|
||||||
@@ -2336,6 +2356,9 @@ void __fastcall TMainForm::UMHttpReturn(TMessage &msg)
|
|||||||
else if( pos = strstr(tokenPtr, "exp:") ){
|
else if( pos = strstr(tokenPtr, "exp:") ){
|
||||||
sscanf( pos+4, "%d", &extm );
|
sscanf( pos+4, "%d", &extm );
|
||||||
}
|
}
|
||||||
|
else if( pos = strstr(tokenPtr, "key:") ){
|
||||||
|
apiKey = pos + 4;
|
||||||
|
}
|
||||||
tokenPtr=strtok(NULL,"|");
|
tokenPtr=strtok(NULL,"|");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2373,7 +2396,7 @@ void __fastcall TMainForm::UMHttpReturn(TMessage &msg)
|
|||||||
PostMessage(Handle, UM_WEBDEAD, -4, 0 );
|
PostMessage(Handle, UM_WEBDEAD, -4, 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(g_uid==0 || uid>0){
|
else if(g_uid==0 && uid>0){
|
||||||
g_uid = uid;
|
g_uid = uid;
|
||||||
m_tExpire = extm;
|
m_tExpire = extm;
|
||||||
|
|
||||||
@@ -2388,7 +2411,11 @@ void __fastcall TMainForm::UMHttpReturn(TMessage &msg)
|
|||||||
PostMessage(Handle, UM_WEBDEAD, -2, 0 );
|
PostMessage(Handle, UM_WEBDEAD, -2, 0 );
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
SetExpireJS();
|
SetExpireJS();
|
||||||
|
u_sApiKey = apiKey;
|
||||||
|
|
||||||
|
if(AIForm)
|
||||||
|
AIForm->OnLogin();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(bVerify){
|
if(bVerify){
|
||||||
@@ -2459,9 +2486,13 @@ void __fastcall TMainForm::UMWebLogin(TMessage &msg)
|
|||||||
|
|
||||||
|
|
||||||
m_bWebLogon = false;
|
m_bWebLogon = false;
|
||||||
if(!m_sActCode.Length())
|
// if(!m_sActCode.Length())
|
||||||
g_uid = 0;
|
g_uid = 0;
|
||||||
|
|
||||||
|
u_sApiKey = "";
|
||||||
|
if(AIForm)
|
||||||
|
AIForm->OnLogout();
|
||||||
|
|
||||||
g_MinOnBet = 20; //缺省限红
|
g_MinOnBet = 20; //缺省限红
|
||||||
g_MaxOnBet = 50000;
|
g_MaxOnBet = 50000;
|
||||||
|
|
||||||
@@ -3663,20 +3694,30 @@ void __fastcall TMainForm::OnSettingClick(TObject *Sender)
|
|||||||
|
|
||||||
void __fastcall TMainForm::OnResetClick(TObject *Sender)
|
void __fastcall TMainForm::OnResetClick(TObject *Sender)
|
||||||
{
|
{
|
||||||
ResetForm = new TResetForm(NULL);
|
if(AIForm){
|
||||||
TPoint pt = TPoint( m_panTopBar->Left + m_btnReset->Left
|
AIForm->BringToFront();
|
||||||
+ (m_btnReset->Width - ResetForm->Width)/ 2
|
u_sApiKey = "";
|
||||||
, m_panWeb->Top);
|
AIForm->OnLogout();
|
||||||
pt = ClientToScreen(pt);
|
}
|
||||||
ResetForm->Left = pt.x;
|
else{
|
||||||
ResetForm->Top = pt.y;
|
AIForm = new TAIForm(NULL);
|
||||||
|
AIForm->Show();
|
||||||
|
}
|
||||||
|
|
||||||
ResetForm->ShowModal();
|
// ResetForm = new TResetForm(NULL);
|
||||||
|
// TPoint pt = TPoint( m_panTopBar->Left + m_btnReset->Left
|
||||||
delete ResetForm;
|
// + (m_btnReset->Width - ResetForm->Width)/ 2
|
||||||
ResetForm = NULL;
|
// , m_panWeb->Top);
|
||||||
|
// pt = ClientToScreen(pt);
|
||||||
SetTableFocus();
|
// ResetForm->Left = pt.x;
|
||||||
|
// ResetForm->Top = pt.y;
|
||||||
|
//
|
||||||
|
// ResetForm->ShowModal();
|
||||||
|
//
|
||||||
|
// delete ResetForm;
|
||||||
|
// ResetForm = NULL;
|
||||||
|
//
|
||||||
|
// SetTableFocus();
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -144,7 +144,7 @@ private: // User declarations
|
|||||||
int m_iWindowState,
|
int m_iWindowState,
|
||||||
m_nLeft, m_nTop, m_nWidth, m_nHeight;
|
m_nLeft, m_nTop, m_nWidth, m_nHeight;
|
||||||
|
|
||||||
TChromium *m_chrm;
|
TChromium *m_chrm; //平台无视窗浏览器
|
||||||
|
|
||||||
TStringList* m_v8Values;
|
TStringList* m_v8Values;
|
||||||
HANDLE m_hV8Sema;
|
HANDLE m_hV8Sema;
|
||||||
|
|||||||
Reference in New Issue
Block a user