Jump to content
×
×
  • Create New...
  • 0

Swap Item


#Saw

Question

Hello,

I have implemented the swap item, however I have 5 inventories and I do not know how to make the lines in the char_item.cpp and uiiventory.py, someone would have them and could share it please, here is The lines I put, but I do not know if it's good:
					if (itemDestSize == 1 && itemDest->GetCell() >= 40 && itemDest->GetCell() < 45 || itemDestSize == 1 && itemDest->GetCell() >= 85 && itemDest->GetCell() < 90 || itemDestSize == 1 && itemDest->GetCell() >= 130 && itemDest->GetCell() < 135 || itemDestSize == 1 && itemDest->GetCell() >= 175 && itemDest->GetCell() < 180 || itemDestSize == 1 && itemDest->GetCell() >= 220 && itemDest->GetCell() < 225)
						return false;

					if (itemDestSize == 1 && itemSrcSize == 3 && itemDest->GetCell() >= 35 && itemDest->GetCell() < 40 || itemDestSize == 1 && itemSrcSize == 3 && itemDest->GetCell() >= 80 && itemDest->GetCell() < 85 || itemDestSize == 1 && itemSrcSize == 3 && itemDest->GetCell() >= 125 && itemDest->GetCell() < 130 || itemDestSize == 1 && itemSrcSize == 3 && itemDest->GetCell() >= 170 && itemDest->GetCell() < 175 || itemDestSize == 1 && itemSrcSize == 3 && itemDest->GetCell() >= 220 && itemDest->GetCell() < 225)

						return false;

					if (itemDestSize == 2 && itemSrcSize == 3 && itemDest->GetCell() >= 35 && itemDest->GetCell() < 40 || itemDestSize == 2 && itemSrcSize == 3 && itemDest->GetCell() >= 80 && itemDest->GetCell() < 85 || itemDestSize == 2 && itemSrcSize == 3 && itemDest->GetCell() >= 125 && itemDest->GetCell() < 130 || itemDestSize == 2 && itemSrcSize == 3 && itemDest->GetCell() >= 170 && itemDest->GetCell() < 175 || itemDestSize == 2 && itemSrcSize == 3 && itemDest->GetCell() >= 220 && itemDest->GetCell() < 225)
						return false;


Thank you,
#Saw

maxresdefault-iloveimg-resized.jpg

Link to comment
Share on other sites

  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.


Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.