Page 1 of 1

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

Posted: Wed Oct 15, 2003 1:47 pm
by MacroFiend
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.

Posted: Wed Oct 15, 2003 2:46 pm
by EqMule
ok i can fix that.

Posted: Wed Oct 15, 2003 7:49 pm
by EqMule
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. ;)