Bug: /click left pack # done|combine

A forum for feature requests/discussions and user submitted patches that improve MQ2

Moderator: MacroQuest Developers

kagonis
a hill giant
a hill giant
Posts: 228
Joined: Sat May 24, 2003 8:48 pm

Bug: /click left pack # done|combine

Post by kagonis » Sat Jun 07, 2003 5:37 am

I know this has been up under misc. topics in the depot, and I have tried modifying EQUI_Container.xml to make it work.

Here is what I have tried so far:
1) Default EQUI_Container.xml
"/click left pack # combine" is clicked. Y coordinate off by approx. +5 from button Y center.
"/click left pack # done" is clicked ONLY if the container has a combine button. Y coordinate off by approx. +10 from button Y center.
If the container does not have a "Combine" button:
"/click left pack # done" is NOT clicked. Y coordinate is off by approx. +35 from button Y center.

2) Modified EQUI_Container.xml
- No label
"/click left pack # combine" is clicked. Y coordinate seems to be button Y center.
"/click left pack # done" is clicked ONLY if the container has a combine button. Y coordinate seems to be button Y center.
If the container does not have a "Combine" button:
"/click left pack # done" is NOT clicked. Y coordinate is off by approx. +30 from button Y center.

3) Modified EQUI_Container.xml
- No label
- No thumbnail
- No titlebar
- Slot positions and window size modified to accomodate the missing label and thumbnail.
- My favourite ;)
"/click left pack # combine" is NOT clicked. Y coordinate off by approx. -35 from button Y center.
"/click left pack # done" is NOT clicked if the container has a combine button. Y coordinate off by approx. -30 from button Y center.
If the container does not have a "Combine" button:
"/click left pack # done" is clicked. Y coordinate is off by approx. -5 from button Y center.

This is with MQ Version SRC-20030516

Hope all this helps to perhaps weed out the minor /click issues there still is :)

|| Napolion ||
a ghoul
a ghoul
Posts: 96
Joined: Sat Dec 28, 2002 7:45 am

Post by || Napolion || » Sat Jun 07, 2003 8:47 am

Got a problem with /click left pack # done.
Whan it's not a 10 slot bag the /click will click belowe the bag, by the missing slots.

kagonis
a hill giant
a hill giant
Posts: 228
Joined: Sat May 24, 2003 8:48 pm

Post by kagonis » Sat Jun 07, 2003 9:29 am

Ah yes, all the bags (and combiners) tested on was 10 slot.

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Sat Jun 07, 2003 9:54 am

Now that's strange. Hit "combine" and "done" fine for a 4 slot Lexicon. Changed to a normal backpack, and couldn't hit "done". However, on that same pack I was able to /click left pack 6 combine.... and hit the "done" button.

This is using the default EQUI_Container file with the title bar turned off.

Apparently the parser is adding in space for the Combine button even if no such button exists. This is happening because combiners and containers use the same XML file, and that file contains coordinates for the Combine button even if your pack doesn't show one.

Shark, if you read this, can you take a look at your modification and see if we can't fix that? If not I'll poke at it... well, got guests coming in from out of town Monday, be weeks before I can get to it.
MQ2: Think of it as Evolution in action.

Shark
a lesser mummy
a lesser mummy
Posts: 47
Joined: Wed May 21, 2003 12:23 pm

Post by Shark » Sat Jun 07, 2003 6:41 pm

[Qoute]
This is with MQ Version SRC-20030516
[/Quote]

When the revised EQUI_Mouse.cpp was updated in CVS on 20030528 the MQ Version was not changed, so you may not have the correct version to parse the locations. The adjustments are only applied when using the mouseloc descriptions, not when specifying the button by name.

Ok, had previously noted that did not know how to tell if pack had combiner button so could not adjust for it. I have now found it. In the _ITEMINFO structure there are 2 fields defined, Type and Size. If the Type is pack then the Size field identifies what kind of pack instead of the size.
So here is the revised code to adjust location for combine button also if done button of pack selected. It will now reject an attempt to press the combine button on a pack that is not a combiner.

Make sure you are using version 1.4 of the EQUI_Mouse.cpp code from cvs before applying this.

Code: Select all

		// TODO: find out whether pack is a combiner
		// If pPack->Type == ITEMTYPE_PACK
		// then pPack->Size identifies whether it is combiner not the size
		//	01 = normal combiner
		//	02 = quest combiner
		//	00 = summoned pack - not combiner
		//	03 = normal pack - not combiner
		if (Bank==0)
		{
			if (!(pPack = pCharInfo->Inventory[22+Pack]))
			{
				DebugSpew("No item pointer for pCharInfo->Inventory[%d]",22+Pack);
				return FALSE;
			}
		}
		else
		{
			if (!(pPack = pCharInfo->Bank[Pack]))
			{
				DebugSpew("No item pointer for pCharInfo->Bank[%d]",Pack);
				return FALSE;
			}
		}
		if (pPack->Type != ITEMTYPE_PACK)
		{
			DebugSpew("Pack access attempted on nonPack in mouseloc: %s",szMouseLoc);
			return FALSE;
		}
		Max_Slots = pPack->Container.Slots;
		Combiner = pPack->Size;
		DebugSpew("Pack has %d Slots and Combiner type %d",Max_Slots,Combiner);
		if ((Combiner==1) || (Combiner==2)) {
			Combiner = 0;
		} else {
			Combiner = 20;
		}

		if (Bank==0)
		{ // not a bank bag
			sprintf(szPack,"inv_pack%d",Pack);
		}
		else
		{ // a bank bag - both bank sizes name bags same
			sprintf(szPack,"bank_pack%d",Pack);
		}
		if (!strnicmp(szArg3,"done",4))
		{
			Adjust_y = Combiner + (((10 - Max_Slots) / 2) * 40);
			sprintf(ClickLocation,"%s_done",szPack);
			DebugSpew("Pack %s Offset for Done = %d",ClickLocation,Adjust_y);
			DebugSpew("Mouse moved using mouseloc: [bank] pack %d done",Pack);
		}
		else if (!strnicmp(szArg3,"combine",7))
		{
			if (Combiner>0) {
				DebugSpew("Pack %d is not a Combiner",Pack);
				return FALSE;
			}
			Adjust_y = ((10 - Max_Slots) / 2) * 40;
			sprintf(ClickLocation,"%s_combine",szPack);
			DebugSpew("Pack %s Offset for Combine = %d",ClickLocation,Adjust_y);
			DebugSpew("Mouse moved using mouseloc: [bank] pack %d combine",Pack);
		}
		else
		{
			Slot = atol(szArg3);
			if ((Slot < 0) || ((Slot + 1) > Max_Slots))
			{
				DebugSpew("Invalid Slot in pack: [bank] pack %d %d",Pack,Slot);
				return FALSE;
			}
			sprintf(ClickLocation,"%s_%d",szPack,Slot);
			DebugSpew("Mouse moved using mouseloc: pack %d %d",Pack,Slot);
		}

|| Napolion ||
a ghoul
a ghoul
Posts: 96
Joined: Sat Dec 28, 2002 7:45 am

Post by || Napolion || » Sun Jun 08, 2003 2:52 am

Just updatet to 1.4 and the problem went away.
Thanx

|| Napolion ||

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Sun Jun 08, 2003 11:10 am

Code: Select all

      else 
      { 
         Slot = atol(szArg3); 
         if ((Slot < 0) || ((Slot + 1) > Max_Slots)) 
         { 
            DebugSpew("Invalid Slot in pack: [bank] pack %d %d",Pack,Slot); 
            return FALSE; 
         } 
         sprintf(ClickLocation,"%s_%d",szPack,Slot); 
         DebugSpew("Mouse moved using mouseloc: pack %d %d",Pack,Slot); 
      }
	else if (!stricmp(szArg1,"button"))
	{ // user specified click location
		strncpy(ClickLocation,szArg2,MAX_STRING);
		DebugSpew("Mouse moved using user specified: button %s",szArg2);
	}
Compile error, else without matching if.

This is after copying the above code over.
MQ2: Think of it as Evolution in action.

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Sun Jun 08, 2003 3:33 pm

Never mind, figured it out while taking a break from remodelling... uploaded to CVS. Current EQLib_Mouse is now 1.5
MQ2: Think of it as Evolution in action.

|| Napolion ||
a ghoul
a ghoul
Posts: 96
Joined: Sat Dec 28, 2002 7:45 am

Click combine in mous v. 1.5

Post by || Napolion || » Tue Jun 10, 2003 6:46 pm

The click combine in mouse.cpp v. 1.5 dont work.

I have a mixing bowl with only 4 slots and it says that it is not a combine item.

Code: Select all

Pack has 4 Slots and Combiner type 63

Pack 7 is not a Combiner

Invalid mouse loc to click, aborting: pack 7 combine
This is from the log file. with the v 1.4 of the mouse.cpp there was not that problem.

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Thu Jun 12, 2003 11:16 am

Regressed... new version is 1.6. Removed the non-working fix above, but keeps the /click item stuff.
MQ2: Think of it as Evolution in action.