Page 1 of 1

Item appraisal drop fix

PostPosted: Mon May 12, 2008 1:25 pm
by Blah4
Well I haven't tested it yet so it could be possible that it doesnt work perfect or that there is a little error somewhere, but still.
With this change blue items (and the occasional unique in pre evo, like the CF ones) have item appraisal 100% of the time and other items never.

in serverfunctions.cpp, find:

  1.        randv = RandNumber( 1, 100 );
  2.         if( randv < 30 )        // 30%
  3.             newdrop->item.stats = rand()%300;
  4.         newdrop->item.appraised = newdrop->item.stats==0?true:false;



and replace it with
  1.        if (newdrop->item.itemtype=2 && (newdrop->item.itemnum>300 && newdrop->item.itemnum<756))
  2.         {
  3.             newdrop->item.appraised = true;
  4.         }
  5.         else if (newdrop->item.itemtype=3 && (newdrop->item.itemnum>199 && newdrop->item.itemnum<656))
  6.         {
  7.              newdrop->item.appraised = true;
  8.         }
  9.         else if (newdrop->item.itemtype=4 && (newdrop->item.itemnum>199 && newdrop->item.itemnum<655))
  10.         {
  11.              newdrop->item.appraised = true;
  12.         }
  13.         else if (newdrop->item.itemtype=5 && (newdrop->item.itemnum>199 && newdrop->item.itemnum<656))
  14.         {
  15.              newdrop->item.appraised = true;
  16.         }
  17.         else if (newdrop->item.itemtype=8 && (newdrop->item.itemnum>491 && newdrop->item.itemnum<994))
  18.         {
  19.              newdrop->item.appraised = true;
  20.         }
  21.         else
  22.         {
  23.              newdrop->item.appraised = false;
  24.              randv = RandNumber( 1, 100 );
  25.              if( randv < 30 )        // 30%
  26.                  newdrop->item.stats = rand()%300;
  27.         }


I'm not sure if it works, I'll try it out soon.

Re: Item appraisal drop fix

PostPosted: Mon May 12, 2008 2:00 pm
by pepu
thanks,testing atm

Re: Item appraisal drop fix

PostPosted: Mon May 12, 2008 2:06 pm
by PurpleYouko
this isn't going to work on every item.
There are quite a few non-blue items listed at higher id numbers in almost every catagory.
All the special stuff (like santa suits and soccer gear) is up there as well.

The drops system that I will be incorporating into the code today already comes with full configurable control over extra stats conversion rates anyway.

Re: Item appraisal drop fix

PostPosted: Mon May 12, 2008 5:13 pm
by Blah4
Well are you going to let monsters drop santa and soccer gear? :/

Re: Item appraisal drop fix

PostPosted: Mon May 12, 2008 5:46 pm
by PurpleYouko
Not specifically but I have had monsters drop stuff like swimsuits or snowboards occasionally for special event :)

Your code will work just fine. I'm just making the point that you aren't covering all eventualities with it.

Re: Item appraisal drop fix

PostPosted: Mon May 12, 2008 5:50 pm
by Blah4
I guess if someone is planning to do so, he/she could just edit it so that those few item ID's are excluded.
^^