diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-03-30 02:05:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-04-01 03:11:26 +0300 |
commit | a39f63cdfa5ce15b22f294a8bb1db3a036ce462d (patch) | |
tree | 4de71bde947cae0cf5d3196cd97e82f5bc537c5c /src/gui/botcheckerwindow.cpp | |
parent | 02ec4369acfbf261236631e20dbb76131e7889f8 (diff) | |
download | manaplus-a39f63cdfa5ce15b22f294a8bb1db3a036ce462d.tar.gz manaplus-a39f63cdfa5ce15b22f294a8bb1db3a036ce462d.tar.bz2 manaplus-a39f63cdfa5ce15b22f294a8bb1db3a036ce462d.tar.xz manaplus-a39f63cdfa5ce15b22f294a8bb1db3a036ce462d.zip |
One part of fixes after auto checking.
Diffstat (limited to 'src/gui/botcheckerwindow.cpp')
-rw-r--r-- | src/gui/botcheckerwindow.cpp | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/src/gui/botcheckerwindow.cpp b/src/gui/botcheckerwindow.cpp index a1ad9cc2a..9265ff203 100644 --- a/src/gui/botcheckerwindow.cpp +++ b/src/gui/botcheckerwindow.cpp @@ -127,44 +127,45 @@ public: if (!mPlayers.at(r)) continue; - std::string name = mPlayers.at(r)->getName(); + Being *player = mPlayers.at(r); + std::string name = player->getName(); gcn::Widget *widget = new Label(name); mWidgets.push_back(widget); - if (mPlayers.at(r)->getAttackTime() != 0) + if (player->getAttackTime() != 0) { widget = new Label(toString(curTime - - mPlayers.at(r)->getAttackTime())); + - player->getAttackTime())); } else { widget = new Label(toString(curTime - - mPlayers.at(r)->getTestTime()) + "?"); + - player->getTestTime()) + "?"); } mWidgets.push_back(widget); - if (mPlayers.at(r)->getTalkTime() != 0) + if (player->getTalkTime() != 0) { widget = new Label(toString(curTime - - mPlayers.at(r)->getTalkTime())); + - player->getTalkTime())); } else { widget = new Label(toString(curTime - - mPlayers.at(r)->getTestTime()) + "?"); + - player->getTestTime()) + "?"); } mWidgets.push_back(widget); - if (mPlayers.at(r)->getMoveTime() != 0) + if (player->getMoveTime() != 0) { widget = new Label(toString(curTime - - mPlayers.at(r)->getMoveTime())); + - player->getMoveTime())); } else { widget = new Label(toString(curTime - - mPlayers.at(r)->getTestTime()) + "?"); + - player->getTestTime()) + "?"); } mWidgets.push_back(widget); @@ -174,20 +175,20 @@ public: bool attackBot = false; bool otherBot = false; - if (curTime - mPlayers.at(r)->getTestTime() > 2 * 60) + if (curTime - player->getTestTime() > 2 * 60) { - int attack = curTime - (mPlayers.at(r)->getAttackTime() - ? mPlayers.at(r)->getAttackTime() - : mPlayers.at(r)->getTestTime()); - int talk = curTime - (mPlayers.at(r)->getTalkTime() - ? mPlayers.at(r)->getTalkTime() - : mPlayers.at(r)->getTestTime()) - attack; - int move = curTime - (mPlayers.at(r)->getMoveTime() - ? mPlayers.at(r)->getMoveTime() - : mPlayers.at(r)->getTestTime()) - attack; - int other = curTime - (mPlayers.at(r)->getOtherTime() - ? mPlayers.at(r)->getMoveTime() - : mPlayers.at(r)->getOtherTime()) - attack; + int attack = curTime - (player->getAttackTime() + ? player->getAttackTime() + : player->getTestTime()); + int talk = curTime - (player->getTalkTime() + ? player->getTalkTime() + : player->getTestTime()) - attack; + int move = curTime - (player->getMoveTime() + ? player->getMoveTime() + : player->getTestTime()) - attack; + int other = curTime - (player->getOtherTime() + ? player->getMoveTime() + : player->getOtherTime()) - attack; if (attack < 2 * 60) attackBot = true; |