Minor bug w/ $merchant(has,xxx), big bug w/ $corpse

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

Moderator: MacroQuest Developers

MacroFiend
a grimling bloodguard
a grimling bloodguard
Posts: 662
Joined: Mon Jul 28, 2003 2:47 am

Minor bug w/ $merchant(has,xxx), big bug w/ $corpse

Post by MacroFiend » Wed Oct 15, 2003 1:47 pm

I noticed this last night while working w/ $corpse and $merchant.

$merchant(has,firstpartofitemname) will return true when it probably shouldn't.

Example: Go to a small plate merchant and do /echo $merchant(has,small).

Without a "similar" option, I would expect it to return false in a case like that because there is not an item named "Small". Instead, it matches the first item that starts with Small. "Small Plate Gauntlet Mold" or something similar.

That's the small $merchant bug. Now for the big $corpse bug (and I tried this with the 20031015 codebase before and after my $corpse mod and it CTD both times).

It appears that the window struct isn't quite the same for the loot window as it is for the merchant. It detects the window open/closed w/ $corpse() fine but as soon as you try to iterate through the items i.e. $corpse(has,xxx), you CTD when it attempts to pull pLootWnd->ItemDesc->Item->Name. I added a DebugSpew inside the loop before the comparison attempt to confirm it died there.

Even with $corpse(empty) where it was just checking to see if there was an item living there caused a CTD which makes no sense if the window struct is aligned properly.

Anyhow, I'm reaching the end of my depth when getting in to the structs, so I ask for some assistance in tracking down this one.

EqMule
Developer
Developer
Posts: 2697
Joined: Fri Jan 03, 2003 9:57 pm
Contact:

Post by EqMule » Wed Oct 15, 2003 2:46 pm

ok i can fix that.
My status o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received Image donations for this month's patches.

Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.

EqMule
Developer
Developer
Posts: 2697
Joined: Fri Jan 03, 2003 9:57 pm
Contact:

Post by EqMule » Wed Oct 15, 2003 7:49 pm

fixed the "big" bug and cvsed it as well as updated the zip on the downloads page, the "small" bug I want you to fix. ;)
My status o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received Image donations for this month's patches.

Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.