4.0.8 & convert utf8

This commit is contained in:
2026-10-13 17:03:09 +08:00
parent 7fa081911b
commit 57b2f5192b
31 changed files with 1277 additions and 1142 deletions
+12 -12
View File
@@ -1,4 +1,4 @@
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include <vcl.h>
#include <System.StrUtils.hpp>
#include <System.JSON.hpp>
@@ -25,14 +25,14 @@ void __fastcall TAutoBetThread::Execute()
{
TGame *pGame = g_aGames.GetGame(m_iGame);
if(pGame){
for(int i=0; i<pGame->aManBets.size(); i++){ //优先处理手工下注
for(int i=0; i<pGame->aManBets.size(); i++){ //优先处理手工下注
TManBet& rMB = pGame->aManBets[i];
if(rMB.state==ST_INIT){
rMB.state = ST_BETTING;
int ret = RealBet(pGame, rMB.chips);
if(!Terminated && ret!=0)
pGame->BetResp(ret, rMB.chips);
goto EXIT; //一个线程只处理一个下注
goto EXIT; //一个线程只处理一个下注
}
}
@@ -58,7 +58,7 @@ void __fastcall TAutoBetThread::Execute()
}
if( pGame->nChip>=0 && pGame->iState==ST_BETTING && pGame->CanBet() ){//再次确认下注状态
if( pGame->nChip>=0 && pGame->iState==ST_BETTING && pGame->CanBet() ){//再次确认下注状态
if(g_bSimulate){
pGame->bReal = false;
@@ -113,7 +113,7 @@ int __fastcall TAutoBetThread::RealBet(TGame* pG, int chips[])
strJS += "tab.addChipByPlayType(" + IntToStr(pG->iBet) + "," + IntToStr(pG->nChip) + ");";
}
if(g_bTesting){ //测试时模拟下注反馈
if(g_bTesting){ //测试时模拟下注反馈
int chip[3] = {0};
if(chips)
memcpy(chip, chips, sizeof(chip));
@@ -203,7 +203,7 @@ int __fastcall TAutoBetThread::RealBet(TGame* pG, int chips[])
"const td = gh ? gh.getTableDO(tid) : null;"
"const gst = td ? td.getCurGameStatusText(td.getGameRoundId()) : 'INVALID';"
"if(gst=='BETTING'){";
if(g_bTesting){ //测试时模拟下注反馈
if(g_bTesting){ //测试时模拟下注反馈
int chip[3] = {0};
if(chips)
memcpy(chip, chips, sizeof(chip));
@@ -247,7 +247,7 @@ int __fastcall TAutoBetThread::RealBet(TGame* pG, int chips[])
"let res = 0;";
if(!g_bTesting){// || g_fBalance>0){ //单独测试pushChip
if(!g_bTesting){// || g_fBalance>0){ //单独测试pushChip
if(chips){
for(int i=0; i<3; i++){
if(chips[i]>0){
@@ -277,7 +277,7 @@ int __fastcall TAutoBetThread::RealBet(TGame* pG, int chips[])
}
}
if(g_bTesting){ //测试时模拟下注反馈
if(g_bTesting){ //测试时模拟下注反馈
int chip[3] = {0};
if(chips)
memcpy(chip, chips, sizeof(chip));
@@ -301,7 +301,7 @@ int __fastcall TAutoBetThread::RealBet(TGame* pG, int chips[])
"return;"
"}"
"}"
"cefApp.ReturnJQValue('');" //非正常状态返回
"cefApp.ReturnJQValue('');" //非正常状态返回
"})()";
}
@@ -323,10 +323,10 @@ int __fastcall TAutoBetThread::RealBet(TGame* pG, int chips[])
else
DebugPrint("GetJQValue return: %s", strlst ? "''" : "null");
if( ret>=0 || !Halt(1000) ) //得到结果 或 用户cancel中途退出
if( ret>=0 || !Halt(1000) ) //得到结果 或 用户cancel中途退出
break;
if(chips==NULL && g_bSimulate){ //改变了模式
if(chips==NULL && g_bSimulate){ //改变了模式
if(g_settings.bSimAccOn && g_settings.bNoBetLow && g_settings.fSimAcc < pG->nChip){
pG->BetResp(26, NULL);
}
@@ -343,7 +343,7 @@ int __fastcall TAutoBetThread::RealBet(TGame* pG, int chips[])
#ifdef _DEBUG
if( !Terminated && ret<0 )
DebugPrint("%s 下注超时", ((AnsiString)pG->vid).c_str());
DebugPrint("%s 下注超时", ((AnsiString)pG->vid).c_str());
#endif
return ret<0 ? 25 : ret;