remove playerlist iterator from log
This commit is contained in:
@@ -143,7 +143,7 @@ public:
|
||||
|
||||
void setMyWinnerState ( bool theValue, int pot ) {
|
||||
myWinnerState = theValue;
|
||||
if(theValue) actualHand->getGuiInterface()->logPlayerWinsMsg(myID, pot);
|
||||
if(theValue) actualHand->getGuiInterface()->logPlayerWinsMsg(myName, pot);
|
||||
}
|
||||
bool getMyWinnerState() const { return myWinnerState;}
|
||||
|
||||
|
||||
@@ -380,7 +380,7 @@ ClientPlayer::setMyWinnerState(bool theValue, int pot)
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
myWinnerState = theValue;
|
||||
if(theValue)
|
||||
actualHand->getGuiInterface()->logPlayerWinsMsg(myID, pot);
|
||||
actualHand->getGuiInterface()->logPlayerWinsMsg(myName, pot);
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
@@ -100,7 +100,7 @@ void ServerGuiWrapper::stopTimeoutAnimation(int /*playerId*/) {}
|
||||
|
||||
void ServerGuiWrapper::logPlayerActionMsg(string /*playerName*/, int /*action*/, int /*setValue*/) {}
|
||||
void ServerGuiWrapper::logNewGameHandMsg(int /*gameID*/, int /*handID*/) {}
|
||||
void ServerGuiWrapper::logPlayerWinsMsg(int /*playerID*/, int /*pot*/) {}
|
||||
void ServerGuiWrapper::logPlayerWinsMsg(std::string /*playerName*/, int /*pot*/) {}
|
||||
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::logPlayerWinGame(std::string /*playerName*/, int /*gameID*/) {}
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
|
||||
void logPlayerActionMsg(std::string playerName, int action, int setValue) ;
|
||||
void logNewGameHandMsg(int gameID, int handID) ;
|
||||
void logPlayerWinsMsg(int playerID, int pot);
|
||||
void logPlayerWinsMsg(std::string playerName, int pot);
|
||||
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 logPlayerWinGame(std::string playerName, int gameID);
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
//log.cpp
|
||||
virtual void logPlayerActionMsg(std::string playName, int action, int setValue) =0;
|
||||
virtual void logNewGameHandMsg(int gameID, int HandID) =0;
|
||||
virtual void logPlayerWinsMsg(int playerID, int pot) = 0;
|
||||
virtual void logPlayerWinsMsg(std::string playerName, int pot) = 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 logPlayerWinGame(std::string playerName, int gameID) =0;
|
||||
|
||||
@@ -103,7 +103,7 @@ void GuiWrapper::stopTimeoutAnimation(int playerId) { myW->signalStopTimeoutAnim
|
||||
|
||||
void GuiWrapper::logPlayerActionMsg(string playerName, int action, int setValue) { myLog->signalLogPlayerActionMsg(QString::fromUtf8(playerName.c_str()), action, setValue); }
|
||||
void GuiWrapper::logNewGameHandMsg(int gameID, int handID) { myLog->signalLogNewGameHandMsg(gameID, handID); }
|
||||
void GuiWrapper::logPlayerWinsMsg(int playerID, int pot) { myLog->signalLogPlayerWinsMsg(playerID, pot); }
|
||||
void GuiWrapper::logPlayerWinsMsg(std::string playerName, int pot) { myLog->signalLogPlayerWinsMsg(QString::fromUtf8(playerName.c_str()), pot); }
|
||||
void GuiWrapper::logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4, int card5) { myLog->signalLogDealBoardCardsMsg(roundID, card1, card2, card3, card4, card5); }
|
||||
void GuiWrapper::logFlipHoleCardsMsg(string playerName, int card1, int card2, int cardsValueInt, string showHas) { myLog->signalLogFlipHoleCardsMsg(QString::fromUtf8(playerName.c_str()), card1, card2, cardsValueInt, QString::fromUtf8(showHas.c_str())); }
|
||||
void GuiWrapper::logPlayerWinGame(std::string playerName, int gameID) { myLog->signalLogPlayerWinGame(QString::fromUtf8(playerName.c_str()), gameID); }
|
||||
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
|
||||
void logPlayerActionMsg(std::string playerName, int action, int setValue) ;
|
||||
void logNewGameHandMsg(int gameID, int handID) ;
|
||||
void logPlayerWinsMsg(int playerID, int pot);
|
||||
void logPlayerWinsMsg(std::string playerName, int pot);
|
||||
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 logPlayerWinGame(std::string playerName, int gameID);
|
||||
|
||||
@@ -35,7 +35,7 @@ Log::Log(mainWindowImpl* w, ConfigFile *c) : myW(w), myConfig(c), myLogDir(0), m
|
||||
|
||||
connect(this, SIGNAL(signalLogPlayerActionMsg(QString, int, int)), this, SLOT(logPlayerActionMsg(QString, int, int)));
|
||||
connect(this, SIGNAL(signalLogNewGameHandMsg(int, int)), this, SLOT(logNewGameHandMsg(int, int)));
|
||||
connect(this, SIGNAL(signalLogPlayerWinsMsg(int, int)), this, SLOT(logPlayerWinsMsg(int, int)));
|
||||
connect(this, SIGNAL(signalLogPlayerWinsMsg(QString, int)), this, SLOT(logPlayerWinsMsg(QString, int)));
|
||||
connect(this, SIGNAL(signalLogDealBoardCardsMsg(int, int, int, int, int, int)), this, SLOT(logDealBoardCardsMsg(int, int, int, int, int, int)));
|
||||
connect(this, SIGNAL(signalLogFlipHoleCardsMsg(QString, int, int, int, QString)), this, SLOT(logFlipHoleCardsMsg(QString, int, int, int, QString)));
|
||||
connect(this, SIGNAL(signalLogPlayerLeftMsg(QString)), this, SLOT(logPlayerLeftMsg(QString)));
|
||||
@@ -318,15 +318,15 @@ void Log::logNewGameHandMsg(int gameID, int handID) {
|
||||
}
|
||||
}
|
||||
|
||||
void Log::logPlayerWinsMsg(int playerID, int pot) {
|
||||
void Log::logPlayerWinsMsg(QString playerName, int pot) {
|
||||
|
||||
HandInterface *currentHand = myW->getSession().getCurrentGame()->getCurrentHand();
|
||||
// HandInterface *currentHand = myW->getSession().getCurrentGame()->getCurrentHand();
|
||||
|
||||
// myW->textBrowser_Log->append(QString::fromUtf8(currentHand->getPlayerArray()[playerID]->getMyName().c_str())+" wins "+QString::number(pot,10)+"$!!! ");
|
||||
|
||||
PlayerListConstIterator playerConstIt = currentHand->getActivePlayerIt(playerID);
|
||||
assert( playerConstIt != currentHand->getActivePlayerList()->end() );
|
||||
myW->textBrowser_Log->append(QString::fromUtf8((*playerConstIt)->getMyName().c_str())+" wins "+QString::number(pot,10)+"$!!! ");
|
||||
// PlayerListConstIterator playerConstIt = currentHand->getActivePlayerIt(playerID);
|
||||
// assert( playerConstIt != currentHand->getActivePlayerList()->end() );
|
||||
myW->textBrowser_Log->append(playerName+" wins "+QString::number(pot,10)+"$!!! ");
|
||||
|
||||
if(myConfig->readConfigInt("LogOnOff")) {
|
||||
//if write logfiles is enabled
|
||||
@@ -340,7 +340,7 @@ void Log::logPlayerWinsMsg(int playerID, int pot) {
|
||||
|
||||
// logFileStreamString += "</br><i>"+QString::fromUtf8(currentHand->getPlayerArray()[playerID]->getMyName().c_str())+" wins "+QString::number(pot,10)+"$!!!</i></p>\n";
|
||||
|
||||
logFileStreamString += "</br><i>"+QString::fromUtf8((*playerConstIt)->getMyName().c_str())+" wins "+QString::number(pot,10)+"$!!!</i></p>\n";
|
||||
logFileStreamString += "</br><i>"+playerName+" wins "+QString::number(pot,10)+"$!!!</i></p>\n";
|
||||
|
||||
if(myConfig->readConfigInt("LogInterval") == 0) {
|
||||
writeLogFileStream(logFileStreamString);
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
public slots:
|
||||
void logPlayerActionMsg(QString playerName, int action, int setValue);
|
||||
void logNewGameHandMsg(int gameID, int handID);
|
||||
void logPlayerWinsMsg(int playerID, int pot);
|
||||
void logPlayerWinsMsg(QString playerName, int pot);
|
||||
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
|
||||
void logFlipHoleCardsMsg(QString playerName, int card1, int card2, int cardsValueInt = -1, QString showHas = "shows");
|
||||
void logPlayerLeftMsg(QString playerName);
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
signals:
|
||||
void signalLogPlayerActionMsg(QString playerName, int action, int setValue);
|
||||
void signalLogNewGameHandMsg(int gameID, int handID);
|
||||
void signalLogPlayerWinsMsg(int playerID, int pot);
|
||||
void signalLogPlayerWinsMsg(QString playerName, int pot);
|
||||
void signalLogDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
|
||||
void signalLogFlipHoleCardsMsg(QString playerName, int card1, int card2, int cardsValueInt = -1, QString showHas = "shows");
|
||||
void signalLogPlayerLeftMsg(QString playerName);
|
||||
|
||||
Reference in New Issue
Block a user