Page 1 of 1

sell bag bug

PostPosted: Wed Apr 28, 2004 1:52 pm
by SDonald
Drocket,
I will post bugs I find although I am not sure you read this forum anymore..

There is a problem with the sell bag command. If you have a stack of items, the stack will sell for the price of one item.


merchant_sell_bag.src
line 104 ff

Code: Select all
if (itemprice)
  if (DestroyItem (item))
    totalsale := totalsale + (itemprice * item.amount);


You are destroying the stack but still expecting to know the .amount
This could read:
Code: Select all
if (itemprice)
      itemamount := item.amount;
      if (DestroyItem (item))
         totalsale := totalsale + (itemprice * itemamount);

For the sake of being complete, also include this at line 98:
Code: Select all
var itemamount;

PostPosted: Wed Apr 28, 2004 6:40 pm
by Drocket
Sorry about not replying too often. I tend to have quite a few more pressing things to deal with most of the time :) Anyway, I already fixed this bug. I guess I need up update the WOD files before too much longer, since I've also fixed a pretty good number of other bugs and potential exploits... Probably in the next few days.