Go Back   EQEmulator Home > EQEmulator Forums > Development > Development: Custom Code

Development: Custom Code This is for code thatdoes not emulate live and wont be added to the official code.

Reply
 
Thread Tools Display Modes
  #1  
Old 06-26-2008, 06:58 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default Removing Non-Titanium Version Checks

Well, while I was adding in some new code posted in the code submission section by other people, I decided to investigate what it would take to change the order than the version checks get checked in so that it always checks for Titanium first. Currently, it checks for 6.2, then Titanium, the Aniversary, then Live and cycles through that continuously until it finds a match. It does this every time a person connects or zones and maybe in other cases as well. I searched for a while and finally located where that is set and it is in the /common/patches/patches.cpp file. At first I was just going to change the order, but after I did, I thought I would try just to see what happened if I commented the other versions out. Compiled the source and started the servers and it worked! I haven't seen a single error or issue so far that is related to removing the other version checks.

Here is what needs to be changes in /common/patches/patches.cpp:

Change this:
Code:
#include "../debug.h"
#include "patches.h"

#include "Client62.h"
#include "Titanium.h"
#include "Anniversary.h"
#include "Live.h"


void RegisterAllPatches(EQStreamIdentifier &into) {
	Client62::Register(into);
	Titanium::Register(into);
	Anniversary::Register(into);
	Live::Register(into);
}

void ReloadAllPatches() {
	Client62::Reload();
	Titanium::Reload();
	Anniversary::Reload();
	Live::Reload();
}
To this:
Code:
#include "../debug.h"
#include "patches.h"

#include "Titanium.h"
//#include "Client62.h"
//#include "Anniversary.h"
//#include "Live.h"


void RegisterAllPatches(EQStreamIdentifier &into) {
	Titanium::Register(into);
//	Client62::Register(into);
//	Anniversary::Register(into);
//	Live::Register(into);
}

void ReloadAllPatches() {
	Titanium::Reload();
//	Client62::Reload();
//	Anniversary::Reload();
//	Live::Reload();
}
Very simple fix to something that has bugged me for a while now. It probably doesn't make a huge difference, but I imagine it will reduce the size of the log files, since I have seen it cycle through all of those enough to cause MBs of log entries. I was also thinking that it could possible make a very slight improvement in client connections, since the checks will be done faster. And, maybe even a very slight improvement in server performance, since there are less things to be checked, which might make an impact on a server with a ton of players on it. Though, most likely, this change won't make much if any noticeable change overall. I just didn't like that it was checking for versions that aren't even supported anymore/yet. This can always be changed back at anytime very quickly and easily.

I didn't post this in the code submission forum because I doubt this is something the team would want to put in the source (or the would have changed it themselves long ago). But, I know a few people have asked about this and would probably appreciate the fix for it.

I will keep an eye out for any issues that might be related to this change, but I don't suspect any. I will also watch for any performance increases (doubtful) and post here if I see any.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
Old 06-26-2008, 11:37 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

If one of the mods/devs think this should be in code submissions, feel free to put it there. The more I think about it, the more sense it makes that this get set in the source. At least until some real progress is made towards Anniversary Edition or Live.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 06-26-2008, 11:55 PM
rojadruid
Discordant
 
Join Date: May 2005
Location: Smith Falls, Ontario, Canada
Posts: 283
Default

Quote:
Originally Posted by trevius View Post
If one of the mods/devs think this should be in code submissions, feel free to put it there. The more I think about it, the more sense it makes that this get set in the source. At least until some real progress is made towards Anniversary Edition or Live.

Droping 6.2 will probably not happen. too many people still use it. I myself use it.
__________________
Rojadruid

Innoruuk Server [legit]
Server Admin.
Server Status: UP
Reply With Quote
  #4  
Old 06-27-2008, 12:02 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

6.2 is not getting dropped.
Reply With Quote
  #5  
Old 06-27-2008, 12:07 AM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

how about a line in server ini file to tell server which version to look for, so it don't go looking for all 3 all the time?

all 3 will still be codded in, but it will only be looking for the one specified
Reply With Quote
  #6  
Old 06-27-2008, 12:34 AM
EvoZak
Sarnak
 
Join Date: May 2008
Location: Midwest
Posts: 72
Default

I thought you HAD to use Titanium? Looks like there is protocol support for other clients. Just code that never got removed, or...?
Reply With Quote
  #7  
Old 06-27-2008, 01:02 AM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

the 6.2 prtocol stil valid for people who had THAT patch to live which existed untill SPECIFIC DAY, and that patch can no longer be obtained by any means - thats why NOW titatium is your only option, but soem peopel stil have 6.2 stashed
Reply With Quote
  #8  
Old 06-27-2008, 03:27 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Well, leaving 6.2 in is easy enough, but the order can easily still be changed so that it checks for 7.0 first, since that is by far the most common one used.

The code would look like this:

Code:
#include "../debug.h"
#include "patches.h"

#include "Titanium.h"
#include "Client62.h"
//#include "Anniversary.h"
//#include "Live.h"


void RegisterAllPatches(EQStreamIdentifier &into) {
	Titanium::Register(into);
	Client62::Register(into);
//	Anniversary::Register(into);
//	Live::Register(into);
}

void ReloadAllPatches() {
	Titanium::Reload();
	Client62::Reload();
//	Anniversary::Reload();
//	Live::Reload();
}
I can certainly understand leaving 6.2 in there for the few that still use it, but at this time I see little need for the Anniversary or Live checks.

So far, I have still noticed 0 issues with having this on my server. I haven't seen any noticeable performance increases either, but it is still too early to tell. I think this change combined with the fix for the "lag bug" may at least help reduce log file sizes as well as maybe a very slight decrease in bandwidth utilization.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #9  
Old 06-27-2008, 04:28 AM
MNWatchdog
Hill Giant
 
Join Date: Feb 2006
Posts: 179
Default

Why not make it so it only does the check once upon logging in. People arent changing clients between zonings.
Reply With Quote
  #10  
Old 06-27-2008, 04:41 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I think zoning and logging in are done in similar processes. So, they are looked at pretty much the same way. In order to do what you mentioned, I think the client version would have to be written into a table somewhere so it would be stored and referenced later. But, that wouldn't be good if for any reason people were switching client versions and trying to use the same account.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #11  
Old 06-27-2008, 05:10 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

It already does the check only once and sticks the version used into the stream identifier and then uses that to decode and encode the data. It's not like we're doing a lookup on every packet that comes in, only on new connections.
Reply With Quote
  #12  
Old 06-27-2008, 08:59 AM
rojadruid
Discordant
 
Join Date: May 2005
Location: Smith Falls, Ontario, Canada
Posts: 283
Default

Quote:
Originally Posted by trevius View Post
Well, leaving 6.2 in is easy enough, but the order can easily still be changed so that it checks for 7.0 first, since that is by far the most common one used.

I can certainly understand leaving 6.2 in there for the few that still use it, but at this time I see little need for the Anniversary or Live checks.

Anniversary was just recently added in the last 4 to 6 months by FNW. I thought/think that it was due to some one working on it but I could be wrong. Live checks are there for the future as it can be re-named as/if we ever catch up to it and then it get past.
__________________
Rojadruid

Innoruuk Server [legit]
Server Admin.
Server Status: UP
Reply With Quote
  #13  
Old 06-27-2008, 08:18 PM
John Adams
Demi-God
 
Join Date: Jul 2006
Posts: 1,552
Default

Quote:
Originally Posted by rojadruid View Post
Anniversary was just recently added in the last 4 to 6 months by FNW.
Heh, it's been a helluva lot longer than 6 mos though that is only important to those holding their breath for newer client support.
Reply With Quote
Reply


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 05:58 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