Jump to content

Block refining item with Magic Stone


Recommended Posts

  • Active Member

Hi,

I want to block refining items with magic stone if the item i'm refining has a RefineSet bigger or equal to 1000.

Currently I'm doing it like this:

					case USE_DETACHMENT:
						{
							LPITEM item2;
							
							if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
								return false;
							
							if (item2->IsExchanging())
								return false;

							if (item2->GetRefineSet() >= 1000 || item2->GetRefineSet2() >= 1000)
								ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Du kannst diesen Gegenstand nur beim Legendaren Schmied verbessern. "));
								return false;

							RefineItem(item, item2);
						}
						break;

It kinda works, It is blocking every item below RefineSet 1000 to use magic stone too which it shouldn't.

When i try to refine an item with RefineSet >= 1000, it says the ChatPacket and doesn't refine like it's supposed to do

But I want to refine items below 1000 with Magic Stone. Why does that not work?

 

 

 

EDIT: Works like that:

					case USE_DETACHMENT:
						{
							LPITEM item2;
							
							if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
								return false;
							
							if (item2->IsExchanging())
								return false;

							if (item2->GetRefineSet() >= 1000 || item2->GetRefineSet2() >= 1000)
							{
								ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Du kannst diesen Gegenstand nur beim Legendaren Schmied verbessern. "));
								return false;
							}
							else
							{
								RefineItem(item, item2);
							}
						}
						break;

 

Edited by Clyde
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

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.