[atlantik-cvs] CVS: kdegames/atlantik/libatlantikui auction_widget.cpp, 1.11.6.1, 1.11.6.2 trade_widget.cpp, 1.34.4.5, 1.34.4.6
[email protected] Wed, 5 Nov 2003 20:37:41 +0100 (CET)
| Newsgroups | gmane.comp.kde.devel.atlantik |
|---|---|
| Message-ID | <[email protected]> |
Update of /home/kde/kdegames/atlantik/libatlantikui
In directory office:/tmp/cvs-serv10416/libatlantikui
Modified Files:
Tag: KDE_3_1_BRANCH
auction_widget.cpp trade_widget.cpp
Log Message:
backport/bugfix: don't show players from other games in auction and trade widgets on monopd 0.9.0 servers
Index: auction_widget.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantikui/auction_widget.cpp,v
retrieving revision 1.11.6.1
retrieving revision 1.11.6.2
diff -u -d -r1.11.6.1 -r1.11.6.2
--- auction_widget.cpp 20 Jan 2003 22:14:59 -0000 1.11.6.1
+++ auction_widget.cpp 5 Nov 2003 19:37:38 -0000 1.11.6.2
@@ -56,12 +56,12 @@
m_playerList->setSorting(1, false);
KListViewItem *item;
- Player *player;
+ Player *player, *pSelf = m_atlanticCore->playerSelf();
QPtrList<Player> playerList = m_atlanticCore->players();
for (QPtrListIterator<Player> it(playerList); *it; ++it)
{
- if ((player = *it))
+ if ((player = *it) && player->gameId() == pSelf->gameId())
{
item = new KListViewItem(m_playerList, player->name(), QString("0"));
item->setPixmap(0, QPixmap(SmallIcon("personal")));
Index: trade_widget.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantikui/trade_widget.cpp,v
retrieving revision 1.34.4.5
retrieving revision 1.34.4.6
diff -u -d -r1.34.4.5 -r1.34.4.6
--- trade_widget.cpp 23 Jun 2003 01:46:37 -0000 1.34.4.5
+++ trade_widget.cpp 5 Nov 2003 19:37:38 -0000 1.34.4.6
@@ -83,7 +83,7 @@
m_moneyBox = new QSpinBox(0, 10000, 1, m_updateComponentBox);
QPtrList<Player> playerList = m_atlanticCore->players();
- Player *player;
+ Player *player, *pSelf = m_atlanticCore->playerSelf();
m_fromLabel = new QLabel(m_updateComponentBox);
m_fromLabel->setText(i18n("From"));
@@ -95,7 +95,7 @@
for (QPtrListIterator<Player> it(playerList); *it; ++it)
{
- if ((player = *it))
+ if ((player = *it) && player->gameId() == pSelf->gameId())
{
m_playerFromCombo->insertItem(player->name());
m_playerFromMap[m_playerFromCombo->count() - 1] = player;