[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:41
[Download RAW message or body]

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;

_______________________________________________
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