cleanup game logging; delete old code and disused defines
This commit is contained in:
+5
-6
@@ -57,10 +57,10 @@ Game::Game(GuiInterface* gui, boost::shared_ptr<EngineFactory> factory,
|
|||||||
dealerPosition = startData.startDealerPlayerId;
|
dealerPosition = startData.startDealerPlayerId;
|
||||||
|
|
||||||
// debug mode
|
// debug mode
|
||||||
if(myLog) {
|
if(myLog) {
|
||||||
myLog->debugMode_getStartSmallBlind(&startSmallBlind,¤tSmallBlind);
|
myLog->debugMode_getStartSmallBlind(&startSmallBlind,¤tSmallBlind);
|
||||||
myLog->debugMode_getStartDealerPosition(&dealerPosition);
|
myLog->debugMode_getStartDealerPosition(&dealerPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ Game::Game(GuiInterface* gui, boost::shared_ptr<EngineFactory> factory,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// debug mode
|
// debug mode
|
||||||
if(myLog) myLog->debugMode_getPlayerStartCash(&myStartCash, i);
|
if(myLog) myLog->debugMode_getPlayerStartCash(&myStartCash, i);
|
||||||
|
|
||||||
// create player objects
|
// create player objects
|
||||||
boost::shared_ptr<PlayerInterface> tmpPlayer = myFactory->createPlayer(i, uniqueId, type, myName, myAvatarFile, myStartCash, startQuantityPlayers > i, myStayOnTableStatus, 0);
|
boost::shared_ptr<PlayerInterface> tmpPlayer = myFactory->createPlayer(i, uniqueId, type, myName, myAvatarFile, myStartCash, startQuantityPlayers > i, myStayOnTableStatus, 0);
|
||||||
@@ -215,7 +215,6 @@ void Game::startHand()
|
|||||||
|
|
||||||
// log new hand
|
// log new hand
|
||||||
myGui->logNewGameHandMsg(myGameID, currentHandID);
|
myGui->logNewGameHandMsg(myGameID, currentHandID);
|
||||||
myGui->flushLogAtGame(myGameID);
|
|
||||||
|
|
||||||
currentHand->start();
|
currentHand->start();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost:
|
|||||||
for(i=0; i<5; i++) tempBoardArray[i] = cardsArray[i];
|
for(i=0; i<5; i++) tempBoardArray[i] = cardsArray[i];
|
||||||
|
|
||||||
// debug mode
|
// debug mode
|
||||||
if(myLog) myLog->debugMode_getBoardCards(tempBoardArray,myID);
|
if(myLog) myLog->debugMode_getBoardCards(tempBoardArray,myID);
|
||||||
|
|
||||||
// prepare whole player hand
|
// prepare whole player hand
|
||||||
for(i=0; i<5; i++) tempPlayerAndBoardArray[i+2] = tempBoardArray[i];
|
for(i=0; i<5; i++) tempPlayerAndBoardArray[i+2] = tempBoardArray[i];
|
||||||
@@ -92,7 +92,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost:
|
|||||||
for(j=0; j<2; j++) tempPlayerArray[j] = cardsArray[2*k+j+5];
|
for(j=0; j<2; j++) tempPlayerArray[j] = cardsArray[2*k+j+5];
|
||||||
|
|
||||||
// debug mode
|
// debug mode
|
||||||
if(myLog) myLog->debugMode_getPlayerCards(tempPlayerArray,myID,k);
|
if(myLog) myLog->debugMode_getPlayerCards(tempPlayerArray,myID,k);
|
||||||
|
|
||||||
// complete whole player hand
|
// complete whole player hand
|
||||||
for(j=0; j<2; j++) tempPlayerAndBoardArray[j] = tempPlayerArray[j];
|
for(j=0; j<2; j++) tempPlayerAndBoardArray[j] = tempPlayerArray[j];
|
||||||
@@ -144,7 +144,6 @@ void LocalHand::start()
|
|||||||
} else {
|
} else {
|
||||||
LOG_ERROR(__FILE__ << " (" << __LINE__ << "): Log Error: cannot find sBID or bBID");
|
LOG_ERROR(__FILE__ << " (" << __LINE__ << "): Log Error: cannot find sBID or bBID");
|
||||||
}
|
}
|
||||||
myGui->flushLogAtHand();
|
|
||||||
|
|
||||||
// deal cards
|
// deal cards
|
||||||
myGui->dealHoleCards();
|
myGui->dealHoleCards();
|
||||||
|
|||||||
@@ -1264,7 +1264,7 @@ void LocalPlayer::preflopEngine()
|
|||||||
// cout << myID << ": " << myOdds << " - " << myNiveau[0] << " " << myNiveau[2] << " - " << "Bluff: " << sBluffStatus << endl;
|
// cout << myID << ": " << myOdds << " - " << myNiveau[0] << " " << myNiveau[2] << " - " << "Bluff: " << sBluffStatus << endl;
|
||||||
|
|
||||||
// debug mode
|
// debug mode
|
||||||
if(currentHand->getLog()) currentHand->getLog()->debugMode_getPlayerAction(&myAction, &bet, &raise, GAME_STATE_PREFLOP, currentHand->getMyID(), myUniqueID, mySet);
|
if(currentHand->getLog()) currentHand->getLog()->debugMode_getPlayerAction(&myAction, &bet, &raise, GAME_STATE_PREFLOP, currentHand->getMyID(), myUniqueID, mySet);
|
||||||
|
|
||||||
evaluation(bet, raise);
|
evaluation(bet, raise);
|
||||||
}
|
}
|
||||||
@@ -1526,7 +1526,7 @@ void LocalPlayer::flopEngine()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// debug mode
|
// debug mode
|
||||||
if(currentHand->getLog()) currentHand->getLog()->debugMode_getPlayerAction(&myAction, &bet, &raise, GAME_STATE_FLOP, currentHand->getMyID(), myUniqueID, mySet);
|
if(currentHand->getLog()) currentHand->getLog()->debugMode_getPlayerAction(&myAction, &bet, &raise, GAME_STATE_FLOP, currentHand->getMyID(), myUniqueID, mySet);
|
||||||
|
|
||||||
evaluation(bet, raise);
|
evaluation(bet, raise);
|
||||||
|
|
||||||
@@ -1801,7 +1801,7 @@ void LocalPlayer::turnEngine()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// debug mode
|
// debug mode
|
||||||
if(currentHand->getLog()) currentHand->getLog()->debugMode_getPlayerAction(&myAction, &bet, &raise, GAME_STATE_TURN, currentHand->getMyID(), myUniqueID, mySet);
|
if(currentHand->getLog()) currentHand->getLog()->debugMode_getPlayerAction(&myAction, &bet, &raise, GAME_STATE_TURN, currentHand->getMyID(), myUniqueID, mySet);
|
||||||
|
|
||||||
evaluation(bet, raise);
|
evaluation(bet, raise);
|
||||||
|
|
||||||
@@ -2062,7 +2062,7 @@ void LocalPlayer::riverEngine()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// debug mode
|
// debug mode
|
||||||
if(currentHand->getLog()) currentHand->getLog()->debugMode_getPlayerAction(&myAction, &bet, &raise, GAME_STATE_RIVER, currentHand->getMyID(), myUniqueID, mySet);
|
if(currentHand->getLog()) currentHand->getLog()->debugMode_getPlayerAction(&myAction, &bet, &raise, GAME_STATE_RIVER, currentHand->getMyID(), myUniqueID, mySet);
|
||||||
|
|
||||||
evaluation(bet, raise);
|
evaluation(bet, raise);
|
||||||
|
|
||||||
|
|||||||
+375
-397
@@ -119,115 +119,112 @@ Log::Log(ConfigFile *c) : mySqliteLogDb(0), mySqliteLogFileName(""), myConfig(c)
|
|||||||
|
|
||||||
Log::~Log()
|
Log::~Log()
|
||||||
{
|
{
|
||||||
if(SQLITE_LOG) sqlite3_close(mySqliteLogDb);
|
sqlite3_close(mySqliteLogDb);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Log::init()
|
Log::init()
|
||||||
{
|
{
|
||||||
|
|
||||||
if(SQLITE_LOG) {
|
// logging activated
|
||||||
|
if(myConfig->readConfigInt("LogOnOff")) {
|
||||||
|
|
||||||
// logging activated
|
DIR *logDir;
|
||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
logDir = opendir((myConfig->readConfigString("LogDir")).c_str());
|
||||||
|
bool dirExists = logDir != NULL;
|
||||||
|
closedir(logDir);
|
||||||
|
|
||||||
DIR *logDir;
|
// check if logging path exist
|
||||||
logDir = opendir((myConfig->readConfigString("LogDir")).c_str());
|
if(myConfig->readConfigString("LogDir") != "" && dirExists) {
|
||||||
bool dirExists = logDir != NULL;
|
|
||||||
closedir(logDir);
|
|
||||||
|
|
||||||
// check if logging path exist
|
// detect current time
|
||||||
if(myConfig->readConfigString("LogDir") != "" && dirExists) {
|
char curDateTime[20];
|
||||||
|
char curDate[11];
|
||||||
|
char curTime[9];
|
||||||
|
time_t now = time(NULL);
|
||||||
|
tm *z = localtime(&now);
|
||||||
|
strftime(curDateTime,20,"%Y-%m-%d_%H%M%S",z);
|
||||||
|
strftime(curDate,11,"%Y-%m-%d",z);
|
||||||
|
strftime(curTime,9,"%H:%M:%S",z);
|
||||||
|
|
||||||
// detect current time
|
mySqliteLogFileName.clear();
|
||||||
char curDateTime[20];
|
mySqliteLogFileName /= myConfig->readConfigString("LogDir");
|
||||||
char curDate[11];
|
mySqliteLogFileName /= string("pokerth-log-") + curDateTime + ".pdb";
|
||||||
char curTime[9];
|
|
||||||
time_t now = time(NULL);
|
|
||||||
tm *z = localtime(&now);
|
|
||||||
strftime(curDateTime,20,"%Y-%m-%d_%H%M%S",z);
|
|
||||||
strftime(curDate,11,"%Y-%m-%d",z);
|
|
||||||
strftime(curTime,9,"%H:%M:%S",z);
|
|
||||||
|
|
||||||
mySqliteLogFileName.clear();
|
// open sqlite-db
|
||||||
mySqliteLogFileName /= myConfig->readConfigString("LogDir");
|
sqlite3_open(mySqliteLogFileName.directory_string().c_str(), &mySqliteLogDb);
|
||||||
mySqliteLogFileName /= string("pokerth-log-") + curDateTime + ".pdb";
|
if( mySqliteLogDb != 0 ) {
|
||||||
|
|
||||||
// open sqlite-db
|
int i;
|
||||||
sqlite3_open(mySqliteLogFileName.directory_string().c_str(), &mySqliteLogDb);
|
// create session table
|
||||||
if( mySqliteLogDb != 0 ) {
|
sql += "CREATE TABLE Session (";
|
||||||
|
sql += "PokerTH_Version TEXT NOT NULL";
|
||||||
|
sql += ",Date TEXT NOT NULL";
|
||||||
|
sql += ",Time TEXT NOT NULL";
|
||||||
|
sql += ",LogVersion INTEGER NOT NULL";
|
||||||
|
sql += ", PRIMARY KEY(Date,Time));";
|
||||||
|
|
||||||
int i;
|
sql += "INSERT INTO Session (";
|
||||||
// create session table
|
sql += "PokerTH_Version";
|
||||||
sql += "CREATE TABLE Session (";
|
sql += ",Date";
|
||||||
sql += "PokerTH_Version TEXT NOT NULL";
|
sql += ",Time";
|
||||||
sql += ",Date TEXT NOT NULL";
|
sql += ",LogVersion";
|
||||||
sql += ",Time TEXT NOT NULL";
|
sql += ") VALUES (";
|
||||||
sql += ",LogVersion INTEGER NOT NULL";
|
sql += "\"" + boost::lexical_cast<string>(POKERTH_BETA_RELEASE_STRING) + "\",";
|
||||||
sql += ", PRIMARY KEY(Date,Time));";
|
sql += "\"" + boost::lexical_cast<string>(curDate) + "\",";
|
||||||
|
sql += "\"" + boost::lexical_cast<string>(curTime) + "\",";
|
||||||
|
sql += boost::lexical_cast<string>(SQLITE_LOG_VERSION) + ");";
|
||||||
|
|
||||||
sql += "INSERT INTO Session (";
|
// create game table
|
||||||
sql += "PokerTH_Version";
|
sql += "CREATE TABLE Game (";
|
||||||
sql += ",Date";
|
sql += "UniqueGameID INTEGER PRIMARY KEY";
|
||||||
sql += ",Time";
|
sql += ",GameID INTEGER NOT NULL";
|
||||||
sql += ",LogVersion";
|
sql += ",Startmoney INTEGER NOT NULL";
|
||||||
sql += ") VALUES (";
|
sql += ",StartSb INTEGER NOT NULL";
|
||||||
sql += "\"" + boost::lexical_cast<string>(POKERTH_BETA_RELEASE_STRING) + "\",";
|
sql += ",DealerPos INTEGER NOT NULL";
|
||||||
sql += "\"" + boost::lexical_cast<string>(curDate) + "\",";
|
sql += ",Winner_Seat INTEGER";
|
||||||
sql += "\"" + boost::lexical_cast<string>(curTime) + "\",";
|
sql += ");";
|
||||||
sql += boost::lexical_cast<string>(SQLITE_LOG_VERSION) + ");";
|
|
||||||
|
|
||||||
// create game table
|
// create player table
|
||||||
sql += "CREATE TABLE Game (";
|
sql += "CREATE TABLE Player (";
|
||||||
sql += "UniqueGameID INTEGER PRIMARY KEY";
|
sql += "UniqueGameID INTEGER NOT NULL";
|
||||||
sql += ",GameID INTEGER NOT NULL";
|
sql += ",Seat INTEGER NOT NULL";
|
||||||
sql += ",Startmoney INTEGER NOT NULL";
|
sql += ",Player TEXT NOT NULL";
|
||||||
sql += ",StartSb INTEGER NOT NULL";
|
sql += ",PRIMARY KEY(UniqueGameID,Seat));";
|
||||||
sql += ",DealerPos INTEGER NOT NULL";
|
|
||||||
sql += ",Winner_Seat INTEGER";
|
|
||||||
sql += ");";
|
|
||||||
|
|
||||||
// create player table
|
// create hand table
|
||||||
sql += "CREATE TABLE Player (";
|
sql += "CREATE TABLE Hand (";
|
||||||
sql += "UniqueGameID INTEGER NOT NULL";
|
sql += "HandID INTEGER NOT NULL";
|
||||||
sql += ",Seat INTEGER NOT NULL";
|
sql += ",UniqueGameID INTEGER NOT NULL";
|
||||||
sql += ",Player TEXT NOT NULL";
|
sql += ",Dealer_Seat INTEGER";
|
||||||
sql += ",PRIMARY KEY(UniqueGameID,Seat));";
|
sql += ",Sb_Amount INTEGER NOT NULL";
|
||||||
|
sql += ",Sb_Seat INTEGER NOT NULL";
|
||||||
// create hand table
|
sql += ",Bb_Amount INTEGER NOT NULL";
|
||||||
sql += "CREATE TABLE Hand (";
|
sql += ",Bb_Seat INTEGER NOT NULL";
|
||||||
sql += "HandID INTEGER NOT NULL";
|
for(i=1; i<=MAX_NUMBER_OF_PLAYERS; i++) {
|
||||||
sql += ",UniqueGameID INTEGER NOT NULL";
|
sql += ",Seat_" + boost::lexical_cast<std::string>(i) + "_Cash INTEGER";
|
||||||
sql += ",Dealer_Seat INTEGER";
|
sql += ",Seat_" + boost::lexical_cast<std::string>(i) + "_Card_1 INTEGER";
|
||||||
sql += ",Sb_Amount INTEGER NOT NULL";
|
sql += ",Seat_" + boost::lexical_cast<std::string>(i) + "_Card_2 INTEGER";
|
||||||
sql += ",Sb_Seat INTEGER NOT NULL";
|
sql += ",Seat_" + boost::lexical_cast<std::string>(i) + "_Hand_text TEXT";
|
||||||
sql += ",Bb_Amount INTEGER NOT NULL";
|
sql += ",Seat_" + boost::lexical_cast<std::string>(i) + "_Hand_int INTEGER";
|
||||||
sql += ",Bb_Seat INTEGER NOT NULL";
|
|
||||||
for(i=1; i<=MAX_NUMBER_OF_PLAYERS; i++) {
|
|
||||||
sql += ",Seat_" + boost::lexical_cast<std::string>(i) + "_Cash INTEGER";
|
|
||||||
sql += ",Seat_" + boost::lexical_cast<std::string>(i) + "_Card_1 INTEGER";
|
|
||||||
sql += ",Seat_" + boost::lexical_cast<std::string>(i) + "_Card_2 INTEGER";
|
|
||||||
sql += ",Seat_" + boost::lexical_cast<std::string>(i) + "_Hand_text TEXT";
|
|
||||||
sql += ",Seat_" + boost::lexical_cast<std::string>(i) + "_Hand_int INTEGER";
|
|
||||||
}
|
|
||||||
for(i=1; i<=5; i++) {
|
|
||||||
sql += ",BoardCard_" + boost::lexical_cast<std::string>(i) + " INTEGER";
|
|
||||||
}
|
|
||||||
sql += ",PRIMARY KEY(HandID,UniqueGameID));";
|
|
||||||
|
|
||||||
// create action table
|
|
||||||
sql += "CREATE TABLE Action (";
|
|
||||||
sql += "ActionID INTEGER PRIMARY KEY AUTOINCREMENT";
|
|
||||||
sql += ",HandID INTEGER NOT NULL";
|
|
||||||
sql += ",UniqueGameID INTEGER NOT NULL";
|
|
||||||
sql += ",BeRo INTEGER NOT NULL";
|
|
||||||
sql += ",Player INTEGER NOT NULL";
|
|
||||||
sql += ",Action TEXT NOT NULL";
|
|
||||||
sql += ",Amount INTEGER";
|
|
||||||
sql += ");";
|
|
||||||
|
|
||||||
exec_transaction();
|
|
||||||
}
|
}
|
||||||
|
for(i=1; i<=5; i++) {
|
||||||
|
sql += ",BoardCard_" + boost::lexical_cast<std::string>(i) + " INTEGER";
|
||||||
|
}
|
||||||
|
sql += ",PRIMARY KEY(HandID,UniqueGameID));";
|
||||||
|
|
||||||
|
// create action table
|
||||||
|
sql += "CREATE TABLE Action (";
|
||||||
|
sql += "ActionID INTEGER PRIMARY KEY AUTOINCREMENT";
|
||||||
|
sql += ",HandID INTEGER NOT NULL";
|
||||||
|
sql += ",UniqueGameID INTEGER NOT NULL";
|
||||||
|
sql += ",BeRo INTEGER NOT NULL";
|
||||||
|
sql += ",Player INTEGER NOT NULL";
|
||||||
|
sql += ",Action TEXT NOT NULL";
|
||||||
|
sql += ",Amount INTEGER";
|
||||||
|
sql += ");";
|
||||||
|
|
||||||
|
exec_transaction();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -238,49 +235,46 @@ Log::logNewGameMsg(int gameID, int startCash, int startSmallBlind, unsigned deal
|
|||||||
{
|
{
|
||||||
uniqueGameID++;
|
uniqueGameID++;
|
||||||
|
|
||||||
if(SQLITE_LOG) {
|
if(myConfig->readConfigInt("LogOnOff")) {
|
||||||
|
//if write logfiles is enabled
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
PlayerListConstIterator it_c;
|
||||||
//if write logfiles is enabled
|
|
||||||
|
|
||||||
PlayerListConstIterator it_c;
|
if( mySqliteLogDb != 0 ) {
|
||||||
|
// sqlite-db is open
|
||||||
|
int i;
|
||||||
|
|
||||||
if( mySqliteLogDb != 0 ) {
|
sql += "INSERT INTO Game (";
|
||||||
// sqlite-db is open
|
sql += "UniqueGameID";
|
||||||
int i;
|
sql += ",GameID";
|
||||||
|
sql += ",Startmoney";
|
||||||
|
sql += ",StartSb";
|
||||||
|
sql += ",DealerPos";
|
||||||
|
sql += ") VALUES (";
|
||||||
|
sql += boost::lexical_cast<string>(uniqueGameID);
|
||||||
|
sql += "," + boost::lexical_cast<string>(gameID);
|
||||||
|
sql += "," + boost::lexical_cast<string>(startCash);
|
||||||
|
sql += "," + boost::lexical_cast<string>(startSmallBlind);
|
||||||
|
sql += "," + boost::lexical_cast<string>(dealerPosition);
|
||||||
|
sql += ");";
|
||||||
|
|
||||||
sql += "INSERT INTO Game (";
|
i = 1;
|
||||||
sql += "UniqueGameID";
|
for(it_c = seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
|
||||||
sql += ",GameID";
|
if((*it_c)->getMyActiveStatus()) {
|
||||||
sql += ",Startmoney";
|
sql += "INSERT INTO Player (";
|
||||||
sql += ",StartSb";
|
sql += "UniqueGameID";
|
||||||
sql += ",DealerPos";
|
sql += ",Seat";
|
||||||
sql += ") VALUES (";
|
sql += ",Player";
|
||||||
sql += boost::lexical_cast<string>(uniqueGameID);
|
sql += ") VALUES (";
|
||||||
sql += "," + boost::lexical_cast<string>(gameID);
|
sql += boost::lexical_cast<string>(uniqueGameID);
|
||||||
sql += "," + boost::lexical_cast<string>(startCash);
|
sql += "," + boost::lexical_cast<string>(i);
|
||||||
sql += "," + boost::lexical_cast<string>(startSmallBlind);
|
sql += ",\"" + (*it_c)->getMyName() +"\"";
|
||||||
sql += "," + boost::lexical_cast<string>(dealerPosition);
|
sql += ");";
|
||||||
sql += ");";
|
|
||||||
|
|
||||||
i = 1;
|
|
||||||
for(it_c = seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
|
|
||||||
if((*it_c)->getMyActiveStatus()) {
|
|
||||||
sql += "INSERT INTO Player (";
|
|
||||||
sql += "UniqueGameID";
|
|
||||||
sql += ",Seat";
|
|
||||||
sql += ",Player";
|
|
||||||
sql += ") VALUES (";
|
|
||||||
sql += boost::lexical_cast<string>(uniqueGameID);
|
|
||||||
sql += "," + boost::lexical_cast<string>(i);
|
|
||||||
sql += ",\"" + (*it_c)->getMyName() +"\"";
|
|
||||||
sql += ");";
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
|
i++;
|
||||||
exec_transaction();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exec_transaction();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -296,82 +290,79 @@ Log::logNewHandMsg(int handID, unsigned dealerPosition, int smallBlind, unsigned
|
|||||||
(*it_c)->setLogHoleCardsDone(false);
|
(*it_c)->setLogHoleCardsDone(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SQLITE_LOG) {
|
if(myConfig->readConfigInt("LogOnOff")) {
|
||||||
|
//if write logfiles is enabled
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
if( mySqliteLogDb != 0 ) {
|
||||||
//if write logfiles is enabled
|
// sqlite-db is open
|
||||||
|
int i;
|
||||||
if( mySqliteLogDb != 0 ) {
|
|
||||||
// sqlite-db is open
|
|
||||||
int i;
|
|
||||||
|
|
||||||
sql += "INSERT INTO Hand (";
|
|
||||||
sql += "HandID";
|
|
||||||
sql += ",UniqueGameID";
|
|
||||||
sql += ",Dealer_Seat";
|
|
||||||
sql += ",Sb_Amount";
|
|
||||||
sql += ",Sb_Seat";
|
|
||||||
sql += ",Bb_Amount";
|
|
||||||
sql += ",Bb_Seat";
|
|
||||||
for(i=1; i<=MAX_NUMBER_OF_PLAYERS; i++) {
|
|
||||||
sql += ",Seat_" + boost::lexical_cast<std::string>(i) + "_Cash";
|
|
||||||
}
|
|
||||||
sql += ") VALUES (";
|
|
||||||
sql += boost::lexical_cast<string>(currentHandID);
|
|
||||||
sql += "," + boost::lexical_cast<string>(uniqueGameID);
|
|
||||||
sql += "," + boost::lexical_cast<string>(dealerPosition);
|
|
||||||
sql += "," + boost::lexical_cast<string>(smallBlind);
|
|
||||||
sql += "," + boost::lexical_cast<string>(smallBlindPosition);
|
|
||||||
sql += "," + boost::lexical_cast<string>(bigBlind);
|
|
||||||
sql += "," + boost::lexical_cast<string>(bigBlindPosition);
|
|
||||||
for(it_c = seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
|
|
||||||
if((*it_c)->getMyActiveStatus()) {
|
|
||||||
sql += "," + boost::lexical_cast<string>((*it_c)->getMyRoundStartCash());
|
|
||||||
} else {
|
|
||||||
sql += ",NULL";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sql += ");";
|
|
||||||
if(myConfig->readConfigInt("LogInterval") == 0) {
|
|
||||||
exec_transaction();
|
|
||||||
}
|
|
||||||
|
|
||||||
// !! TODO !! Hack, weil Button-Regel noch falsch und dealerPosition noch teilweise falsche ID enthält (HeadsUp: dealerPosition=bigBlindPosition <-- falsch)
|
|
||||||
bool dealerButtonOnTable = false;
|
|
||||||
int countActivePlayer = 0;
|
|
||||||
for(it_c = seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
|
|
||||||
if((*it_c)->getMyActiveStatus()) {
|
|
||||||
countActivePlayer++;
|
|
||||||
if((*it_c)->getMyButton()==BUTTON_DEALER && (*it_c)->getMyActiveStatus()) {
|
|
||||||
dealerButtonOnTable = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(countActivePlayer==2) {
|
|
||||||
logPlayerAction(smallBlindPosition,LOG_ACTION_DEALER);
|
|
||||||
} else {
|
|
||||||
if(dealerButtonOnTable) {
|
|
||||||
logPlayerAction(dealerPosition,LOG_ACTION_DEALER);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// log blinds
|
|
||||||
for(it_c = seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
|
|
||||||
if((*it_c)->getMyButton() == BUTTON_SMALL_BLIND && (*it_c)->getMySet()>0) {
|
|
||||||
logPlayerAction(smallBlindPosition,LOG_ACTION_SMALL_BLIND,(*it_c)->getMySet());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for(it_c = seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
|
|
||||||
if((*it_c)->getMyButton() == BUTTON_BIG_BLIND && (*it_c)->getMySet()>0) {
|
|
||||||
logPlayerAction(bigBlindPosition,LOG_ACTION_BIG_BLIND,(*it_c)->getMySet());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// (*it_c)->getMySet() ist ein Hack, da es im Internetspiel vorkam, dass ein Spieler zweimal geloggt wurde mit Blind - einmal jedoch mit $0
|
|
||||||
|
|
||||||
// !! TODO !! Hack
|
|
||||||
|
|
||||||
|
sql += "INSERT INTO Hand (";
|
||||||
|
sql += "HandID";
|
||||||
|
sql += ",UniqueGameID";
|
||||||
|
sql += ",Dealer_Seat";
|
||||||
|
sql += ",Sb_Amount";
|
||||||
|
sql += ",Sb_Seat";
|
||||||
|
sql += ",Bb_Amount";
|
||||||
|
sql += ",Bb_Seat";
|
||||||
|
for(i=1; i<=MAX_NUMBER_OF_PLAYERS; i++) {
|
||||||
|
sql += ",Seat_" + boost::lexical_cast<std::string>(i) + "_Cash";
|
||||||
}
|
}
|
||||||
|
sql += ") VALUES (";
|
||||||
|
sql += boost::lexical_cast<string>(currentHandID);
|
||||||
|
sql += "," + boost::lexical_cast<string>(uniqueGameID);
|
||||||
|
sql += "," + boost::lexical_cast<string>(dealerPosition);
|
||||||
|
sql += "," + boost::lexical_cast<string>(smallBlind);
|
||||||
|
sql += "," + boost::lexical_cast<string>(smallBlindPosition);
|
||||||
|
sql += "," + boost::lexical_cast<string>(bigBlind);
|
||||||
|
sql += "," + boost::lexical_cast<string>(bigBlindPosition);
|
||||||
|
for(it_c = seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
|
||||||
|
if((*it_c)->getMyActiveStatus()) {
|
||||||
|
sql += "," + boost::lexical_cast<string>((*it_c)->getMyRoundStartCash());
|
||||||
|
} else {
|
||||||
|
sql += ",NULL";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sql += ");";
|
||||||
|
if(myConfig->readConfigInt("LogInterval") == 0) {
|
||||||
|
exec_transaction();
|
||||||
|
}
|
||||||
|
|
||||||
|
// !! TODO !! Hack, weil Button-Regel noch falsch und dealerPosition noch teilweise falsche ID enthält (HeadsUp: dealerPosition=bigBlindPosition <-- falsch)
|
||||||
|
bool dealerButtonOnTable = false;
|
||||||
|
int countActivePlayer = 0;
|
||||||
|
for(it_c = seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
|
||||||
|
if((*it_c)->getMyActiveStatus()) {
|
||||||
|
countActivePlayer++;
|
||||||
|
if((*it_c)->getMyButton()==BUTTON_DEALER && (*it_c)->getMyActiveStatus()) {
|
||||||
|
dealerButtonOnTable = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(countActivePlayer==2) {
|
||||||
|
logPlayerAction(smallBlindPosition,LOG_ACTION_DEALER);
|
||||||
|
} else {
|
||||||
|
if(dealerButtonOnTable) {
|
||||||
|
logPlayerAction(dealerPosition,LOG_ACTION_DEALER);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// log blinds
|
||||||
|
for(it_c = seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
|
||||||
|
if((*it_c)->getMyButton() == BUTTON_SMALL_BLIND && (*it_c)->getMySet()>0) {
|
||||||
|
logPlayerAction(smallBlindPosition,LOG_ACTION_SMALL_BLIND,(*it_c)->getMySet());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(it_c = seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
|
||||||
|
if((*it_c)->getMyButton() == BUTTON_BIG_BLIND && (*it_c)->getMySet()>0) {
|
||||||
|
logPlayerAction(bigBlindPosition,LOG_ACTION_BIG_BLIND,(*it_c)->getMySet());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// (*it_c)->getMySet() ist ein Hack, da es im Internetspiel vorkam, dass ein Spieler zweimal geloggt wurde mit Blind - einmal jedoch mit $0
|
||||||
|
|
||||||
|
// !! TODO !! Hack
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -380,35 +371,32 @@ void
|
|||||||
Log::logPlayerAction(string playerName, PlayerActionLog action, int amount)
|
Log::logPlayerAction(string playerName, PlayerActionLog action, int amount)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(SQLITE_LOG) {
|
if(myConfig->readConfigInt("LogOnOff")) {
|
||||||
|
//if write logfiles is enabled
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
if( mySqliteLogDb != 0 ) {
|
||||||
//if write logfiles is enabled
|
// sqlite-db is open
|
||||||
|
|
||||||
if( mySqliteLogDb != 0 ) {
|
char **result_Player=0;
|
||||||
// sqlite-db is open
|
int nRow_Player=0;
|
||||||
|
int nCol_Player=0;
|
||||||
|
char *errmsg = 0;
|
||||||
|
|
||||||
char **result_Player=0;
|
// read seat
|
||||||
int nRow_Player=0;
|
string sql_select = "SELECT Seat FROM Player WHERE UniqueGameID=" + boost::lexical_cast<std::string>(uniqueGameID);
|
||||||
int nCol_Player=0;
|
sql_select += " AND ";
|
||||||
char *errmsg = 0;
|
sql_select += "Player=\"" + playerName +"\"";
|
||||||
|
if(sqlite3_get_table(mySqliteLogDb,sql_select.c_str(),&result_Player,&nRow_Player,&nCol_Player,&errmsg) != SQLITE_OK) {
|
||||||
// read seat
|
cout << "Error in statement: " << sql_select.c_str() << "[" << errmsg << "]." << endl;
|
||||||
string sql_select = "SELECT Seat FROM Player WHERE UniqueGameID=" + boost::lexical_cast<std::string>(uniqueGameID);
|
} else {
|
||||||
sql_select += " AND ";
|
if(nRow_Player == 1) {
|
||||||
sql_select += "Player=\"" + playerName +"\"";
|
logPlayerAction(boost::lexical_cast<int>(result_Player[1]), action, amount);
|
||||||
if(sqlite3_get_table(mySqliteLogDb,sql_select.c_str(),&result_Player,&nRow_Player,&nCol_Player,&errmsg) != SQLITE_OK) {
|
|
||||||
cout << "Error in statement: " << sql_select.c_str() << "[" << errmsg << "]." << endl;
|
|
||||||
} else {
|
} else {
|
||||||
if(nRow_Player == 1) {
|
cout << "Implausible information about player " << playerName << " in log-db!" << endl;
|
||||||
logPlayerAction(boost::lexical_cast<int>(result_Player[1]), action, amount);
|
|
||||||
} else {
|
|
||||||
cout << "Implausible information about player " << playerName << " in log-db!" << endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sqlite3_free_table(result_Player);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sqlite3_free_table(result_Player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -417,107 +405,104 @@ void
|
|||||||
Log::logPlayerAction(int seat, PlayerActionLog action, int amount)
|
Log::logPlayerAction(int seat, PlayerActionLog action, int amount)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(SQLITE_LOG) {
|
if(myConfig->readConfigInt("LogOnOff")) {
|
||||||
|
//if write logfiles is enabled
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
if( mySqliteLogDb != 0 ) {
|
||||||
//if write logfiles is enabled
|
// sqlite-db is open
|
||||||
|
|
||||||
if( mySqliteLogDb != 0 ) {
|
if(action!=LOG_ACTION_NONE) {
|
||||||
// sqlite-db is open
|
sql += "INSERT INTO Action (";
|
||||||
|
sql += "HandID";
|
||||||
if(action!=LOG_ACTION_NONE) {
|
sql += ",UniqueGameID";
|
||||||
sql += "INSERT INTO Action (";
|
sql += ",BeRo";
|
||||||
sql += "HandID";
|
sql += ",Player";
|
||||||
sql += ",UniqueGameID";
|
sql += ",Action";
|
||||||
sql += ",BeRo";
|
sql += ",Amount";
|
||||||
sql += ",Player";
|
sql += ") VALUES (";
|
||||||
sql += ",Action";
|
sql += boost::lexical_cast<string>(currentHandID);
|
||||||
sql += ",Amount";
|
sql += "," + boost::lexical_cast<string>(uniqueGameID);
|
||||||
sql += ") VALUES (";
|
sql += "," + boost::lexical_cast<string>(currentRound);;
|
||||||
sql += boost::lexical_cast<string>(currentHandID);
|
sql += "," + boost::lexical_cast<string>(seat);
|
||||||
sql += "," + boost::lexical_cast<string>(uniqueGameID);
|
switch(action) {
|
||||||
sql += "," + boost::lexical_cast<string>(currentRound);;
|
case LOG_ACTION_DEALER:
|
||||||
sql += "," + boost::lexical_cast<string>(seat);
|
sql += ",'starts as dealer'";
|
||||||
switch(action) {
|
sql += ",NULL";
|
||||||
case LOG_ACTION_DEALER:
|
break;
|
||||||
sql += ",'starts as dealer'";
|
case LOG_ACTION_SMALL_BLIND:
|
||||||
sql += ",NULL";
|
sql += ",'posts small blind'";
|
||||||
break;
|
sql += "," + boost::lexical_cast<string>(amount);
|
||||||
case LOG_ACTION_SMALL_BLIND:
|
break;
|
||||||
sql += ",'posts small blind'";
|
case LOG_ACTION_BIG_BLIND:
|
||||||
sql += "," + boost::lexical_cast<string>(amount);
|
sql += ",'posts big blind'";
|
||||||
break;
|
sql += "," + boost::lexical_cast<string>(amount);
|
||||||
case LOG_ACTION_BIG_BLIND:
|
break;
|
||||||
sql += ",'posts big blind'";
|
case LOG_ACTION_FOLD:
|
||||||
sql += "," + boost::lexical_cast<string>(amount);
|
sql += ",'folds'";
|
||||||
break;
|
sql += ",NULL";
|
||||||
case LOG_ACTION_FOLD:
|
break;
|
||||||
sql += ",'folds'";
|
case LOG_ACTION_CHECK:
|
||||||
sql += ",NULL";
|
sql += ",'checks'";
|
||||||
break;
|
sql += ",NULL";
|
||||||
case LOG_ACTION_CHECK:
|
break;
|
||||||
sql += ",'checks'";
|
case LOG_ACTION_CALL:
|
||||||
sql += ",NULL";
|
sql += ",'calls'";
|
||||||
break;
|
sql += "," + boost::lexical_cast<string>(amount);
|
||||||
case LOG_ACTION_CALL:
|
break;
|
||||||
sql += ",'calls'";
|
case LOG_ACTION_BET:
|
||||||
sql += "," + boost::lexical_cast<string>(amount);
|
sql += ",'bets'";
|
||||||
break;
|
sql += "," + boost::lexical_cast<string>(amount);
|
||||||
case LOG_ACTION_BET:
|
break;
|
||||||
sql += ",'bets'";
|
case LOG_ACTION_ALL_IN:
|
||||||
sql += "," + boost::lexical_cast<string>(amount);
|
sql += ",'is all in with'";
|
||||||
break;
|
sql += "," + boost::lexical_cast<string>(amount);
|
||||||
case LOG_ACTION_ALL_IN:
|
break;
|
||||||
sql += ",'is all in with'";
|
case LOG_ACTION_SHOW:
|
||||||
sql += "," + boost::lexical_cast<string>(amount);
|
sql += ",'shows'";
|
||||||
break;
|
sql += ",NULL";
|
||||||
case LOG_ACTION_SHOW:
|
break;
|
||||||
sql += ",'shows'";
|
case LOG_ACTION_HAS:
|
||||||
sql += ",NULL";
|
sql += ",'has'";
|
||||||
break;
|
sql += ",NULL";
|
||||||
case LOG_ACTION_HAS:
|
break;
|
||||||
sql += ",'has'";
|
case LOG_ACTION_WIN:
|
||||||
sql += ",NULL";
|
sql += ",'wins'";
|
||||||
break;
|
sql += "," + boost::lexical_cast<string>(amount);
|
||||||
case LOG_ACTION_WIN:
|
break;
|
||||||
sql += ",'wins'";
|
case LOG_ACTION_WIN_SIDE_POT:
|
||||||
sql += "," + boost::lexical_cast<string>(amount);
|
sql += ",'wins (side pot)'";
|
||||||
break;
|
sql += "," + boost::lexical_cast<string>(amount);
|
||||||
case LOG_ACTION_WIN_SIDE_POT:
|
break;
|
||||||
sql += ",'wins (side pot)'";
|
case LOG_ACTION_SIT_OUT:
|
||||||
sql += "," + boost::lexical_cast<string>(amount);
|
sql += ",'sits out'";
|
||||||
break;
|
sql += ",NULL";
|
||||||
case LOG_ACTION_SIT_OUT:
|
break;
|
||||||
sql += ",'sits out'";
|
case LOG_ACTION_WIN_GAME:
|
||||||
sql += ",NULL";
|
sql += ",'wins game'";
|
||||||
break;
|
sql += ",NULL";
|
||||||
case LOG_ACTION_WIN_GAME:
|
break;
|
||||||
sql += ",'wins game'";
|
case LOG_ACTION_LEFT:
|
||||||
sql += ",NULL";
|
sql += ",'has left the game'";
|
||||||
break;
|
sql += ",NULL";
|
||||||
case LOG_ACTION_LEFT:
|
break;
|
||||||
sql += ",'has left the game'";
|
case LOG_ACTION_KICKED:
|
||||||
sql += ",NULL";
|
sql += ",'was kicked from the game'";
|
||||||
break;
|
sql += ",NULL";
|
||||||
case LOG_ACTION_KICKED:
|
break;
|
||||||
sql += ",'was kicked from the game'";
|
case LOG_ACTION_ADMIN:
|
||||||
sql += ",NULL";
|
sql += ",'is game admin now'";
|
||||||
break;
|
sql += ",NULL";
|
||||||
case LOG_ACTION_ADMIN:
|
break;
|
||||||
sql += ",'is game admin now'";
|
case LOG_ACTION_JOIN:
|
||||||
sql += ",NULL";
|
sql += ",'has joined the game'";
|
||||||
break;
|
sql += ",NULL";
|
||||||
case LOG_ACTION_JOIN:
|
break;
|
||||||
sql += ",'has joined the game'";
|
default:
|
||||||
sql += ",NULL";
|
return;
|
||||||
break;
|
}
|
||||||
default:
|
sql += ");";
|
||||||
return;
|
if(myConfig->readConfigInt("LogInterval") == 0) {
|
||||||
}
|
exec_transaction();
|
||||||
sql += ");";
|
|
||||||
if(myConfig->readConfigInt("LogInterval") == 0) {
|
|
||||||
exec_transaction();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -552,42 +537,40 @@ Log::transformPlayerActionLog(PlayerAction action)
|
|||||||
void
|
void
|
||||||
Log::logBoardCards(int boardCards[5])
|
Log::logBoardCards(int boardCards[5])
|
||||||
{
|
{
|
||||||
if(SQLITE_LOG) {
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
if(myConfig->readConfigInt("LogOnOff")) {
|
||||||
//if write logfiles is enabled
|
//if write logfiles is enabled
|
||||||
|
|
||||||
if( mySqliteLogDb != 0 ) {
|
if( mySqliteLogDb != 0 ) {
|
||||||
// sqlite-db is open
|
// sqlite-db is open
|
||||||
|
|
||||||
switch(currentRound) {
|
switch(currentRound) {
|
||||||
case GAME_STATE_FLOP: {
|
case GAME_STATE_FLOP: {
|
||||||
sql += "UPDATE Hand SET ";
|
sql += "UPDATE Hand SET ";
|
||||||
sql += "BoardCard_1=" + boost::lexical_cast<string>(boardCards[0]) + ",";
|
sql += "BoardCard_1=" + boost::lexical_cast<string>(boardCards[0]) + ",";
|
||||||
sql += "BoardCard_2=" + boost::lexical_cast<string>(boardCards[1]) + ",";
|
sql += "BoardCard_2=" + boost::lexical_cast<string>(boardCards[1]) + ",";
|
||||||
sql += "BoardCard_3=" + boost::lexical_cast<string>(boardCards[2]);
|
sql += "BoardCard_3=" + boost::lexical_cast<string>(boardCards[2]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GAME_STATE_TURN: {
|
case GAME_STATE_TURN: {
|
||||||
sql += "UPDATE Hand SET ";
|
sql += "UPDATE Hand SET ";
|
||||||
sql += "BoardCard_4=" + boost::lexical_cast<string>(boardCards[3]);
|
sql += "BoardCard_4=" + boost::lexical_cast<string>(boardCards[3]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GAME_STATE_RIVER: {
|
case GAME_STATE_RIVER: {
|
||||||
sql += "UPDATE Hand SET ";
|
sql += "UPDATE Hand SET ";
|
||||||
sql += "BoardCard_5=" + boost::lexical_cast<string>(boardCards[4]);
|
sql += "BoardCard_5=" + boost::lexical_cast<string>(boardCards[4]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sql += " WHERE ";
|
sql += " WHERE ";
|
||||||
sql += "UniqueGameID=" + boost::lexical_cast<string>(uniqueGameID) + " AND ";
|
sql += "UniqueGameID=" + boost::lexical_cast<string>(uniqueGameID) + " AND ";
|
||||||
sql += "HandID=" + boost::lexical_cast<string>(currentHandID);
|
sql += "HandID=" + boost::lexical_cast<string>(currentHandID);
|
||||||
sql += ";";
|
sql += ";";
|
||||||
if(myConfig->readConfigInt("LogInterval") == 0) {
|
if(myConfig->readConfigInt("LogInterval") == 0) {
|
||||||
exec_transaction();
|
exec_transaction();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -612,44 +595,41 @@ void
|
|||||||
Log::logHoleCardsHandName(PlayerList activePlayerList, boost::shared_ptr<PlayerInterface> player, bool forceExecLog)
|
Log::logHoleCardsHandName(PlayerList activePlayerList, boost::shared_ptr<PlayerInterface> player, bool forceExecLog)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(SQLITE_LOG) {
|
if(myConfig->readConfigInt("LogOnOff")) {
|
||||||
|
//if write logfiles is enabled
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
if( mySqliteLogDb != 0) {
|
||||||
//if write logfiles is enabled
|
|
||||||
|
|
||||||
if( mySqliteLogDb != 0) {
|
|
||||||
|
|
||||||
int myCards[2];
|
|
||||||
player->getMyCards(myCards);
|
|
||||||
sql += "UPDATE Hand SET ";
|
|
||||||
if(currentRound==GAME_STATE_POST_RIVER && player->getMyCardsValueInt()>0) {
|
|
||||||
sql += "Seat_" + boost::lexical_cast<string>(player->getMyID()+1) + "_Hand_text=\"" + CardsValue::determineHandName(player->getMyCardsValueInt(),activePlayerList) + "\"";
|
|
||||||
sql += ",Seat_" + boost::lexical_cast<string>(player->getMyID()+1) + "_Hand_int=" + boost::lexical_cast<string>(player->getMyCardsValueInt());
|
|
||||||
}
|
|
||||||
if(currentRound==GAME_STATE_POST_RIVER && player->getMyCardsValueInt()>0 && !player->getLogHoleCardsDone()) {
|
|
||||||
sql+= ",";
|
|
||||||
}
|
|
||||||
if(!player->getLogHoleCardsDone()) {
|
|
||||||
sql += "Seat_" + boost::lexical_cast<string>(player->getMyID()+1) + "_Card_1=" + boost::lexical_cast<string>(myCards[0]);
|
|
||||||
sql += ",Seat_" + boost::lexical_cast<string>(player->getMyID()+1) + "_Card_2=" + boost::lexical_cast<string>(myCards[1]);
|
|
||||||
}
|
|
||||||
sql += " WHERE ";
|
|
||||||
sql += "UniqueGameID=" + boost::lexical_cast<string>(uniqueGameID) + " AND ";
|
|
||||||
sql += "HandID=" + boost::lexical_cast<string>(currentHandID);
|
|
||||||
sql += ";";
|
|
||||||
if(myConfig->readConfigInt("LogInterval") == 0 || forceExecLog) {
|
|
||||||
exec_transaction();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!player->getLogHoleCardsDone()) {
|
|
||||||
logPlayerAction(player->getMyName(),LOG_ACTION_SHOW);
|
|
||||||
} else {
|
|
||||||
logPlayerAction(player->getMyName(),LOG_ACTION_HAS);
|
|
||||||
}
|
|
||||||
|
|
||||||
player->setLogHoleCardsDone(true);
|
|
||||||
|
|
||||||
|
int myCards[2];
|
||||||
|
player->getMyCards(myCards);
|
||||||
|
sql += "UPDATE Hand SET ";
|
||||||
|
if(currentRound==GAME_STATE_POST_RIVER && player->getMyCardsValueInt()>0) {
|
||||||
|
sql += "Seat_" + boost::lexical_cast<string>(player->getMyID()+1) + "_Hand_text=\"" + CardsValue::determineHandName(player->getMyCardsValueInt(),activePlayerList) + "\"";
|
||||||
|
sql += ",Seat_" + boost::lexical_cast<string>(player->getMyID()+1) + "_Hand_int=" + boost::lexical_cast<string>(player->getMyCardsValueInt());
|
||||||
}
|
}
|
||||||
|
if(currentRound==GAME_STATE_POST_RIVER && player->getMyCardsValueInt()>0 && !player->getLogHoleCardsDone()) {
|
||||||
|
sql+= ",";
|
||||||
|
}
|
||||||
|
if(!player->getLogHoleCardsDone()) {
|
||||||
|
sql += "Seat_" + boost::lexical_cast<string>(player->getMyID()+1) + "_Card_1=" + boost::lexical_cast<string>(myCards[0]);
|
||||||
|
sql += ",Seat_" + boost::lexical_cast<string>(player->getMyID()+1) + "_Card_2=" + boost::lexical_cast<string>(myCards[1]);
|
||||||
|
}
|
||||||
|
sql += " WHERE ";
|
||||||
|
sql += "UniqueGameID=" + boost::lexical_cast<string>(uniqueGameID) + " AND ";
|
||||||
|
sql += "HandID=" + boost::lexical_cast<string>(currentHandID);
|
||||||
|
sql += ";";
|
||||||
|
if(myConfig->readConfigInt("LogInterval") == 0 || forceExecLog) {
|
||||||
|
exec_transaction();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!player->getLogHoleCardsDone()) {
|
||||||
|
logPlayerAction(player->getMyName(),LOG_ACTION_SHOW);
|
||||||
|
} else {
|
||||||
|
logPlayerAction(player->getMyName(),LOG_ACTION_HAS);
|
||||||
|
}
|
||||||
|
|
||||||
|
player->setLogHoleCardsDone(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -752,11 +732,9 @@ Log::exec_transaction()
|
|||||||
//void
|
//void
|
||||||
//Log::closeLogDbAtExit()
|
//Log::closeLogDbAtExit()
|
||||||
//{
|
//{
|
||||||
// if(SQLITE_LOG) {
|
// // close sqlite-db
|
||||||
// // close sqlite-db
|
// sqlite3_close(mySqliteLogDb);
|
||||||
// sqlite3_close(mySqliteLogDb);
|
// mySqliteLogDb = NULL;
|
||||||
// mySqliteLogDb = NULL;
|
|
||||||
// }
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -37,9 +37,6 @@
|
|||||||
#define MIN_GUI_SPEED 1
|
#define MIN_GUI_SPEED 1
|
||||||
#define MAX_GUI_SPEED 11
|
#define MAX_GUI_SPEED 11
|
||||||
|
|
||||||
#define SQLITE_LOG 1
|
|
||||||
#define HTML_LOG 0
|
|
||||||
|
|
||||||
#define POKERTH_VERSION_MAJOR 1
|
#define POKERTH_VERSION_MAJOR 1
|
||||||
#define POKERTH_VERSION_MINOR 11
|
#define POKERTH_VERSION_MINOR 11
|
||||||
#define POKERTH_VERSION ((POKERTH_VERSION_MAJOR << 8) | POKERTH_VERSION_MINOR)
|
#define POKERTH_VERSION ((POKERTH_VERSION_MAJOR << 8) | POKERTH_VERSION_MINOR)
|
||||||
|
|||||||
@@ -105,8 +105,6 @@ void ServerGuiWrapper::logNewBlindsSetsMsg(int /*sbSet*/, int /*bbSet*/, std::st
|
|||||||
void ServerGuiWrapper::logDealBoardCardsMsg(int /*roundID*/, int /*card1*/, int /*card2*/, int /*card3*/, int /*card4*/, int /*card5*/) {}
|
void ServerGuiWrapper::logDealBoardCardsMsg(int /*roundID*/, int /*card1*/, int /*card2*/, int /*card3*/, int /*card4*/, int /*card5*/) {}
|
||||||
void ServerGuiWrapper::logFlipHoleCardsMsg(std::string /*playerName*/, int /*card1*/, int /*card2*/, int /*cardsValueInt*/, std::string /*showHas*/) {}
|
void ServerGuiWrapper::logFlipHoleCardsMsg(std::string /*playerName*/, int /*card1*/, int /*card2*/, int /*cardsValueInt*/, std::string /*showHas*/) {}
|
||||||
void ServerGuiWrapper::logPlayerWinGame(std::string /*playerName*/, int /*gameID*/) {}
|
void ServerGuiWrapper::logPlayerWinGame(std::string /*playerName*/, int /*gameID*/) {}
|
||||||
void ServerGuiWrapper::flushLogAtGame(int /*gameID*/) {}
|
|
||||||
void ServerGuiWrapper::flushLogAtHand() {}
|
|
||||||
|
|
||||||
void ServerGuiWrapper::SignalNetClientServerListAdd(unsigned serverId)
|
void ServerGuiWrapper::SignalNetClientServerListAdd(unsigned serverId)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -118,8 +118,6 @@ public:
|
|||||||
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1) ;
|
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1) ;
|
||||||
void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows") ;
|
void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows") ;
|
||||||
void logPlayerWinGame(std::string playerName, int gameID);
|
void logPlayerWinGame(std::string playerName, int gameID);
|
||||||
void flushLogAtGame(int gameID);
|
|
||||||
void flushLogAtHand();
|
|
||||||
|
|
||||||
void SignalNetClientConnect(int actionID);
|
void SignalNetClientConnect(int actionID);
|
||||||
void SignalNetClientGameInfo(int actionID);
|
void SignalNetClientGameInfo(int actionID);
|
||||||
|
|||||||
@@ -119,8 +119,6 @@ public:
|
|||||||
virtual void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1) = 0;
|
virtual void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1) = 0;
|
||||||
virtual void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows") = 0;
|
virtual void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows") = 0;
|
||||||
virtual void logPlayerWinGame(std::string playerName, int gameID) =0;
|
virtual void logPlayerWinGame(std::string playerName, int gameID) =0;
|
||||||
virtual void flushLogAtGame(int gameID) =0;
|
|
||||||
virtual void flushLogAtHand() =0;
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -61,9 +61,6 @@ guiLog::guiLog(gameTableImpl* w, ConfigFile *c) : myW(w), myConfig(c), myLogDir(
|
|||||||
connect(this, SIGNAL(signalLogSpectatorLeftMsg(QString, int)), this, SLOT(logSpectatorLeftMsg(QString, int)));
|
connect(this, SIGNAL(signalLogSpectatorLeftMsg(QString, int)), this, SLOT(logSpectatorLeftMsg(QString, int)));
|
||||||
connect(this, SIGNAL(signalLogSpectatorJoinedMsg(QString)), this, SLOT(logSpectatorJoinedMsg(QString)));
|
connect(this, SIGNAL(signalLogSpectatorJoinedMsg(QString)), this, SLOT(logSpectatorJoinedMsg(QString)));
|
||||||
connect(this, SIGNAL(signalLogPlayerWinGame(QString, int)), this, SLOT(logPlayerWinGame(QString, int)));
|
connect(this, SIGNAL(signalLogPlayerWinGame(QString, int)), this, SLOT(logPlayerWinGame(QString, int)));
|
||||||
connect(this, SIGNAL(signalFlushLogAtGame(int)), this, SLOT(flushLogAtGame(int)));
|
|
||||||
connect(this, SIGNAL(signalFlushLogAtHand()), this, SLOT(flushLogAtHand()));
|
|
||||||
|
|
||||||
|
|
||||||
logFileStreamString = "";
|
logFileStreamString = "";
|
||||||
lastGameID = 0;
|
lastGameID = 0;
|
||||||
@@ -79,40 +76,7 @@ guiLog::guiLog(gameTableImpl* w, ConfigFile *c) : myW(w), myConfig(c), myLogDir(
|
|||||||
|
|
||||||
myLogDir = new QDir(QString::fromUtf8(myConfig->readConfigString("LogDir").c_str()));
|
myLogDir = new QDir(QString::fromUtf8(myConfig->readConfigString("LogDir").c_str()));
|
||||||
|
|
||||||
if(HTML_LOG) {
|
// delete old log files - TODO: move to Log
|
||||||
|
|
||||||
QDateTime currentTime = QDateTime::currentDateTime();
|
|
||||||
if(SQLITE_LOG) {
|
|
||||||
myHtmlLogFile_old = new QFile(myLogDir->absolutePath()+"/pokerth-log-"+currentTime.toString("yyyy-MM-dd_hh.mm.ss")+"_old.html");
|
|
||||||
} else {
|
|
||||||
myHtmlLogFile_old = new QFile(myLogDir->absolutePath()+"/pokerth-log-"+currentTime.toString("yyyy-MM-dd_hh.mm.ss")+".html");
|
|
||||||
}
|
|
||||||
|
|
||||||
//Logo-Pixmap extrahieren
|
|
||||||
QPixmap logoChipPixmapFile(":/gfx/logoChip3D.png");
|
|
||||||
logoChipPixmapFile.save(myLogDir->absolutePath()+"/logo.png");
|
|
||||||
|
|
||||||
// myW->textBrowser_Log->append(myHtmlLogFile_old->fileName());
|
|
||||||
|
|
||||||
// erstelle html-Datei
|
|
||||||
myHtmlLogFile_old->open( QIODevice::WriteOnly );
|
|
||||||
QTextStream stream_old( myHtmlLogFile_old );
|
|
||||||
stream_old << "<html>\n";
|
|
||||||
stream_old << "<head>\n";
|
|
||||||
stream_old << "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf8\">";
|
|
||||||
stream_old << "</head>\n";
|
|
||||||
#ifdef GUI_800x480
|
|
||||||
stream_old << "<body style=\"font-size:14px\">\n";
|
|
||||||
#else
|
|
||||||
stream_old << "<body>\n";
|
|
||||||
#endif
|
|
||||||
stream_old << "<img src='logo.png'>\n";
|
|
||||||
stream_old << QString("<h3><b>Log-File for PokerTH %1 Session started on ").arg(POKERTH_BETA_RELEASE_STRING)+QDate::currentDate().toString("yyyy-MM-dd")+" at "+QTime::currentTime().toString("hh:mm:ss")+"</b></h3>\n";
|
|
||||||
myHtmlLogFile_old->close();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// delete old log files
|
|
||||||
int daysUntilWaste = myConfig->readConfigInt("LogStoreDuration");
|
int daysUntilWaste = myConfig->readConfigInt("LogStoreDuration");
|
||||||
|
|
||||||
QStringList filters("pokerth-log*");
|
QStringList filters("pokerth-log*");
|
||||||
@@ -191,62 +155,19 @@ void guiLog::logPlayerActionMsg(QString msg, int action, int setValue)
|
|||||||
myW->textBrowser_Log->append("<span style=\"color:#"+myStyle->getChatLogTextColor()+";\">"+msg+"</span>");
|
myW->textBrowser_Log->append("<span style=\"color:#"+myStyle->getChatLogTextColor()+";\">"+msg+"</span>");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
if(HTML_LOG) {
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
|
||||||
//if write logfiles is enabled
|
|
||||||
|
|
||||||
logFileStreamString += msg+"</br>\n";
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogInterval") == 0) {
|
|
||||||
writeLogFileStream(logFileStreamString);
|
|
||||||
logFileStreamString = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void guiLog::logNewGameHandMsg(int gameID, int handID)
|
void guiLog::logNewGameHandMsg(int gameID, int handID)
|
||||||
{
|
{
|
||||||
|
|
||||||
PlayerListConstIterator it_c;
|
|
||||||
boost::shared_ptr<HandInterface> currentHand = myW->getSession()->getCurrentGame()->getCurrentHand();
|
|
||||||
|
|
||||||
PlayerList activePlayerList = currentHand->getActivePlayerList();
|
|
||||||
|
|
||||||
#ifdef GUI_800x480
|
#ifdef GUI_800x480
|
||||||
myW->tabs.textBrowser_Log->append("<span style=\"color:#"+myStyle->getChatLogTextColor()+"; font-size:large; font-weight:bold\">## Game: "+QString::number(gameID,10)+" | Hand: "+QString::number(handID,10)+" ##</span>");
|
myW->tabs.textBrowser_Log->append("<span style=\"color:#"+myStyle->getChatLogTextColor()+"; font-size:large; font-weight:bold\">## Game: "+QString::number(gameID,10)+" | Hand: "+QString::number(handID,10)+" ##</span>");
|
||||||
#else
|
#else
|
||||||
myW->textBrowser_Log->append("<span style=\"color:#"+myStyle->getChatLogTextColor()+"; font-size:large; font-weight:bold\">## Game: "+QString::number(gameID,10)+" | Hand: "+QString::number(handID,10)+" ##</span>");
|
myW->textBrowser_Log->append("<span style=\"color:#"+myStyle->getChatLogTextColor()+"; font-size:large; font-weight:bold\">## Game: "+QString::number(gameID,10)+" | Hand: "+QString::number(handID,10)+" ##</span>");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(HTML_LOG) {
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
|
||||||
//if write logfiles is enabled
|
|
||||||
|
|
||||||
logFileStreamString += "<table><tr><td width=\"600\" align=\"center\"><hr noshade size=\"3\"><b>Game: "+QString::number(gameID,10)+" | Hand: "+QString::number(handID,10)+"</b></td><td></td></tr></table>";
|
|
||||||
logFileStreamString += "BLIND LEVEL: $"+QString::number(currentHand->getSmallBlind())+" / $"+QString::number(currentHand->getSmallBlind()*2)+"</br>";
|
|
||||||
|
|
||||||
//print cash only for active players
|
|
||||||
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); ++it_c) {
|
|
||||||
|
|
||||||
logFileStreamString += "Seat " + QString::number((*it_c)->getMyID()+1,10) + ": <b>" + QString::fromUtf8((*it_c)->getMyName().c_str()) + "</b> ($" + QString::number((*it_c)->getMyCash()+(*it_c)->getMySet(),10)+")</br>";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void guiLog::logNewBlindsSetsMsg(int sbSet, int bbSet, QString sbName, QString bbName)
|
void guiLog::logNewBlindsSetsMsg(int sbSet, int bbSet, QString sbName, QString bbName)
|
||||||
{
|
{
|
||||||
|
|
||||||
// log blinds
|
// log blinds
|
||||||
#ifdef GUI_800x480
|
#ifdef GUI_800x480
|
||||||
myW->tabs.textBrowser_Log->append("<span style=\"color:#"+myStyle->getChatLogTextColor()+";\">"+sbName+" posts small blind ($"+QString::number(sbSet,10)+")</span>");
|
myW->tabs.textBrowser_Log->append("<span style=\"color:#"+myStyle->getChatLogTextColor()+";\">"+sbName+" posts small blind ($"+QString::number(sbSet,10)+")</span>");
|
||||||
@@ -255,45 +176,6 @@ void guiLog::logNewBlindsSetsMsg(int sbSet, int bbSet, QString sbName, QString b
|
|||||||
myW->textBrowser_Log->append("<span style=\"color:#"+myStyle->getChatLogTextColor()+";\">"+sbName+" posts small blind ($"+QString::number(sbSet,10)+")</span>");
|
myW->textBrowser_Log->append("<span style=\"color:#"+myStyle->getChatLogTextColor()+";\">"+sbName+" posts small blind ($"+QString::number(sbSet,10)+")</span>");
|
||||||
myW->textBrowser_Log->append("<span style=\"color:#"+myStyle->getChatLogTextColor()+";\">"+bbName+" posts big blind ($"+QString::number(bbSet,10)+")</span>");
|
myW->textBrowser_Log->append("<span style=\"color:#"+myStyle->getChatLogTextColor()+";\">"+bbName+" posts big blind ($"+QString::number(bbSet,10)+")</span>");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(HTML_LOG) {
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
|
||||||
//if write logfiles is enabled
|
|
||||||
|
|
||||||
logFileStreamString += "BLINDS: ";
|
|
||||||
|
|
||||||
logFileStreamString += sbName+" ($"+QString::number(sbSet,10)+"), ";
|
|
||||||
logFileStreamString += bbName+" ($"+QString::number(bbSet,10)+")";
|
|
||||||
|
|
||||||
PlayerListConstIterator it_c;
|
|
||||||
boost::shared_ptr<Game> currentGame = myW->getSession()->getCurrentGame();
|
|
||||||
PlayerList activePlayerList = currentGame->getActivePlayerList();
|
|
||||||
|
|
||||||
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); ++it_c) {
|
|
||||||
|
|
||||||
if(activePlayerList->size() > 2) {
|
|
||||||
if((*it_c)->getMyButton() == BUTTON_DEALER) {
|
|
||||||
|
|
||||||
logFileStreamString += "</br>" + QString::fromUtf8((*it_c)->getMyName().c_str()) + " starts as dealer.";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if((*it_c)->getMyButton() == BUTTON_SMALL_BLIND) {
|
|
||||||
|
|
||||||
logFileStreamString += "</br>" + QString::fromUtf8((*it_c)->getMyName().c_str()) + " starts as dealer.";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
logFileStreamString += "</br></br><b>PREFLOP</b>";
|
|
||||||
logFileStreamString += "</br>\n";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void guiLog::logPlayerWinsMsg(QString playerName, int pot, bool main)
|
void guiLog::logPlayerWinsMsg(QString playerName, int pot, bool main)
|
||||||
@@ -312,116 +194,43 @@ void guiLog::logPlayerWinsMsg(QString playerName, int pot, bool main)
|
|||||||
myW->textBrowser_Log->append("<span style=\"color:#"+myStyle->getLogWinnerSidePotColor()+";\">"+playerName+" wins $"+QString::number(pot,10)+" (side pot)</span>");
|
myW->textBrowser_Log->append("<span style=\"color:#"+myStyle->getLogWinnerSidePotColor()+";\">"+playerName+" wins $"+QString::number(pot,10)+" (side pot)</span>");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(HTML_LOG) {
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
|
||||||
//if write logfiles is enabled
|
|
||||||
|
|
||||||
logFileStreamString += "</br><i>"+playerName+" wins $"+QString::number(pot,10);
|
|
||||||
if(!main) {
|
|
||||||
logFileStreamString += " (side pot)";
|
|
||||||
}
|
|
||||||
logFileStreamString += "</i>\n";
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogInterval") == 0) {
|
|
||||||
writeLogFileStream(logFileStreamString);
|
|
||||||
logFileStreamString = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void guiLog::logPlayerSitsOut(QString playerName)
|
void guiLog::logPlayerSitsOut(QString playerName)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef GUI_800x480
|
#ifdef GUI_800x480
|
||||||
myW->tabs.textBrowser_Log->append("<i><span style=\"color:#"+myStyle->getLogPlayerSitsOutColor()+";\">"+playerName+" sits out</span></i>");
|
myW->tabs.textBrowser_Log->append("<i><span style=\"color:#"+myStyle->getLogPlayerSitsOutColor()+";\">"+playerName+" sits out</span></i>");
|
||||||
#else
|
#else
|
||||||
myW->textBrowser_Log->append("<i><span style=\"color:#"+myStyle->getLogPlayerSitsOutColor()+";\">"+playerName+" sits out</span></i>");
|
myW->textBrowser_Log->append("<i><span style=\"color:#"+myStyle->getLogPlayerSitsOutColor()+";\">"+playerName+" sits out</span></i>");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(HTML_LOG) {
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
|
||||||
|
|
||||||
logFileStreamString += "</br><i><span style=\"font-size:smaller;\">"+playerName+" sits out</span></i>\n";
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogInterval") == 0) {
|
|
||||||
writeLogFileStream(logFileStreamString);
|
|
||||||
logFileStreamString = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void guiLog::logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4, int card5)
|
void guiLog::logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4, int card5)
|
||||||
{
|
{
|
||||||
|
|
||||||
QString round;
|
|
||||||
|
|
||||||
switch (roundID) {
|
switch (roundID) {
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
round = "Flop";
|
|
||||||
#ifdef GUI_800x480
|
#ifdef GUI_800x480
|
||||||
myW->tabs.textBrowser_Log->append("<span style=\"color:#"+myStyle->getLogPlayerSitsOutColor()+";\">--- "+round+" --- "+"["+translateCardCode(card1).at(0)+translateCardCode(card1).at(1)+","+translateCardCode(card2).at(0)+translateCardCode(card2).at(1)+","+translateCardCode(card3).at(0)+translateCardCode(card3).at(1)+"]</span>");
|
myW->tabs.textBrowser_Log->append("<span style=\"color:#"+myStyle->getLogPlayerSitsOutColor()+";\">--- Flop --- "+"["+translateCardCode(card1).at(0)+translateCardCode(card1).at(1)+","+translateCardCode(card2).at(0)+translateCardCode(card2).at(1)+","+translateCardCode(card3).at(0)+translateCardCode(card3).at(1)+"]</span>");
|
||||||
#else
|
#else
|
||||||
myW->textBrowser_Log->append("<span style=\"color:#"+myStyle->getLogPlayerSitsOutColor()+";\">--- "+round+" --- "+"["+translateCardCode(card1).at(0)+translateCardCode(card1).at(1)+","+translateCardCode(card2).at(0)+translateCardCode(card2).at(1)+","+translateCardCode(card3).at(0)+translateCardCode(card3).at(1)+"]</span>");
|
myW->textBrowser_Log->append("<span style=\"color:#"+myStyle->getLogPlayerSitsOutColor()+";\">--- Flop --- "+"["+translateCardCode(card1).at(0)+translateCardCode(card1).at(1)+","+translateCardCode(card2).at(0)+translateCardCode(card2).at(1)+","+translateCardCode(card3).at(0)+translateCardCode(card3).at(1)+"]</span>");
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
round = "Turn";
|
|
||||||
#ifdef GUI_800x480
|
#ifdef GUI_800x480
|
||||||
myW->tabs.textBrowser_Log->append("<span style=\"color:#"+myStyle->getLogPlayerSitsOutColor()+";\">--- "+round+" --- "+"["+translateCardCode(card1).at(0)+translateCardCode(card1).at(1)+","+translateCardCode(card2).at(0)+translateCardCode(card2).at(1)+","+translateCardCode(card3).at(0)+translateCardCode(card3).at(1)+","+translateCardCode(card4).at(0)+translateCardCode(card4).at(1)+"]</span>");
|
myW->tabs.textBrowser_Log->append("<span style=\"color:#"+myStyle->getLogPlayerSitsOutColor()+";\">--- Turn --- "+"["+translateCardCode(card1).at(0)+translateCardCode(card1).at(1)+","+translateCardCode(card2).at(0)+translateCardCode(card2).at(1)+","+translateCardCode(card3).at(0)+translateCardCode(card3).at(1)+","+translateCardCode(card4).at(0)+translateCardCode(card4).at(1)+"]</span>");
|
||||||
#else
|
#else
|
||||||
myW->textBrowser_Log->append("<span style=\"color:#"+myStyle->getLogPlayerSitsOutColor()+";\">--- "+round+" --- "+"["+translateCardCode(card1).at(0)+translateCardCode(card1).at(1)+","+translateCardCode(card2).at(0)+translateCardCode(card2).at(1)+","+translateCardCode(card3).at(0)+translateCardCode(card3).at(1)+","+translateCardCode(card4).at(0)+translateCardCode(card4).at(1)+"]</span>");
|
myW->textBrowser_Log->append("<span style=\"color:#"+myStyle->getLogPlayerSitsOutColor()+";\">--- Turn --- "+"["+translateCardCode(card1).at(0)+translateCardCode(card1).at(1)+","+translateCardCode(card2).at(0)+translateCardCode(card2).at(1)+","+translateCardCode(card3).at(0)+translateCardCode(card3).at(1)+","+translateCardCode(card4).at(0)+translateCardCode(card4).at(1)+"]</span>");
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
round = "River";
|
|
||||||
#ifdef GUI_800x480
|
#ifdef GUI_800x480
|
||||||
myW->tabs.textBrowser_Log->append("<span style=\"color:#"+myStyle->getLogPlayerSitsOutColor()+";\">--- "+round+" --- "+"["+translateCardCode(card1).at(0)+translateCardCode(card1).at(1)+","+translateCardCode(card2).at(0)+translateCardCode(card2).at(1)+","+translateCardCode(card3).at(0)+translateCardCode(card3).at(1)+","+translateCardCode(card4).at(0)+translateCardCode(card4).at(1)+","+translateCardCode(card5).at(0)+translateCardCode(card5).at(1)+"]</span>");
|
myW->tabs.textBrowser_Log->append("<span style=\"color:#"+myStyle->getLogPlayerSitsOutColor()+";\">--- River --- "+"["+translateCardCode(card1).at(0)+translateCardCode(card1).at(1)+","+translateCardCode(card2).at(0)+translateCardCode(card2).at(1)+","+translateCardCode(card3).at(0)+translateCardCode(card3).at(1)+","+translateCardCode(card4).at(0)+translateCardCode(card4).at(1)+","+translateCardCode(card5).at(0)+translateCardCode(card5).at(1)+"]</span>");
|
||||||
#else
|
#else
|
||||||
myW->textBrowser_Log->append("<span style=\"color:#"+myStyle->getLogPlayerSitsOutColor()+";\">--- "+round+" --- "+"["+translateCardCode(card1).at(0)+translateCardCode(card1).at(1)+","+translateCardCode(card2).at(0)+translateCardCode(card2).at(1)+","+translateCardCode(card3).at(0)+translateCardCode(card3).at(1)+","+translateCardCode(card4).at(0)+translateCardCode(card4).at(1)+","+translateCardCode(card5).at(0)+translateCardCode(card5).at(1)+"]</span>");
|
myW->textBrowser_Log->append("<span style=\"color:#"+myStyle->getLogPlayerSitsOutColor()+";\">--- River --- "+"["+translateCardCode(card1).at(0)+translateCardCode(card1).at(1)+","+translateCardCode(card2).at(0)+translateCardCode(card2).at(1)+","+translateCardCode(card3).at(0)+translateCardCode(card3).at(1)+","+translateCardCode(card4).at(0)+translateCardCode(card4).at(1)+","+translateCardCode(card5).at(0)+translateCardCode(card5).at(1)+"]</span>");
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
round = "ERROR";
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
if(HTML_LOG) {
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
|
||||||
//if write logfiles is enabled
|
|
||||||
|
|
||||||
switch (roundID) {
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
round = "Flop";
|
|
||||||
logFileStreamString += "</br><b>"+round.toUpper()+"</b> [board cards <b>"+translateCardCode(card1).at(0)+"</b>"+translateCardCode(card1).at(1)+",<b>"+translateCardCode(card2).at(0)+"</b>"+translateCardCode(card2).at(1)+",<b>"+translateCardCode(card3).at(0)+"</b>"+translateCardCode(card3).at(1)+"]"+"</br>\n";
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
round = "Turn";
|
|
||||||
logFileStreamString += "</br><b>"+round.toUpper()+"</b> [board cards <b>"+translateCardCode(card1).at(0)+"</b>"+translateCardCode(card1).at(1)+",<b>"+translateCardCode(card2).at(0)+"</b>"+translateCardCode(card2).at(1)+",<b>"+translateCardCode(card3).at(0)+"</b>"+translateCardCode(card3).at(1)+",<b>"+translateCardCode(card4).at(0)+"</b>"+translateCardCode(card4).at(1)+"]"+"</br>\n";
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
round = "River";
|
|
||||||
logFileStreamString += "</br><b>"+round.toUpper()+"</b> [board cards <b>"+translateCardCode(card1).at(0)+"</b>"+translateCardCode(card1).at(1)+",<b>"+translateCardCode(card2).at(0)+"</b>"+translateCardCode(card2).at(1)+",<b>"+translateCardCode(card3).at(0)+"</b>"+translateCardCode(card3).at(1)+",<b>"+translateCardCode(card4).at(0)+"</b>"+translateCardCode(card4).at(1)+",<b>"+translateCardCode(card5).at(0)+"</b>"+translateCardCode(card5).at(1)+"]"+"</br>\n";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
round = "ERROR";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogInterval") == 0) {
|
|
||||||
writeLogFileStream(logFileStreamString);
|
|
||||||
logFileStreamString = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -447,40 +256,10 @@ void guiLog::logFlipHoleCardsMsg(QString playerName, int card1, int card2, int c
|
|||||||
myW->textBrowser_Log->append("<span style=\"color:#"+myStyle->getChatLogTextColor()+";\">"+playerName+" "+showHas+" ["+translateCardCode(card1).at(0)+translateCardCode(card1).at(1)+","+translateCardCode(card2).at(0)+translateCardCode(card2).at(1)+"]</span>");
|
myW->textBrowser_Log->append("<span style=\"color:#"+myStyle->getChatLogTextColor()+";\">"+playerName+" "+showHas+" ["+translateCardCode(card1).at(0)+translateCardCode(card1).at(1)+","+translateCardCode(card2).at(0)+translateCardCode(card2).at(1)+"]</span>");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if(HTML_LOG) {
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
|
||||||
//if write logfiles is enabled
|
|
||||||
|
|
||||||
if (cardsValueInt != -1) {
|
|
||||||
|
|
||||||
tempHandName.fromStdString(CardsValue::determineHandName(cardsValueInt,myW->getSession()->getCurrentGame()->getActivePlayerList()));
|
|
||||||
|
|
||||||
logFileStreamString += playerName+" "+showHas+" [ <b>"+translateCardCode(card1).at(0)+"</b>"+translateCardCode(card1).at(1)+",<b>"+translateCardCode(card2).at(0)+"</b>"+translateCardCode(card2).at(1)+"] - "+tempHandName+"</br>\n";
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogInterval") == 0) {
|
|
||||||
writeLogFileStream(logFileStreamString);
|
|
||||||
logFileStreamString = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
logFileStreamString += playerName+" "+showHas+" [<b>"+translateCardCode(card1).at(0)+"</b>"+translateCardCode(card1).at(1)+",<b>"+translateCardCode(card2).at(0)+"</b>"+translateCardCode(card2).at(1)+"]"+"</br>\n";
|
|
||||||
if(myConfig->readConfigInt("LogInterval") == 0) {
|
|
||||||
writeLogFileStream(logFileStreamString);
|
|
||||||
logFileStreamString = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void guiLog::logPlayerLeftMsg(QString playerName, int wasKicked)
|
void guiLog::logPlayerLeftMsg(QString playerName, int wasKicked)
|
||||||
{
|
{
|
||||||
|
|
||||||
QString action;
|
QString action;
|
||||||
if(wasKicked) action = "was kicked from";
|
if(wasKicked) action = "was kicked from";
|
||||||
else action = "has left";
|
else action = "has left";
|
||||||
@@ -490,44 +269,15 @@ void guiLog::logPlayerLeftMsg(QString playerName, int wasKicked)
|
|||||||
#else
|
#else
|
||||||
myW->textBrowser_Log->append( "<span style=\"color:#"+myStyle->getChatLogTextColor()+";\"><i>"+playerName+" "+action+" the game!</i></span>");
|
myW->textBrowser_Log->append( "<span style=\"color:#"+myStyle->getChatLogTextColor()+";\"><i>"+playerName+" "+action+" the game!</i></span>");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(HTML_LOG) {
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
|
||||||
|
|
||||||
logFileStreamString += "<i>"+playerName+" "+action+" the game!</i><br>\n";
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogInterval") == 0) {
|
|
||||||
writeLogFileStream(logFileStreamString);
|
|
||||||
logFileStreamString = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void guiLog::logNewGameAdminMsg(QString playerName)
|
void guiLog::logNewGameAdminMsg(QString playerName)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef GUI_800x480
|
#ifdef GUI_800x480
|
||||||
myW->tabs.textBrowser_Log->append( "<i><span style=\"color:#"+myStyle->getLogNewGameAdminColor()+";\">"+playerName+" is game admin now!</span></i>");
|
myW->tabs.textBrowser_Log->append( "<i><span style=\"color:#"+myStyle->getLogNewGameAdminColor()+";\">"+playerName+" is game admin now!</span></i>");
|
||||||
#else
|
#else
|
||||||
myW->textBrowser_Log->append( "<i><span style=\"color:#"+myStyle->getLogNewGameAdminColor()+";\">"+playerName+" is game admin now!</span></i>");
|
myW->textBrowser_Log->append( "<i><span style=\"color:#"+myStyle->getLogNewGameAdminColor()+";\">"+playerName+" is game admin now!</span></i>");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(HTML_LOG) {
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
|
||||||
|
|
||||||
logFileStreamString += "<i>"+playerName+" is game admin now!</i><br>\n";
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogInterval") == 0) {
|
|
||||||
writeLogFileStream(logFileStreamString);
|
|
||||||
logFileStreamString = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void guiLog::logPlayerJoinedMsg(QString playerName)
|
void guiLog::logPlayerJoinedMsg(QString playerName)
|
||||||
@@ -551,27 +301,11 @@ void guiLog::logSpectatorJoinedMsg(QString playerName)
|
|||||||
|
|
||||||
void guiLog::logPlayerWinGame(QString playerName, int gameID)
|
void guiLog::logPlayerWinGame(QString playerName, int gameID)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef GUI_800x480
|
#ifdef GUI_800x480
|
||||||
myW->tabs.textBrowser_Log->append( "<i><b>"+playerName+" wins game " + QString::number(gameID,10) +"!</i></b><br>");
|
myW->tabs.textBrowser_Log->append( "<i><b>"+playerName+" wins game " + QString::number(gameID,10) +"!</i></b><br>");
|
||||||
#else
|
#else
|
||||||
myW->textBrowser_Log->append( "<i><b>"+playerName+" wins game " + QString::number(gameID,10) +"!</i></b><br>");
|
myW->textBrowser_Log->append( "<i><b>"+playerName+" wins game " + QString::number(gameID,10) +"!</i></b><br>");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(HTML_LOG) {
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
|
||||||
|
|
||||||
logFileStreamString += "</br></br><i><b>"+playerName+" wins game " + QString::number(gameID,10) +"!</i></b></br>\n";
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogInterval") == 0) {
|
|
||||||
writeLogFileStream(logFileStreamString);
|
|
||||||
logFileStreamString = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList guiLog::translateCardCode(int cardCode)
|
QStringList guiLog::translateCardCode(int cardCode)
|
||||||
@@ -693,39 +427,6 @@ void guiLog::writeLog(string log_string, int modus)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void guiLog::flushLogAtHand()
|
|
||||||
{
|
|
||||||
|
|
||||||
if(HTML_LOG) {
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
|
||||||
if(myConfig->readConfigInt("LogInterval") < 2) {
|
|
||||||
// write for log after every action and after every hand
|
|
||||||
writeLogFileStream(logFileStreamString);
|
|
||||||
logFileStreamString = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void guiLog::flushLogAtGame(int gameID)
|
|
||||||
{
|
|
||||||
|
|
||||||
if(HTML_LOG) {
|
|
||||||
|
|
||||||
if(myConfig->readConfigInt("LogOnOff")) {
|
|
||||||
// write for log after every game
|
|
||||||
if(gameID > lastGameID) {
|
|
||||||
writeLogFileStream(logFileStreamString);
|
|
||||||
logFileStreamString = "";
|
|
||||||
lastGameID = gameID;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void guiLog::exportLogPdbToHtml(QString fileStringPdb, QString exportFileString)
|
void guiLog::exportLogPdbToHtml(QString fileStringPdb, QString exportFileString)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -81,8 +81,6 @@ public slots:
|
|||||||
void logSpectatorLeftMsg(QString playerName, int wasKicked);
|
void logSpectatorLeftMsg(QString playerName, int wasKicked);
|
||||||
void logSpectatorJoinedMsg(QString playerName);
|
void logSpectatorJoinedMsg(QString playerName);
|
||||||
void logPlayerWinGame(QString playerName, int gameID);
|
void logPlayerWinGame(QString playerName, int gameID);
|
||||||
void flushLogAtGame(int gameID);
|
|
||||||
void flushLogAtHand();
|
|
||||||
void exportLogPdbToHtml(QString fileStringPdb, QString exportFileString);
|
void exportLogPdbToHtml(QString fileStringPdb, QString exportFileString);
|
||||||
void exportLogPdbToTxt(QString fileStringPdb, QString exportFileString);
|
void exportLogPdbToTxt(QString fileStringPdb, QString exportFileString);
|
||||||
void showLog(QString fileStringPdb, QTextBrowser *tb, int uniqueGameID = 0);
|
void showLog(QString fileStringPdb, QTextBrowser *tb, int uniqueGameID = 0);
|
||||||
@@ -115,8 +113,6 @@ signals:
|
|||||||
void signalLogSpectatorJoinedMsg(QString playerName);
|
void signalLogSpectatorJoinedMsg(QString playerName);
|
||||||
void signalLogNewGameAdminMsg(QString playerName);
|
void signalLogNewGameAdminMsg(QString playerName);
|
||||||
void signalLogPlayerWinGame(QString playerName, int gameID);
|
void signalLogPlayerWinGame(QString playerName, int gameID);
|
||||||
void signalFlushLogAtGame(int gameID);
|
|
||||||
void signalFlushLogAtHand();
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -287,14 +287,6 @@ void GuiWrapper::logPlayerWinGame(std::string playerName, int gameID)
|
|||||||
{
|
{
|
||||||
myGuiLog->signalLogPlayerWinGame(QString::fromUtf8(playerName.c_str()), gameID);
|
myGuiLog->signalLogPlayerWinGame(QString::fromUtf8(playerName.c_str()), gameID);
|
||||||
}
|
}
|
||||||
void GuiWrapper::flushLogAtGame(int gameID)
|
|
||||||
{
|
|
||||||
myGuiLog->signalFlushLogAtGame(gameID);
|
|
||||||
}
|
|
||||||
void GuiWrapper::flushLogAtHand()
|
|
||||||
{
|
|
||||||
myGuiLog->signalFlushLogAtHand();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void GuiWrapper::SignalNetClientConnect(int actionID)
|
void GuiWrapper::SignalNetClientConnect(int actionID)
|
||||||
|
|||||||
@@ -124,8 +124,6 @@ public:
|
|||||||
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
|
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
|
||||||
void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows");
|
void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows");
|
||||||
void logPlayerWinGame(std::string playerName, int gameID);
|
void logPlayerWinGame(std::string playerName, int gameID);
|
||||||
void flushLogAtGame(int gameID);
|
|
||||||
void flushLogAtHand();
|
|
||||||
|
|
||||||
void SignalNetClientConnect(int actionID);
|
void SignalNetClientConnect(int actionID);
|
||||||
void SignalNetClientServerListAdd(unsigned serverId);
|
void SignalNetClientServerListAdd(unsigned serverId);
|
||||||
|
|||||||
@@ -1800,7 +1800,6 @@ ClientStateRunHand::InternalHandlePacket(boost::shared_ptr<ClientThread> client,
|
|||||||
curGame->getPlayerByUniqueId(curGame->getCurrentHand()->getCurrentBeRo()->getBigBlindPositionId())->getMySet(),
|
curGame->getPlayerByUniqueId(curGame->getCurrentHand()->getCurrentBeRo()->getBigBlindPositionId())->getMySet(),
|
||||||
curGame->getPlayerByUniqueId(curGame->getCurrentHand()->getCurrentBeRo()->getSmallBlindPositionId())->getMyName(),
|
curGame->getPlayerByUniqueId(curGame->getCurrentHand()->getCurrentBeRo()->getSmallBlindPositionId())->getMyName(),
|
||||||
curGame->getPlayerByUniqueId(curGame->getCurrentHand()->getCurrentBeRo()->getBigBlindPositionId())->getMyName());
|
curGame->getPlayerByUniqueId(curGame->getCurrentHand()->getCurrentBeRo()->getBigBlindPositionId())->getMyName());
|
||||||
client->GetGui().flushLogAtHand();
|
|
||||||
client->GetClientLog()->logNewHandMsg(
|
client->GetClientLog()->logNewHandMsg(
|
||||||
curGame->getCurrentHandID(),
|
curGame->getCurrentHandID(),
|
||||||
curGame->getPlayerByUniqueId(curGame->getCurrentHand()->getDealerPosition())->getMyID()+1,
|
curGame->getPlayerByUniqueId(curGame->getCurrentHand()->getDealerPosition())->getMyID()+1,
|
||||||
|
|||||||
Reference in New Issue
Block a user