[prev in list] [next in list] [prev in thread] [next in thread] 

List:       atlantik-devel
Subject:    [atlantik-cvs] CVS: kdegames/atlantik/libatlantikui
From:       kde () office ! kde ! org
Date:       2003-11-05 19:37:23
[Download RAW message or body]

Update of /home/kde/kdegames/atlantik/libatlantikui
In directory office:/tmp/cvs-serv10373/libatlantikui

Modified Files:
	auction_widget.cpp trade_widget.cpp 
Log Message:
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.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- auction_widget.cpp	28 Nov 2002 11:59:25 -0000	1.12
+++ auction_widget.cpp	5 Nov 2003 19:37:20 -0000	1.13
@@ -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.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- trade_widget.cpp	27 Oct 2003 10:08:15 -0000	1.40
+++ trade_widget.cpp	5 Nov 2003 19:37:20 -0000	1.41
@@ -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;

_______________________________________________
atlantik-cvs mailing list
atlantik-cvs@kde.org
https://mail.kde.org/mailman/listinfo/atlantik-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic