Bläddra i källkod

Fix display of creatures to sell in Freelancer Guild

Ivan Savenko 1 år sedan
förälder
incheckning
344d8891e4
1 ändrade filer med 17 tillägg och 1 borttagningar
  1. 17 1
      client/windows/CTradeWindow.cpp

+ 17 - 1
client/windows/CTradeWindow.cpp

@@ -137,7 +137,23 @@ std::vector<int> *CTradeWindow::getItemsIds(bool Left)
 {
 	std::vector<int> *ids = nullptr;
 
-	if(!Left)
+	if(Left)
+	{
+		switch(itemsType[1])
+		{
+		case CREATURE:
+			ids = new std::vector<int>;
+			for(int i = 0; i < 7; i++)
+			{
+				if(const CCreature *c = hero->getCreature(SlotID(i)))
+					ids->push_back(c->getId());
+				else
+					ids->push_back(-1);
+			}
+			break;
+		}
+	}
+	else
 	{
 		switch(itemsType[0])
 		{