Show team owner in tooltip
authorunc0rr
Fri, 16 Jan 2009 15:43:19 +0000
changeset 1683 af34da5726aa
parent 1682 f8c4af3a2b54
child 1684 b3f4ec08f0a4
Show team owner in tooltip
QTfrontend/newnetclient.cpp
QTfrontend/team.cpp
QTfrontend/team.h
QTfrontend/teamselhelper.cpp
netserver/Miscutils.hs
--- a/QTfrontend/newnetclient.cpp	Fri Jan 16 15:36:16 2009 +0000
+++ b/QTfrontend/newnetclient.cpp	Fri Jan 16 15:43:19 2009 +0000
@@ -310,7 +310,7 @@
 	}
 
 	if (lst[0] == "ADD_TEAM") {
-		if(lst.size() != 22)
+		if(lst.size() != 23)
 		{
 			qWarning("Net: Bad ADDTEAM message");
 			return;
--- a/QTfrontend/team.cpp	Fri Jan 16 15:36:16 2009 +0000
+++ b/QTfrontend/team.cpp	Fri Jan 16 15:43:19 2009 +0000
@@ -55,16 +55,17 @@
   m_isNetTeam(true)
 {
 	// net teams are configured from QStringList
-	if(strLst.size() < 21) throw HWTeamConstructException();
+	if(strLst.size() != 22) throw HWTeamConstructException();
 	TeamName = strLst[0];
 	Grave = strLst[1];
 	Fort = strLst[2];
 	Voicepack = strLst[3];
-	difficulty = strLst[4].toUInt();
+	Owner = strLst[4];
+	difficulty = strLst[5].toUInt();
 	for(int i = 0; i < 8; i++)
 	{
-		HHName[i]=strLst[i * 2 + 5];
-		HHHat[i]=strLst[i * 2 + 6];
+		HHName[i]=strLst[i * 2 + 6];
+		HHHat[i]=strLst[i * 2 + 7];
 	}
 }
 
--- a/QTfrontend/team.h	Fri Jan 16 15:36:16 2009 +0000
+++ b/QTfrontend/team.h	Fri Jan 16 15:43:19 2009 +0000
@@ -46,6 +46,7 @@
 		QString Grave;
 		QString Fort;
 		QString Voicepack;
+		QString Owner;
 		unsigned int difficulty;
 		BindAction binds[BINDS_NUMBER];
 
--- a/QTfrontend/teamselhelper.cpp	Fri Jan 16 15:36:16 2009 +0000
+++ b/QTfrontend/teamselhelper.cpp	Fri Jan 16 15:43:19 2009 +0000
@@ -50,6 +50,7 @@
 
 	butt = new QPushButton(difficultyIcon, team.TeamName, this);
 	butt->setFlat(true);
+	butt->setToolTip(team.Owner);
 	mainLayout.addWidget(butt);
 	butt->setStyleSheet("QPushButton{"
 			"icon-size: 48px;"
--- a/netserver/Miscutils.hs	Fri Jan 16 15:36:16 2009 +0000
+++ b/netserver/Miscutils.hs	Fri Jan 16 15:43:19 2009 +0000
@@ -197,4 +197,6 @@
 proto2ver 20 = "0.9.8-dev"
 proto2ver 21 = "0.9.8"
 proto2ver 22 = "0.9.9-dev"
+proto2ver 23 = "0.9.9"
+proto2ver 24 = "0.9.10-dev"
 proto2ver _ = "Unknown"