Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-31-2002, 12:06 AM
Edgar1898
Senior Member
Former EQEmu Developer
Current EQ2Emu Lead Developer
 
Join Date: Dec 2002
Posts: 1,065
Default New Look to Client.cpp

I recoded Client.cpp from the beginning to make the code flow better and to get rid of the 10000 mile long if then else loop that it had. What I do was replaced that with a switch that sent you to the function that holds the commands. There are 8 functions each of them represents a status on the server. (Normal,Privuser,Vprivuser,Questtroupe,GM,LeadGM,S erverOP, and VHServerOp). Each other these functions contains only the information for their status. It starts at the highest level that you can access, then is flows downhill from there until it gets to a Normal User. Let me explain: Your a GM and you use the command #kill (somemob) instead of having to go through every command trying to find the one it was looking for (like the old version did), it simply calls the function for that status group, and it retrieves it much faster since it has about 80% less information to sort through. If the command is a lower status command, it then goes down a step in the status chain to the next rung, and it looks for it there, and so on until it gets to the lowest one. Since most users dont have access to the large list of commands at the top there was no reason to have them search through it. Okies Im done rambling on hehe time to goto bed Anyways to sum it up this will save quite a bit of time and overhead by using this method.

Add the following to client.h:
Code:
bool NormalUser(const char* message, const char* targetname);
	bool PrivUser(const char* message, const char* targetname);
	bool VeryPrivUser(const char* message, const char* targetname);
	bool QuestTroupe(const char* message, const char* targetname);
	bool NormalGM(const char* message, const char* targetname);
	bool LeadGM(const char* message, const char* targetname);
	bool ServerOP(const char* message, const char* targetname);
	bool VHServerOP(const char* message, const char* targetname);
Reply With Quote
 


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 09:20 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