Item appraisal drop fix

Submit code for osProse project.

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

Item appraisal drop fix

Postby Blah4 on Mon May 12, 2008 1:25 pm

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.
Blah4
ospRose dev team
ospRose dev team
 
Posts: 199
Joined: Sun Jan 06, 2008 12:05 pm
Location: The Netherlands

Re: Item appraisal drop fix

Postby pepu on Mon May 12, 2008 2:00 pm

thanks,testing atm
pepu
ospRose dev team
ospRose dev team
 
Posts: 283
Joined: Mon Feb 04, 2008 10:12 pm
Location: ESPAÑA(Aranjuez)

Re: Item appraisal drop fix

Postby PurpleYouko on Mon May 12, 2008 2:06 pm

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.
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4594
Joined: Fri Aug 10, 2007 2:05 pm

Re: Item appraisal drop fix

Postby Blah4 on Mon May 12, 2008 5:13 pm

Well are you going to let monsters drop santa and soccer gear? :/
Blah4
ospRose dev team
ospRose dev team
 
Posts: 199
Joined: Sun Jan 06, 2008 12:05 pm
Location: The Netherlands

Re: Item appraisal drop fix

Postby PurpleYouko on Mon May 12, 2008 5:46 pm

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.
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4594
Joined: Fri Aug 10, 2007 2:05 pm

Re: Item appraisal drop fix

Postby Blah4 on Mon May 12, 2008 5:50 pm

I guess if someone is planning to do so, he/she could just edit it so that those few item ID's are excluded.
^^
Blah4
ospRose dev team
ospRose dev team
 
Posts: 199
Joined: Sun Jan 06, 2008 12:05 pm
Location: The Netherlands


Return to Submit Code

Who is online

Users browsing this forum: No registered users and 1 guest

cron