Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 06-13-2008, 12:21 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Sweet! I will definitely try to get this added to my unofficial updates for the 1110e release. Of course, I will make sure to run some tests on it before posting the new version. Looks like we might have a new coder out to help fix some issues I will test out your LoS agro changes too and see how it works. That one seems complex to fix since you don't want things agroing through walls in separate rooms. If it seems pretty good, I will try to get that one added as well.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
Old 06-13-2008, 02:07 AM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

greggg, do you know if this will also affect the "salerate" field in "items" table of the DB, which suposely should control... SOMETHING price related?

if yes, then how?
Reply With Quote
  #3  
Old 06-13-2008, 02:26 AM
greggg230
Fire Beetle
 
Join Date: Jun 2008
Location: Vegas
Posts: 17
Default

Quote:
Originally Posted by ChaosSlayer View Post
greggg, do you know if this will also affect the "salerate" field in "items" table of the DB, which suposely should control... SOMETHING price related?

if yes, then how?
From everything I can tell, it does nothing. It's probably an obsolete variable at this point. It's not clear what it might have done in the past. Unless I'm missing something faction, charisma, and the base price of an item should be the only variables needed to determine actual price.

Fine Steel Short Sword has a value of 5500, and I was able to accurately predict its sell and buy prices without even knowing about sellrate. Its sellrate is 9, apparently.

Someone please correct me if I'm wrong, though.
Reply With Quote
  #4  
Old 06-13-2008, 02:32 AM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

i was under impression, that 'salerate' was some sort of an option to set a custom sell back for each specific item - could realy be usefull in order to create items which would sell back for 100% base price (i can think for dozen fo reason for having such items) - or at least its the only logical explation that coudl posibly fit the description of the field name.

of course the thing never worked, so... =)

but it would be nice to have it actualy working this way =)
(could also be interesting to have item which would sell back for ABOVE base price - again for various reasons) =)
Reply With Quote
  #5  
Old 06-13-2008, 10:09 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

Moving to submission. To make it easier on KLS/Scorp, could you diff your changes?
Reply With Quote
  #6  
Old 06-13-2008, 01:21 PM
greggg230
Fire Beetle
 
Join Date: Jun 2008
Location: Vegas
Posts: 17
Default

Quote:
Originally Posted by cavedude View Post
Moving to submission. To make it easier on KLS/Scorp, could you diff your changes?
Sure.

Line 3717 of zone/client_packet.cpp should be changed from:

Code:
mco->rate = 1.6;
to

Code:
mco->rate = 1/(.884*Client::CalcPriceMod(tmp,true));
line 3842 of zone/client_packet.cpp should be changed from:

Code:
mpo->price = (item->Price*127/100)*mp->quantity;
to

Code:
mpo->price = (item->Price*(1/.884)*Client::CalcPriceMod(tmp,false))*mp->quantity;
line 3947 of zone/client_packet.cpp should be changed from:

Code:
price=(int)((item->Price*mp->quantity)*.884);
to

Code:
price=(int)((item->Price*mp->quantity)*.884*Client::CalcPriceMod(vendor,true)+0.5); // need to round, because client does it automatically when displaying price
line 4001 of zone/client_packet.cpp should be changed from:

Code:
inst2->SetPrice(item->Price*127/100);
to

Code:
inst2->SetPrice(item->Price*(1/.884)*Client::CalcPriceMod(vendor,false));
in zone/client_process.cpp, the following should be moved from 878 to 804:

Code:
Mob* merch = entity_list.GetMobByNpcTypeID(npcid);
line 831 of zone/client_process.cpp should be changed from:

Code:
inst->SetPrice(item->Price*127/100);
to

Code:
inst->SetPrice((item->Price*(1/.884)*Client::CalcPriceMod(merch,false)));
line 862 of zone/client_process.cpp should be changed from:

Code:
inst->SetPrice(item->Price*127/100);
to

Code:
inst->SetPrice((item->Price*(1/.884)*Client::CalcPriceMod(merch,false)));
Reply With Quote
  #7  
Old 06-13-2008, 01:50 PM
Aramid
Discordant
 
Join Date: May 2006
Posts: 356
Default

Quote:
Originally Posted by cavedude View Post
Moving to submission. To make it easier on KLS/Scorp, could you diff your changes?
CD, for those of us who used to be WinDoze users, can you tell us what the correct Syntax is to create a diff file?

Thanks
__________________
Random Segments of Code....
Reply With Quote
  #8  
Old 06-17-2008, 12:45 PM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default

Another great fix. Keep up the great work, Greg! =)
Reply With Quote
  #9  
Old 06-17-2008, 02:49 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Quote:
Originally Posted by Aramid View Post
CD, for those of us who used to be WinDoze users, can you tell us what the correct Syntax is to create a diff file?

Thanks
In Linux, diff is integrated in the os. You can make diffs/patches via command line. There are also some very nice graphical interfaces you can add, that help you see even better (kompare, xxdiff).
When I first started here at EqEmu, I couldn't for the best of me, get the source to compile under my windows box. So I took it to my Linux box where I had little trouble there - it was better this happened to me, because Linux Distros usually come "developer ready" and have all these neat tools like diff, kompare, compilers, etc. They are all just as available as my "dir" or "copy" command in windows.
I think I'm gonna try windows compile again with that new compiler package that's posted here, just for the challenge.
Anyways, you usually can google what you need for windows - I just googled "diff program for windows xp", and came up with a whole swarm of stuff. The diff toolshould be self explanatory on how you present it here.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 11:45 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3