diff --git a/src/engine/local_engine/localplayer.h b/src/engine/local_engine/localplayer.h index 6bea1b39..30a3e43e 100755 --- a/src/engine/local_engine/localplayer.h +++ b/src/engine/local_engine/localplayer.h @@ -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;} diff --git a/src/engine/network_engine/clientplayer.cpp b/src/engine/network_engine/clientplayer.cpp index 722bafd7..0d013371 100644 --- a/src/engine/network_engine/clientplayer.cpp +++ b/src/engine/network_engine/clientplayer.cpp @@ -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 diff --git a/src/gui/generic/serverguiwrapper.cpp b/src/gui/generic/serverguiwrapper.cpp index 6a992278..003917c2 100644 --- a/src/gui/generic/serverguiwrapper.cpp +++ b/src/gui/generic/serverguiwrapper.cpp @@ -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*/) {} diff --git a/src/gui/generic/serverguiwrapper.h b/src/gui/generic/serverguiwrapper.h index 6d10ad85..e4f16f2b 100644 --- a/src/gui/generic/serverguiwrapper.h +++ b/src/gui/generic/serverguiwrapper.h @@ -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); diff --git a/src/gui/guiinterface.h b/src/gui/guiinterface.h index a0194e6d..c75e4bd2 100644 --- a/src/gui/guiinterface.h +++ b/src/gui/guiinterface.h @@ -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; diff --git a/src/gui/qt/guiwrapper.cpp b/src/gui/qt/guiwrapper.cpp index d36a312d..1bcb7ae1 100644 --- a/src/gui/qt/guiwrapper.cpp +++ b/src/gui/qt/guiwrapper.cpp @@ -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); } diff --git a/src/gui/qt/guiwrapper.h b/src/gui/qt/guiwrapper.h index 669959d5..76957cbd 100644 --- a/src/gui/qt/guiwrapper.h +++ b/src/gui/qt/guiwrapper.h @@ -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); diff --git a/src/gui/qt/mainwindow/log/log.cpp b/src/gui/qt/mainwindow/log/log.cpp index 66723cc2..3ad0ed63 100644 --- a/src/gui/qt/mainwindow/log/log.cpp +++ b/src/gui/qt/mainwindow/log/log.cpp @@ -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 += "
"+QString::fromUtf8(currentHand->getPlayerArray()[playerID]->getMyName().c_str())+" wins "+QString::number(pot,10)+"$!!!

\n"; - logFileStreamString += "
"+QString::fromUtf8((*playerConstIt)->getMyName().c_str())+" wins "+QString::number(pot,10)+"$!!!

\n"; + logFileStreamString += "
"+playerName+" wins "+QString::number(pot,10)+"$!!!

\n"; if(myConfig->readConfigInt("LogInterval") == 0) { writeLogFileStream(logFileStreamString); diff --git a/src/gui/qt/mainwindow/log/log.h b/src/gui/qt/mainwindow/log/log.h index fd4b0203..d1c29808 100644 --- a/src/gui/qt/mainwindow/log/log.h +++ b/src/gui/qt/mainwindow/log/log.h @@ -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);